[alsa-devel] using plug for sample format conversion

Adam Rosenberg adam at alcorn.com
Wed Jul 28 00:17:08 CEST 2010


I am trying to use plug to play audio files that are S16_LE but my
hardware only supports S32_LE.  It is not working.  Here is an example
of the problem using speaker-test.  First I use S32_LE and it works as
expected.  I then try S16_LE but it fails.  Does this mean the plug
plugin cannot convert between these sample formats?

Thanks,
Adam

root:/> speaker-test -l 1 -r 48000 -c 2 -F S32_LE -Dplughw:0,0,0

speaker-test 1.0.12

Playback device is plughw:0,0,0
Stream parameters are 48000Hz, S32_LE, 2 channels
Using 16 octaves of pink noise
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 1 to 4096
Period size range from 1 to 4096
Using max buffer size 4096
Periods = 4
was set period_size = 1024
was set buffer_size = 4096
 0 - Front Left
 1 - Front Right
Time per period = 5.844000

root:/> speaker-test -l 1 -r 48000 -c 2 -F S16_LE -Dplughw:0,0,0

speaker-test 1.0.12

Playback device is plughw:0,0,0
Stream parameters are 48000Hz, S16_LE, 2 channels
Using 16 octaves of pink noise
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 1 to 4096
Period size range from 1 to 4096
Using max buffer size 4096
Periods = 4
was set period_size = 1024
was set buffer_size = 4096
Unable to set hw params for playback: Invalid argument
Setting of hwparams failed: Invalid argument


More information about the Alsa-devel mailing list