Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754503AbeALIgU convert rfc822-to-8bit (ORCPT + 1 other); Fri, 12 Jan 2018 03:36:20 -0500 Received: from mga09.intel.com ([134.134.136.24]:53433 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754255AbeALIgS (ORCPT ); Fri, 12 Jan 2018 03:36:18 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,348,1511856000"; d="scan'208";a="9833965" From: "Kumar, Abhijeet" To: "Koul, Vinod" CC: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , "Kp, Jeeja" , "Prusty, Subhransu S" , "Singh, Guneshwor O" , "Tayal, SandeepX" , "alsa-devel@alsa-project.org" , "linux-kernel@vger.kernel.org" , "Kumar, Abhijeet" Subject: RE: [PATCH] ASoC: hdac_hdmi: Ensuring proper setting of output widget power state Thread-Topic: [PATCH] ASoC: hdac_hdmi: Ensuring proper setting of output widget power state Thread-Index: AQHTis8A+CSLw3QwWEyDXE+e0urW76NvNbIAgAC0SnA= Date: Fri, 12 Jan 2018 08:36:10 +0000 Message-ID: <60213CA7255C53479ADE3BCF0360117F02E7119B@PGSMSX104.gar.corp.intel.com> References: <1515670468-9198-1-git-send-email-abhijeet.kumar@intel.com> <20180112054638.GL18649@localhost> In-Reply-To: <20180112054638.GL18649@localhost> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZDVmYzQzZTEtZmQ5MC00MmE4LWJiY2UtNGJiODViYmE3ZTkzIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjIuNS4xOCIsIlRydXN0ZWRMYWJlbEhhc2giOiI5Z2Q0a2lLT0t0TUphUzNKSWo3aVE0cFVZc3daYzlxSnRNUTZBOFwvSkhUbUpBakVrOGhXM0JTV0kwcFpRZ3ExaCJ9 x-ctpclassification: CTP_NT x-originating-ip: [172.30.20.205] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: > can you rephrase this please done please review v2! https://patchwork.kernel.org/patch/10159791/ > am not sure I fully understood the problem here This appears to be an timing issue, while performing a stress test, we found out that sometimes either pin or converters are not powered up. Thus ensuring it that the power state is set correctly. > how does read help instead of write? Indeed i'm making use of read instead of write to send the set command. But unlike codec_write, codec_read send the verb synchronously. Maybe if you read the comment while powering up and down afg in hdmi_codec_prepare and hdmi_codec_complete you would understand better. "codec_read is preferred over codec_write to set the power state. This way verb is send to set the power state and response is received. So setting power state is ensured without using loop to read the state." -----Original Message----- From: Koul, Vinod Sent: Friday, January 12, 2018 11:17 AM To: Kumar, Abhijeet Cc: Liam Girdwood ; Mark Brown ; Jaroslav Kysela ; Takashi Iwai ; Kp, Jeeja ; Prusty, Subhransu S ; Singh, Guneshwor O ; Tayal, SandeepX ; alsa-devel@alsa-project.org; linux-kernel@vger.kernel.org Subject: Re: [PATCH] ASoC: hdac_hdmi: Ensuring proper setting of output widget power state On Thu, Jan 11, 2018 at 05:04:27PM +0530, abhijeet.kumar@intel.com wrote: > From: Abhijeet Kumar > > When we change the resolution of DP pannel or hot plug-unplug it while > playing an audio clip,sometimes we observe a silent playback(no audio). can you rephrase this please > During no audio condition, we have noticed that the power state of the > pin or the connector is D3. Optimzing the way we set the power could > mitigate the issue.With this changes the verb is sent to set the power space after . > state and response is received. Thus ensuring power state is set. am not sure I fully understood the problem here > > Signed-off-by: Abhijeet Kumar > --- > sound/soc/codecs/hdac_hdmi.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/sound/soc/codecs/hdac_hdmi.c > b/sound/soc/codecs/hdac_hdmi.c index f3b4f4dfae6a..e24caecf0a4f 100644 > --- a/sound/soc/codecs/hdac_hdmi.c > +++ b/sound/soc/codecs/hdac_hdmi.c > @@ -718,7 +718,7 @@ static void hdac_hdmi_set_power_state(struct > hdac_ext_device *edev, { > if (get_wcaps(&edev->hdac, nid) & AC_WCAP_POWER) { > if (!snd_hdac_check_power_state(&edev->hdac, nid, pwr_state)) > - snd_hdac_codec_write(&edev->hdac, nid, 0, > + snd_hdac_codec_read(&edev->hdac, nid, 0, how does read help instead of write? -- ~Vinod