Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751898AbdHAE7l (ORCPT ); Tue, 1 Aug 2017 00:59:41 -0400 Received: from mga06.intel.com ([134.134.136.31]:62460 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751004AbdHAE7k (ORCPT ); Tue, 1 Aug 2017 00:59:40 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.41,305,1498546800"; d="scan'208";a="134360041" Subject: Re: [alsa-devel] [PATCH v2] ASoC: Intel: Reset hw_ptr on resume trigger To: Vinod Koul , Cheng-Yi Chiang , Jie Yang Cc: alsa-devel@alsa-project.org, Liam Girdwood , linux-kernel@vger.kernel.org, Takashi Iwai , Mark Brown , "U . Artie Eoff" References: <20170731104734.5776-1-cychiang@chromium.org> <20170801033006.GL3053@localhost> From: Keyon Jie Message-ID: <60e20968-28b2-dd91-c30c-318aee9d298f@linux.intel.com> Date: Tue, 1 Aug 2017 13:04:14 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <20170801033006.GL3053@localhost> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1485 Lines: 45 On 2017年08月01日 11:30, Vinod Koul wrote: > On Mon, Jul 31, 2017 at 06:47:34PM +0800, Cheng-Yi Chiang wrote: >> From: "U. Artie Eoff" >> >> Reset the hw_ptr before queuing the restore_stream_context >> work to eradicate a nasty white audio noise on resume. > > Liam, Jie? This on legacy BYT driver.. > >> >> Tested-by: Cheng-Yi Chiang >> Signed-off-by: U. Artie Eoff >> Signed-off-by: Cheng-Yi Chiang >> --- >> sound/soc/intel/baytrail/sst-baytrail-pcm.c | 4 +++- >> 1 file changed, 3 insertions(+), 1 deletion(-) >> >> diff --git a/sound/soc/intel/baytrail/sst-baytrail-pcm.c b/sound/soc/intel/baytrail/sst-baytrail-pcm.c >> index 4765ad474544..e0db7070cd42 100644 >> --- a/sound/soc/intel/baytrail/sst-baytrail-pcm.c >> +++ b/sound/soc/intel/baytrail/sst-baytrail-pcm.c >> @@ -187,8 +187,10 @@ static int sst_byt_pcm_trigger(struct snd_pcm_substream *substream, int cmd) >> sst_byt_stream_start(byt, pcm_data->stream, 0); >> break; >> case SNDRV_PCM_TRIGGER_RESUME: >> - if (pdata->restore_stream == true) >> + if (pdata->restore_stream == true) { >> + pcm_data->hw_ptr = 0; Won't this break the hw_ptr and make the resuming won't play from the pausing point of the last suspending? Thanks, ~Keyon >> schedule_work(&pcm_data->work); >> + } >> else >> sst_byt_stream_resume(byt, pcm_data->stream); >> break; >> -- >> 2.12.2 >> >