All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] ASoC: cs35l56: Updates for B0 silicon
@ 2023-04-18 14:43 Richard Fitzgerald
  2023-04-18 14:43 ` [PATCH 1/4] ASoC: cs35l56: Update comment on masking of EINT20 interrupts Richard Fitzgerald via Alsa-devel
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: Richard Fitzgerald @ 2023-04-18 14:43 UTC (permalink / raw)
  To: broonie; +Cc: alsa-devel, linux-kernel, patches, Richard Fitzgerald

These patches make some small changes to align with the B0
silicon revision.

Richard Fitzgerald (4):
  ASoC: cs35l56: Update comment on masking of EINT20 interrupts
  ASoC: cs35l56: Remove SDW1 TX5 and TX6
  ASoC: cs35l56: Remove SDW2RX1 mixer source
  ASoC: cs35l56: Rename mixer source defines for SoundWire DP1

 include/sound/cs35l56.h           | 10 +++------
 sound/soc/codecs/cs35l56-shared.c | 34 +++----------------------------
 sound/soc/codecs/cs35l56.c        | 30 ++-------------------------
 3 files changed, 8 insertions(+), 66 deletions(-)

-- 
2.30.2


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 1/4] ASoC: cs35l56: Update comment on masking of EINT20 interrupts
  2023-04-18 14:43 [PATCH 0/4] ASoC: cs35l56: Updates for B0 silicon Richard Fitzgerald
  2023-04-18 14:43 ` [PATCH 1/4] ASoC: cs35l56: Update comment on masking of EINT20 interrupts Richard Fitzgerald via Alsa-devel
@ 2023-04-18 14:43 ` Richard Fitzgerald
  2023-04-18 14:43 ` [PATCH 2/4] ASoC: cs35l56: Remove SDW1 TX5 and TX6 Richard Fitzgerald
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Richard Fitzgerald @ 2023-04-18 14:43 UTC (permalink / raw)
  To: broonie; +Cc: alsa-devel, linux-kernel, patches, Richard Fitzgerald

EINT20 contains wake-source interrupts and also interface-blocked
interrupts, which all default to unmasked after reset or wake.

The comment in cs35l56_init() only mentioned the wake interrupts.
Update the comment so it's clear that it's intentional to also
mask the *_BLOCKED interrupts.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
---
 sound/soc/codecs/cs35l56.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/codecs/cs35l56.c b/sound/soc/codecs/cs35l56.c
index 0f4a94b02ef8..1b80cae5026e 100644
--- a/sound/soc/codecs/cs35l56.c
+++ b/sound/soc/codecs/cs35l56.c
@@ -1537,7 +1537,7 @@ int cs35l56_init(struct cs35l56_private *cs35l56)
 
 	cs35l56_patch(cs35l56->dev, cs35l56->regmap, cs35l56->rev);
 
-	/* Wake source interrupts default to unmasked, so mask them */
+	/* Wake source and *_BLOCKED interrupts default to unmasked, so mask them */
 	regmap_write(cs35l56->regmap, CS35L56_IRQ1_MASK_20, 0xffffffff);
 	regmap_update_bits(cs35l56->regmap, CS35L56_IRQ1_MASK_1,
 			   CS35L56_AMP_SHORT_ERR_EINT1_MASK,
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 1/4] ASoC: cs35l56: Update comment on masking of EINT20 interrupts
  2023-04-18 14:43 [PATCH 0/4] ASoC: cs35l56: Updates for B0 silicon Richard Fitzgerald
@ 2023-04-18 14:43 ` Richard Fitzgerald via Alsa-devel
  2023-04-18 14:43 ` Richard Fitzgerald
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Richard Fitzgerald via Alsa-devel @ 2023-04-18 14:43 UTC (permalink / raw)
  To: broonie; +Cc: alsa-devel, linux-kernel, patches, Richard Fitzgerald


[-- Attachment #0: Type: message/rfc822, Size: 5709 bytes --]

From: Richard Fitzgerald <rf@opensource.cirrus.com>
To: <broonie@kernel.org>
Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, patches@opensource.cirrus.com, Richard Fitzgerald <rf@opensource.cirrus.com>
Subject: [PATCH 1/4] ASoC: cs35l56: Update comment on masking of EINT20 interrupts
Date: Tue, 18 Apr 2023 15:43:06 +0100
Message-ID: <20230418144309.1100721-2-rf@opensource.cirrus.com>

EINT20 contains wake-source interrupts and also interface-blocked
interrupts, which all default to unmasked after reset or wake.

The comment in cs35l56_init() only mentioned the wake interrupts.
Update the comment so it's clear that it's intentional to also
mask the *_BLOCKED interrupts.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
---
 sound/soc/codecs/cs35l56.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/codecs/cs35l56.c b/sound/soc/codecs/cs35l56.c
index 0f4a94b02ef8..1b80cae5026e 100644
--- a/sound/soc/codecs/cs35l56.c
+++ b/sound/soc/codecs/cs35l56.c
@@ -1537,7 +1537,7 @@ int cs35l56_init(struct cs35l56_private *cs35l56)
 
 	cs35l56_patch(cs35l56->dev, cs35l56->regmap, cs35l56->rev);
 
-	/* Wake source interrupts default to unmasked, so mask them */
+	/* Wake source and *_BLOCKED interrupts default to unmasked, so mask them */
 	regmap_write(cs35l56->regmap, CS35L56_IRQ1_MASK_20, 0xffffffff);
 	regmap_update_bits(cs35l56->regmap, CS35L56_IRQ1_MASK_1,
 			   CS35L56_AMP_SHORT_ERR_EINT1_MASK,
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 2/4] ASoC: cs35l56: Remove SDW1 TX5 and TX6
  2023-04-18 14:43 [PATCH 0/4] ASoC: cs35l56: Updates for B0 silicon Richard Fitzgerald
  2023-04-18 14:43 ` [PATCH 1/4] ASoC: cs35l56: Update comment on masking of EINT20 interrupts Richard Fitzgerald via Alsa-devel
  2023-04-18 14:43 ` Richard Fitzgerald
@ 2023-04-18 14:43 ` Richard Fitzgerald
  2023-04-18 14:43 ` Richard Fitzgerald via Alsa-devel
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Richard Fitzgerald @ 2023-04-18 14:43 UTC (permalink / raw)
  To: broonie; +Cc: alsa-devel, linux-kernel, patches, Richard Fitzgerald

Reduce SDW1 to 4 channels and remove the controls for SDW1
TX5 and TX6.

The TX5 and TX6 channels have been removed from B0 silicon.
There is no need to support them on A1 silicon.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
---
 include/sound/cs35l56.h           |  3 ---
 sound/soc/codecs/cs35l56-shared.c | 27 ---------------------------
 sound/soc/codecs/cs35l56.c        | 28 +---------------------------
 3 files changed, 1 insertion(+), 57 deletions(-)

diff --git a/include/sound/cs35l56.h b/include/sound/cs35l56.h
index b3300bce74f4..dd7503464651 100644
--- a/include/sound/cs35l56.h
+++ b/include/sound/cs35l56.h
@@ -43,8 +43,6 @@
 #define CS35L56_SWIRE_DP3_CH2_INPUT			0x0004C74
 #define CS35L56_SWIRE_DP3_CH3_INPUT			0x0004C78
 #define CS35L56_SWIRE_DP3_CH4_INPUT			0x0004C7C
-#define CS35L56_SWIRE_DP3_CH5_INPUT			0x0004C80
-#define CS35L56_SWIRE_DP3_CH6_INPUT			0x0004C84
 #define CS35L56_IRQ1_CFG				0x000E000
 #define CS35L56_IRQ1_STATUS				0x000E004
 #define CS35L56_IRQ1_EINT_1				0x000E010
@@ -262,7 +260,6 @@ extern const struct cs_dsp_region cs35l56_dsp1_regions[CS35L56_NUM_DSP_REGIONS];
 extern const char * const cs35l56_tx_input_texts[CS35L56_NUM_INPUT_SRC];
 extern const unsigned int cs35l56_tx_input_values[CS35L56_NUM_INPUT_SRC];
 
-void cs35l56_patch(struct device *dev, struct regmap *regmap, u8 revid);
 void cs35l56_reread_firmware_registers(struct device *dev, struct regmap *regmap);
 int cs35l56_get_bclk_freq_id(unsigned int freq);
 void cs35l56_fill_supply_names(struct regulator_bulk_data *data);
diff --git a/sound/soc/codecs/cs35l56-shared.c b/sound/soc/codecs/cs35l56-shared.c
index d8bc06ad4888..f5fa6bb04d38 100644
--- a/sound/soc/codecs/cs35l56-shared.c
+++ b/sound/soc/codecs/cs35l56-shared.c
@@ -28,8 +28,6 @@ static const struct reg_default cs35l56_reg_defaults[] = {
 	{ CS35L56_SWIRE_DP3_CH2_INPUT,		0x00000019 },
 	{ CS35L56_SWIRE_DP3_CH3_INPUT,		0x00000029 },
 	{ CS35L56_SWIRE_DP3_CH4_INPUT,		0x00000028 },
-	{ CS35L56_SWIRE_DP3_CH5_INPUT,		0x00000018 },
-	{ CS35L56_SWIRE_DP3_CH6_INPUT,		0x00000018 },
 	{ CS35L56_IRQ1_CFG,			0x00000000 },
 	{ CS35L56_IRQ1_MASK_1,			0x83ffffff },
 	{ CS35L56_IRQ1_MASK_2,			0xffff7fff },
@@ -42,29 +40,6 @@ static const struct reg_default cs35l56_reg_defaults[] = {
 	/* CS35L56_MAIN_POSTURE_NUMBER - soft register, no default	*/
 };
 
-/*
- * The Ax devices have different default register values to that of B0,
- * establish a common set of register defaults.
- */
-static const struct reg_sequence cs35l56_reva_patch[] = {
-	{ CS35L56_SWIRE_DP3_CH5_INPUT,	0x00000018 },
-	{ CS35L56_SWIRE_DP3_CH6_INPUT,	0x00000018 },
-};
-
-void cs35l56_patch(struct device *dev, struct regmap *regmap, u8 revid)
-{
-	int ret;
-
-	if (revid >= CS35L56_REVID_B0)
-		return;
-
-	ret = regmap_register_patch(regmap, cs35l56_reva_patch,
-				    ARRAY_SIZE(cs35l56_reva_patch));
-	if (ret)
-		dev_err(dev, "Failed to apply patch: %d\n", ret);
-}
-EXPORT_SYMBOL_NS_GPL(cs35l56_patch, SND_SOC_CS35L56_SHARED);
-
 static bool cs35l56_is_dsp_memory(unsigned int reg)
 {
 	switch (reg) {
@@ -114,8 +89,6 @@ static bool cs35l56_readable_reg(struct device *dev, unsigned int reg)
 	case CS35L56_SWIRE_DP3_CH2_INPUT:
 	case CS35L56_SWIRE_DP3_CH3_INPUT:
 	case CS35L56_SWIRE_DP3_CH4_INPUT:
-	case CS35L56_SWIRE_DP3_CH5_INPUT:
-	case CS35L56_SWIRE_DP3_CH6_INPUT:
 	case CS35L56_IRQ1_CFG:
 	case CS35L56_IRQ1_STATUS:
 	case CS35L56_IRQ1_EINT_1 ... CS35L56_IRQ1_EINT_8:
diff --git a/sound/soc/codecs/cs35l56.c b/sound/soc/codecs/cs35l56.c
index 1b80cae5026e..c0a857cfb8cb 100644
--- a/sound/soc/codecs/cs35l56.c
+++ b/sound/soc/codecs/cs35l56.c
@@ -166,24 +166,6 @@ static SOC_VALUE_ENUM_SINGLE_DECL(cs35l56_sdw1tx4_enum,
 static const struct snd_kcontrol_new sdw1_tx4_mux =
 	SOC_DAPM_ENUM("SDW1TX4 SRC", cs35l56_sdw1tx4_enum);
 
-static SOC_VALUE_ENUM_SINGLE_DECL(cs35l56_sdw1tx5_enum,
-				CS35L56_SWIRE_DP3_CH5_INPUT,
-				0, CS35L56_SWIRETXn_SRC_MASK,
-				cs35l56_tx_input_texts,
-				cs35l56_tx_input_values);
-
-static const struct snd_kcontrol_new sdw1_tx5_mux =
-	SOC_DAPM_ENUM("SDW1TX5 SRC", cs35l56_sdw1tx5_enum);
-
-static SOC_VALUE_ENUM_SINGLE_DECL(cs35l56_sdw1tx6_enum,
-				CS35L56_SWIRE_DP3_CH6_INPUT,
-				0, CS35L56_SWIRETXn_SRC_MASK,
-				cs35l56_tx_input_texts,
-				cs35l56_tx_input_values);
-
-static const struct snd_kcontrol_new sdw1_tx6_mux =
-	SOC_DAPM_ENUM("SDW1TX6 SRC", cs35l56_sdw1tx6_enum);
-
 static int cs35l56_play_event(struct snd_soc_dapm_widget *w,
 			      struct snd_kcontrol *kcontrol, int event)
 {
@@ -251,8 +233,6 @@ static const struct snd_soc_dapm_widget cs35l56_dapm_widgets[] = {
 	SND_SOC_DAPM_MUX("SDW1 TX2 Source", SND_SOC_NOPM, 0, 0, &sdw1_tx2_mux),
 	SND_SOC_DAPM_MUX("SDW1 TX3 Source", SND_SOC_NOPM, 0, 0, &sdw1_tx3_mux),
 	SND_SOC_DAPM_MUX("SDW1 TX4 Source", SND_SOC_NOPM, 0, 0, &sdw1_tx4_mux),
-	SND_SOC_DAPM_MUX("SDW1 TX5 Source", SND_SOC_NOPM, 0, 0, &sdw1_tx5_mux),
-	SND_SOC_DAPM_MUX("SDW1 TX6 Source", SND_SOC_NOPM, 0, 0, &sdw1_tx6_mux),
 
 	SND_SOC_DAPM_SIGGEN("VMON ADC"),
 	SND_SOC_DAPM_SIGGEN("IMON ADC"),
@@ -318,14 +298,10 @@ static const struct snd_soc_dapm_route cs35l56_audio_map[] = {
 	CS35L56_SRC_ROUTE("SDW1 TX2")
 	CS35L56_SRC_ROUTE("SDW1 TX3")
 	CS35L56_SRC_ROUTE("SDW1 TX4")
-	CS35L56_SRC_ROUTE("SDW1 TX5")
-	CS35L56_SRC_ROUTE("SDW1 TX6")
 	{ "SDW1 Capture", NULL, "SDW1 TX1 Source" },
 	{ "SDW1 Capture", NULL, "SDW1 TX2 Source" },
 	{ "SDW1 Capture", NULL, "SDW1 TX3 Source" },
 	{ "SDW1 Capture", NULL, "SDW1 TX4 Source" },
-	{ "SDW1 Capture", NULL, "SDW1 TX5 Source" },
-	{ "SDW1 Capture", NULL, "SDW1 TX6 Source" },
 };
 
 static int cs35l56_dsp_event(struct snd_soc_dapm_widget *w,
@@ -779,7 +755,7 @@ static struct snd_soc_dai_driver cs35l56_dai[] = {
 		.capture = {
 			.stream_name = "SDW1 Capture",
 			.channels_min = 1,
-			.channels_max = 6,
+			.channels_max = 4,
 			.rates = CS35L56_RATES,
 			.formats = CS35L56_TX_FORMATS,
 		},
@@ -1535,8 +1511,6 @@ int cs35l56_init(struct cs35l56_private *cs35l56)
 	dev_info(cs35l56->dev, "Cirrus Logic CS35L56%s Rev %02X OTP%d\n",
 		 cs35l56->secured ? "s" : "", cs35l56->rev, otpid);
 
-	cs35l56_patch(cs35l56->dev, cs35l56->regmap, cs35l56->rev);
-
 	/* Wake source and *_BLOCKED interrupts default to unmasked, so mask them */
 	regmap_write(cs35l56->regmap, CS35L56_IRQ1_MASK_20, 0xffffffff);
 	regmap_update_bits(cs35l56->regmap, CS35L56_IRQ1_MASK_1,
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 2/4] ASoC: cs35l56: Remove SDW1 TX5 and TX6
  2023-04-18 14:43 [PATCH 0/4] ASoC: cs35l56: Updates for B0 silicon Richard Fitzgerald
                   ` (2 preceding siblings ...)
  2023-04-18 14:43 ` [PATCH 2/4] ASoC: cs35l56: Remove SDW1 TX5 and TX6 Richard Fitzgerald
@ 2023-04-18 14:43 ` Richard Fitzgerald via Alsa-devel
  2023-04-18 14:43 ` [PATCH 3/4] ASoC: cs35l56: Remove SDW2RX1 mixer source Richard Fitzgerald
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Richard Fitzgerald via Alsa-devel @ 2023-04-18 14:43 UTC (permalink / raw)
  To: broonie; +Cc: alsa-devel, linux-kernel, patches, Richard Fitzgerald


[-- Attachment #0: Type: message/rfc822, Size: 10983 bytes --]

From: Richard Fitzgerald <rf@opensource.cirrus.com>
To: <broonie@kernel.org>
Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, patches@opensource.cirrus.com, Richard Fitzgerald <rf@opensource.cirrus.com>
Subject: [PATCH 2/4] ASoC: cs35l56: Remove SDW1 TX5 and TX6
Date: Tue, 18 Apr 2023 15:43:07 +0100
Message-ID: <20230418144309.1100721-3-rf@opensource.cirrus.com>

Reduce SDW1 to 4 channels and remove the controls for SDW1
TX5 and TX6.

The TX5 and TX6 channels have been removed from B0 silicon.
There is no need to support them on A1 silicon.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
---
 include/sound/cs35l56.h           |  3 ---
 sound/soc/codecs/cs35l56-shared.c | 27 ---------------------------
 sound/soc/codecs/cs35l56.c        | 28 +---------------------------
 3 files changed, 1 insertion(+), 57 deletions(-)

diff --git a/include/sound/cs35l56.h b/include/sound/cs35l56.h
index b3300bce74f4..dd7503464651 100644
--- a/include/sound/cs35l56.h
+++ b/include/sound/cs35l56.h
@@ -43,8 +43,6 @@
 #define CS35L56_SWIRE_DP3_CH2_INPUT			0x0004C74
 #define CS35L56_SWIRE_DP3_CH3_INPUT			0x0004C78
 #define CS35L56_SWIRE_DP3_CH4_INPUT			0x0004C7C
-#define CS35L56_SWIRE_DP3_CH5_INPUT			0x0004C80
-#define CS35L56_SWIRE_DP3_CH6_INPUT			0x0004C84
 #define CS35L56_IRQ1_CFG				0x000E000
 #define CS35L56_IRQ1_STATUS				0x000E004
 #define CS35L56_IRQ1_EINT_1				0x000E010
@@ -262,7 +260,6 @@ extern const struct cs_dsp_region cs35l56_dsp1_regions[CS35L56_NUM_DSP_REGIONS];
 extern const char * const cs35l56_tx_input_texts[CS35L56_NUM_INPUT_SRC];
 extern const unsigned int cs35l56_tx_input_values[CS35L56_NUM_INPUT_SRC];
 
-void cs35l56_patch(struct device *dev, struct regmap *regmap, u8 revid);
 void cs35l56_reread_firmware_registers(struct device *dev, struct regmap *regmap);
 int cs35l56_get_bclk_freq_id(unsigned int freq);
 void cs35l56_fill_supply_names(struct regulator_bulk_data *data);
diff --git a/sound/soc/codecs/cs35l56-shared.c b/sound/soc/codecs/cs35l56-shared.c
index d8bc06ad4888..f5fa6bb04d38 100644
--- a/sound/soc/codecs/cs35l56-shared.c
+++ b/sound/soc/codecs/cs35l56-shared.c
@@ -28,8 +28,6 @@ static const struct reg_default cs35l56_reg_defaults[] = {
 	{ CS35L56_SWIRE_DP3_CH2_INPUT,		0x00000019 },
 	{ CS35L56_SWIRE_DP3_CH3_INPUT,		0x00000029 },
 	{ CS35L56_SWIRE_DP3_CH4_INPUT,		0x00000028 },
-	{ CS35L56_SWIRE_DP3_CH5_INPUT,		0x00000018 },
-	{ CS35L56_SWIRE_DP3_CH6_INPUT,		0x00000018 },
 	{ CS35L56_IRQ1_CFG,			0x00000000 },
 	{ CS35L56_IRQ1_MASK_1,			0x83ffffff },
 	{ CS35L56_IRQ1_MASK_2,			0xffff7fff },
@@ -42,29 +40,6 @@ static const struct reg_default cs35l56_reg_defaults[] = {
 	/* CS35L56_MAIN_POSTURE_NUMBER - soft register, no default	*/
 };
 
-/*
- * The Ax devices have different default register values to that of B0,
- * establish a common set of register defaults.
- */
-static const struct reg_sequence cs35l56_reva_patch[] = {
-	{ CS35L56_SWIRE_DP3_CH5_INPUT,	0x00000018 },
-	{ CS35L56_SWIRE_DP3_CH6_INPUT,	0x00000018 },
-};
-
-void cs35l56_patch(struct device *dev, struct regmap *regmap, u8 revid)
-{
-	int ret;
-
-	if (revid >= CS35L56_REVID_B0)
-		return;
-
-	ret = regmap_register_patch(regmap, cs35l56_reva_patch,
-				    ARRAY_SIZE(cs35l56_reva_patch));
-	if (ret)
-		dev_err(dev, "Failed to apply patch: %d\n", ret);
-}
-EXPORT_SYMBOL_NS_GPL(cs35l56_patch, SND_SOC_CS35L56_SHARED);
-
 static bool cs35l56_is_dsp_memory(unsigned int reg)
 {
 	switch (reg) {
@@ -114,8 +89,6 @@ static bool cs35l56_readable_reg(struct device *dev, unsigned int reg)
 	case CS35L56_SWIRE_DP3_CH2_INPUT:
 	case CS35L56_SWIRE_DP3_CH3_INPUT:
 	case CS35L56_SWIRE_DP3_CH4_INPUT:
-	case CS35L56_SWIRE_DP3_CH5_INPUT:
-	case CS35L56_SWIRE_DP3_CH6_INPUT:
 	case CS35L56_IRQ1_CFG:
 	case CS35L56_IRQ1_STATUS:
 	case CS35L56_IRQ1_EINT_1 ... CS35L56_IRQ1_EINT_8:
diff --git a/sound/soc/codecs/cs35l56.c b/sound/soc/codecs/cs35l56.c
index 1b80cae5026e..c0a857cfb8cb 100644
--- a/sound/soc/codecs/cs35l56.c
+++ b/sound/soc/codecs/cs35l56.c
@@ -166,24 +166,6 @@ static SOC_VALUE_ENUM_SINGLE_DECL(cs35l56_sdw1tx4_enum,
 static const struct snd_kcontrol_new sdw1_tx4_mux =
 	SOC_DAPM_ENUM("SDW1TX4 SRC", cs35l56_sdw1tx4_enum);
 
-static SOC_VALUE_ENUM_SINGLE_DECL(cs35l56_sdw1tx5_enum,
-				CS35L56_SWIRE_DP3_CH5_INPUT,
-				0, CS35L56_SWIRETXn_SRC_MASK,
-				cs35l56_tx_input_texts,
-				cs35l56_tx_input_values);
-
-static const struct snd_kcontrol_new sdw1_tx5_mux =
-	SOC_DAPM_ENUM("SDW1TX5 SRC", cs35l56_sdw1tx5_enum);
-
-static SOC_VALUE_ENUM_SINGLE_DECL(cs35l56_sdw1tx6_enum,
-				CS35L56_SWIRE_DP3_CH6_INPUT,
-				0, CS35L56_SWIRETXn_SRC_MASK,
-				cs35l56_tx_input_texts,
-				cs35l56_tx_input_values);
-
-static const struct snd_kcontrol_new sdw1_tx6_mux =
-	SOC_DAPM_ENUM("SDW1TX6 SRC", cs35l56_sdw1tx6_enum);
-
 static int cs35l56_play_event(struct snd_soc_dapm_widget *w,
 			      struct snd_kcontrol *kcontrol, int event)
 {
@@ -251,8 +233,6 @@ static const struct snd_soc_dapm_widget cs35l56_dapm_widgets[] = {
 	SND_SOC_DAPM_MUX("SDW1 TX2 Source", SND_SOC_NOPM, 0, 0, &sdw1_tx2_mux),
 	SND_SOC_DAPM_MUX("SDW1 TX3 Source", SND_SOC_NOPM, 0, 0, &sdw1_tx3_mux),
 	SND_SOC_DAPM_MUX("SDW1 TX4 Source", SND_SOC_NOPM, 0, 0, &sdw1_tx4_mux),
-	SND_SOC_DAPM_MUX("SDW1 TX5 Source", SND_SOC_NOPM, 0, 0, &sdw1_tx5_mux),
-	SND_SOC_DAPM_MUX("SDW1 TX6 Source", SND_SOC_NOPM, 0, 0, &sdw1_tx6_mux),
 
 	SND_SOC_DAPM_SIGGEN("VMON ADC"),
 	SND_SOC_DAPM_SIGGEN("IMON ADC"),
@@ -318,14 +298,10 @@ static const struct snd_soc_dapm_route cs35l56_audio_map[] = {
 	CS35L56_SRC_ROUTE("SDW1 TX2")
 	CS35L56_SRC_ROUTE("SDW1 TX3")
 	CS35L56_SRC_ROUTE("SDW1 TX4")
-	CS35L56_SRC_ROUTE("SDW1 TX5")
-	CS35L56_SRC_ROUTE("SDW1 TX6")
 	{ "SDW1 Capture", NULL, "SDW1 TX1 Source" },
 	{ "SDW1 Capture", NULL, "SDW1 TX2 Source" },
 	{ "SDW1 Capture", NULL, "SDW1 TX3 Source" },
 	{ "SDW1 Capture", NULL, "SDW1 TX4 Source" },
-	{ "SDW1 Capture", NULL, "SDW1 TX5 Source" },
-	{ "SDW1 Capture", NULL, "SDW1 TX6 Source" },
 };
 
 static int cs35l56_dsp_event(struct snd_soc_dapm_widget *w,
@@ -779,7 +755,7 @@ static struct snd_soc_dai_driver cs35l56_dai[] = {
 		.capture = {
 			.stream_name = "SDW1 Capture",
 			.channels_min = 1,
-			.channels_max = 6,
+			.channels_max = 4,
 			.rates = CS35L56_RATES,
 			.formats = CS35L56_TX_FORMATS,
 		},
@@ -1535,8 +1511,6 @@ int cs35l56_init(struct cs35l56_private *cs35l56)
 	dev_info(cs35l56->dev, "Cirrus Logic CS35L56%s Rev %02X OTP%d\n",
 		 cs35l56->secured ? "s" : "", cs35l56->rev, otpid);
 
-	cs35l56_patch(cs35l56->dev, cs35l56->regmap, cs35l56->rev);
-
 	/* Wake source and *_BLOCKED interrupts default to unmasked, so mask them */
 	regmap_write(cs35l56->regmap, CS35L56_IRQ1_MASK_20, 0xffffffff);
 	regmap_update_bits(cs35l56->regmap, CS35L56_IRQ1_MASK_1,
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 3/4] ASoC: cs35l56: Remove SDW2RX1 mixer source
  2023-04-18 14:43 [PATCH 0/4] ASoC: cs35l56: Updates for B0 silicon Richard Fitzgerald
                   ` (3 preceding siblings ...)
  2023-04-18 14:43 ` Richard Fitzgerald via Alsa-devel
@ 2023-04-18 14:43 ` Richard Fitzgerald
  2023-04-18 14:43 ` Richard Fitzgerald via Alsa-devel
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Richard Fitzgerald @ 2023-04-18 14:43 UTC (permalink / raw)
  To: broonie; +Cc: alsa-devel, linux-kernel, patches, Richard Fitzgerald

The mixer source index value for SDW2RX1 is different between
A1 and B0 silicon. As the driver doesn't provide a DAI for SDW2
just remove it as a mixer source option.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
---
 include/sound/cs35l56.h           | 3 +--
 sound/soc/codecs/cs35l56-shared.c | 3 +--
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/include/sound/cs35l56.h b/include/sound/cs35l56.h
index dd7503464651..0b2f7cfc6a4a 100644
--- a/include/sound/cs35l56.h
+++ b/include/sound/cs35l56.h
@@ -181,10 +181,9 @@
 #define CS35L56_INPUT_SRC_INTERPOLATOR			0x40
 #define CS35L56_INPUT_SRC_SWIRE_RX1			0x44
 #define CS35L56_INPUT_SRC_SWIRE_RX2			0x45
-#define CS35L56_INPUT_SRC_SWIRE_RX3			0x46
 #define CS35L56_INPUT_MASK				0x7F
 
-#define CS35L56_NUM_INPUT_SRC				22
+#define CS35L56_NUM_INPUT_SRC				21
 
 /* ASP formats */
 #define CS35L56_ASP_FMT_DSP_A				0
diff --git a/sound/soc/codecs/cs35l56-shared.c b/sound/soc/codecs/cs35l56-shared.c
index f5fa6bb04d38..93a1b056660b 100644
--- a/sound/soc/codecs/cs35l56-shared.c
+++ b/sound/soc/codecs/cs35l56-shared.c
@@ -278,7 +278,7 @@ const char * const cs35l56_tx_input_texts[] = {
 	"None", "ASP1RX1", "ASP1RX2", "VMON", "IMON", "ERRVOL", "CLASSH",
 	"VDDBMON", "VBSTMON", "DSP1TX1", "DSP1TX2", "DSP1TX3", "DSP1TX4",
 	"DSP1TX5", "DSP1TX6", "DSP1TX7", "DSP1TX8", "TEMPMON",
-	"INTERPOLATOR", "SDW1RX1", "SDW1RX2", "SDW2RX1",
+	"INTERPOLATOR", "SDW1RX1", "SDW1RX2",
 };
 EXPORT_SYMBOL_NS_GPL(cs35l56_tx_input_texts, SND_SOC_CS35L56_SHARED);
 
@@ -304,7 +304,6 @@ const unsigned int cs35l56_tx_input_values[] = {
 	CS35L56_INPUT_SRC_INTERPOLATOR,
 	CS35L56_INPUT_SRC_SWIRE_RX1,
 	CS35L56_INPUT_SRC_SWIRE_RX2,
-	CS35L56_INPUT_SRC_SWIRE_RX3,
 };
 EXPORT_SYMBOL_NS_GPL(cs35l56_tx_input_values, SND_SOC_CS35L56_SHARED);
 
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 3/4] ASoC: cs35l56: Remove SDW2RX1 mixer source
  2023-04-18 14:43 [PATCH 0/4] ASoC: cs35l56: Updates for B0 silicon Richard Fitzgerald
                   ` (4 preceding siblings ...)
  2023-04-18 14:43 ` [PATCH 3/4] ASoC: cs35l56: Remove SDW2RX1 mixer source Richard Fitzgerald
@ 2023-04-18 14:43 ` Richard Fitzgerald via Alsa-devel
  2023-04-18 14:43 ` [PATCH 4/4] ASoC: cs35l56: Rename mixer source defines for SoundWire DP1 Richard Fitzgerald via Alsa-devel
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Richard Fitzgerald via Alsa-devel @ 2023-04-18 14:43 UTC (permalink / raw)
  To: broonie; +Cc: alsa-devel, linux-kernel, patches, Richard Fitzgerald


[-- Attachment #0: Type: message/rfc822, Size: 6427 bytes --]

From: Richard Fitzgerald <rf@opensource.cirrus.com>
To: <broonie@kernel.org>
Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, patches@opensource.cirrus.com, Richard Fitzgerald <rf@opensource.cirrus.com>
Subject: [PATCH 3/4] ASoC: cs35l56: Remove SDW2RX1 mixer source
Date: Tue, 18 Apr 2023 15:43:08 +0100
Message-ID: <20230418144309.1100721-4-rf@opensource.cirrus.com>

The mixer source index value for SDW2RX1 is different between
A1 and B0 silicon. As the driver doesn't provide a DAI for SDW2
just remove it as a mixer source option.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
---
 include/sound/cs35l56.h           | 3 +--
 sound/soc/codecs/cs35l56-shared.c | 3 +--
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/include/sound/cs35l56.h b/include/sound/cs35l56.h
index dd7503464651..0b2f7cfc6a4a 100644
--- a/include/sound/cs35l56.h
+++ b/include/sound/cs35l56.h
@@ -181,10 +181,9 @@
 #define CS35L56_INPUT_SRC_INTERPOLATOR			0x40
 #define CS35L56_INPUT_SRC_SWIRE_RX1			0x44
 #define CS35L56_INPUT_SRC_SWIRE_RX2			0x45
-#define CS35L56_INPUT_SRC_SWIRE_RX3			0x46
 #define CS35L56_INPUT_MASK				0x7F
 
-#define CS35L56_NUM_INPUT_SRC				22
+#define CS35L56_NUM_INPUT_SRC				21
 
 /* ASP formats */
 #define CS35L56_ASP_FMT_DSP_A				0
diff --git a/sound/soc/codecs/cs35l56-shared.c b/sound/soc/codecs/cs35l56-shared.c
index f5fa6bb04d38..93a1b056660b 100644
--- a/sound/soc/codecs/cs35l56-shared.c
+++ b/sound/soc/codecs/cs35l56-shared.c
@@ -278,7 +278,7 @@ const char * const cs35l56_tx_input_texts[] = {
 	"None", "ASP1RX1", "ASP1RX2", "VMON", "IMON", "ERRVOL", "CLASSH",
 	"VDDBMON", "VBSTMON", "DSP1TX1", "DSP1TX2", "DSP1TX3", "DSP1TX4",
 	"DSP1TX5", "DSP1TX6", "DSP1TX7", "DSP1TX8", "TEMPMON",
-	"INTERPOLATOR", "SDW1RX1", "SDW1RX2", "SDW2RX1",
+	"INTERPOLATOR", "SDW1RX1", "SDW1RX2",
 };
 EXPORT_SYMBOL_NS_GPL(cs35l56_tx_input_texts, SND_SOC_CS35L56_SHARED);
 
@@ -304,7 +304,6 @@ const unsigned int cs35l56_tx_input_values[] = {
 	CS35L56_INPUT_SRC_INTERPOLATOR,
 	CS35L56_INPUT_SRC_SWIRE_RX1,
 	CS35L56_INPUT_SRC_SWIRE_RX2,
-	CS35L56_INPUT_SRC_SWIRE_RX3,
 };
 EXPORT_SYMBOL_NS_GPL(cs35l56_tx_input_values, SND_SOC_CS35L56_SHARED);
 
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 4/4] ASoC: cs35l56: Rename mixer source defines for SoundWire DP1
  2023-04-18 14:43 [PATCH 0/4] ASoC: cs35l56: Updates for B0 silicon Richard Fitzgerald
                   ` (6 preceding siblings ...)
  2023-04-18 14:43 ` [PATCH 4/4] ASoC: cs35l56: Rename mixer source defines for SoundWire DP1 Richard Fitzgerald via Alsa-devel
@ 2023-04-18 14:43 ` Richard Fitzgerald
  2023-04-18 18:09 ` [PATCH 0/4] ASoC: cs35l56: Updates for B0 silicon Mark Brown
  8 siblings, 0 replies; 10+ messages in thread
From: Richard Fitzgerald @ 2023-04-18 14:43 UTC (permalink / raw)
  To: broonie; +Cc: alsa-devel, linux-kernel, patches, Richard Fitzgerald

Rename the mixer source defines from CS35L56_INPUT_SRC_SWIRE_RXn
to CS35L56_INPUT_SRC_SWIRE_DP1_CHANNELn to match the latest
datasheet.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
---
 include/sound/cs35l56.h           | 4 ++--
 sound/soc/codecs/cs35l56-shared.c | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/include/sound/cs35l56.h b/include/sound/cs35l56.h
index 0b2f7cfc6a4a..002042b1c73c 100644
--- a/include/sound/cs35l56.h
+++ b/include/sound/cs35l56.h
@@ -179,8 +179,8 @@
 #define CS35L56_INPUT_SRC_DSP1TX8			0x39
 #define CS35L56_INPUT_SRC_TEMPMON			0x3A
 #define CS35L56_INPUT_SRC_INTERPOLATOR			0x40
-#define CS35L56_INPUT_SRC_SWIRE_RX1			0x44
-#define CS35L56_INPUT_SRC_SWIRE_RX2			0x45
+#define CS35L56_INPUT_SRC_SWIRE_DP1_CHANNEL1		0x44
+#define CS35L56_INPUT_SRC_SWIRE_DP1_CHANNEL2		0x45
 #define CS35L56_INPUT_MASK				0x7F
 
 #define CS35L56_NUM_INPUT_SRC				21
diff --git a/sound/soc/codecs/cs35l56-shared.c b/sound/soc/codecs/cs35l56-shared.c
index 93a1b056660b..60da8c75b7b9 100644
--- a/sound/soc/codecs/cs35l56-shared.c
+++ b/sound/soc/codecs/cs35l56-shared.c
@@ -302,8 +302,8 @@ const unsigned int cs35l56_tx_input_values[] = {
 	CS35L56_INPUT_SRC_DSP1TX8,
 	CS35L56_INPUT_SRC_TEMPMON,
 	CS35L56_INPUT_SRC_INTERPOLATOR,
-	CS35L56_INPUT_SRC_SWIRE_RX1,
-	CS35L56_INPUT_SRC_SWIRE_RX2,
+	CS35L56_INPUT_SRC_SWIRE_DP1_CHANNEL1,
+	CS35L56_INPUT_SRC_SWIRE_DP1_CHANNEL2,
 };
 EXPORT_SYMBOL_NS_GPL(cs35l56_tx_input_values, SND_SOC_CS35L56_SHARED);
 
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 4/4] ASoC: cs35l56: Rename mixer source defines for SoundWire DP1
  2023-04-18 14:43 [PATCH 0/4] ASoC: cs35l56: Updates for B0 silicon Richard Fitzgerald
                   ` (5 preceding siblings ...)
  2023-04-18 14:43 ` Richard Fitzgerald via Alsa-devel
@ 2023-04-18 14:43 ` Richard Fitzgerald via Alsa-devel
  2023-04-18 14:43 ` Richard Fitzgerald
  2023-04-18 18:09 ` [PATCH 0/4] ASoC: cs35l56: Updates for B0 silicon Mark Brown
  8 siblings, 0 replies; 10+ messages in thread
From: Richard Fitzgerald via Alsa-devel @ 2023-04-18 14:43 UTC (permalink / raw)
  To: broonie; +Cc: alsa-devel, linux-kernel, patches, Richard Fitzgerald


[-- Attachment #0: Type: message/rfc822, Size: 6148 bytes --]

From: Richard Fitzgerald <rf@opensource.cirrus.com>
To: <broonie@kernel.org>
Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, patches@opensource.cirrus.com, Richard Fitzgerald <rf@opensource.cirrus.com>
Subject: [PATCH 4/4] ASoC: cs35l56: Rename mixer source defines for SoundWire DP1
Date: Tue, 18 Apr 2023 15:43:09 +0100
Message-ID: <20230418144309.1100721-5-rf@opensource.cirrus.com>

Rename the mixer source defines from CS35L56_INPUT_SRC_SWIRE_RXn
to CS35L56_INPUT_SRC_SWIRE_DP1_CHANNELn to match the latest
datasheet.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
---
 include/sound/cs35l56.h           | 4 ++--
 sound/soc/codecs/cs35l56-shared.c | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/include/sound/cs35l56.h b/include/sound/cs35l56.h
index 0b2f7cfc6a4a..002042b1c73c 100644
--- a/include/sound/cs35l56.h
+++ b/include/sound/cs35l56.h
@@ -179,8 +179,8 @@
 #define CS35L56_INPUT_SRC_DSP1TX8			0x39
 #define CS35L56_INPUT_SRC_TEMPMON			0x3A
 #define CS35L56_INPUT_SRC_INTERPOLATOR			0x40
-#define CS35L56_INPUT_SRC_SWIRE_RX1			0x44
-#define CS35L56_INPUT_SRC_SWIRE_RX2			0x45
+#define CS35L56_INPUT_SRC_SWIRE_DP1_CHANNEL1		0x44
+#define CS35L56_INPUT_SRC_SWIRE_DP1_CHANNEL2		0x45
 #define CS35L56_INPUT_MASK				0x7F
 
 #define CS35L56_NUM_INPUT_SRC				21
diff --git a/sound/soc/codecs/cs35l56-shared.c b/sound/soc/codecs/cs35l56-shared.c
index 93a1b056660b..60da8c75b7b9 100644
--- a/sound/soc/codecs/cs35l56-shared.c
+++ b/sound/soc/codecs/cs35l56-shared.c
@@ -302,8 +302,8 @@ const unsigned int cs35l56_tx_input_values[] = {
 	CS35L56_INPUT_SRC_DSP1TX8,
 	CS35L56_INPUT_SRC_TEMPMON,
 	CS35L56_INPUT_SRC_INTERPOLATOR,
-	CS35L56_INPUT_SRC_SWIRE_RX1,
-	CS35L56_INPUT_SRC_SWIRE_RX2,
+	CS35L56_INPUT_SRC_SWIRE_DP1_CHANNEL1,
+	CS35L56_INPUT_SRC_SWIRE_DP1_CHANNEL2,
 };
 EXPORT_SYMBOL_NS_GPL(cs35l56_tx_input_values, SND_SOC_CS35L56_SHARED);
 
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH 0/4] ASoC: cs35l56: Updates for B0 silicon
  2023-04-18 14:43 [PATCH 0/4] ASoC: cs35l56: Updates for B0 silicon Richard Fitzgerald
                   ` (7 preceding siblings ...)
  2023-04-18 14:43 ` Richard Fitzgerald
@ 2023-04-18 18:09 ` Mark Brown
  8 siblings, 0 replies; 10+ messages in thread
From: Mark Brown @ 2023-04-18 18:09 UTC (permalink / raw)
  To: Richard Fitzgerald; +Cc: alsa-devel, linux-kernel, patches

On Tue, 18 Apr 2023 15:43:05 +0100, Richard Fitzgerald wrote:
> These patches make some small changes to align with the B0
> silicon revision.
> 
> Richard Fitzgerald (4):
>   ASoC: cs35l56: Update comment on masking of EINT20 interrupts
>   ASoC: cs35l56: Remove SDW1 TX5 and TX6
>   ASoC: cs35l56: Remove SDW2RX1 mixer source
>   ASoC: cs35l56: Rename mixer source defines for SoundWire DP1
> 
> [...]

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/4] ASoC: cs35l56: Update comment on masking of EINT20 interrupts
      commit: 16e5fc8ae793947d7dd0de63c7a613798f75c237
[2/4] ASoC: cs35l56: Remove SDW1 TX5 and TX6
      commit: 5ab28c78a125a724684958f4caf8210127d3f528
[3/4] ASoC: cs35l56: Remove SDW2RX1 mixer source
      commit: d3a4efb334e5f6cbb3f2741fa07a873a2a78b016
[4/4] ASoC: cs35l56: Rename mixer source defines for SoundWire DP1
      commit: d29a966b72fb370128096393961f2c456ff24e3d

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2023-04-18 18:09 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-18 14:43 [PATCH 0/4] ASoC: cs35l56: Updates for B0 silicon Richard Fitzgerald
2023-04-18 14:43 ` [PATCH 1/4] ASoC: cs35l56: Update comment on masking of EINT20 interrupts Richard Fitzgerald via Alsa-devel
2023-04-18 14:43 ` Richard Fitzgerald
2023-04-18 14:43 ` [PATCH 2/4] ASoC: cs35l56: Remove SDW1 TX5 and TX6 Richard Fitzgerald
2023-04-18 14:43 ` Richard Fitzgerald via Alsa-devel
2023-04-18 14:43 ` [PATCH 3/4] ASoC: cs35l56: Remove SDW2RX1 mixer source Richard Fitzgerald
2023-04-18 14:43 ` Richard Fitzgerald via Alsa-devel
2023-04-18 14:43 ` [PATCH 4/4] ASoC: cs35l56: Rename mixer source defines for SoundWire DP1 Richard Fitzgerald via Alsa-devel
2023-04-18 14:43 ` Richard Fitzgerald
2023-04-18 18:09 ` [PATCH 0/4] ASoC: cs35l56: Updates for B0 silicon Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.