Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp3443381pxu; Mon, 30 Nov 2020 03:21:57 -0800 (PST) X-Google-Smtp-Source: ABdhPJzN5MGrAKZe+lcKw9wF/Ut9ElpR/j5ImrndiO1i6UL9oyYm+voDGJGZa2S8Dy+Sb+GgLO9s X-Received: by 2002:a50:cd9a:: with SMTP id p26mr7660339edi.119.1606735316811; Mon, 30 Nov 2020 03:21:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606735316; cv=none; d=google.com; s=arc-20160816; b=Z5ey7sLRH+8OplzrPT9cBFKxdEzFK+j9KFT2rttpUZhFTe0KAW2RtfTr2td5C+y3AJ iMYb+5K710GAi/4Jn7ty+BhiqEQl3yJ3SuDqwDgCpDiX8y0trWPCwQfG4wGeNNv7IGcm eVmrwE23pX23/y0YARGQeW9AmZVHXT7Ql4whuxpeUHNqHY3o1cko7lc1XcyxcWDmZ7fy tLoUkkF3CpqfI5lhLpLnXmNxTAgG0nPBoJCWkdEQ9Q2GkEkonZtfyC8lGpLGO9q308JH oewxpHmBQ2njpPrvWzFUe3aV1iXaSB57hcWL40fdO+VIQs18lKDMlk5aOvozug2bu7L/ 44Jg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=kA1B+3YWtsqZLdoP/PFm3M4IJcbU3ZY5uXa3zxL9D5U=; b=LSVuH8+xDVMNku65Fu9TbiP5936Hgw30jkuCSLral0528faRONfgd/DPXGl5Pi8s+y yOqAZA1GhVRs8Cbig5UsNb6IWUKLG9LLHda6izgPb7bObpGjEeamJIR6xXE7p6G4hfET kQK+imfOReWSyHjMCIUioH/1upCNbBpKzMt3vD1+zTfhdZ/sz7+JXoF6JzkDePR9usay ypeJutF8r6TaoZC1gLdSH19A/+eKjkPlY4hdgvhYChIrAJ8GW5ZuxU3ZeauV5/wA35Fz 0GHgOqXJSAN7gCzZ3zE2TosUnNnzzQ9ottDL6qIGKrqOwRiP0Gthit1ssohFk/HAu94T 67nQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="kXGC/hkX"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id lr26si3911681ejb.312.2020.11.30.03.21.33; Mon, 30 Nov 2020 03:21:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="kXGC/hkX"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728806AbgK3LT5 (ORCPT + 99 others); Mon, 30 Nov 2020 06:19:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46172 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727394AbgK3LT4 (ORCPT ); Mon, 30 Nov 2020 06:19:56 -0500 Received: from mail-wm1-x342.google.com (mail-wm1-x342.google.com [IPv6:2a00:1450:4864:20::342]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7B981C0613D3 for ; Mon, 30 Nov 2020 03:19:16 -0800 (PST) Received: by mail-wm1-x342.google.com with SMTP id c198so18057913wmd.0 for ; Mon, 30 Nov 2020 03:19:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=kA1B+3YWtsqZLdoP/PFm3M4IJcbU3ZY5uXa3zxL9D5U=; b=kXGC/hkXw3WUjUW8dyzi+KxMgQfPrY9PpqKHsi6N9ndZtsG6e1wl8Up32s/Q/MNzp/ TG9HDjXySSC8sE2voSaQHmDaGs9ApE6cX2ZNK53ZPBiJ241946+2OdCXXwPPnyrB2g+I 28BidxQ1k8Au44U2UvYUWh31ljl4YB44MmNzpBNIHXAKL2MNDa3DHBIzbXfbexLzRLoV LZWfLOWLBxWYNWAFbrN54yQ203hMABfhBDAabKVsALajqJXsZNN2leThKFjssZbpiSiw Z+c5ECJwrCHcsmjolzUkNOdA8OGjcKfgivWeo2E9oLtTVUs9KWRQwfWxaBSN1NwZ9fYe bEfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=kA1B+3YWtsqZLdoP/PFm3M4IJcbU3ZY5uXa3zxL9D5U=; b=uKUNiSTe19GkYAqEpQLxs6XfSsOtyGIny7cVmgCmVGgJxeiBUdm6gBBoBU8YrxvGay HVJG5mVvUIq7ba8+gAHX6GRjies90kFzcVUS+UUOCR1215ubwWX/jdrA8ZSgLAaqYrUn sQ9OZAO8ycxvpjnZbTlT3mFq23rOm1CcJCQ9gxBN19Xvf09fUpNMnw1B2RItbiru4zKJ Ho8hSWL9I4ysCBwH2PHLipABsLuN/dCzhdSO1lq1XiiUoFRRRM3ouTRtRpRvQyX+iBCM gRsxdS8CNWjNEYHY3VWz+PFMfapbYDWpL/dfx5romzRdx+GXh0tqTlozjGx3VY8d9lNh Mfnw== X-Gm-Message-State: AOAM532kI5lKpniLRZ/p/5JAkQ7UocJcPM51DxLVZYqM6VqfjE+QNj4y IKmU0wccuP7SSc4SsU6XeIngiw== X-Received: by 2002:a1c:4802:: with SMTP id v2mr14690593wma.13.1606735155159; Mon, 30 Nov 2020 03:19:15 -0800 (PST) Received: from [192.168.86.34] (cpc86377-aztw32-2-0-cust226.18-1.cable.virginm.net. [92.233.226.227]) by smtp.googlemail.com with ESMTPSA id j14sm26432119wrs.49.2020.11.30.03.19.13 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 30 Nov 2020 03:19:14 -0800 (PST) Subject: Re: [PATCH v4 2/2] ASoC: qcom: Add support for playback recover after resume To: Srinivasa Rao Mandadapu , agross@kernel.org, bjorn.andersson@linaro.org, lgirdwood@gmail.com, broonie@kernel.org, robh+dt@kernel.org, plai@codeaurora.org, bgoswami@codeaurora.org, perex@perex.cz, tiwai@suse.com, rohitkr@codeaurora.org, linux-arm-msm@vger.kernel.org, alsa-devel@alsa-project.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: V Sujith Kumar Reddy References: <1606539559-4277-1-git-send-email-srivasam@codeaurora.org> <1606539559-4277-3-git-send-email-srivasam@codeaurora.org> From: Srinivas Kandagatla Message-ID: <76b8d52f-4f54-734f-683a-72fe62fdd8e4@linaro.org> Date: Mon, 30 Nov 2020 11:19:13 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <1606539559-4277-3-git-send-email-srivasam@codeaurora.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 28/11/2020 04:59, Srinivasa Rao Mandadapu wrote: > To support playback continuation after hard suspend(bypass powerd) > and resume add component driver ops and do regcache sync. > > Signed-off-by: V Sujith Kumar Reddy > Signed-off-by: Srinivasa Rao Mandadapu LGTM, Reviewed-by: Srinivas Kandagatla > --- > sound/soc/qcom/lpass-platform.c | 35 +++++++++++++++++++++++++++++++++++ > 1 file changed, 35 insertions(+) > > diff --git a/sound/soc/qcom/lpass-platform.c b/sound/soc/qcom/lpass-platform.c > index 0e71899..12764a8 100644 > --- a/sound/soc/qcom/lpass-platform.c > +++ b/sound/soc/qcom/lpass-platform.c > @@ -827,6 +827,39 @@ static void lpass_platform_pcm_free(struct snd_soc_component *component, > } > } > > +static int lpass_platform_pcmops_suspend(struct snd_soc_component *component) > +{ > + struct lpass_data *drvdata = snd_soc_component_get_drvdata(component); > + struct regmap *map; > + unsigned int dai_id = component->id; > + > + if (dai_id == LPASS_DP_RX) > + map = drvdata->hdmiif_map; > + else > + map = drvdata->lpaif_map; > + > + regcache_cache_only(map, true); > + regcache_mark_dirty(map); > + > + return 0; > +} > + > +static int lpass_platform_pcmops_resume(struct snd_soc_component *component) > +{ > + struct lpass_data *drvdata = snd_soc_component_get_drvdata(component); > + struct regmap *map; > + unsigned int dai_id = component->id; > + > + if (dai_id == LPASS_DP_RX) > + map = drvdata->hdmiif_map; > + else > + map = drvdata->lpaif_map; > + > + regcache_cache_only(map, false); > + return regcache_sync(map); > +} > + > + > static const struct snd_soc_component_driver lpass_component_driver = { > .name = DRV_NAME, > .open = lpass_platform_pcmops_open, > @@ -839,6 +872,8 @@ static const struct snd_soc_component_driver lpass_component_driver = { > .mmap = lpass_platform_pcmops_mmap, > .pcm_construct = lpass_platform_pcm_new, > .pcm_destruct = lpass_platform_pcm_free, > + .suspend = lpass_platform_pcmops_suspend, > + .resume = lpass_platform_pcmops_resume, > > }; > >