Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1698593

[PATCH] ASoC: Intel: Reset hw_ptr on resume trigger

From Cheng-Yi Chiang <cychiang@chromium.org>
Newsgroups linux.kernel
Subject [PATCH] ASoC: Intel: Reset hw_ptr on resume trigger
Date 2017-07-28 10:50 +0200
Message-ID <u8985-1mx-3@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


From: "U. Artie Eoff" <ullysses.a.eoff@intel.com>

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 <ullysses.a.eoff@intel.com>
---
 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

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH] ASoC: Intel: Reset hw_ptr on resume trigger Cheng-Yi Chiang <cychiang@chromium.org> - 2017-07-28 10:50 +0200
  Re: [PATCH] ASoC: Intel: Reset hw_ptr on resume trigger Mark Brown <broonie@kernel.org> - 2017-07-28 14:50 +0200

csiph-web