From: Takashi Iwai <tiwai@suse.de>
To: Thomas Charbonnel <thomas@undata.org>
Cc: alsa-devel@lists.sourceforge.net
Subject: Re: No support for 128kHz sample rate ?
Date: Thu, 14 Aug 2003 18:00:44 +0200 [thread overview]
Message-ID: <s5hbrusfcur.wl@alsa2.suse.de> (raw)
In-Reply-To: <34050.193.253.230.179.1060874341.squirrel@www.undata.org>
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
next prev parent reply other threads:[~2003-08-14 16:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-08-14 15:19 No support for 128kHz sample rate ? Thomas Charbonnel
2003-08-14 16:00 ` Takashi Iwai [this message]
2003-08-14 16:09 ` Thomas Charbonnel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=s5hbrusfcur.wl@alsa2.suse.de \
--to=tiwai@suse.de \
--cc=alsa-devel@lists.sourceforge.net \
--cc=thomas@undata.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.