[alsa-devel] Plug plugin not working on Raspberry Pi.

Krzysztof Adamski k at japko.eu
Fri Jul 13 09:38:14 CEST 2012

for a couple of days I'm trying to figure out problems with ALSA on 
Raspberry Pi. It turned out that for some reason, plug plugin is not 
working as expected. Id does work correctly when I'm using PCM 
configuration that can be handled directly by HW but any other 
configuration (like unsuported format, more channes etc) fails with 
"Invalid argument" on snd_pcm_hw_params.

It's not my code that fails because of this by it's both mplayer and 
VLC. Both snd_pcm_hw_params_set_format and snd_pcm_hw_params_test_format 
(and other similar functions) does not return error. Only when 
snd_pcm_hw_params is run, there is one.

I'm using Debian Wheezy, with ALSA 1.0.25 with all default ALSA 
configuration. ALSA drivers for RPi are not in mainline kernel but they 
can be viewed here:
https://github.com/raspberrypi/linux/tree/rpi-patches/sound/arm (it's 
bcm2835). Card capabilities seems to be described correctly:

static struct snd_pcm_hardware snd_bcm2835_playback_hw = {
.rate_min = 8000,
.rate_max = 48000,
.channels_min = 1,
.channels_max = 2,
.buffer_bytes_max = (4 * 8 - 1) * 1024, /* Needs to be less than 
audioplay buffer size */
.period_bytes_min = 1 * 1024,
.period_bytes_max = (4 * 8 - 1) * 1024,
.periods_min = 1,
.periods_max = 4 * 8 - 1,

So, I would like someone to help me investigate if it's a userspace or 
driver BUG and how to fix this. I will be happy to provide any 
information that is needed for debug, test patches, recompile with some 
debugin enabled etc.

More information about the Alsa-devel mailing list