DMA_AUTOINIT missing in asm-sparc64/dma.h
I was going to test out various PCI sound cards I've had lying around when I noticed that DMA_AUTOINIT isn't defined in asm-sparc64/dma.h like it is in other archs... most archs defined it as 2 while arm defines it as 4.
CC [M] sound/oss/dmabuf.osound/oss/dmabuf.c: In function `sound_start_dma':sound/oss/dmabuf.c:155: warning: implicit declaration of function `disable_dma'sound/oss/dmabuf.c:156: warning: implicit declaration of function `clear_dma_ff'sound/oss/dmabuf.c:157: warning: implicit declaration of function `set_dma_mode'sound/oss/dmabuf.c:158: warning: implicit declaration of function `set_dma_addr'sound/oss/dmabuf.c:159: warning: implicit declaration of function `set_dma_count'sound/oss/dmabuf.c:160: warning: implicit declaration of function `enable_dma'sound/oss/dmabuf.c: In function `DMAbuf_get_buffer_pointer':sound/oss/dmabuf.c:653: warning: implicit declaration of function `get_dma_residue'sound/oss/dmabuf.c: In function `local_start_dma':sound/oss/dmabuf.c:943: error: `DMA_AUTOINIT' undeclared (first use in this function)sound/oss/dmabuf.c:943: error: (Each undeclared identifier is reported only oncesound/oss/dmabuf.c:943: error: for each function it appears in.) make[2]: *** [sound/oss/dmabuf.o] Error 1
make[1]: *** [sound/oss] Error 2
make: *** [sound] Error 2
/usr/src/linux $ grep -nR DMA_AUTOINIT . ./arch/arm/kernel/dma-isa.c:31:#define ISA_DMA_AUTOINIT 0x10./arch/arm/kernel/dma-isa.c:121: if (dma->dma_mode &DMA_AUTOINIT)./arch/arm/kernel/dma-isa.c:122: mode |=ISA_DMA_AUTOINIT;
./include/asm-ppc64/dma.h:150:#define DMA_AUTOINIT 0x10
./include/asm-m68k/apollodma.h:120:#define DMA_AUTOINIT 0x10
./include/asm-parisc/dma.h:43:#define DMA_AUTOINIT 0x10
./include/asm-mips/dma.h:151:#define DMA_AUTOINIT 0x10
./include/asm-ppc/dma.h:176:#define DMA_AUTOINIT 0x10
./include/asm-x86_64/dma.h:135:#define DMA_AUTOINIT 0x10
./include/asm-arm/dma.h:23:#define DMA_AUTOINIT 4
./include/asm-alpha/dma.h:197:#define DMA_AUTOINIT 0x10
./include/asm-i386/dma.h:135:#define DMA_AUTOINIT 0x10
./include/asm-arm26/dma.h:77:#define DMA_AUTOINIT 4
./include/asm-sh/mpc1211/dma.h:135:#define DMA_AUTOINIT 0x10
./include/asm/dma.h:135:#define DMA_AUTOINIT 0x10./sound/oss/dmabuf.c:943: sound_start_dma(dmap,dmap->raw_buf_phys, dmap->bytes_in_use, dma_mode | DMA_AUTOINIT); ./sound/oss/os.h:48:#undef PSEUDO_DMA_AUTOINIT ./sound/pci/ice1712/ice1712.h:210:#define ICE1712_DMA_AUTOINIT 0x10./sound/pci/ice1712/ice1712.c:595: outb(ICE1712_DMA_MODE_WRITE |ICE1712_DMA_AUTOINIT, ice->ddma_port + 0x0b); <./sound/isa snipped>
Quoted 4 lines · On Sat, 26 Jun 2004 03:11:23 -0700 Jeremy Huddleston <[email protected]>…
I was going to test out various PCI sound cards I've had lying around when I noticed that
DMA_AUTOINITisn't defined inasm-sparc64/dma.hlike it is in other archs... most archs defined it as 2 while arm defines it as 4.
These pieces of code you are trying to compile are attempting to do ISA DMA controller programming. Such things do not exist on Sparc.
I never get these errors and I have a large number of PCI sound cards enabled in my config, which is arch/sparc64/defconfig BTW.
Which card are you enabling in the build?
Quoted 8 lines · David S. Miller
Quoted 4 lines · On Sat, 26 Jun 2004 03:11:23 -0700 Jeremy Huddleston <[email protected]>…
I was going to test out various PCI sound cards I've had lying around when I noticed that
DMA_AUTOINITisn't defined inasm-sparc64/dma.hlike it is in other archs... most archs defined it as 2 while arm defines it as 4.
Quoted 6 lines
These pieces of code you are trying to compile are attempting to do ISA DMA controller programming. Such things do not exist on Sparc.
I never get these errors and I have a large number of PCI sound cards enabled in my config, which is
arch/sparc64/defconfigBTW.
arch/sparc64/defconfig does not enable OSS which is why you haven't noticed this problem.
Quoted 1 line
Which card are you enabling in the build?
dmabuf.o (which has the reference to DMA_AUTOINIT) is compiled regardless of which oss modules you select. I caught this with just emu10k1, es1370, and es1371 selected under OSS.
Quoted 5 lines · On Sat, 26 Jun 2004 12:17:37 -0700 Jeremy Huddleston <[email protected]>…
Quoted 1 line
Which card are you enabling in the build?
dmabuf.o (which has the reference to
DMA_AUTOINIT) is compiled regardless of which oss modules you select. I caught this with just emu10k1, es1370, and es1371 selected under OSS.
There are perfectly compilable ALSA drivers for these cards, why not use those?
Yes, the OSS layer does a lot of PC-centric stuff, better to stick with the ALSA drivers as I do watch over them for portability when changes are made.
Quoted 11 lines · David S. Miller
Quoted 5 lines · On Sat, 26 Jun 2004 12:17:37 -0700 Jeremy Huddleston <[email protected]>…
Quoted 1 line
Which card are you enabling in the build?
dmabuf.o (which has the reference to
DMA_AUTOINIT) is compiled regardless of which oss modules you select. I caught this with just emu10k1, es1370, and es1371 selected under OSS.There are perfectly compilable ALSA drivers for these cards, why not use those?
Because I was having trouble with the alsa drivers, so I thought I'd give the oss drivers a try...
Quoted 3 lines
Yes, the OSS layer does a lot of PC-centric stuff, better to stick with the ALSA drivers as I do watch over them for portability when changes are made.
Yeah, I figure that's a safe bet... I just wanted to check it out... perhaps the Kconfig should be updated to exclude OSS as a selectable option on sparcs since it won't even compile because of the PC-centric stuff.
And an odd thing I've noticed with my es1371 (Ensoniq 5880 AudioPCI (rev 02)) card... I can use it through the OSS emulation layer, but I can't use alsa-specific applications with it... ie. I can use aumix/sox but not alsamixer/aplay. I'm going to try updating alsa-{lib,utils} from 1.0.4 to 1.0.5 right now, but I don't think that's the problem...
Quoted 5 lines · On Sat, 26 Jun 2004 15:22:58 -0700 Jeremy Huddleston <[email protected]>…
And an odd thing I've noticed with my es1371 (Ensoniq 5880 AudioPCI (rev 02)) card... I can use it through the OSS emulation layer, but I can't use alsa-specific applications with it... ie. I can use aumix/sox but not alsamixer/aplay. I'm going to try updating alsa-{lib,utils} from 1.0.4 to 1.0.5 right now, but I don't think that's the problem...
Probably errors in the 32-bit compat layer. I bet if you build the alsa apps native 64-bit they work.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Quoted 3 lines · David S. Miller
Yes, the OSS layer does a lot of PC-centric stuff, better to stick with the ALSA drivers as I do watch over them for portability when changes are made.
On a side note, has cs4231 ever been at a point in the 2.5 or 2.6 kernels where it has been usable? It'll compile, build and load fine at least for PCI systems (SBUS is hit and miss whether it'll build but that's more typically core ALSA components) but the audio produced is never understandable. On PCI I have tried turning on all of the debugging options but it doesn't seem to generate any helpful errors.
Thanks,
- --
Jason Wever
Gentoo/Sparc Co-Team Lead
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
iD8DBQFA3gXmdKvgdVioq28RAqiAAJ4mHIPxGAwWh8DWeKSb2AFup+fszACdFPl9 4TAie6t4aH1gnqfdmX80svo=sqKP
-----END PGP SIGNATURE-----
Quoted 6 lines · On Sat, 26 Jun 2004 17:25:24 -0600 (MDT) Jason Wever <[email protected]> wrote:
On a side note, has cs4231 ever been at a point in the 2.5 or 2.6 kernels where it has been usable? It'll compile, build and load fine at least for PCI systems (SBUS is hit and miss whether it'll build but that's more typically core ALSA components) but the audio produced is never understandable. On PCI I have tried turning on all of the debugging options but it doesn't seem to generate any helpful errors.
I had it %90 working mid-2.5.x, but I simply haven't fiddled with it since. I also lack any interesting in working on it as I have my hands full with enough other things at the moment. :)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Quoted 3 lines · David S. Miller
I had it %90 working mid-2.5.x, but I simply haven't fiddled with it since. I also lack any interesting in working on it as I have my hands full with enough other things at the moment. :)
Gotcha. Are there any resources on-line or otherwise that could be used by others to help get this working? I'm interested in getting it working but I'm thinking my enthusiasm outweighs my coding skills at the moment :)
Also were the ALSA folks been much involved with the work on the driver in the 2.5 days and if so, is there someone good to follow-up with over there?
Thanks,
- --
Jason Wever
Gentoo/Sparc Co-Team Lead
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
iD8DBQFA3gfPdKvgdVioq28RAmNcAJ9tkPq6+Irw9qaX6aCPodmE80n+rgCgn7v9 J2NwowMQscep7+xpv78rCBo=+AoH
-----END PGP SIGNATURE-----
Quoted 3 lines · On Sat, 26 Jun 2004 17:33:33 -0600 (MDT) Jason Wever <[email protected]> wrote:
Gotcha. Are there any resources on-line or otherwise that could be used by others to help get this working? I'm interested in getting it working but I'm thinking my enthusiasm outweighs my coding skills at the moment :)
The best reference is the 2.4.x driver. The netbsd driver is not a bad refernce either.
The EBUS DMA engine is documented at:
http://www.sun.com/oem/products/manuals/802-7837.pdf
And that's likely where the problem are, the DMA controller and the CS4321 chip aren't sync'ing up correctly. That was the most difficult part of the driver to get right.
Quoted 3 lines
Also were the ALSA folks been much involved with the work on the driver in the 2.5 days and if so, is there someone good to follow-up with over there?
None at all, I wrote it all by myself using the ALSA ISA cs432x driver as a guide.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Quoted 6 lines · David S. Miller
The best reference is the 2.4.x driver. The netbsd driver is not a bad refernce either.
The EBUS DMA engine is documented at:
Cool, thanks for the pointers!
- --
Jason Wever
Gentoo/Sparc Co-Team Lead
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
iD8DBQFA3gtFdKvgdVioq28RAipTAJ0ZEnHQfTBTdM84qS+kJTpxQiEjJgCeOiJh tVP4fhKs+PjhhocN7eVS7WwlLO
-----END PGP SIGNATURE-----