[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: ALSA Driver for Sparc DBRI chips


I was able to get a working 2.4.28 kernel today, and even got sound
with alsa 1.0.7 and the dbri code. I applied the patch below to
the ALSA code, but as Takashi indicated this is probably not essential for
the driver to work.

Takashi, Jaroslav, please see if the patch below has your approval and can
be included.

Hendrik, can you confirm that 'aplay -vv' shows continuous output being send?

If so, could you try the following:
1) Try not to load the snd-sun-amd7930 module. There may be an interaction
issue between the two drivers, causing both not to work.
2) Add the dbi_debug parameter when loading the module:
modprobe snd-sun-dbri dbri_debug=7
and post the data dumped in /var/log/syslog.
When playing a file more data will be dumped here.

Sorry for the delay in responding. I ended up on sparc64 machines last
week, which don't have this chipset.


On Tue, Dec 07, 2004 at 05:54:41PM +0100, Hendrik Sattler wrote:
> Am Montag, 6. Dezember 2004 20:17 schrieb Hendrik Sattler:
> > Am Sonntag, 21. November 2004 12:34 schrieb Martin Habets:
> > > I have been working on an ALSA driver for the DBRI/CS4215 chip
> > > combo found in Sparc machines. It is a port of the 2.5 OSS driver.
> >
> > After setting the defines from pci_* to NULL and recompiling, it now loads.
> > I try playback later and capture later, any suggestion for good console
> > alsa applications? How do I toggle switches with alsamixer, same as muting?
> I used alsamixer to set the volume and tried aplay to play a WAV file. 
> However, no success: nothing can be heard, neither with snd-sun-amd7930 nor 
> with snd-sun-dbri. Maybe assigning NULL causes this? I really have no idea 
> about kernel or sound programming...
> HS


Not all machines have a PCI bus. Pre-2.6 kernels on those machines fail to
load the snd-page-alloc.o module. This patch fixes this for SPARC machines
that have an SBUS.

        Signed-off-by: Martin Habets <errandir_news@mph.eclipse.co.uk>

--- alsa-driver-1.0.7/acore/memalloc.c.orig2	2004-12-19 00:22:08.000000000 +0000
+++ alsa-driver-1.0.7/acore/memalloc.c	2004-12-19 13:41:29.662624656 +0000
@@ -123,8 +123,15 @@
 /* for 2.2/2.4 kernels */
+#ifdef CONFIG_PCI
 #define dma_alloc_coherent(dev,size,addr,flags) pci_alloc_consistent((struct pci_dev *)(dev),size,addr)
 #define dma_free_coherent(dev,size,ptr,addr) pci_free_consistent((struct pci_dev *)(dev),size,ptr,addr)
+#define dma_alloc_coherent(dev,size,addr,flags) sbus_alloc_consistent((struct sbus_dev *)(dev),size,addr)
+#define dma_free_coherent(dev,size,ptr,addr) sbus_free_consistent((struct sbus_dev *)(dev),size,ptr,addr)
+#error "Need a bus for dma_alloc_coherent()"
 #endif /* >= 2.6.0 */

Reply to: