> At Thu, 14 Aug 2003 17:19:01 +0200 (CEST),
> Thomas Charbonnel wrote:
>>
>> Hi,
>>
>> I'm currently working on the hdsp 9632 driver. This card supports
>> sample rates up to 192kHz, including 128kHz and 176.4kHz. The problem
>> is 128kHz sample rate seems to have been omited in <sound/pcm.h>. How
>> am I supposed to deal with this ?
>
> there are two ways:
>
> 1. define a new bit for 128k, and add to your rates field.
>    easy one but will affect others.
>
> 2. define your own hw_constraints.
>    add something like the following:
>
>       static unsigned int xxx_rates[] =
>               { 32000, 44100, ....., 128000, 176400, 192000 };
>       static snd_pcm_hw_constraint_list_t xxx_hw_const_rates = {
>               .count = ARRAY_SIZE(xxx_rates),
>               .list = xxx_rates,
>       };
>
>   and in the open callback of pcm:
>
>       static int snd_xxx_pcm_open(snd_pcm_substream_t *substream)
>       {
>               ....
>
>               snd_pcm_hw_constraint_list(substream->runtime, 0,
>                                          SNDRV_PCM_HW_PARAM_RATE,
>                                          &xxx_hw_const_rates);
>               ....
>       }
>
>   then add SNDRV_PCM_RATE_KNOT to rates field, which indicates the
> unconventional rates are supported.
>
>
>
> well, i would take the latter :)
>
>

Thanks,
I reported this because I thought 128kHz was somehow conventional, but I'm
ok with the hw_constraints method.

Thomas





-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
_______________________________________________
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel

Reply via email to