Skip to content

Commit 6ace1c7

Browse files
committed
Merge tag 'sound-6.11-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Pull sound fixes from Takashi Iwai: "It became a bit larger collection of fixes than wished at this time, but all changes are small and mostly device-specific fixes that should be fairly safe to apply. Majority of fixes are about ASoC for AMD SOF, Cirrus codecs, lpass, etc, in addition to the usual HD-audio quirks / fixes" * tag 'sound-6.11-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (22 commits) ALSA: hda: hda_component: Fix mutex crash if nothing ever binds ALSA: hda/realtek: support HP Pavilion Aero 13-bg0xxx Mute LED ALSA: hda/realtek: Fix the speaker output on Samsung Galaxy Book3 Ultra ASoC: cs-amp-lib: Ignore empty UEFI calibration entries ASoC: cs-amp-lib-test: Force test calibration blob entries to be valid ALSA: hda/realtek - FIxed ALC285 headphone no sound ALSA: hda/realtek - Fixed ALC256 headphone no sound ASoC: allow module autoloading for table board_ids ASoC: allow module autoloading for table db1200_pids ALSA: hda: cs35l56: Don't use the device index as a calibration index ALSA: seq: Skip event type filtering for UMP events ALSA: hda/realtek: Enable mute/micmute LEDs on HP Laptop 14-ey0xxx ASoC: SOF: amd: Fix for acp init sequence ASoC: amd: acp: fix module autoloading ASoC: mediatek: mt8188: Mark AFE_DAC_CON0 register as volatile ASoC: codecs: wcd937x: Fix missing de-assert of reset GPIO ASoC: SOF: mediatek: Add missing board compatible ASoC: MAINTAINERS: Drop Banajit Goswami from Qualcomm sound drivers ASoC: SOF: amd: Fix for incorrect acp error register offsets ASoC: SOF: amd: move iram-dram fence register programming sequence ...
2 parents 3e9bff3 + 28b329f commit 6ace1c7

21 files changed

+149
-54
lines changed

MAINTAINERS

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18545,7 +18545,6 @@ F: drivers/crypto/intel/qat/
1854518545

1854618546
QCOM AUDIO (ASoC) DRIVERS
1854718547
M: Srinivas Kandagatla <[email protected]>
18548-
M: Banajit Goswami <[email protected]>
1854918548
L: [email protected] (moderated for non-subscribers)
1855018549
1855118550
S: Supported

sound/core/seq/seq_clientmgr.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -537,6 +537,9 @@ static struct snd_seq_client *get_event_dest_client(struct snd_seq_event *event,
537537
return NULL;
538538
if (! dest->accept_input)
539539
goto __not_avail;
540+
if (snd_seq_ev_is_ump(event))
541+
return dest; /* ok - no filter checks */
542+
540543
if ((dest->filter & SNDRV_SEQ_FILTER_USE_EVENT) &&
541544
! test_bit(event->type, dest->event_filter))
542545
goto __not_avail;

sound/pci/hda/cs35l56_hda.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1003,7 +1003,7 @@ int cs35l56_hda_common_probe(struct cs35l56_hda *cs35l56, int hid, int id)
10031003
goto err;
10041004
}
10051005

1006-
cs35l56->base.cal_index = cs35l56->index;
1006+
cs35l56->base.cal_index = -1;
10071007

10081008
cs35l56_init_cs_dsp(&cs35l56->base, &cs35l56->cs_dsp);
10091009
cs35l56->cs_dsp.client_ops = &cs35l56_hda_client_ops;

sound/pci/hda/hda_component.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,7 @@ int hda_component_manager_bind(struct hda_codec *cdc,
141141
int ret;
142142

143143
/* Init shared and component specific data */
144-
memset(parent, 0, sizeof(*parent));
145-
mutex_init(&parent->mutex);
144+
memset(parent->comps, 0, sizeof(parent->comps));
146145
parent->codec = cdc;
147146

148147
mutex_lock(&parent->mutex);
@@ -164,6 +163,8 @@ int hda_component_manager_init(struct hda_codec *cdc,
164163
struct hda_scodec_match *sm;
165164
int ret, i;
166165

166+
mutex_init(&parent->mutex);
167+
167168
for (i = 0; i < count; i++) {
168169
sm = devm_kmalloc(dev, sizeof(*sm), GFP_KERNEL);
169170
if (!sm)

sound/pci/hda/patch_realtek.c

Lines changed: 54 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -4930,6 +4930,30 @@ static void alc269_fixup_hp_line1_mic1_led(struct hda_codec *codec,
49304930
}
49314931
}
49324932

4933+
static void alc_hp_mute_disable(struct hda_codec *codec, unsigned int delay)
4934+
{
4935+
if (delay <= 0)
4936+
delay = 75;
4937+
snd_hda_codec_write(codec, 0x21, 0,
4938+
AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE);
4939+
msleep(delay);
4940+
snd_hda_codec_write(codec, 0x21, 0,
4941+
AC_VERB_SET_PIN_WIDGET_CONTROL, 0x0);
4942+
msleep(delay);
4943+
}
4944+
4945+
static void alc_hp_enable_unmute(struct hda_codec *codec, unsigned int delay)
4946+
{
4947+
if (delay <= 0)
4948+
delay = 75;
4949+
snd_hda_codec_write(codec, 0x21, 0,
4950+
AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT);
4951+
msleep(delay);
4952+
snd_hda_codec_write(codec, 0x21, 0,
4953+
AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE);
4954+
msleep(delay);
4955+
}
4956+
49334957
static const struct coef_fw alc225_pre_hsmode[] = {
49344958
UPDATE_COEF(0x4a, 1<<8, 0),
49354959
UPDATE_COEFEX(0x57, 0x05, 1<<14, 0),
@@ -5031,6 +5055,7 @@ static void alc_headset_mode_unplugged(struct hda_codec *codec)
50315055
case 0x10ec0236:
50325056
case 0x10ec0256:
50335057
case 0x19e58326:
5058+
alc_hp_mute_disable(codec, 75);
50345059
alc_process_coef_fw(codec, coef0256);
50355060
break;
50365061
case 0x10ec0234:
@@ -5065,6 +5090,7 @@ static void alc_headset_mode_unplugged(struct hda_codec *codec)
50655090
case 0x10ec0295:
50665091
case 0x10ec0289:
50675092
case 0x10ec0299:
5093+
alc_hp_mute_disable(codec, 75);
50685094
alc_process_coef_fw(codec, alc225_pre_hsmode);
50695095
alc_process_coef_fw(codec, coef0225);
50705096
break;
@@ -5290,6 +5316,7 @@ static void alc_headset_mode_default(struct hda_codec *codec)
52905316
case 0x10ec0299:
52915317
alc_process_coef_fw(codec, alc225_pre_hsmode);
52925318
alc_process_coef_fw(codec, coef0225);
5319+
alc_hp_enable_unmute(codec, 75);
52935320
break;
52945321
case 0x10ec0255:
52955322
alc_process_coef_fw(codec, coef0255);
@@ -5302,6 +5329,7 @@ static void alc_headset_mode_default(struct hda_codec *codec)
53025329
alc_write_coef_idx(codec, 0x45, 0xc089);
53035330
msleep(50);
53045331
alc_process_coef_fw(codec, coef0256);
5332+
alc_hp_enable_unmute(codec, 75);
53055333
break;
53065334
case 0x10ec0234:
53075335
case 0x10ec0274:
@@ -5399,6 +5427,7 @@ static void alc_headset_mode_ctia(struct hda_codec *codec)
53995427
case 0x10ec0256:
54005428
case 0x19e58326:
54015429
alc_process_coef_fw(codec, coef0256);
5430+
alc_hp_enable_unmute(codec, 75);
54025431
break;
54035432
case 0x10ec0234:
54045433
case 0x10ec0274:
@@ -5447,6 +5476,7 @@ static void alc_headset_mode_ctia(struct hda_codec *codec)
54475476
alc_process_coef_fw(codec, coef0225_2);
54485477
else
54495478
alc_process_coef_fw(codec, coef0225_1);
5479+
alc_hp_enable_unmute(codec, 75);
54505480
break;
54515481
case 0x10ec0867:
54525482
alc_update_coefex_idx(codec, 0x57, 0x5, 1<<14, 0);
@@ -5514,6 +5544,7 @@ static void alc_headset_mode_omtp(struct hda_codec *codec)
55145544
case 0x10ec0256:
55155545
case 0x19e58326:
55165546
alc_process_coef_fw(codec, coef0256);
5547+
alc_hp_enable_unmute(codec, 75);
55175548
break;
55185549
case 0x10ec0234:
55195550
case 0x10ec0274:
@@ -5551,6 +5582,7 @@ static void alc_headset_mode_omtp(struct hda_codec *codec)
55515582
case 0x10ec0289:
55525583
case 0x10ec0299:
55535584
alc_process_coef_fw(codec, coef0225);
5585+
alc_hp_enable_unmute(codec, 75);
55545586
break;
55555587
}
55565588
codec_dbg(codec, "Headset jack set to Nokia-style headset mode.\n");
@@ -5619,25 +5651,21 @@ static void alc_determine_headset_type(struct hda_codec *codec)
56195651
alc_write_coef_idx(codec, 0x06, 0x6104);
56205652
alc_write_coefex_idx(codec, 0x57, 0x3, 0x09a3);
56215653

5622-
snd_hda_codec_write(codec, 0x21, 0,
5623-
AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE);
5624-
msleep(80);
5625-
snd_hda_codec_write(codec, 0x21, 0,
5626-
AC_VERB_SET_PIN_WIDGET_CONTROL, 0x0);
5627-
56285654
alc_process_coef_fw(codec, coef0255);
56295655
msleep(300);
56305656
val = alc_read_coef_idx(codec, 0x46);
56315657
is_ctia = (val & 0x0070) == 0x0070;
5632-
5658+
if (!is_ctia) {
5659+
alc_write_coef_idx(codec, 0x45, 0xe089);
5660+
msleep(100);
5661+
val = alc_read_coef_idx(codec, 0x46);
5662+
if ((val & 0x0070) == 0x0070)
5663+
is_ctia = false;
5664+
else
5665+
is_ctia = true;
5666+
}
56335667
alc_write_coefex_idx(codec, 0x57, 0x3, 0x0da3);
56345668
alc_update_coefex_idx(codec, 0x57, 0x5, 1<<14, 0);
5635-
5636-
snd_hda_codec_write(codec, 0x21, 0,
5637-
AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT);
5638-
msleep(80);
5639-
snd_hda_codec_write(codec, 0x21, 0,
5640-
AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE);
56415669
break;
56425670
case 0x10ec0234:
56435671
case 0x10ec0274:
@@ -5714,12 +5742,6 @@ static void alc_determine_headset_type(struct hda_codec *codec)
57145742
case 0x10ec0295:
57155743
case 0x10ec0289:
57165744
case 0x10ec0299:
5717-
snd_hda_codec_write(codec, 0x21, 0,
5718-
AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE);
5719-
msleep(80);
5720-
snd_hda_codec_write(codec, 0x21, 0,
5721-
AC_VERB_SET_PIN_WIDGET_CONTROL, 0x0);
5722-
57235745
alc_process_coef_fw(codec, alc225_pre_hsmode);
57245746
alc_update_coef_idx(codec, 0x67, 0xf000, 0x1000);
57255747
val = alc_read_coef_idx(codec, 0x45);
@@ -5736,15 +5758,19 @@ static void alc_determine_headset_type(struct hda_codec *codec)
57365758
val = alc_read_coef_idx(codec, 0x46);
57375759
is_ctia = (val & 0x00f0) == 0x00f0;
57385760
}
5761+
if (!is_ctia) {
5762+
alc_update_coef_idx(codec, 0x45, 0x3f<<10, 0x38<<10);
5763+
alc_update_coef_idx(codec, 0x49, 3<<8, 1<<8);
5764+
msleep(100);
5765+
val = alc_read_coef_idx(codec, 0x46);
5766+
if ((val & 0x00f0) == 0x00f0)
5767+
is_ctia = false;
5768+
else
5769+
is_ctia = true;
5770+
}
57395771
alc_update_coef_idx(codec, 0x4a, 7<<6, 7<<6);
57405772
alc_update_coef_idx(codec, 0x4a, 3<<4, 3<<4);
57415773
alc_update_coef_idx(codec, 0x67, 0xf000, 0x3000);
5742-
5743-
snd_hda_codec_write(codec, 0x21, 0,
5744-
AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT);
5745-
msleep(80);
5746-
snd_hda_codec_write(codec, 0x21, 0,
5747-
AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE);
57485774
break;
57495775
case 0x10ec0867:
57505776
is_ctia = true;
@@ -10315,6 +10341,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
1031510341
SND_PCI_QUIRK(0x103c, 0x8c15, "HP Spectre x360 2-in-1 Laptop 14-eu0xxx", ALC245_FIXUP_HP_SPECTRE_X360_EU0XXX),
1031610342
SND_PCI_QUIRK(0x103c, 0x8c16, "HP Spectre 16", ALC287_FIXUP_CS35L41_I2C_2),
1031710343
SND_PCI_QUIRK(0x103c, 0x8c17, "HP Spectre 16", ALC287_FIXUP_CS35L41_I2C_2),
10344+
SND_PCI_QUIRK(0x103c, 0x8c21, "HP Pavilion Plus Laptop 14-ey0XXX", ALC245_FIXUP_HP_X360_MUTE_LEDS),
1031810345
SND_PCI_QUIRK(0x103c, 0x8c46, "HP EliteBook 830 G11", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
1031910346
SND_PCI_QUIRK(0x103c, 0x8c47, "HP EliteBook 840 G11", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
1032010347
SND_PCI_QUIRK(0x103c, 0x8c48, "HP EliteBook 860 G11", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
@@ -10353,6 +10380,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
1035310380
SND_PCI_QUIRK(0x103c, 0x8ca2, "HP ZBook Power", ALC236_FIXUP_HP_GPIO_LED),
1035410381
SND_PCI_QUIRK(0x103c, 0x8ca4, "HP ZBook Fury", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
1035510382
SND_PCI_QUIRK(0x103c, 0x8ca7, "HP ZBook Fury", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
10383+
SND_PCI_QUIRK(0x103c, 0x8cbd, "HP Pavilion Aero Laptop 13-bg0xxx", ALC245_FIXUP_HP_X360_MUTE_LEDS),
1035610384
SND_PCI_QUIRK(0x103c, 0x8cdd, "HP Spectre", ALC287_FIXUP_CS35L41_I2C_2),
1035710385
SND_PCI_QUIRK(0x103c, 0x8cde, "HP Spectre", ALC287_FIXUP_CS35L41_I2C_2),
1035810386
SND_PCI_QUIRK(0x103c, 0x8cdf, "HP SnowWhite", ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED),
@@ -10513,6 +10541,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
1051310541
SND_PCI_QUIRK(0x144d, 0xca03, "Samsung Galaxy Book2 Pro 360 (NP930QED)", ALC298_FIXUP_SAMSUNG_AMP),
1051410542
SND_PCI_QUIRK(0x144d, 0xc868, "Samsung Galaxy Book2 Pro (NP930XED)", ALC298_FIXUP_SAMSUNG_AMP),
1051510543
SND_PCI_QUIRK(0x144d, 0xc1ca, "Samsung Galaxy Book3 Pro 360 (NP960QFG-KB1US)", ALC298_FIXUP_SAMSUNG_AMP2),
10544+
SND_PCI_QUIRK(0x144d, 0xc1cc, "Samsung Galaxy Book3 Ultra (NT960XFH-XD92G))", ALC298_FIXUP_SAMSUNG_AMP2),
1051610545
SND_PCI_QUIRK(0x1458, 0xfa53, "Gigabyte BXBT-2807", ALC283_FIXUP_HEADSET_MIC),
1051710546
SND_PCI_QUIRK(0x1462, 0xb120, "MSI Cubi MS-B120", ALC283_FIXUP_HEADSET_MIC),
1051810547
SND_PCI_QUIRK(0x1462, 0xb171, "Cubi N 8GL (MS-B171)", ALC283_FIXUP_HEADSET_MIC),

sound/soc/amd/acp/acp-legacy-mach.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,8 @@ static const struct platform_device_id board_ids[] = {
227227
},
228228
{ }
229229
};
230+
MODULE_DEVICE_TABLE(platform, board_ids);
231+
230232
static struct platform_driver acp_asoc_audio = {
231233
.driver = {
232234
.pm = &snd_soc_pm_ops,

sound/soc/amd/acp/acp-sof-mach.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,8 @@ static const struct platform_device_id board_ids[] = {
158158
},
159159
{ }
160160
};
161+
MODULE_DEVICE_TABLE(platform, board_ids);
162+
161163
static struct platform_driver acp_asoc_audio = {
162164
.driver = {
163165
.name = "sof_mach",

sound/soc/au1x/db1200.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ static const struct platform_device_id db1200_pids[] = {
4444
},
4545
{},
4646
};
47+
MODULE_DEVICE_TABLE(platform, db1200_pids);
4748

4849
/*------------------------- AC97 PART ---------------------------*/
4950

sound/soc/codecs/cs-amp-lib-test.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ static void cs_amp_lib_test_init_dummy_cal_blob(struct kunit *test, int num_amps
3838
{
3939
struct cs_amp_lib_test_priv *priv = test->priv;
4040
unsigned int blob_size;
41+
int i;
4142

4243
blob_size = offsetof(struct cirrus_amp_efi_data, data) +
4344
sizeof(struct cirrus_amp_cal_data) * num_amps;
@@ -49,6 +50,14 @@ static void cs_amp_lib_test_init_dummy_cal_blob(struct kunit *test, int num_amps
4950
priv->cal_blob->count = num_amps;
5051

5152
get_random_bytes(priv->cal_blob->data, sizeof(struct cirrus_amp_cal_data) * num_amps);
53+
54+
/* Ensure all timestamps are non-zero to mark the entry valid. */
55+
for (i = 0; i < num_amps; i++)
56+
priv->cal_blob->data[i].calTime[0] |= 1;
57+
58+
/* Ensure that all UIDs are non-zero and unique. */
59+
for (i = 0; i < num_amps; i++)
60+
*(u8 *)&priv->cal_blob->data[i].calTarget[0] = i + 1;
5261
}
5362

5463
static u64 cs_amp_lib_test_get_target_uid(struct kunit *test)

sound/soc/codecs/cs-amp-lib.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,10 @@ static int _cs_amp_get_efi_calibration_data(struct device *dev, u64 target_uid,
182182
for (i = 0; i < efi_data->count; ++i) {
183183
u64 cal_target = cs_amp_cal_target_u64(&efi_data->data[i]);
184184

185+
/* Skip empty entries */
186+
if (!efi_data->data[i].calTime[0] && !efi_data->data[i].calTime[1])
187+
continue;
188+
185189
/* Skip entries with unpopulated silicon ID */
186190
if (cal_target == 0)
187191
continue;
@@ -193,7 +197,8 @@ static int _cs_amp_get_efi_calibration_data(struct device *dev, u64 target_uid,
193197
}
194198
}
195199

196-
if (!cal && (amp_index >= 0) && (amp_index < efi_data->count)) {
200+
if (!cal && (amp_index >= 0) && (amp_index < efi_data->count) &&
201+
(efi_data->data[amp_index].calTime[0] || efi_data->data[amp_index].calTime[1])) {
197202
u64 cal_target = cs_amp_cal_target_u64(&efi_data->data[amp_index]);
198203

199204
/*

0 commit comments

Comments
 (0)