Skip to content

Commit 5ab28c7

Browse files
rfvirgilbroonie
authored andcommitted
ASoC: cs35l56: Remove SDW1 TX5 and TX6
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> Link: https://lore.kernel.org/r/20230418144309.1100721-3-rf@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent 16e5fc8 commit 5ab28c7

3 files changed

Lines changed: 1 addition & 57 deletions

File tree

include/sound/cs35l56.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,6 @@
4343
#define CS35L56_SWIRE_DP3_CH2_INPUT 0x0004C74
4444
#define CS35L56_SWIRE_DP3_CH3_INPUT 0x0004C78
4545
#define CS35L56_SWIRE_DP3_CH4_INPUT 0x0004C7C
46-
#define CS35L56_SWIRE_DP3_CH5_INPUT 0x0004C80
47-
#define CS35L56_SWIRE_DP3_CH6_INPUT 0x0004C84
4846
#define CS35L56_IRQ1_CFG 0x000E000
4947
#define CS35L56_IRQ1_STATUS 0x000E004
5048
#define CS35L56_IRQ1_EINT_1 0x000E010
@@ -262,7 +260,6 @@ extern const struct cs_dsp_region cs35l56_dsp1_regions[CS35L56_NUM_DSP_REGIONS];
262260
extern const char * const cs35l56_tx_input_texts[CS35L56_NUM_INPUT_SRC];
263261
extern const unsigned int cs35l56_tx_input_values[CS35L56_NUM_INPUT_SRC];
264262

265-
void cs35l56_patch(struct device *dev, struct regmap *regmap, u8 revid);
266263
void cs35l56_reread_firmware_registers(struct device *dev, struct regmap *regmap);
267264
int cs35l56_get_bclk_freq_id(unsigned int freq);
268265
void cs35l56_fill_supply_names(struct regulator_bulk_data *data);

sound/soc/codecs/cs35l56-shared.c

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@ static const struct reg_default cs35l56_reg_defaults[] = {
2828
{ CS35L56_SWIRE_DP3_CH2_INPUT, 0x00000019 },
2929
{ CS35L56_SWIRE_DP3_CH3_INPUT, 0x00000029 },
3030
{ CS35L56_SWIRE_DP3_CH4_INPUT, 0x00000028 },
31-
{ CS35L56_SWIRE_DP3_CH5_INPUT, 0x00000018 },
32-
{ CS35L56_SWIRE_DP3_CH6_INPUT, 0x00000018 },
3331
{ CS35L56_IRQ1_CFG, 0x00000000 },
3432
{ CS35L56_IRQ1_MASK_1, 0x83ffffff },
3533
{ CS35L56_IRQ1_MASK_2, 0xffff7fff },
@@ -42,29 +40,6 @@ static const struct reg_default cs35l56_reg_defaults[] = {
4240
/* CS35L56_MAIN_POSTURE_NUMBER - soft register, no default */
4341
};
4442

45-
/*
46-
* The Ax devices have different default register values to that of B0,
47-
* establish a common set of register defaults.
48-
*/
49-
static const struct reg_sequence cs35l56_reva_patch[] = {
50-
{ CS35L56_SWIRE_DP3_CH5_INPUT, 0x00000018 },
51-
{ CS35L56_SWIRE_DP3_CH6_INPUT, 0x00000018 },
52-
};
53-
54-
void cs35l56_patch(struct device *dev, struct regmap *regmap, u8 revid)
55-
{
56-
int ret;
57-
58-
if (revid >= CS35L56_REVID_B0)
59-
return;
60-
61-
ret = regmap_register_patch(regmap, cs35l56_reva_patch,
62-
ARRAY_SIZE(cs35l56_reva_patch));
63-
if (ret)
64-
dev_err(dev, "Failed to apply patch: %d\n", ret);
65-
}
66-
EXPORT_SYMBOL_NS_GPL(cs35l56_patch, SND_SOC_CS35L56_SHARED);
67-
6843
static bool cs35l56_is_dsp_memory(unsigned int reg)
6944
{
7045
switch (reg) {
@@ -114,8 +89,6 @@ static bool cs35l56_readable_reg(struct device *dev, unsigned int reg)
11489
case CS35L56_SWIRE_DP3_CH2_INPUT:
11590
case CS35L56_SWIRE_DP3_CH3_INPUT:
11691
case CS35L56_SWIRE_DP3_CH4_INPUT:
117-
case CS35L56_SWIRE_DP3_CH5_INPUT:
118-
case CS35L56_SWIRE_DP3_CH6_INPUT:
11992
case CS35L56_IRQ1_CFG:
12093
case CS35L56_IRQ1_STATUS:
12194
case CS35L56_IRQ1_EINT_1 ... CS35L56_IRQ1_EINT_8:

sound/soc/codecs/cs35l56.c

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -166,24 +166,6 @@ static SOC_VALUE_ENUM_SINGLE_DECL(cs35l56_sdw1tx4_enum,
166166
static const struct snd_kcontrol_new sdw1_tx4_mux =
167167
SOC_DAPM_ENUM("SDW1TX4 SRC", cs35l56_sdw1tx4_enum);
168168

169-
static SOC_VALUE_ENUM_SINGLE_DECL(cs35l56_sdw1tx5_enum,
170-
CS35L56_SWIRE_DP3_CH5_INPUT,
171-
0, CS35L56_SWIRETXn_SRC_MASK,
172-
cs35l56_tx_input_texts,
173-
cs35l56_tx_input_values);
174-
175-
static const struct snd_kcontrol_new sdw1_tx5_mux =
176-
SOC_DAPM_ENUM("SDW1TX5 SRC", cs35l56_sdw1tx5_enum);
177-
178-
static SOC_VALUE_ENUM_SINGLE_DECL(cs35l56_sdw1tx6_enum,
179-
CS35L56_SWIRE_DP3_CH6_INPUT,
180-
0, CS35L56_SWIRETXn_SRC_MASK,
181-
cs35l56_tx_input_texts,
182-
cs35l56_tx_input_values);
183-
184-
static const struct snd_kcontrol_new sdw1_tx6_mux =
185-
SOC_DAPM_ENUM("SDW1TX6 SRC", cs35l56_sdw1tx6_enum);
186-
187169
static int cs35l56_play_event(struct snd_soc_dapm_widget *w,
188170
struct snd_kcontrol *kcontrol, int event)
189171
{
@@ -251,8 +233,6 @@ static const struct snd_soc_dapm_widget cs35l56_dapm_widgets[] = {
251233
SND_SOC_DAPM_MUX("SDW1 TX2 Source", SND_SOC_NOPM, 0, 0, &sdw1_tx2_mux),
252234
SND_SOC_DAPM_MUX("SDW1 TX3 Source", SND_SOC_NOPM, 0, 0, &sdw1_tx3_mux),
253235
SND_SOC_DAPM_MUX("SDW1 TX4 Source", SND_SOC_NOPM, 0, 0, &sdw1_tx4_mux),
254-
SND_SOC_DAPM_MUX("SDW1 TX5 Source", SND_SOC_NOPM, 0, 0, &sdw1_tx5_mux),
255-
SND_SOC_DAPM_MUX("SDW1 TX6 Source", SND_SOC_NOPM, 0, 0, &sdw1_tx6_mux),
256236

257237
SND_SOC_DAPM_SIGGEN("VMON ADC"),
258238
SND_SOC_DAPM_SIGGEN("IMON ADC"),
@@ -318,14 +298,10 @@ static const struct snd_soc_dapm_route cs35l56_audio_map[] = {
318298
CS35L56_SRC_ROUTE("SDW1 TX2")
319299
CS35L56_SRC_ROUTE("SDW1 TX3")
320300
CS35L56_SRC_ROUTE("SDW1 TX4")
321-
CS35L56_SRC_ROUTE("SDW1 TX5")
322-
CS35L56_SRC_ROUTE("SDW1 TX6")
323301
{ "SDW1 Capture", NULL, "SDW1 TX1 Source" },
324302
{ "SDW1 Capture", NULL, "SDW1 TX2 Source" },
325303
{ "SDW1 Capture", NULL, "SDW1 TX3 Source" },
326304
{ "SDW1 Capture", NULL, "SDW1 TX4 Source" },
327-
{ "SDW1 Capture", NULL, "SDW1 TX5 Source" },
328-
{ "SDW1 Capture", NULL, "SDW1 TX6 Source" },
329305
};
330306

331307
static int cs35l56_dsp_event(struct snd_soc_dapm_widget *w,
@@ -779,7 +755,7 @@ static struct snd_soc_dai_driver cs35l56_dai[] = {
779755
.capture = {
780756
.stream_name = "SDW1 Capture",
781757
.channels_min = 1,
782-
.channels_max = 6,
758+
.channels_max = 4,
783759
.rates = CS35L56_RATES,
784760
.formats = CS35L56_TX_FORMATS,
785761
},
@@ -1535,8 +1511,6 @@ int cs35l56_init(struct cs35l56_private *cs35l56)
15351511
dev_info(cs35l56->dev, "Cirrus Logic CS35L56%s Rev %02X OTP%d\n",
15361512
cs35l56->secured ? "s" : "", cs35l56->rev, otpid);
15371513

1538-
cs35l56_patch(cs35l56->dev, cs35l56->regmap, cs35l56->rev);
1539-
15401514
/* Wake source and *_BLOCKED interrupts default to unmasked, so mask them */
15411515
regmap_write(cs35l56->regmap, CS35L56_IRQ1_MASK_20, 0xffffffff);
15421516
regmap_update_bits(cs35l56->regmap, CS35L56_IRQ1_MASK_1,

0 commit comments

Comments
 (0)