[alsa-devel] OSS app works but aplay does not with SNDRV_PCM_FMTBIT_U32_LE

Steve Strobel steve.strobel at link-comm.com
Tue Sep 18 20:38:24 CEST 2007

I am developing an ALSA driver for the AD1938 codec on uClinux for 
Blackfin (I don't believe my problem is specific to that 
platform).  When I set up the snd_pcm_hardware_t structure with

   .formats =          SNDRV_PCM_FMTBIT_S32_LE,

I can run both "aplay < /dev/urandom" and an OSS test application 
("tone") that sends a sine wave, but the sine wave is "inside out" 
(see <http://www.link-comm.com/temp/inside_out.gif> for a screen 
shot) because the codec needs unsigned data.

If I set up the snd_pcm_hardware_t structure with

   .formats =          SNDRV_PCM_FMTBIT_U32_LE,

the OSS test application sends a nice sine wave, but aplay fails with 
the following messages:

root:~> aplay < /dev/urandom
ALSA sound/blackfin/ad1836.c:1050: snd_ad1836_playback_open
Playing raw data 'stdin' : Unsigned 8 bit, Rate 8000 Hz, Mono
ACCESS = 00000000ffffffffffffffff -> 0000000000000008
FORMAT = 0000000000000400 -> 0000000000000000
ACCESS = 333f8fc000a32c60c0333f8fc -> 333f8fc000a00000008
ALSA lib ALSA sound/blackfin/ad1836.c:1172: snd_ad1836_hw_free
../../../src/pcm/pcm_params.c:2152:(snd_pcm_hw_refine_slave) Slave 
PCM not usable
aplay: set_params:882: Broken configuration for this PCM: no 
configurations available

I am working my way through the ALSA source, but I have not yet 
figured out why aplay won't work with the unsigned codec 
configuration.  Any suggestions?


P.S.  A more complete log of the console output with both settings 
for those commands and most of the info from aadebug can be found at 
the following URLs:

Steve Strobel
Link Communications, Inc.
1035 Cerise Rd
Billings, MT 59101-7378
(406) 245-5002 ext 102
(406) 245-4889 (fax)
WWW: http://www.link-comm.com
MailTo:steve.strobel at link-comm.com

More information about the Alsa-devel mailing list