From patchwork Mon Aug 24 08:29:37 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 248158 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:522:0:0:0:0 with SMTP id h2csp2361280ils; Mon, 24 Aug 2020 01:35:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzTkjdwRmNJCvK9rD9TpZeB9tPsEsrKYtbfgmwVBpAzu96otel4hOp5fS+2JgKpssYcpZrW X-Received: by 2002:a17:906:d181:: with SMTP id c1mr4367976ejz.181.1598258122628; Mon, 24 Aug 2020 01:35:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598258122; cv=none; d=google.com; s=arc-20160816; b=IU1NC3/deTYtX/danBVvimzy/TXbgxDoATRI0eaS2KuHIiUhSnUYGznVmsxIvpvhLS NHXTqH9JDZNahrsqGzBAWdk+QjsU9ZRbuxeP4q+s5t/oycTfkEoMP+HL15YsNCjcE8GF t6PgSp5hhegvrS+y/qEM2Fi7iB1tjmI2JUsZK9HWSW0bWvvT+DQSFCSYWKoTcq1qYWpn A/UqkRotA+vAGU23krGLE1vxfLJn8qMu2k+nyO/we25HLv39/CT/Jmct1vSZkk+QMunj Efb5d0nBQOL+o8Dp0Nbz6guf41JSMWfEbodhEHOr9dZ1nIvW3CCvqb0ZKGlgsiSChuJL CmnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=7DzjQMTiwjgN+yqyxhWPqTyjB9PnND6ZyxT1GN04UFw=; b=crdMjZDix0ocGjqkZi1Cj/C3nULMhtYXm/LYCWHr4WI/UvaF3T9bySYEnkj6hQOd5F uIMupeZp/W3eshRrTyg8ciPQaHAF3ZpMbzrTcav9Ypwd4CO/YlkU/03cjbTvyHwikQH3 ruMymKEXUI/rLyn0M9qK4a4TMf4tzT6h0Q8Ew86F0UKugn2Be/gmJi97Jd70gptR3OhZ czIzkVZA01z4By+cGodkwTes1Bt+9iUVwzhLgoT2Qfs04naPfTV/WIYbOliC+udyoEUo 0irUCqQ/jwQ6DplLKXHL53rRzK6lxeBn3hKalN7Jhh9+0/mXoAXSUo6E1y8tRgGH0wEi 9WPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=cv5vhWX7; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 64si6514233edm.423.2020.08.24.01.35.22; Mon, 24 Aug 2020 01:35:22 -0700 (PDT) Received-SPF: pass (google.com: domain of stable-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=@kernel.org header.s=default header.b=cv5vhWX7; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728088AbgHXIfU (ORCPT + 15 others); Mon, 24 Aug 2020 04:35:20 -0400 Received: from mail.kernel.org ([198.145.29.99]:45582 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728054AbgHXIfO (ORCPT ); Mon, 24 Aug 2020 04:35:14 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 0D415206F0; Mon, 24 Aug 2020 08:35:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1598258113; bh=9HAS2loCHxQ24PIAcghVs2Z0hXa2Wx19xvuumM0vtFI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cv5vhWX7BlACiaQCjQXKBdcGXK1hQvHxVg4WGP5lpHxoEvXyxzwbU1ax8fLrSvoT8 TW1KuD/UPy9AIb5yQ7MhaN15IILkosN6qy4zND4mHROUCEcn2NPUB5GWRMiFSx+NQg 6OrAcbvEgy3P+/PjUYaGhyM95g2vseD0KqyelZkg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, John Stultz , Srinivas Kandagatla , Mark Brown , Sasha Levin Subject: [PATCH 5.8 079/148] ASoC: q6routing: add dummy register read/write function Date: Mon, 24 Aug 2020 10:29:37 +0200 Message-Id: <20200824082417.851958095@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200824082413.900489417@linuxfoundation.org> References: <20200824082413.900489417@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Srinivas Kandagatla [ Upstream commit 796a58fe2b8c9b6668db00d92512ec84be663027 ] Most of the DAPM widgets for DSP ASoC components reuse reg field of the widgets for its internal calculations, however these are not real registers. So read/writes to these numbers are not really valid. However ASoC core will read these registers to get default state during startup. With recent changes to ASoC core, every register read/write failures are reported very verbosely. Prior to this fails to reads are totally ignored, so we never saw any error messages. To fix this add dummy read/write function to return default value. Fixes: e3a33673e845 ("ASoC: qdsp6: q6routing: Add q6routing driver") Reported-by: John Stultz Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20200811120205.21805-2-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/qcom/qdsp6/q6routing.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) -- 2.25.1 diff --git a/sound/soc/qcom/qdsp6/q6routing.c b/sound/soc/qcom/qdsp6/q6routing.c index 46e50612b92c1..750e6a30444eb 100644 --- a/sound/soc/qcom/qdsp6/q6routing.c +++ b/sound/soc/qcom/qdsp6/q6routing.c @@ -973,6 +973,20 @@ static int msm_routing_probe(struct snd_soc_component *c) return 0; } +static unsigned int q6routing_reg_read(struct snd_soc_component *component, + unsigned int reg) +{ + /* default value */ + return 0; +} + +static int q6routing_reg_write(struct snd_soc_component *component, + unsigned int reg, unsigned int val) +{ + /* dummy */ + return 0; +} + static const struct snd_soc_component_driver msm_soc_routing_component = { .probe = msm_routing_probe, .name = DRV_NAME, @@ -981,6 +995,8 @@ static const struct snd_soc_component_driver msm_soc_routing_component = { .num_dapm_widgets = ARRAY_SIZE(msm_qdsp6_widgets), .dapm_routes = intercon, .num_dapm_routes = ARRAY_SIZE(intercon), + .read = q6routing_reg_read, + .write = q6routing_reg_write, }; static int q6pcm_routing_probe(struct platform_device *pdev)