From patchwork Fri Jul 28 08:42:06 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cheng-yi Chiang X-Patchwork-Id: 9868149 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id EDE406035E for ; Fri, 28 Jul 2017 08:42:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DDD1B288AD for ; Fri, 28 Jul 2017 08:42:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D2A1E288B1; Fri, 28 Jul 2017 08:42:25 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_NONE,T_DKIM_INVALID autolearn=no version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7BAFA288AD for ; Fri, 28 Jul 2017 08:42:24 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 75161267665; Fri, 28 Jul 2017 10:42:20 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id A7B5C267666; Fri, 28 Jul 2017 10:42:18 +0200 (CEST) Received: from mail-pg0-f44.google.com (mail-pg0-f44.google.com [74.125.83.44]) by alsa0.perex.cz (Postfix) with ESMTP id A4584266AF9 for ; Fri, 28 Jul 2017 10:42:16 +0200 (CEST) Received: by mail-pg0-f44.google.com with SMTP id u185so2875946pgb.1 for ; Fri, 28 Jul 2017 01:42:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id; bh=WhUOwmlTTjFXgXmtnrbJ1pBTExB20t0uYhFeQvk/nw0=; b=kyzgMrSgloQkNc53RUEgAzKRWF/jNo+cN8R0Ykt5k5AXINbSp3OGclnaU5iNItpp2v okzNwVCFXI1d0TVjqmGSZsRe+XUGnbHmILLaFQcOYbXMtOOm8637SIz8gBJnrQ7v95JK oV/d49JGHGpbikwSXRAIqceXsetyGnrq+XvD0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=WhUOwmlTTjFXgXmtnrbJ1pBTExB20t0uYhFeQvk/nw0=; b=fT4mAOGysp4Z5WTiP1RwWoJiDaMuFRdLIwgAHN87KckWf2qtjXJQQEiEn+JkgRsZUY fTHW/v1+X3pNouYFxyHZBtuPovAfkoBy+ntaG8UjnnyVqmZB+eFbWTIrFvXDG+xQqLob Tfzi0kTBiYPzo/s8U9EW+bOWId5ayF+VA5UsgXFEA87aAK9ApX2XdxHhosJZqjf06Djq mvNR6kOEB9uS/iCSKqyoirimPKyiBxjmIDSoRgDeIbSUgzLHyMem+YpraDgVbiZkgniU 7bZPCZ2rhSSgpH2MIQSjfPMUZs/hAqvJWBDRnT4LL5//4HJmdA8R1kU+EgR/CrD4qffc yF3Q== X-Gm-Message-State: AIVw1135ci22GVpLy7HoUY7OLPNq8+OXbhJz+b4Ms+amVnIPTwS+7LXA pJ73HbIZz67CqMTO X-Received: by 10.98.147.74 with SMTP id b71mr5658895pfe.283.1501231335085; Fri, 28 Jul 2017 01:42:15 -0700 (PDT) Received: from cychiang-z840.tpe.corp.google.com ([2401:fa00:1:b:5019:e7f4:4cb2:b140]) by smtp.gmail.com with ESMTPSA id r73sm34438443pgr.32.2017.07.28.01.42.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 28 Jul 2017 01:42:13 -0700 (PDT) From: Cheng-Yi Chiang To: linux-arm-kernel@lists.infradead.org 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 Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Takashi Iwai , Liam Girdwood , Mark Brown , "U . Artie Eoff" Subject: [alsa-devel] [PATCH] ASoC: Intel: Reset hw_ptr on resume trigger X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP 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;