Skip to content

Commit 10db952

Browse files
committed
Merge tag 'asoc-fix-v6.16-merge-window' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
ASoC: Fixes for v6.16 A bunch of fixes, including a big batch for the Intel AVS driver, and one new device ID. It's all device specific.
2 parents 6a3439a + b7188a1 commit 10db952

File tree

20 files changed

+184
-68
lines changed

20 files changed

+184
-68
lines changed

drivers/firmware/cirrus/test/cs_dsp_mock_wmfw.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,10 +133,11 @@ void cs_dsp_mock_wmfw_add_info(struct cs_dsp_mock_wmfw_builder *builder,
133133

134134
if (info_len % 4) {
135135
/* Create a padded string with length a multiple of 4 */
136+
size_t copy_len = info_len;
136137
info_len = round_up(info_len, 4);
137138
tmp = kunit_kzalloc(builder->test_priv->test, info_len, GFP_KERNEL);
138139
KUNIT_ASSERT_NOT_ERR_OR_NULL(builder->test_priv->test, tmp);
139-
memcpy(tmp, info, info_len);
140+
memcpy(tmp, info, copy_len);
140141
info = tmp;
141142
}
142143

drivers/firmware/cirrus/test/cs_dsp_test_control_cache.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -776,7 +776,6 @@ static void cs_dsp_ctl_cache_init_multiple_offsets(struct kunit *test)
776776
"dummyalg", NULL);
777777

778778
/* Create controls identical except for offset */
779-
def.length_bytes = 8;
780779
def.offset_dsp_words = 0;
781780
def.shortname = "CtlA";
782781
cs_dsp_mock_wmfw_add_coeff_desc(local->wmfw_builder, &def);

sound/soc/amd/yc/acp6x-mach.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,13 @@ static const struct dmi_system_id yc_acp_quirk_table[] = {
311311
DMI_MATCH(DMI_PRODUCT_NAME, "83AS"),
312312
}
313313
},
314+
{
315+
.driver_data = &acp6x_card,
316+
.matches = {
317+
DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
318+
DMI_MATCH(DMI_PRODUCT_NAME, "83BS"),
319+
}
320+
},
314321
{
315322
.driver_data = &acp6x_card,
316323
.matches = {

sound/soc/codecs/es8375.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,7 @@ static int es8375_hw_params(struct snd_pcm_substream *substream,
319319
coeff = get_coeff(es8375->vddd, dmic_enable, es8375->mclk_freq, params_rate(params));
320320
if (coeff < 0) {
321321
dev_warn(component->dev, "Clock coefficients do not match");
322+
return coeff;
322323
}
323324
regmap_write(es8375->regmap, ES8375_CLK_MGR4,
324325
coeff_div[coeff].Reg0x04);

sound/soc/codecs/hda.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,15 +152,15 @@ int hda_codec_probe_complete(struct hda_codec *codec)
152152
ret = snd_hda_codec_build_controls(codec);
153153
if (ret < 0) {
154154
dev_err(&hdev->dev, "unable to create controls %d\n", ret);
155-
goto out;
155+
return ret;
156156
}
157157

158158
/* Bus suspended codecs as it does not manage their pm */
159159
pm_runtime_set_active(&hdev->dev);
160160
/* rpm was forbidden in snd_hda_codec_device_new() */
161161
snd_hda_codec_set_power_save(codec, 2000);
162162
snd_hda_codec_register(codec);
163-
out:
163+
164164
/* Complement pm_runtime_get_sync(bus) in probe */
165165
pm_runtime_mark_last_busy(bus->dev);
166166
pm_runtime_put_autosuspend(bus->dev);

sound/soc/codecs/rt1320-sdw.c

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ static const struct reg_sequence rt1320_vc_blind_write[] = {
204204
{ 0x3fc2bfc0, 0x03 },
205205
{ 0x0000d486, 0x43 },
206206
{ SDW_SDCA_CTL(FUNC_NUM_AMP, RT1320_SDCA_ENT_PDE23, RT1320_SDCA_CTL_REQ_POWER_STATE, 0), 0x00 },
207-
{ 0x1000db00, 0x04 },
207+
{ 0x1000db00, 0x07 },
208208
{ 0x1000db01, 0x00 },
209209
{ 0x1000db02, 0x11 },
210210
{ 0x1000db03, 0x00 },
@@ -225,6 +225,21 @@ static const struct reg_sequence rt1320_vc_blind_write[] = {
225225
{ 0x1000db12, 0x00 },
226226
{ 0x1000db13, 0x00 },
227227
{ 0x1000db14, 0x45 },
228+
{ 0x1000db15, 0x0d },
229+
{ 0x1000db16, 0x01 },
230+
{ 0x1000db17, 0x00 },
231+
{ 0x1000db18, 0x00 },
232+
{ 0x1000db19, 0xbf },
233+
{ 0x1000db1a, 0x13 },
234+
{ 0x1000db1b, 0x09 },
235+
{ 0x1000db1c, 0x00 },
236+
{ 0x1000db1d, 0x00 },
237+
{ 0x1000db1e, 0x00 },
238+
{ 0x1000db1f, 0x12 },
239+
{ 0x1000db20, 0x09 },
240+
{ 0x1000db21, 0x00 },
241+
{ 0x1000db22, 0x00 },
242+
{ 0x1000db23, 0x00 },
228243
{ 0x0000d540, 0x01 },
229244
{ 0x0000c081, 0xfc },
230245
{ 0x0000f01e, 0x80 },

sound/soc/codecs/tas571x.c

Lines changed: 65 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -718,6 +718,69 @@ static const struct regmap_config tas5721_regmap_config = {
718718
.volatile_table = &tas571x_volatile_regs,
719719
};
720720

721+
static const struct snd_kcontrol_new tas5733_controls[] = {
722+
/* MVOL LSB is ignored - see comments in tas571x_i2c_probe() */
723+
SOC_SINGLE_TLV("Master Volume",
724+
TAS571X_MVOL_REG, 1, 0x1ff, 1,
725+
tas5717_volume_tlv),
726+
SOC_DOUBLE_R_TLV("Speaker Volume",
727+
TAS571X_CH1_VOL_REG, TAS571X_CH2_VOL_REG,
728+
1, 0x1ff, 1, tas5717_volume_tlv),
729+
SOC_DOUBLE("Speaker Switch",
730+
TAS571X_SOFT_MUTE_REG,
731+
TAS571X_SOFT_MUTE_CH1_SHIFT, TAS571X_SOFT_MUTE_CH2_SHIFT,
732+
1, 1),
733+
734+
SOC_DOUBLE_R_RANGE("CH1 Mixer Volume",
735+
TAS5717_CH1_LEFT_CH_MIX_REG,
736+
TAS5717_CH1_RIGHT_CH_MIX_REG,
737+
16, 0, 0x80, 0),
738+
739+
SOC_DOUBLE_R_RANGE("CH2 Mixer Volume",
740+
TAS5717_CH2_LEFT_CH_MIX_REG,
741+
TAS5717_CH2_RIGHT_CH_MIX_REG,
742+
16, 0, 0x80, 0),
743+
744+
/*
745+
* The biquads are named according to the register names.
746+
* Please note that TI's TAS57xx Graphical Development Environment
747+
* tool names them different.
748+
*/
749+
BIQUAD_COEFS("CH1 - Biquad 0", TAS5733_CH1_BQ0_REG),
750+
BIQUAD_COEFS("CH1 - Biquad 1", TAS5733_CH1_BQ1_REG),
751+
BIQUAD_COEFS("CH1 - Biquad 2", TAS5733_CH1_BQ2_REG),
752+
BIQUAD_COEFS("CH1 - Biquad 3", TAS5733_CH1_BQ3_REG),
753+
BIQUAD_COEFS("CH1 - Biquad 4", TAS5733_CH1_BQ4_REG),
754+
BIQUAD_COEFS("CH1 - Biquad 5", TAS5733_CH1_BQ5_REG),
755+
BIQUAD_COEFS("CH1 - Biquad 6", TAS5733_CH1_BQ6_REG),
756+
BIQUAD_COEFS("CH1 - Biquad 7", TAS5733_CH1_BQ7_REG),
757+
BIQUAD_COEFS("CH1 - Biquad 8", TAS5733_CH1_BQ8_REG),
758+
BIQUAD_COEFS("CH1 - Biquad 9", TAS5733_CH1_BQ9_REG),
759+
BIQUAD_COEFS("CH1 - Biquad 10", TAS5733_CH1_BQ10_REG),
760+
761+
BIQUAD_COEFS("CH2 - Biquad 0", TAS5733_CH2_BQ0_REG),
762+
BIQUAD_COEFS("CH2 - Biquad 1", TAS5733_CH2_BQ1_REG),
763+
BIQUAD_COEFS("CH2 - Biquad 2", TAS5733_CH2_BQ2_REG),
764+
BIQUAD_COEFS("CH2 - Biquad 3", TAS5733_CH2_BQ3_REG),
765+
BIQUAD_COEFS("CH2 - Biquad 4", TAS5733_CH2_BQ4_REG),
766+
BIQUAD_COEFS("CH2 - Biquad 5", TAS5733_CH2_BQ5_REG),
767+
BIQUAD_COEFS("CH2 - Biquad 6", TAS5733_CH2_BQ6_REG),
768+
BIQUAD_COEFS("CH2 - Biquad 7", TAS5733_CH2_BQ7_REG),
769+
BIQUAD_COEFS("CH2 - Biquad 8", TAS5733_CH2_BQ8_REG),
770+
BIQUAD_COEFS("CH2 - Biquad 9", TAS5733_CH2_BQ9_REG),
771+
BIQUAD_COEFS("CH2 - Biquad 10", TAS5733_CH2_BQ10_REG),
772+
773+
BIQUAD_COEFS("CH1 - Cross Biquad 0", TAS5733_CH1_CBQ0_REG),
774+
BIQUAD_COEFS("CH1 - Cross Biquad 1", TAS5733_CH1_CBQ1_REG),
775+
BIQUAD_COEFS("CH1 - Cross Biquad 2", TAS5733_CH1_CBQ2_REG),
776+
BIQUAD_COEFS("CH1 - Cross Biquad 3", TAS5733_CH1_CBQ3_REG),
777+
778+
BIQUAD_COEFS("CH2 - Cross Biquad 0", TAS5733_CH2_CBQ0_REG),
779+
BIQUAD_COEFS("CH2 - Cross Biquad 1", TAS5733_CH2_CBQ1_REG),
780+
BIQUAD_COEFS("CH2 - Cross Biquad 2", TAS5733_CH2_CBQ2_REG),
781+
BIQUAD_COEFS("CH2 - Cross Biquad 3", TAS5733_CH2_CBQ3_REG),
782+
};
783+
721784
static const char *const tas5733_supply_names[] = {
722785
"AVDD",
723786
"DVDD",
@@ -770,8 +833,8 @@ static const struct regmap_config tas5733_regmap_config = {
770833
static const struct tas571x_chip tas5733_chip = {
771834
.supply_names = tas5733_supply_names,
772835
.num_supply_names = ARRAY_SIZE(tas5733_supply_names),
773-
.controls = tas5717_controls,
774-
.num_controls = ARRAY_SIZE(tas5717_controls),
836+
.controls = tas5733_controls,
837+
.num_controls = ARRAY_SIZE(tas5733_controls),
775838
.regmap_config = &tas5733_regmap_config,
776839
.vol_reg_size = 2,
777840
};

sound/soc/codecs/tas571x.h

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,4 +104,38 @@
104104
#define TAS5717_CH2_LEFT_CH_MIX_REG 0x76
105105
#define TAS5717_CH2_RIGHT_CH_MIX_REG 0x77
106106

107+
#define TAS5733_CH1_BQ0_REG 0x26
108+
#define TAS5733_CH1_BQ1_REG 0x27
109+
#define TAS5733_CH1_BQ2_REG 0x28
110+
#define TAS5733_CH1_BQ3_REG 0x29
111+
#define TAS5733_CH1_BQ4_REG 0x2a
112+
#define TAS5733_CH1_BQ5_REG 0x2b
113+
#define TAS5733_CH1_BQ6_REG 0x2c
114+
#define TAS5733_CH1_BQ7_REG 0x2d
115+
#define TAS5733_CH1_BQ8_REG 0x2e
116+
#define TAS5733_CH1_BQ9_REG 0x2f
117+
118+
#define TAS5733_CH2_BQ0_REG 0x30
119+
#define TAS5733_CH2_BQ1_REG 0x31
120+
#define TAS5733_CH2_BQ2_REG 0x32
121+
#define TAS5733_CH2_BQ3_REG 0x33
122+
#define TAS5733_CH2_BQ4_REG 0x34
123+
#define TAS5733_CH2_BQ5_REG 0x35
124+
#define TAS5733_CH2_BQ6_REG 0x36
125+
#define TAS5733_CH2_BQ7_REG 0x37
126+
#define TAS5733_CH2_BQ8_REG 0x38
127+
#define TAS5733_CH2_BQ9_REG 0x39
128+
129+
#define TAS5733_CH1_BQ10_REG 0x58
130+
#define TAS5733_CH1_CBQ0_REG 0x59
131+
#define TAS5733_CH1_CBQ1_REG 0x5a
132+
#define TAS5733_CH1_CBQ2_REG 0x5b
133+
#define TAS5733_CH1_CBQ3_REG 0x5c
134+
135+
#define TAS5733_CH2_BQ10_REG 0x5d
136+
#define TAS5733_CH2_CBQ0_REG 0x5e
137+
#define TAS5733_CH2_CBQ1_REG 0x5f
138+
#define TAS5733_CH2_CBQ2_REG 0x60
139+
#define TAS5733_CH2_CBQ3_REG 0x61
140+
107141
#endif /* _TAS571X_H */

sound/soc/codecs/wcd9335.c

Lines changed: 7 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,6 @@ struct wcd9335_codec {
332332

333333
int intr1;
334334
struct gpio_desc *reset_gpio;
335-
struct regulator_bulk_data supplies[WCD9335_MAX_SUPPLY];
336335

337336
unsigned int rx_port_value[WCD9335_RX_MAX];
338337
unsigned int tx_port_value[WCD9335_TX_MAX];
@@ -355,6 +354,10 @@ struct wcd9335_irq {
355354
char *name;
356355
};
357356

357+
static const char * const wcd9335_supplies[] = {
358+
"vdd-buck", "vdd-buck-sido", "vdd-tx", "vdd-rx", "vdd-io",
359+
};
360+
358361
static const struct wcd9335_slim_ch wcd9335_tx_chs[WCD9335_TX_MAX] = {
359362
WCD9335_SLIM_TX_CH(0),
360363
WCD9335_SLIM_TX_CH(1),
@@ -4989,30 +4992,16 @@ static int wcd9335_parse_dt(struct wcd9335_codec *wcd)
49894992
if (IS_ERR(wcd->native_clk))
49904993
return dev_err_probe(dev, PTR_ERR(wcd->native_clk), "slimbus clock not found\n");
49914994

4992-
wcd->supplies[0].supply = "vdd-buck";
4993-
wcd->supplies[1].supply = "vdd-buck-sido";
4994-
wcd->supplies[2].supply = "vdd-tx";
4995-
wcd->supplies[3].supply = "vdd-rx";
4996-
wcd->supplies[4].supply = "vdd-io";
4997-
4998-
ret = regulator_bulk_get(dev, WCD9335_MAX_SUPPLY, wcd->supplies);
4995+
ret = devm_regulator_bulk_get_enable(dev, ARRAY_SIZE(wcd9335_supplies),
4996+
wcd9335_supplies);
49994997
if (ret)
5000-
return dev_err_probe(dev, ret, "Failed to get supplies\n");
4998+
return dev_err_probe(dev, ret, "Failed to get and enable supplies\n");
50014999

50025000
return 0;
50035001
}
50045002

50055003
static int wcd9335_power_on_reset(struct wcd9335_codec *wcd)
50065004
{
5007-
struct device *dev = wcd->dev;
5008-
int ret;
5009-
5010-
ret = regulator_bulk_enable(WCD9335_MAX_SUPPLY, wcd->supplies);
5011-
if (ret) {
5012-
dev_err(dev, "Failed to get supplies: err = %d\n", ret);
5013-
return ret;
5014-
}
5015-
50165005
/*
50175006
* For WCD9335, it takes about 600us for the Vout_A and
50185007
* Vout_D to be ready after BUCK_SIDO is powered up.

sound/soc/codecs/wcd937x.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@ struct wcd937x_priv {
9191
struct regmap_irq_chip *wcd_regmap_irq_chip;
9292
struct regmap_irq_chip_data *irq_chip;
9393
struct regulator_bulk_data supplies[WCD937X_MAX_BULK_SUPPLY];
94-
struct regulator *buck_supply;
9594
struct snd_soc_jack *jack;
9695
unsigned long status_mask;
9796
s32 micb_ref[WCD937X_MAX_MICBIAS];
@@ -2945,10 +2944,8 @@ static int wcd937x_probe(struct platform_device *pdev)
29452944
return dev_err_probe(dev, ret, "Failed to get supplies\n");
29462945

29472946
ret = regulator_bulk_enable(WCD937X_MAX_BULK_SUPPLY, wcd937x->supplies);
2948-
if (ret) {
2949-
regulator_bulk_free(WCD937X_MAX_BULK_SUPPLY, wcd937x->supplies);
2947+
if (ret)
29502948
return dev_err_probe(dev, ret, "Failed to enable supplies\n");
2951-
}
29522949

29532950
wcd937x_dt_parse_micbias_info(dev, wcd937x);
29542951

@@ -2984,7 +2981,6 @@ static int wcd937x_probe(struct platform_device *pdev)
29842981

29852982
err_disable_regulators:
29862983
regulator_bulk_disable(WCD937X_MAX_BULK_SUPPLY, wcd937x->supplies);
2987-
regulator_bulk_free(WCD937X_MAX_BULK_SUPPLY, wcd937x->supplies);
29882984

29892985
return ret;
29902986
}
@@ -3001,7 +2997,6 @@ static void wcd937x_remove(struct platform_device *pdev)
30012997
pm_runtime_dont_use_autosuspend(dev);
30022998

30032999
regulator_bulk_disable(WCD937X_MAX_BULK_SUPPLY, wcd937x->supplies);
3004-
regulator_bulk_free(WCD937X_MAX_BULK_SUPPLY, wcd937x->supplies);
30053000
}
30063001

30073002
#if defined(CONFIG_OF)

0 commit comments

Comments
 (0)