From: Takashi Iwai Subject: Re: snd_pcm_hw_params and hw_params function call Date: Tue, 19 Sep 2006 18:08:45 +0200 Message-ID: References: <000901c6db0d$ff25c140$9b01a8c0@LiYong> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <000901c6db0d$ff25c140$9b01a8c0@LiYong> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@lists.sourceforge.net Errors-To: alsa-devel-bounces@lists.sourceforge.net To: YongLi Cc: alsa-devel@lists.sourceforge.net List-Id: alsa-devel@alsa-project.org At Mon, 18 Sep 2006 18:34:14 +0800, YongLi wrote: > > Hello All, > > I am porting the linux 2.6.16 to my ARM board. I found a problem related to the sound codec driver. > > In the sound codec driver, I defined a .hw_params function to set the IIS related DMA buffer. However, > > I cannot get the runtime->period_size and runtime->frame_bits value. These values are assigned in the > snd_pcm_hw_params function after hw_params call. > > How to resolve this problem? Hm, period_size is a vital field that the system doesn't work without it. Are other fields set correctly as expected? Note that a correct period_size isn't always set at the first hw_params call. The hw_params callback can be called multiple times in the driver, depending on the app. If runtime->period_size isn't set properly at prepare callback, it's a big problem, though. Takashi ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV