Skip to content

Commit b8b68d2

Browse files
committed
Merge tag 'sound-6.7-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Pull sound fixes from Takashi Iwai: "This is a typical bump in the middle of its way; we've gathered lots of fixes (mostly for ASoC) at this time: - PCM array out-of-bound access fix - Correction of SOC PCM merge error - Lots of ASoC SOF Intel updates - A few ASoC AMD quirks - More proper timer handling in PCM test module - HD-audio and USB-audio quirks as usual - Other device-specific fixes for various ASoC codecs" * tag 'sound-6.7-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (39 commits) ALSA: hda/realtek: Add quirk for Lenovo Yoga Pro 7 ALSA: pcmtest: stop timer before buffer is released ALSA: hda/realtek: Add Framework laptop 16 to quirks ALSA: hda/realtek: add new Framework laptop to quirks ALSA: pcm: fix out-of-bounds in snd_pcm_state_names ASoC: qcom: sc8280xp: Limit speaker digital volumes ASoC: ops: add correct range check for limiting volume ALSA: hda/realtek: Enable headset on Lenovo M90 Gen5 ALSA: hda/realtek: fix speakers on XPS 9530 (2023) ALSA: usb-audio: Add Pioneer DJM-450 mixer controls ASoC: wm_adsp: fix memleak in wm_adsp_buffer_populate ASoC: da7219: Support low DC impedance headset ASoC: amd: acp: Add support for a new Huawei Matebook laptop ALSA: hda/realtek: Apply quirk for ASUS UM3504DA ASoC: SOF: ipc4-topology: Correct data structures for the GAIN module ASoC: SOF: ipc4-topology: Correct data structures for the SRC module ASoC: hdac_hda: Conditionally register dais for HDMI and Analog ASoC: codecs: lpass-tx-macro: set active_decimator correct default value ASoC: amd: yc: Fix non-functional mic on ASUS E1504FA ASoC: amd: yc: Add DMI entry to support System76 Pangolin 13 ...
2 parents 38bafa6 + 634e5e1 commit b8b68d2

32 files changed

+335
-108
lines changed

sound/core/pcm.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,7 @@ static const char * const snd_pcm_state_names[] = {
253253
STATE(DRAINING),
254254
STATE(PAUSED),
255255
STATE(SUSPENDED),
256+
STATE(DISCONNECTED),
256257
};
257258

258259
static const char * const snd_pcm_access_names[] = {

sound/drivers/pcmtest.c

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,6 @@ static int snd_pcmtst_pcm_close(struct snd_pcm_substream *substream)
397397
struct pcmtst_buf_iter *v_iter = substream->runtime->private_data;
398398

399399
timer_shutdown_sync(&v_iter->timer_instance);
400-
v_iter->substream = NULL;
401400
playback_capture_test = !v_iter->is_buf_corrupted;
402401
kfree(v_iter);
403402
return 0;
@@ -435,6 +434,7 @@ static int snd_pcmtst_pcm_trigger(struct snd_pcm_substream *substream, int cmd)
435434
case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
436435
// We can't call timer_shutdown_sync here, as it is forbidden to sleep here
437436
v_iter->suspend = true;
437+
timer_delete(&v_iter->timer_instance);
438438
break;
439439
}
440440

@@ -512,12 +512,22 @@ static int snd_pcmtst_ioctl(struct snd_pcm_substream *substream, unsigned int cm
512512
return snd_pcm_lib_ioctl(substream, cmd, arg);
513513
}
514514

515+
static int snd_pcmtst_sync_stop(struct snd_pcm_substream *substream)
516+
{
517+
struct pcmtst_buf_iter *v_iter = substream->runtime->private_data;
518+
519+
timer_delete_sync(&v_iter->timer_instance);
520+
521+
return 0;
522+
}
523+
515524
static const struct snd_pcm_ops snd_pcmtst_playback_ops = {
516525
.open = snd_pcmtst_pcm_open,
517526
.close = snd_pcmtst_pcm_close,
518527
.trigger = snd_pcmtst_pcm_trigger,
519528
.hw_params = snd_pcmtst_pcm_hw_params,
520529
.ioctl = snd_pcmtst_ioctl,
530+
.sync_stop = snd_pcmtst_sync_stop,
521531
.hw_free = snd_pcmtst_pcm_hw_free,
522532
.prepare = snd_pcmtst_pcm_prepare,
523533
.pointer = snd_pcmtst_pcm_pointer,
@@ -530,6 +540,7 @@ static const struct snd_pcm_ops snd_pcmtst_capture_ops = {
530540
.hw_params = snd_pcmtst_pcm_hw_params,
531541
.hw_free = snd_pcmtst_pcm_hw_free,
532542
.ioctl = snd_pcmtst_ioctl,
543+
.sync_stop = snd_pcmtst_sync_stop,
533544
.prepare = snd_pcmtst_pcm_prepare,
534545
.pointer = snd_pcmtst_pcm_pointer,
535546
};

sound/pci/hda/patch_realtek.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9705,6 +9705,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
97059705
SND_PCI_QUIRK(0x1028, 0x0b1a, "Dell Precision 5570", ALC289_FIXUP_DUAL_SPK),
97069706
SND_PCI_QUIRK(0x1028, 0x0b37, "Dell Inspiron 16 Plus 7620 2-in-1", ALC295_FIXUP_DELL_INSPIRON_TOP_SPEAKERS),
97079707
SND_PCI_QUIRK(0x1028, 0x0b71, "Dell Inspiron 16 Plus 7620", ALC295_FIXUP_DELL_INSPIRON_TOP_SPEAKERS),
9708+
SND_PCI_QUIRK(0x1028, 0x0beb, "Dell XPS 15 9530 (2023)", ALC289_FIXUP_DELL_CS35L41_SPI_2),
97089709
SND_PCI_QUIRK(0x1028, 0x0c03, "Dell Precision 5340", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE),
97099710
SND_PCI_QUIRK(0x1028, 0x0c19, "Dell Precision 3340", ALC236_FIXUP_DELL_DUAL_CODECS),
97109711
SND_PCI_QUIRK(0x1028, 0x0c1a, "Dell Precision 3340", ALC236_FIXUP_DELL_DUAL_CODECS),
@@ -9963,6 +9964,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
99639964
SND_PCI_QUIRK(0x1043, 0x17f3, "ROG Ally RC71L_RC71L", ALC294_FIXUP_ASUS_ALLY),
99649965
SND_PCI_QUIRK(0x1043, 0x1881, "ASUS Zephyrus S/M", ALC294_FIXUP_ASUS_GX502_PINS),
99659966
SND_PCI_QUIRK(0x1043, 0x18b1, "Asus MJ401TA", ALC256_FIXUP_ASUS_HEADSET_MIC),
9967+
SND_PCI_QUIRK(0x1043, 0x18d3, "ASUS UM3504DA", ALC294_FIXUP_CS35L41_I2C_2),
99669968
SND_PCI_QUIRK(0x1043, 0x18f1, "Asus FX505DT", ALC256_FIXUP_ASUS_HEADSET_MIC),
99679969
SND_PCI_QUIRK(0x1043, 0x194e, "ASUS UX563FD", ALC294_FIXUP_ASUS_HPE),
99689970
SND_PCI_QUIRK(0x1043, 0x1970, "ASUS UX550VE", ALC289_FIXUP_ASUS_GA401),
@@ -10204,6 +10206,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
1020410206
SND_PCI_QUIRK(0x17aa, 0x387d, "Yoga S780-16 pro Quad AAC", ALC287_FIXUP_TAS2781_I2C),
1020510207
SND_PCI_QUIRK(0x17aa, 0x387e, "Yoga S780-16 pro Quad YC", ALC287_FIXUP_TAS2781_I2C),
1020610208
SND_PCI_QUIRK(0x17aa, 0x3881, "YB9 dual power mode2 YC", ALC287_FIXUP_TAS2781_I2C),
10209+
SND_PCI_QUIRK(0x17aa, 0x3882, "Lenovo Yoga Pro 7 14APH8", ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN),
1020710210
SND_PCI_QUIRK(0x17aa, 0x3884, "Y780 YG DUAL", ALC287_FIXUP_TAS2781_I2C),
1020810211
SND_PCI_QUIRK(0x17aa, 0x3886, "Y780 VECO DUAL", ALC287_FIXUP_TAS2781_I2C),
1020910212
SND_PCI_QUIRK(0x17aa, 0x38a7, "Y780P AMD YG dual", ALC287_FIXUP_TAS2781_I2C),
@@ -10271,6 +10274,8 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
1027110274
SND_PCI_QUIRK(0x8086, 0x2081, "Intel NUC 10", ALC256_FIXUP_INTEL_NUC10),
1027210275
SND_PCI_QUIRK(0x8086, 0x3038, "Intel NUC 13", ALC295_FIXUP_CHROME_BOOK),
1027310276
SND_PCI_QUIRK(0xf111, 0x0001, "Framework Laptop", ALC295_FIXUP_FRAMEWORK_LAPTOP_MIC_NO_PRESENCE),
10277+
SND_PCI_QUIRK(0xf111, 0x0005, "Framework Laptop", ALC295_FIXUP_FRAMEWORK_LAPTOP_MIC_NO_PRESENCE),
10278+
SND_PCI_QUIRK(0xf111, 0x0006, "Framework Laptop", ALC295_FIXUP_FRAMEWORK_LAPTOP_MIC_NO_PRESENCE),
1027410279

1027510280
#if 0
1027610281
/* Below is a quirk table taken from the old code.
@@ -12196,6 +12201,7 @@ static const struct snd_pci_quirk alc662_fixup_tbl[] = {
1219612201
SND_PCI_QUIRK(0x17aa, 0x32f7, "Lenovo ThinkCentre M90", ALC897_FIXUP_HEADSET_MIC_PIN),
1219712202
SND_PCI_QUIRK(0x17aa, 0x3321, "Lenovo ThinkCentre M70 Gen4", ALC897_FIXUP_HEADSET_MIC_PIN),
1219812203
SND_PCI_QUIRK(0x17aa, 0x331b, "Lenovo ThinkCentre M90 Gen4", ALC897_FIXUP_HEADSET_MIC_PIN),
12204+
SND_PCI_QUIRK(0x17aa, 0x3364, "Lenovo ThinkCentre M90 Gen5", ALC897_FIXUP_HEADSET_MIC_PIN),
1219912205
SND_PCI_QUIRK(0x17aa, 0x3742, "Lenovo TianYi510Pro-14IOB", ALC897_FIXUP_HEADSET_MIC_PIN2),
1220012206
SND_PCI_QUIRK(0x17aa, 0x38af, "Lenovo Ideapad Y550P", ALC662_FIXUP_IDEAPAD),
1220112207
SND_PCI_QUIRK(0x17aa, 0x3a0d, "Lenovo Ideapad Y550", ALC662_FIXUP_IDEAPAD),

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,

0 commit comments

Comments
 (0)