Skip to content

Commit fbbc69d

Browse files
committed
Merge tag 'asoc-fix-v6.7-rc4' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
ASoC: Fixes for v6.7 A crop of fixes for v6.7, one core fix for a merge issue and a bunch of driver specific fixes and new IDs, mostly for x86 platforms.
2 parents 2b3a7a3 + 0a10d15 commit fbbc69d

28 files changed

+286
-107
lines changed

sound/soc/amd/acp-config.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,20 @@ static const struct config_entry config_table[] = {
103103
{}
104104
},
105105
},
106+
{
107+
.flags = FLAG_AMD_LEGACY,
108+
.device = ACP_PCI_DEV_ID,
109+
.dmi_table = (const struct dmi_system_id []) {
110+
{
111+
.matches = {
112+
DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "HUAWEI"),
113+
DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "HVY-WXX9"),
114+
DMI_EXACT_MATCH(DMI_PRODUCT_VERSION, "M1010"),
115+
},
116+
},
117+
{}
118+
},
119+
},
106120
{
107121
.flags = FLAG_AMD_LEGACY,
108122
.device = ACP_PCI_DEV_ID,

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

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,13 @@ static const struct dmi_system_id yc_acp_quirk_table[] = {
283283
DMI_MATCH(DMI_PRODUCT_NAME, "M6500RC"),
284284
}
285285
},
286+
{
287+
.driver_data = &acp6x_card,
288+
.matches = {
289+
DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK COMPUTER INC."),
290+
DMI_MATCH(DMI_PRODUCT_NAME, "E1504FA"),
291+
}
292+
},
286293
{
287294
.driver_data = &acp6x_card,
288295
.matches = {
@@ -367,6 +374,13 @@ static const struct dmi_system_id yc_acp_quirk_table[] = {
367374
DMI_MATCH(DMI_BOARD_NAME, "8A3E"),
368375
}
369376
},
377+
{
378+
.driver_data = &acp6x_card,
379+
.matches = {
380+
DMI_MATCH(DMI_BOARD_VENDOR, "HP"),
381+
DMI_MATCH(DMI_BOARD_NAME, "8B2F"),
382+
}
383+
},
370384
{
371385
.driver_data = &acp6x_card,
372386
.matches = {
@@ -381,6 +395,13 @@ static const struct dmi_system_id yc_acp_quirk_table[] = {
381395
DMI_MATCH(DMI_PRODUCT_VERSION, "pang12"),
382396
}
383397
},
398+
{
399+
.driver_data = &acp6x_card,
400+
.matches = {
401+
DMI_MATCH(DMI_BOARD_VENDOR, "System76"),
402+
DMI_MATCH(DMI_PRODUCT_VERSION, "pang13"),
403+
}
404+
},
384405
{}
385406
};
386407

sound/soc/codecs/cs43130.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -578,7 +578,7 @@ static int cs43130_set_sp_fmt(int dai_id, unsigned int bitwidth_sclk,
578578
break;
579579
case SND_SOC_DAIFMT_LEFT_J:
580580
hi_size = bitwidth_sclk;
581-
frm_delay = 2;
581+
frm_delay = 0;
582582
frm_phase = 1;
583583
break;
584584
case SND_SOC_DAIFMT_DSP_A:
@@ -1682,7 +1682,7 @@ static ssize_t hpload_dc_r_show(struct device *dev,
16821682
return cs43130_show_dc(dev, buf, HP_RIGHT);
16831683
}
16841684

1685-
static u16 const cs43130_ac_freq[CS43130_AC_FREQ] = {
1685+
static const u16 cs43130_ac_freq[CS43130_AC_FREQ] = {
16861686
24,
16871687
43,
16881688
93,
@@ -2362,7 +2362,7 @@ static const struct regmap_config cs43130_regmap = {
23622362
.use_single_write = true,
23632363
};
23642364

2365-
static u16 const cs43130_dc_threshold[CS43130_DC_THRESHOLD] = {
2365+
static const u16 cs43130_dc_threshold[CS43130_DC_THRESHOLD] = {
23662366
50,
23672367
120,
23682368
};

sound/soc/codecs/da7219-aad.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -696,7 +696,7 @@ static struct da7219_aad_pdata *da7219_aad_fw_to_pdata(struct device *dev)
696696
aad_pdata->mic_det_thr =
697697
da7219_aad_fw_mic_det_thr(dev, fw_val32);
698698
else
699-
aad_pdata->mic_det_thr = DA7219_AAD_MIC_DET_THR_500_OHMS;
699+
aad_pdata->mic_det_thr = DA7219_AAD_MIC_DET_THR_200_OHMS;
700700

701701
if (fwnode_property_read_u32(aad_np, "dlg,jack-ins-deb", &fw_val32) >= 0)
702702
aad_pdata->jack_ins_deb =

sound/soc/codecs/hdac_hda.c

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,9 @@ static struct snd_soc_dai_driver hdac_hda_dais[] = {
132132
.sig_bits = 24,
133133
},
134134
},
135+
};
136+
137+
static struct snd_soc_dai_driver hdac_hda_hdmi_dais[] = {
135138
{
136139
.id = HDAC_HDMI_0_DAI_ID,
137140
.name = "intel-hdmi-hifi1",
@@ -607,8 +610,16 @@ static const struct snd_soc_component_driver hdac_hda_codec = {
607610
.endianness = 1,
608611
};
609612

613+
static const struct snd_soc_component_driver hdac_hda_hdmi_codec = {
614+
.probe = hdac_hda_codec_probe,
615+
.remove = hdac_hda_codec_remove,
616+
.idle_bias_on = false,
617+
.endianness = 1,
618+
};
619+
610620
static int hdac_hda_dev_probe(struct hdac_device *hdev)
611621
{
622+
struct hdac_hda_priv *hda_pvt = dev_get_drvdata(&hdev->dev);
612623
struct hdac_ext_link *hlink;
613624
int ret;
614625

@@ -621,9 +632,15 @@ static int hdac_hda_dev_probe(struct hdac_device *hdev)
621632
snd_hdac_ext_bus_link_get(hdev->bus, hlink);
622633

623634
/* ASoC specific initialization */
624-
ret = devm_snd_soc_register_component(&hdev->dev,
625-
&hdac_hda_codec, hdac_hda_dais,
626-
ARRAY_SIZE(hdac_hda_dais));
635+
if (hda_pvt->need_display_power)
636+
ret = devm_snd_soc_register_component(&hdev->dev,
637+
&hdac_hda_hdmi_codec, hdac_hda_hdmi_dais,
638+
ARRAY_SIZE(hdac_hda_hdmi_dais));
639+
else
640+
ret = devm_snd_soc_register_component(&hdev->dev,
641+
&hdac_hda_codec, hdac_hda_dais,
642+
ARRAY_SIZE(hdac_hda_dais));
643+
627644
if (ret < 0) {
628645
dev_err(&hdev->dev, "failed to register HDA codec %d\n", ret);
629646
return ret;

sound/soc/codecs/lpass-tx-macro.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2021,6 +2021,11 @@ static int tx_macro_probe(struct platform_device *pdev)
20212021

20222022
tx->dev = dev;
20232023

2024+
/* Set active_decimator default value */
2025+
tx->active_decimator[TX_MACRO_AIF1_CAP] = -1;
2026+
tx->active_decimator[TX_MACRO_AIF2_CAP] = -1;
2027+
tx->active_decimator[TX_MACRO_AIF3_CAP] = -1;
2028+
20242029
/* set MCLK and NPL rates */
20252030
clk_set_rate(tx->mclk, MCLK_FREQ);
20262031
clk_set_rate(tx->npl, MCLK_FREQ);

sound/soc/codecs/nau8822.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,7 @@ static int nau8822_eq_get(struct snd_kcontrol *kcontrol,
184184
struct soc_bytes_ext *params = (void *)kcontrol->private_value;
185185
int i, reg;
186186
u16 reg_val, *val;
187+
__be16 tmp;
187188

188189
val = (u16 *)ucontrol->value.bytes.data;
189190
reg = NAU8822_REG_EQ1;
@@ -192,8 +193,8 @@ static int nau8822_eq_get(struct snd_kcontrol *kcontrol,
192193
/* conversion of 16-bit integers between native CPU format
193194
* and big endian format
194195
*/
195-
reg_val = cpu_to_be16(reg_val);
196-
memcpy(val + i, &reg_val, sizeof(reg_val));
196+
tmp = cpu_to_be16(reg_val);
197+
memcpy(val + i, &tmp, sizeof(tmp));
197198
}
198199

199200
return 0;
@@ -216,6 +217,7 @@ static int nau8822_eq_put(struct snd_kcontrol *kcontrol,
216217
void *data;
217218
u16 *val, value;
218219
int i, reg, ret;
220+
__be16 *tmp;
219221

220222
data = kmemdup(ucontrol->value.bytes.data,
221223
params->max, GFP_KERNEL | GFP_DMA);
@@ -228,7 +230,8 @@ static int nau8822_eq_put(struct snd_kcontrol *kcontrol,
228230
/* conversion of 16-bit integers between native CPU format
229231
* and big endian format
230232
*/
231-
value = be16_to_cpu(*(val + i));
233+
tmp = (__be16 *)(val + i);
234+
value = be16_to_cpup(tmp);
232235
ret = snd_soc_component_write(component, reg + i, value);
233236
if (ret) {
234237
dev_err(component->dev,

sound/soc/codecs/rt5645.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -448,6 +448,7 @@ struct rt5645_priv {
448448
struct regulator_bulk_data supplies[ARRAY_SIZE(rt5645_supply_names)];
449449
struct rt5645_eq_param_s *eq_param;
450450
struct timer_list btn_check_timer;
451+
struct mutex jd_mutex;
451452

452453
int codec_type;
453454
int sysclk;
@@ -3193,6 +3194,8 @@ static int rt5645_jack_detect(struct snd_soc_component *component, int jack_inse
31933194
rt5645_enable_push_button_irq(component, true);
31943195
}
31953196
} else {
3197+
if (rt5645->en_button_func)
3198+
rt5645_enable_push_button_irq(component, false);
31963199
snd_soc_dapm_disable_pin(dapm, "Mic Det Power");
31973200
snd_soc_dapm_sync(dapm);
31983201
rt5645->jack_type = SND_JACK_HEADPHONE;
@@ -3295,6 +3298,8 @@ static void rt5645_jack_detect_work(struct work_struct *work)
32953298
if (!rt5645->component)
32963299
return;
32973300

3301+
mutex_lock(&rt5645->jd_mutex);
3302+
32983303
switch (rt5645->pdata.jd_mode) {
32993304
case 0: /* Not using rt5645 JD */
33003305
if (rt5645->gpiod_hp_det) {
@@ -3321,7 +3326,7 @@ static void rt5645_jack_detect_work(struct work_struct *work)
33213326

33223327
if (!val && (rt5645->jack_type == 0)) { /* jack in */
33233328
report = rt5645_jack_detect(rt5645->component, 1);
3324-
} else if (!val && rt5645->jack_type != 0) {
3329+
} else if (!val && rt5645->jack_type == SND_JACK_HEADSET) {
33253330
/* for push button and jack out */
33263331
btn_type = 0;
33273332
if (snd_soc_component_read(rt5645->component, RT5645_INT_IRQ_ST) & 0x4) {
@@ -3377,6 +3382,8 @@ static void rt5645_jack_detect_work(struct work_struct *work)
33773382
rt5645_jack_detect(rt5645->component, 0);
33783383
}
33793384

3385+
mutex_unlock(&rt5645->jd_mutex);
3386+
33803387
snd_soc_jack_report(rt5645->hp_jack, report, SND_JACK_HEADPHONE);
33813388
snd_soc_jack_report(rt5645->mic_jack, report, SND_JACK_MICROPHONE);
33823389
if (rt5645->en_button_func)
@@ -4150,6 +4157,7 @@ static int rt5645_i2c_probe(struct i2c_client *i2c)
41504157
}
41514158
timer_setup(&rt5645->btn_check_timer, rt5645_btn_check_callback, 0);
41524159

4160+
mutex_init(&rt5645->jd_mutex);
41534161
INIT_DELAYED_WORK(&rt5645->jack_detect_work, rt5645_jack_detect_work);
41544162
INIT_DELAYED_WORK(&rt5645->rcclock_work, rt5645_rcclock_work);
41554163

sound/soc/codecs/wm8974.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ SOC_DAPM_SINGLE("PCM Playback Switch", WM8974_MONOMIX, 0, 1, 0),
186186

187187
/* Boost mixer */
188188
static const struct snd_kcontrol_new wm8974_boost_mixer[] = {
189-
SOC_DAPM_SINGLE("Aux Switch", WM8974_INPPGA, 6, 1, 1),
189+
SOC_DAPM_SINGLE("PGA Switch", WM8974_INPPGA, 6, 1, 1),
190190
};
191191

192192
/* Input PGA */
@@ -246,8 +246,8 @@ static const struct snd_soc_dapm_route wm8974_dapm_routes[] = {
246246

247247
/* Boost Mixer */
248248
{"ADC", NULL, "Boost Mixer"},
249-
{"Boost Mixer", "Aux Switch", "Aux Input"},
250-
{"Boost Mixer", NULL, "Input PGA"},
249+
{"Boost Mixer", NULL, "Aux Input"},
250+
{"Boost Mixer", "PGA Switch", "Input PGA"},
251251
{"Boost Mixer", NULL, "MICP"},
252252

253253
/* Input PGA */

sound/soc/codecs/wm_adsp.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1451,12 +1451,12 @@ static int wm_adsp_buffer_populate(struct wm_adsp_compr_buf *buf)
14511451
ret = wm_adsp_buffer_read(buf, caps->region_defs[i].base_offset,
14521452
&region->base_addr);
14531453
if (ret < 0)
1454-
return ret;
1454+
goto err;
14551455

14561456
ret = wm_adsp_buffer_read(buf, caps->region_defs[i].size_offset,
14571457
&offset);
14581458
if (ret < 0)
1459-
return ret;
1459+
goto err;
14601460

14611461
region->cumulative_size = offset;
14621462

@@ -1467,6 +1467,10 @@ static int wm_adsp_buffer_populate(struct wm_adsp_compr_buf *buf)
14671467
}
14681468

14691469
return 0;
1470+
1471+
err:
1472+
kfree(buf->regions);
1473+
return ret;
14701474
}
14711475

14721476
static void wm_adsp_buffer_clear(struct wm_adsp_compr_buf *buf)

0 commit comments

Comments
 (0)