Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751798AbdG1ImQ (ORCPT ); Fri, 28 Jul 2017 04:42:16 -0400 Received: from mail-pg0-f48.google.com ([74.125.83.48]:37618 "EHLO mail-pg0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751779AbdG1ImP (ORCPT ); Fri, 28 Jul 2017 04:42:15 -0400 From: Cheng-Yi Chiang To: linux-arm-kernel@lists.infradead.org Cc: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , "U . Artie Eoff" , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Subject: [PATCH] ASoC: Intel: Reset hw_ptr on resume trigger Date: Fri, 28 Jul 2017 16:42:06 +0800 Message-Id: <20170728084206.4431-1-cychiang@chromium.org> X-Mailer: git-send-email 2.12.2 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 989 Lines: 28 From: "U. Artie Eoff" Reset the hw_ptr before queuing the restore_stream_context work to eradicate a nasty white audio noise on resume. Signed-off-by: U. Artie Eoff --- 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; schedule_work(&pcm_data->work); + } else sst_byt_stream_resume(byt, pcm_data->stream); break; -- 2.12.2