Received: by 2002:ab2:6991:0:b0:1f7:f6c3:9cb1 with SMTP id v17csp168818lqo; Tue, 7 May 2024 16:25:29 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVJgHPtCkO8t+KnKttm8rbjXrdDx6U6ZKtz6haJErjS9s/CEQEa8EXQ+0AHW0lFqWOXwmTnIb5R5iCJOOUvnt2acqt2sIaLOro/hNwaiQ== X-Google-Smtp-Source: AGHT+IF15iEuas71gm70DaqTHOZsVuiwmaySaeXCpxQwhdBwgxQ8WPAeb9NS966NnoguE7rEhH3w X-Received: by 2002:a17:906:6b9a:b0:a59:bae0:b12f with SMTP id a640c23a62f3a-a59fb9ce9d9mr45574666b.57.1715124329115; Tue, 07 May 2024 16:25:29 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715124329; cv=pass; d=google.com; s=arc-20160816; b=LsHB4+e+vLE5c0rqoJenwzzwGHGJZqGnwMjhwX2q2DOTJT3YYtKEXUmNJnWd+eDqhv VLAn7iV4A7EiN1xvmZMZhw6XJsvkr7pcKg00y0eXAg3EDvEloLGZloiKQoofg5dB+AvT p18jhz6Ybal8ZPXdNE/el2zMbTrpRCyUXadhccvnyminnDc4GWQErYKvpiI3mQCJ7GZS GpGc8c5Y2PuKX5mLa5q4ITHScaZ4ZW8klyfJqAa0kL9ZyFM9OF6nHQsQ3k+zlG5wD0oA MxYZn0XFmWnQqQKVTGI+UQrPeJGicTNuSyGBlArUcMk2jQcAjX5IafMseHLrTM/hIupR Sz3w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=NA2kEghDKfsFIJYNlvqw4fYQcrD1kwrSmyq4tGpl43M=; fh=hYj16BiRXlyB0pRjVFH/fB1xEF4960w9bosjfRnN6yw=; b=KxnlkpNbUg3napzxMkeBQhbrTYf9fQMrmP1TBoATZKdp4sKDc0h+eVh3bQ2Ez0lIxv JmNsP+UW0xUsa2PryL9AVQeP+qjh1hEO44iNkc+lVVfvjfEwpRXDOm7mtn+OAdgyawlA gnpAn5XXh5hjNXPJ9ctH/DJtQkm2BRjPWyUfD/eEKf8TaYZTzrczpE+NI8X/88uglVgl 7LjOnCzLXmxCeIxJ2kPp3lXX6M9kdx9iIlJao4lJKMGqhEyJY3rDzgFRHoQc3Uo6ooQo I3EFkkAV1BXRDcQhz+3aN+rDPyiSq9AMK2OIm+zFUMv0t/11d3Cco6elEUSD4ebTolZd BW2w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=BTKb2ilb; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-172357-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-172357-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id gt36-20020a1709072da400b00a59b348e56csi4269828ejc.5.2024.05.07.16.25.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 May 2024 16:25:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-172357-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=BTKb2ilb; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-172357-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-172357-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id D599F1F21FC8 for ; Tue, 7 May 2024 23:25:28 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 67DDE133400; Tue, 7 May 2024 23:08:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="BTKb2ilb" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8B12B1332A0; Tue, 7 May 2024 23:08:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715123309; cv=none; b=ck+4eytWntDXz9Suw7cuyq0U58b/tsQB7DG54Lrujv4zdUOSqiqEUDLuBEaQ96Bkwt8rCpxyE8XCd66rAR/6yELZCjupGhATgHla02gwl5LwwLZCtfD0v8biaLLHPy3DYDUJNYitlGidcF0aTcqD3uCk0KdRQKwE61uqpL2kuq8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715123309; c=relaxed/simple; bh=KqH/EllT2nZhX3OizGudEvwDJBGY4WN0GkKk4gjgHcg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=fZrearPLBq3QFeb87kHa0d7aeSy3wARAdmoipLoMidJxh0RIsJPBNM8vBypspS4Egl49xqo59+PxkZ7FUCT3MzqS06Avn0Vsil/4KWdLi1MalqyVQ0yg9ctXEfQyNJTDyvA9c5WOxnAB4JgAnI5xDiDW4NsNYy4sFcEXwKpiVfc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=BTKb2ilb; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id EDD0AC2BBFC; Tue, 7 May 2024 23:08:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1715123309; bh=KqH/EllT2nZhX3OizGudEvwDJBGY4WN0GkKk4gjgHcg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BTKb2ilbwb+rE3RM9BJBjbUJ8IMXx4dIFfqkk9zLFG/Ho/6M3gGOVxKUFOMGzdMDt F1T2ErrY3k1ny0hybSmz12rvLWPZh/VWTzjcrWwvvwxFCqTC2M/laduJ68XLqUG0ov EMAd0+izTSEXqQY3q3+lbHYvjoXQ6aFQlcfFOxnwPusqfoM35ZKmMjtpKSVIMfTpO1 +k9itD5ywZMWF4/x6a4mqDl3q/11MeDSLwC9YrHuis10OkKQoLsExhLiCVW9alwsuA o9zJx4+2vyEoxFsSqkU4OMwRMhFP1Jhoc4nvtB+eMKiLltCYfhsJ1g/iMZMOChVdnb l80kbHAwh5xuw== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Stefan Binding , Richard Fitzgerald , Mark Brown , Sasha Levin , james.schulman@cirrus.com, david.rhodes@cirrus.com, lgirdwood@gmail.com, perex@perex.cz, tiwai@suse.com, alsa-devel@alsa-project.org, patches@opensource.cirrus.com, linux-sound@vger.kernel.org Subject: [PATCH AUTOSEL 6.8 15/52] ASoC: cs35l41: Update DSP1RX5/6 Sources for DSP config Date: Tue, 7 May 2024 19:06:41 -0400 Message-ID: <20240507230800.392128-15-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240507230800.392128-1-sashal@kernel.org> References: <20240507230800.392128-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore X-stable-base: Linux 6.8.9 Content-Transfer-Encoding: 8bit From: Stefan Binding [ Upstream commit eefb831d2e4dd58d58002a2ef75ff989e073230d ] Currently, all ASoC systems are set to use VPMON for DSP1RX5_SRC, however, this is required only for internal boost systems. External boost systems require VBSTMON instead of VPMON to be the input to DSP1RX5_SRC. Shared Boost Active acts like Internal boost (requires VPMON). Shared Boost Passive acts like External boost (requires VBSTMON) All systems require DSP1RX6_SRC to be set to VBSTMON. Signed-off-by: Stefan Binding Reviewed-by: Richard Fitzgerald Link: https://msgid.link/r/20240411142648.650921-1-sbinding@opensource.cirrus.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/codecs/cs35l41.c | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/cs35l41.c b/sound/soc/codecs/cs35l41.c index dfb4ce53491bb..f8e57a2fc3e32 100644 --- a/sound/soc/codecs/cs35l41.c +++ b/sound/soc/codecs/cs35l41.c @@ -1094,6 +1094,7 @@ static int cs35l41_handle_pdata(struct device *dev, struct cs35l41_hw_cfg *hw_cf static int cs35l41_dsp_init(struct cs35l41_private *cs35l41) { struct wm_adsp *dsp; + uint32_t dsp1rx5_src; int ret; dsp = &cs35l41->dsp; @@ -1113,16 +1114,29 @@ static int cs35l41_dsp_init(struct cs35l41_private *cs35l41) return ret; } - ret = regmap_write(cs35l41->regmap, CS35L41_DSP1_RX5_SRC, - CS35L41_INPUT_SRC_VPMON); + switch (cs35l41->hw_cfg.bst_type) { + case CS35L41_INT_BOOST: + case CS35L41_SHD_BOOST_ACTV: + dsp1rx5_src = CS35L41_INPUT_SRC_VPMON; + break; + case CS35L41_EXT_BOOST: + case CS35L41_SHD_BOOST_PASS: + dsp1rx5_src = CS35L41_INPUT_SRC_VBSTMON; + break; + default: + dev_err(cs35l41->dev, "wm_halo_init failed - Invalid Boost Type: %d\n", + cs35l41->hw_cfg.bst_type); + goto err_dsp; + } + + ret = regmap_write(cs35l41->regmap, CS35L41_DSP1_RX5_SRC, dsp1rx5_src); if (ret < 0) { - dev_err(cs35l41->dev, "Write INPUT_SRC_VPMON failed: %d\n", ret); + dev_err(cs35l41->dev, "Write DSP1RX5_SRC: %d failed: %d\n", dsp1rx5_src, ret); goto err_dsp; } - ret = regmap_write(cs35l41->regmap, CS35L41_DSP1_RX6_SRC, - CS35L41_INPUT_SRC_CLASSH); + ret = regmap_write(cs35l41->regmap, CS35L41_DSP1_RX6_SRC, CS35L41_INPUT_SRC_VBSTMON); if (ret < 0) { - dev_err(cs35l41->dev, "Write INPUT_SRC_CLASSH failed: %d\n", ret); + dev_err(cs35l41->dev, "Write CS35L41_INPUT_SRC_VBSTMON failed: %d\n", ret); goto err_dsp; } ret = regmap_write(cs35l41->regmap, CS35L41_DSP1_RX7_SRC, -- 2.43.0