From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takashi Iwai Subject: Re: [RFC PATCH 2/4] ALSA: core: add .notify callback for pcm ops Date: Thu, 09 Jul 2015 16:44:01 +0200 Message-ID: References: <1436350236-17509-1-git-send-email-pierre-louis.bossart@linux.intel.com> <1436350236-17509-3-git-send-email-pierre-louis.bossart@linux.intel.com> <559D5988.70206@linux.intel.com> 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 mx2.suse.de (cantor2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id 0F8F3266181 for ; Thu, 9 Jul 2015 16:44:02 +0200 (CEST) In-Reply-To: <559D5988.70206@linux.intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org To: Pierre-Louis Bossart Cc: alsa-devel@alsa-project.org List-Id: alsa-devel@alsa-project.org On Wed, 08 Jul 2015 19:10:32 +0200, Pierre-Louis Bossart wrote: > > > >> This is only enabled when the NO_REWIND hardware flag is used, > >> so that the low-level driver/hardware to opportunistically pre-fetch > >> data. > >> > >> FIXME: should we rely on .ack for this? > >> Signed-off-by: Pierre-Louis Bossart > > > > Hmm, OK, so the forward is allowed but with workarounds... > > But then why rewind won't work in a similar way? DSP might be able to > > cancel some of inflight data. > > Nope, this is explicitly not supported, so unfortunately if we want to > optimize for power and let hardware fetch data when it's most > appropriate rewinds need to be disabled. > > > In other words, I see no reason to strict notify callback only for > > no_rewinds. This is an optional ops in anyway. > > It's fine to remove the check. I added this based on internal review > comments but I agree with your point. OK, then let's treat the NO_REWIND and new ops individually. > > Also, I find the name "notify" a bit too ambiguous. In this case, > > it's notifying the applptr change. So, a name related with the > > function would be more understandable. > > The first open I had was to know if we could use .ack for this? if a > different callback is needed, we can use 'appl_ptr_update' instead of > 'notify' As there are no many users of ack callback, I don't mind to reuse it. But then we need to extend the function to receive a new argument indicating the type of ack, right? thanks, Takashi