From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takashi Iwai Subject: Re: [PATCH v3 05/13] ALSA: hda: check stream decoupled register state Date: Wed, 28 Dec 2016 16:03:06 +0100 Message-ID: References: <1481184684-9620-1-git-send-email-jeeja.kp@intel.com> <1481184684-9620-6-git-send-email-jeeja.kp@intel.com> <20161216083449.GA11902@kpjeeja-desk> 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 (mx2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id 4DA8C26693C for ; Wed, 28 Dec 2016 16:03:07 +0100 (CET) In-Reply-To: <20161216083449.GA11902@kpjeeja-desk> 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: Jeeja KP Cc: patches.audio@intel.com, alsa-devel@alsa-project.org, broonie@kernel.org, liam.r.girdwood@intel.com List-Id: alsa-devel@alsa-project.org On Fri, 16 Dec 2016 09:34:51 +0100, Jeeja KP wrote: > > On Thu, Dec 08, 2016 at 01:41:16PM +0530, jeeja.kp@intel.com wrote: > > From: Jeeja KP > Hi Takashi, > > I have fixed the comments on the V2 patch. > Can you please ACK this patch of this series if there no concern, as this on > on sound/hda/. I think Mark is waiting on that.. Looks good to me. Acked-by: Takashi Iwai thanks, Takashi > > > > > Check stream decoupled register value with requested value > > before decoupling/coupling the stream. > > > > Signed-off-by: Jeeja KP > > --- > > sound/hda/ext/hdac_ext_stream.c | 15 +++++++++------ > > 1 file changed, 9 insertions(+), 6 deletions(-) > > > > diff --git a/sound/hda/ext/hdac_ext_stream.c b/sound/hda/ext/hdac_ext_stream.c > > index 3be051a..c96d7a7 100644 > > --- a/sound/hda/ext/hdac_ext_stream.c > > +++ b/sound/hda/ext/hdac_ext_stream.c > > @@ -128,14 +128,17 @@ void snd_hdac_ext_stream_decouple(struct hdac_ext_bus *ebus, > > { > > struct hdac_stream *hstream = &stream->hstream; > > struct hdac_bus *bus = &ebus->bus; > > + u32 val; > > + int mask = AZX_PPCTL_PROCEN(hstream->index); > > > > spin_lock_irq(&bus->reg_lock); > > - if (decouple) > > - snd_hdac_updatel(bus->ppcap, AZX_REG_PP_PPCTL, 0, > > - AZX_PPCTL_PROCEN(hstream->index)); > > - else > > - snd_hdac_updatel(bus->ppcap, AZX_REG_PP_PPCTL, > > - AZX_PPCTL_PROCEN(hstream->index), 0); > > + val = readw(bus->ppcap + AZX_REG_PP_PPCTL) & mask; > > + > > + if (decouple && !val) > > + snd_hdac_updatel(bus->ppcap, AZX_REG_PP_PPCTL, mask, mask); > > + else if (!decouple && val) > > + snd_hdac_updatel(bus->ppcap, AZX_REG_PP_PPCTL, mask, 0); > > + > > stream->decoupled = decouple; > > spin_unlock_irq(&bus->reg_lock); > > } > > -- > > 2.5.0 > > > > -- >