[alsa-devel] Recording problem with ALSA: trying to set up some constraints

Clemens Ladisch clemens at ladisch.de
Thu May 22 13:03:33 CEST 2008

Sedji Gaouaou wrote:
> I have a problem with my recording driver.
> I have set up a pcm_hardware structure in which I define the format
> supported by my hardware:
> ...
>     .formats        = (SNDRV_PCM_FMTBIT_S16_LE
>                    | SNDRV_PCM_FMTBIT_S16_BE
>                    | SNDRV_PCM_FMTBIT_S20_3LE
>                    ...
> Then in my open function I pass it to the runtime struct.
> Nevertheless if  I try to run arecord with this option: arecord -d 1
> test.wav, I will have a kernel oops.
> The default format is U8, but it is not supported by my Hardware, abd it
> is not defined in my structure, so I though that it should exit arecord
> but not crash.

The default device will do automatic sample format conversion, i.e.,
your driver will see a request for S16_LE.

This looks like a bug somewhere else in your driver.


More information about the Alsa-devel mailing list