From: Takashi Iwai Subject: Re: AC97 Codec Rate Problem Date: Fri, 12 May 2006 19:44:52 +0200 Message-ID: References: <4464C2C1.4030908@roarinelk.homelinux.net> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Return-path: In-Reply-To: <4464C2C1.4030908@roarinelk.homelinux.net> Sender: alsa-devel-admin@lists.sourceforge.net Errors-To: alsa-devel-admin@lists.sourceforge.net List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , List-Archive: To: Manuel Lauss Cc: alsa-devel@lists.sourceforge.net List-Id: alsa-devel@alsa-project.org At Fri, 12 May 2006 19:15:45 +0200, Manuel Lauss wrote: > > Hello folks, > > I've developed an ALSA driver for the Renesas SH7760 (a SH-4 SoC) > AC97 component, following Takashi Iwai's howto document. > > Right now, I call snd_ac97_set_rate() in the drivers' prepare() callback; > but since I don't know which rates the attached codec actually supports, > I thought maybe there is a way to let ALSA itself handle setting > the rates? The supported rates are detected at ac97 probing time and stored in ac97->rates[] array. For example, ac97->rates[AC97_RATES_FRONT_DAC] corresponds to the front playback rates. It's bit flags consisting of SNDRV_PCM_RATE_* bits. Usually, at a PCM open callback, write this value to runtime->hw.rates, then call snd_pcm_limit_hw_rates(runtime) for adding a hw_params constraint. Takashi ------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642