* No support for 128kHz sample rate ?
@ 2003-08-14 15:19 Thomas Charbonnel
2003-08-14 16:00 ` Takashi Iwai
0 siblings, 1 reply; 3+ messages in thread
From: Thomas Charbonnel @ 2003-08-14 15:19 UTC (permalink / raw)
To: alsa-devel
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 ?
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: No support for 128kHz sample rate ?
2003-08-14 15:19 No support for 128kHz sample rate ? Thomas Charbonnel
@ 2003-08-14 16:00 ` Takashi Iwai
2003-08-14 16:09 ` Thomas Charbonnel
0 siblings, 1 reply; 3+ messages in thread
From: Takashi Iwai @ 2003-08-14 16:00 UTC (permalink / raw)
To: Thomas Charbonnel; +Cc: alsa-devel
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 :)
ciao,
Takashi
-------------------------------------------------------
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: No support for 128kHz sample rate ?
2003-08-14 16:00 ` Takashi Iwai
@ 2003-08-14 16:09 ` Thomas Charbonnel
0 siblings, 0 replies; 3+ messages in thread
From: Thomas Charbonnel @ 2003-08-14 16:09 UTC (permalink / raw)
To: tiwai; +Cc: thomas, alsa-devel
> 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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2003-08-14 16:09 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-08-14 15:19 No support for 128kHz sample rate ? Thomas Charbonnel
2003-08-14 16:00 ` Takashi Iwai
2003-08-14 16:09 ` Thomas Charbonnel
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.