[alsa-devel] Assert in pcm_params.c

Raymond Yau superquad.vortex2 at gmail.com
Mon Apr 20 09:08:55 CEST 2015


> > > Hi,
> > >
> > > The following assert is being hit in pcm_params.c:
> > >
> > > "pcm_params.c:2249: snd1_pcm_hw_params_slave: Assertion `err >= 0'>
> > > failed."
> >
> > > This is from a developer using Portaudio in his own application; I
have
> > > yet to ascertain full details, but it is trying successive sample
rates to
> > > see which are valid.
> > >
> > > Does this point to a flaw in the configuration or possibly a bug in
> > > Alsa-lib or can it occur just as a result of misuse of the Alsa API?

> >
> >
http://www.alsa-project.org/alsa-doc/alsa-lib/group___p_c_m___h_w___params.
> >html
> >
> > Only snd_pcm_hw_params_test_rate() can be call multiple times,
> > Verify if a rate is available inside a configuration space for a PCM.
> >
> > Those snd_pcm_hw_params_ser_rate*  functions restrict the configuration
> > space to one rate and can be called once only
>
> The stream is being opened and closed at each attempt.

Seem Delta 44 does not support 2,4,6 or 8 channels

aplay --dump-hw-params -Dhw:CARD=M44 any.wav

Do both channel min and channel max > 8 ?

https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/tree/sound/pci/ice1712/delta.c

https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/tree/sound/pci/ice1712/ice1712.c

rates = SNDRV_PCM_RATE_CONTINUOUS | SNDRV_PCM_RATE_8000_48000,
.rate_min = 4000,
.rate_max = 48000,

If the driver really support any rate between 4000Hz and 48000Hz, the list
of supported rates has 48000-4000+1 entries


More information about the Alsa-devel mailing list