From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takashi Iwai Subject: Re: No support for 128kHz sample rate ? Date: Thu, 14 Aug 2003 18:00:44 +0200 Sender: alsa-devel-admin@lists.sourceforge.net Message-ID: References: <34050.193.253.230.179.1060874341.squirrel@www.undata.org> Mime-Version: 1.0 (generated by SEMI 1.14.4 - "Hosorogi") Content-Type: text/plain; charset=US-ASCII Return-path: In-Reply-To: <34050.193.253.230.179.1060874341.squirrel@www.undata.org> Errors-To: alsa-devel-admin@lists.sourceforge.net List-Help: List-Post: List-Subscribe: , List-Unsubscribe: , List-Archive: To: Thomas Charbonnel Cc: alsa-devel@lists.sourceforge.net List-Id: alsa-devel@alsa-project.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 . 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