Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1160201pxu; Fri, 27 Nov 2020 00:49:48 -0800 (PST) X-Google-Smtp-Source: ABdhPJxwZKZgqg2s6dgxwcxEVTqC4BG4SPljbi0XYQAIA8HRUR4nEnOqFIgpzZnPSD1lCGUSakiL X-Received: by 2002:a17:906:f0c3:: with SMTP id dk3mr6460530ejb.366.1606466988621; Fri, 27 Nov 2020 00:49:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606466988; cv=none; d=google.com; s=arc-20160816; b=HKt1TvKQxxTp4kuh2pLy/hXGJpoL4+GRNM3sKivIt5m39LaQhzRppbCVIZfNuajw5J PiOtq+Vn+3Vu/HYcjQK+YStdY58tRW7SRYkQzuJzNpfUznsjXpY3gkicaoL7fnekYClI TZrsaUaEUjKCS3g16vRa8xY5eFHbC/f0+nH/Zq6Ynb9WXszQxh2EbWeol/FDg7yG3HOq VXHMkh0ugPT/shW9JV8InxvVgRRLVJA70S/rtDycSYvNf4tGdfyZmdQRtDGvjMPA2kqa Woymkk4XMM3Q4RvfSm47AjUTHWxYuIjSLcpo9ivMeWisOZiB2LxcPgz5EV7sgf2PgJI6 95zA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from:dmarc-filter :sender:dkim-signature; bh=X7Qb679WxuRp4Difwrjsn0t8m9dWVYkJod5nmfHLyEo=; b=b9aE6zQaNB7hXFeyca8WngpOlpuV5dxlNMc0a1PHcM2CmcJCvkZZtaaIR4GGfzQUZc CSeNBa0WZhiSvhV/dlz/Wgb0FxkspRW8CzxbCAV69IbpBarfv7t7M84H1wYIE8ONuDnc knJNDajLT5vpbor/u8C/5bc7SxtPH5G/fD8reoRYWzVZK16mQDFo1viWGvudAFrea99w fI4wcBW7IKp73t0bcj/1dqQZswXzdANaz5Bf1ntWi2cqlSXFh9TBIGLj4U9vjieU1ttA KwTPAp5OjAwYfpBT5sov99/Wk3dwCtlRSg5MnsumDuwfqpgORv4pcJAKAM5rwR7hymuq 86vA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=fQPLnJtG; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y4si4764751edv.83.2020.11.27.00.49.26; Fri, 27 Nov 2020 00:49:48 -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=@mg.codeaurora.org header.s=smtp header.b=fQPLnJtG; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2392393AbgK0EM2 (ORCPT + 99 others); Thu, 26 Nov 2020 23:12:28 -0500 Received: from m42-4.mailgun.net ([69.72.42.4]:17329 "EHLO m42-4.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2392394AbgK0EM2 (ORCPT ); Thu, 26 Nov 2020 23:12:28 -0500 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1606450347; h=Message-Id: Date: Subject: Cc: To: From: Sender; bh=X7Qb679WxuRp4Difwrjsn0t8m9dWVYkJod5nmfHLyEo=; b=fQPLnJtGwHhXrNJ9PcO1Gl3m71WT4N2TY5Qg5J46S9/qeRUhIYasYuzK6TSfklp43KVPYie/ /fBeroHG5Y7Ele/3sjyNkHOGpEBMuZYYvsm0oi/wONefOMLcjMI3ZZr5Yk9CmeN+wwF6NfSZ h2LNj3v0lvOohhac7ZqZkNz20eU= X-Mailgun-Sending-Ip: 69.72.42.4 X-Mailgun-Sid: WyI0MWYwYSIsICJsaW51eC1rZXJuZWxAdmdlci5rZXJuZWwub3JnIiwgImJlOWU0YSJd Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n06.prod.us-east-1.postgun.com with SMTP id 5fc07caaba50d14f886d91d8 (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Fri, 27 Nov 2020 04:12:26 GMT Sender: srivasam=codeaurora.org@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id CDD8FC433ED; Fri, 27 Nov 2020 04:12:25 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=ALL_TRUSTED,BAYES_00,SPF_FAIL, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from hyd-lnxbld210.qualcomm.com (unknown [202.46.22.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: srivasam) by smtp.codeaurora.org (Postfix) with ESMTPSA id CADB8C433C6; Fri, 27 Nov 2020 04:12:19 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org CADB8C433C6 Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=fail smtp.mailfrom=srivasam@codeaurora.org From: Srinivasa Rao Mandadapu To: 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, srinivas.kandagatla@linaro.org, rohitkr@codeaurora.org, linux-arm-msm@vger.kernel.org, alsa-devel@alsa-project.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Srinivasa Rao Mandadapu , V Sujith Kumar Reddy Subject: [PATCH] Asoc: qcom: Fix for problem in resume with CRAS Date: Fri, 27 Nov 2020 09:42:03 +0530 Message-Id: <1606450323-21641-1-git-send-email-srivasam@codeaurora.org> X-Mailer: git-send-email 2.7.4 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org To support playback continuation after resume problem in chrome audio server: Prepare device in platform trigger callback. Make I2s and DMA control registers as non volatile. Signed-off-by: V Sujith Kumar Reddy Signed-off-by: Srinivasa Rao Mandadapu --- sound/soc/qcom/lpass-cpu.c | 8 ++------ sound/soc/qcom/lpass-platform.c | 5 +++-- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/sound/soc/qcom/lpass-cpu.c b/sound/soc/qcom/lpass-cpu.c index af684fd..c99be03 100644 --- a/sound/soc/qcom/lpass-cpu.c +++ b/sound/soc/qcom/lpass-cpu.c @@ -454,20 +454,16 @@ static bool lpass_cpu_regmap_volatile(struct device *dev, unsigned int reg) struct lpass_variant *v = drvdata->variant; int i; - for (i = 0; i < v->i2s_ports; ++i) - if (reg == LPAIF_I2SCTL_REG(v, i)) - return true; for (i = 0; i < v->irq_ports; ++i) if (reg == LPAIF_IRQSTAT_REG(v, i)) return true; for (i = 0; i < v->rdma_channels; ++i) - if (reg == LPAIF_RDMACURR_REG(v, i) || reg == LPAIF_RDMACTL_REG(v, i)) + if (reg == LPAIF_RDMACURR_REG(v, i)) return true; for (i = 0; i < v->wrdma_channels; ++i) - if (reg == LPAIF_WRDMACURR_REG(v, i + v->wrdma_channel_start) || - reg == LPAIF_WRDMACTL_REG(v, i + v->wrdma_channel_start)) + if (reg == LPAIF_WRDMACURR_REG(v, i + v->wrdma_channel_start)) return true; return false; diff --git a/sound/soc/qcom/lpass-platform.c b/sound/soc/qcom/lpass-platform.c index 80b09de..2b0a7c1 100644 --- a/sound/soc/qcom/lpass-platform.c +++ b/sound/soc/qcom/lpass-platform.c @@ -481,8 +481,9 @@ static int lpass_platform_pcmops_trigger(struct snd_soc_component *component, return -ENOTRECOVERABLE; } switch (cmd) { - case SNDRV_PCM_TRIGGER_START: case SNDRV_PCM_TRIGGER_RESUME: + lpass_platform_pcmops_prepare(component, substream); + case SNDRV_PCM_TRIGGER_START: case SNDRV_PCM_TRIGGER_PAUSE_RELEASE: ret = regmap_fields_write(dmactl->enable, id, LPAIF_DMACTL_ENABLE_ON); @@ -592,7 +593,7 @@ static int lpass_platform_pcmops_trigger(struct snd_soc_component *component, break; } - return 0; + return ret; } static snd_pcm_uframes_t lpass_platform_pcmops_pointer( -- Qualcomm India Private Limited, on behalf of Qualcomm Innovation Center, Inc., is a member of Code Aurora Forum, a Linux Foundation Collaborative Project.