From: Takashi Iwai Subject: Re: delayed dma trigger Date: Tue, 24 Oct 2006 17:07:16 +0200 Message-ID: References: <1161593391.6617.25.camel@ux156> <1161611212.6617.53.camel@ux156> <1161613867.6617.64.camel@ux156> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx1.suse.de (mx1.suse.de [195.135.220.2]) by alsa.jcu.cz (ALSA's E-mail Delivery System) with ESMTP id 2825E16F for ; Tue, 24 Oct 2006 17:07:23 +0200 (MEST) In-Reply-To: <1161613867.6617.64.camel@ux156> 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: Johannes Berg Cc: alsa-devel , Paul Mackerras , Benjamin Berg List-Id: alsa-devel@alsa-project.org At Mon, 23 Oct 2006 16:31:07 +0200, Johannes Berg wrote: > > > > Right, but prepare can sleep as well so it's easy to do. Though if the > > > prepare doesn't actually change anything, couldn't we not stop the DMA > > > and just continue? > > > > It's up to you. My point is the prepare callback is called anyway, > > and if you want to resolve the DMA call conflict, prepare callback is > > the right place. But, if trigger(START) checks whether the DMA is > > already is running and just continues, then yes, you don't have to > > wait in prepare. > > But is prepare also called between pause/resume? I was assuming it > isn't. It won't be called unless PCM_INFO_PAUSE bit flag is set. It means that the driver doesn't support the hardware pause/resume function. The pseudo pause/resume is just like a stop -> reset -> start sequence. In other words, once when you set SNDRV_PCM_INFO_PAUSE flag, the driver has to stop the stream by trigger(PAUSE_PUSH) and restart the stream by trigger(PAUSE_RELEASE) call without prepare callback. 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