From patchwork Fri Dec 2 17:41:48 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeeja KP X-Patchwork-Id: 9459185 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 AE3A06074E for ; Fri, 2 Dec 2016 20:49:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9DB8F28585 for ; Fri, 2 Dec 2016 20:49:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 92603285A0; Fri, 2 Dec 2016 20:49:34 +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.9 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE autolearn=ham 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 C488228585 for ; Fri, 2 Dec 2016 20:49:33 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 0907B267868; Fri, 2 Dec 2016 21:49:30 +0100 (CET) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id B3628266656; Fri, 2 Dec 2016 21:47:11 +0100 (CET) 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 18EF926782B; Fri, 2 Dec 2016 18:32:26 +0100 (CET) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by alsa0.perex.cz (Postfix) with ESMTP id 775FC267814 for ; Fri, 2 Dec 2016 18:32:23 +0100 (CET) Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga101.jf.intel.com with ESMTP; 02 Dec 2016 09:32:23 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,287,1477983600"; d="scan'208";a="38344657" Received: from kpjeeja-desk.iind.intel.com ([10.223.96.110]) by fmsmga006.fm.intel.com with ESMTP; 02 Dec 2016 09:32:20 -0800 From: jeeja.kp@intel.com To: alsa-devel@alsa-project.org Date: Fri, 2 Dec 2016 23:11:48 +0530 Message-Id: <1480700509-23380-12-git-send-email-jeeja.kp@intel.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1480700509-23380-1-git-send-email-jeeja.kp@intel.com> References: <1480700509-23380-1-git-send-email-jeeja.kp@intel.com> Cc: tiwai@suse.de, patches.audio@intel.com, broonie@kernel.org, liam.r.girdwood@intel.com, Jeeja KP Subject: [alsa-devel] [PATCH 11/12] ASoC: Intel: Skylake: set the resume point to LPIB 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: Jeeja KP In system suspend, the firmware pipelines will be deleted and there is no need to save the pipeline context. Driver will save the DPIB and LPIB pointers in suspend. In system resume, the firmware pipelines will be created again and the RD/RW pointers in the Firmware buffer points to the base address. So need to fetch the non-played data again to firmware buffer. LPIB indicates the HW rendered position. Instead of setting DPIB as resume point, set it to LPIB to restore from the HW render position so that DMA would fetch the non-played data one more time. Signed-off-by: Jeeja KP --- sound/soc/intel/skylake/skl-pcm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/intel/skylake/skl-pcm.c b/sound/soc/intel/skylake/skl-pcm.c index 800fdad..508144b 100644 --- a/sound/soc/intel/skylake/skl-pcm.c +++ b/sound/soc/intel/skylake/skl-pcm.c @@ -484,7 +484,7 @@ static int skl_pcm_trigger(struct snd_pcm_substream *substream, int cmd, snd_hdac_ext_stream_drsm_enable(ebus, true, hdac_stream(stream)->index); snd_hdac_ext_stream_set_dpibr(ebus, stream, - stream->dpib); + stream->lpib); snd_hdac_ext_stream_set_lpib(stream, stream->lpib); }