Skip to content

Commit 2059c40

Browse files
committed
Merge tag 'sound-fix-5.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Pull sound fixes from Takashi Iwai: "Just a few device-specific HD-audio and USB-audio fixes" * tag 'sound-fix-5.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: hda: generic: change the DAC ctl name for LO+SPK or LO+HP ALSA: hda/realtek: Add fixup for HP OMEN laptop ALSA: hda/realtek: Fix speaker amp on HP Envy AiO 32 ALSA: hda/realtek: Fix silent headphone output on ASUS UX430UA ALSA: usb-audio: Add dB range mapping for Sennheiser Communications Headset PC 8 ALSA: hda/realtek: ALC285 Thinkpad jack pin quirk is unreachable
2 parents bd31396 + f48652b commit 2059c40

File tree

3 files changed

+109
-9
lines changed

3 files changed

+109
-9
lines changed

sound/pci/hda/hda_generic.c

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1204,11 +1204,17 @@ static const char *get_line_out_pfx(struct hda_codec *codec, int ch,
12041204
*index = ch;
12051205
return "Headphone";
12061206
case AUTO_PIN_LINE_OUT:
1207-
/* This deals with the case where we have two DACs and
1208-
* one LO, one HP and one Speaker */
1209-
if (!ch && cfg->speaker_outs && cfg->hp_outs) {
1210-
bool hp_lo_shared = !path_has_mixer(codec, spec->hp_paths[0], ctl_type);
1211-
bool spk_lo_shared = !path_has_mixer(codec, spec->speaker_paths[0], ctl_type);
1207+
/* This deals with the case where one HP or one Speaker or
1208+
* one HP + one Speaker need to share the DAC with LO
1209+
*/
1210+
if (!ch) {
1211+
bool hp_lo_shared = false, spk_lo_shared = false;
1212+
1213+
if (cfg->speaker_outs)
1214+
spk_lo_shared = !path_has_mixer(codec,
1215+
spec->speaker_paths[0], ctl_type);
1216+
if (cfg->hp_outs)
1217+
hp_lo_shared = !path_has_mixer(codec, spec->hp_paths[0], ctl_type);
12121218
if (hp_lo_shared && spk_lo_shared)
12131219
return spec->vmaster_mute.hook ? "PCM" : "Master";
12141220
if (hp_lo_shared)

sound/pci/hda/patch_realtek.c

Lines changed: 86 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4338,6 +4338,35 @@ static void alc245_fixup_hp_x360_amp(struct hda_codec *codec,
43384338
}
43394339
}
43404340

4341+
/* toggle GPIO2 at each time stream is started; we use PREPARE state instead */
4342+
static void alc274_hp_envy_pcm_hook(struct hda_pcm_stream *hinfo,
4343+
struct hda_codec *codec,
4344+
struct snd_pcm_substream *substream,
4345+
int action)
4346+
{
4347+
switch (action) {
4348+
case HDA_GEN_PCM_ACT_PREPARE:
4349+
alc_update_gpio_data(codec, 0x04, true);
4350+
break;
4351+
case HDA_GEN_PCM_ACT_CLEANUP:
4352+
alc_update_gpio_data(codec, 0x04, false);
4353+
break;
4354+
}
4355+
}
4356+
4357+
static void alc274_fixup_hp_envy_gpio(struct hda_codec *codec,
4358+
const struct hda_fixup *fix,
4359+
int action)
4360+
{
4361+
struct alc_spec *spec = codec->spec;
4362+
4363+
if (action == HDA_FIXUP_ACT_PROBE) {
4364+
spec->gpio_mask |= 0x04;
4365+
spec->gpio_dir |= 0x04;
4366+
spec->gen.pcm_playback_hook = alc274_hp_envy_pcm_hook;
4367+
}
4368+
}
4369+
43414370
static void alc_update_coef_led(struct hda_codec *codec,
43424371
struct alc_coef_led *led,
43434372
bool polarity, bool on)
@@ -5695,6 +5724,18 @@ static void alc_fixup_tpt470_dacs(struct hda_codec *codec,
56955724
spec->gen.preferred_dacs = preferred_pairs;
56965725
}
56975726

5727+
static void alc295_fixup_asus_dacs(struct hda_codec *codec,
5728+
const struct hda_fixup *fix, int action)
5729+
{
5730+
static const hda_nid_t preferred_pairs[] = {
5731+
0x17, 0x02, 0x21, 0x03, 0
5732+
};
5733+
struct alc_spec *spec = codec->spec;
5734+
5735+
if (action == HDA_FIXUP_ACT_PRE_PROBE)
5736+
spec->gen.preferred_dacs = preferred_pairs;
5737+
}
5738+
56985739
static void alc_shutup_dell_xps13(struct hda_codec *codec)
56995740
{
57005741
struct alc_spec *spec = codec->spec;
@@ -6453,6 +6494,7 @@ enum {
64536494
ALC255_FIXUP_XIAOMI_HEADSET_MIC,
64546495
ALC274_FIXUP_HP_MIC,
64556496
ALC274_FIXUP_HP_HEADSET_MIC,
6497+
ALC274_FIXUP_HP_ENVY_GPIO,
64566498
ALC256_FIXUP_ASUS_HPE,
64576499
ALC285_FIXUP_THINKPAD_NO_BASS_SPK_HEADSET_JACK,
64586500
ALC287_FIXUP_HP_GPIO_LED,
@@ -6463,6 +6505,8 @@ enum {
64636505
ALC256_FIXUP_ACER_HEADSET_MIC,
64646506
ALC285_FIXUP_IDEAPAD_S740_COEF,
64656507
ALC285_FIXUP_HP_LIMIT_INT_MIC_BOOST,
6508+
ALC295_FIXUP_ASUS_DACS,
6509+
ALC295_FIXUP_HP_OMEN,
64666510
};
64676511

64686512
static const struct hda_fixup alc269_fixups[] = {
@@ -7894,6 +7938,10 @@ static const struct hda_fixup alc269_fixups[] = {
78947938
.chained = true,
78957939
.chain_id = ALC274_FIXUP_HP_MIC
78967940
},
7941+
[ALC274_FIXUP_HP_ENVY_GPIO] = {
7942+
.type = HDA_FIXUP_FUNC,
7943+
.v.func = alc274_fixup_hp_envy_gpio,
7944+
},
78977945
[ALC256_FIXUP_ASUS_HPE] = {
78987946
.type = HDA_FIXUP_VERBS,
78997947
.v.verbs = (const struct hda_verb[]) {
@@ -7963,6 +8011,30 @@ static const struct hda_fixup alc269_fixups[] = {
79638011
.chained = true,
79648012
.chain_id = ALC285_FIXUP_HP_MUTE_LED,
79658013
},
8014+
[ALC295_FIXUP_ASUS_DACS] = {
8015+
.type = HDA_FIXUP_FUNC,
8016+
.v.func = alc295_fixup_asus_dacs,
8017+
},
8018+
[ALC295_FIXUP_HP_OMEN] = {
8019+
.type = HDA_FIXUP_PINS,
8020+
.v.pins = (const struct hda_pintbl[]) {
8021+
{ 0x12, 0xb7a60130 },
8022+
{ 0x13, 0x40000000 },
8023+
{ 0x14, 0x411111f0 },
8024+
{ 0x16, 0x411111f0 },
8025+
{ 0x17, 0x90170110 },
8026+
{ 0x18, 0x411111f0 },
8027+
{ 0x19, 0x02a11030 },
8028+
{ 0x1a, 0x411111f0 },
8029+
{ 0x1b, 0x04a19030 },
8030+
{ 0x1d, 0x40600001 },
8031+
{ 0x1e, 0x411111f0 },
8032+
{ 0x21, 0x03211020 },
8033+
{}
8034+
},
8035+
.chained = true,
8036+
.chain_id = ALC269_FIXUP_HP_LINE1_MIC1_LED,
8037+
},
79668038
};
79678039

79688040
static const struct snd_pci_quirk alc269_fixup_tbl[] = {
@@ -8121,8 +8193,10 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
81218193
SND_PCI_QUIRK(0x103c, 0x82c0, "HP G3 mini premium", ALC221_FIXUP_HP_MIC_NO_PRESENCE),
81228194
SND_PCI_QUIRK(0x103c, 0x83b9, "HP Spectre x360", ALC269_FIXUP_HP_MUTE_LED_MIC3),
81238195
SND_PCI_QUIRK(0x103c, 0x8497, "HP Envy x360", ALC269_FIXUP_HP_MUTE_LED_MIC3),
8196+
SND_PCI_QUIRK(0x103c, 0x84da, "HP OMEN dc0019-ur", ALC295_FIXUP_HP_OMEN),
81248197
SND_PCI_QUIRK(0x103c, 0x84e7, "HP Pavilion 15", ALC269_FIXUP_HP_MUTE_LED_MIC3),
81258198
SND_PCI_QUIRK(0x103c, 0x869d, "HP", ALC236_FIXUP_HP_MUTE_LED),
8199+
SND_PCI_QUIRK(0x103c, 0x86c7, "HP Envy AiO 32", ALC274_FIXUP_HP_ENVY_GPIO),
81268200
SND_PCI_QUIRK(0x103c, 0x8724, "HP EliteBook 850 G7", ALC285_FIXUP_HP_GPIO_LED),
81278201
SND_PCI_QUIRK(0x103c, 0x8729, "HP", ALC285_FIXUP_HP_GPIO_LED),
81288202
SND_PCI_QUIRK(0x103c, 0x8730, "HP ProBook 445 G7", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
@@ -8161,6 +8235,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
81618235
SND_PCI_QUIRK(0x1043, 0x1427, "Asus Zenbook UX31E", ALC269VB_FIXUP_ASUS_ZENBOOK),
81628236
SND_PCI_QUIRK(0x1043, 0x1517, "Asus Zenbook UX31A", ALC269VB_FIXUP_ASUS_ZENBOOK_UX31A),
81638237
SND_PCI_QUIRK(0x1043, 0x16e3, "ASUS UX50", ALC269_FIXUP_STEREO_DMIC),
8238+
SND_PCI_QUIRK(0x1043, 0x1740, "ASUS UX430UA", ALC295_FIXUP_ASUS_DACS),
81648239
SND_PCI_QUIRK(0x1043, 0x17d1, "ASUS UX431FL", ALC294_FIXUP_ASUS_DUAL_SPK),
81658240
SND_PCI_QUIRK(0x1043, 0x1881, "ASUS Zephyrus S/M", ALC294_FIXUP_ASUS_GX502_PINS),
81668241
SND_PCI_QUIRK(0x1043, 0x18b1, "Asus MJ401TA", ALC256_FIXUP_ASUS_HEADSET_MIC),
@@ -8524,6 +8599,7 @@ static const struct hda_model_fixup alc269_fixup_models[] = {
85248599
{.id = ALC255_FIXUP_XIAOMI_HEADSET_MIC, .name = "alc255-xiaomi-headset"},
85258600
{.id = ALC274_FIXUP_HP_MIC, .name = "alc274-hp-mic-detect"},
85268601
{.id = ALC245_FIXUP_HP_X360_AMP, .name = "alc245-hp-x360-amp"},
8602+
{.id = ALC295_FIXUP_HP_OMEN, .name = "alc295-hp-omen"},
85278603
{}
85288604
};
85298605
#define ALC225_STANDARD_PINS \
@@ -8801,6 +8877,16 @@ static const struct snd_hda_pin_quirk alc269_pin_fixup_tbl[] = {
88018877
{0x19, 0x03a11020},
88028878
{0x21, 0x0321101f}),
88038879
SND_HDA_PIN_QUIRK(0x10ec0285, 0x17aa, "Lenovo", ALC285_FIXUP_LENOVO_PC_BEEP_IN_NOISE,
8880+
{0x12, 0x90a60130},
8881+
{0x14, 0x90170110},
8882+
{0x19, 0x04a11040},
8883+
{0x21, 0x04211020}),
8884+
SND_HDA_PIN_QUIRK(0x10ec0285, 0x17aa, "Lenovo", ALC285_FIXUP_LENOVO_PC_BEEP_IN_NOISE,
8885+
{0x14, 0x90170110},
8886+
{0x19, 0x04a11040},
8887+
{0x1d, 0x40600001},
8888+
{0x21, 0x04211020}),
8889+
SND_HDA_PIN_QUIRK(0x10ec0285, 0x17aa, "Lenovo", ALC285_FIXUP_THINKPAD_NO_BASS_SPK_HEADSET_JACK,
88048890
{0x14, 0x90170110},
88058891
{0x19, 0x04a11040},
88068892
{0x21, 0x04211020}),
@@ -8971,10 +9057,6 @@ static const struct snd_hda_pin_quirk alc269_fallback_pin_fixup_tbl[] = {
89719057
SND_HDA_PIN_QUIRK(0x10ec0274, 0x1028, "Dell", ALC274_FIXUP_DELL_AIO_LINEOUT_VERB,
89729058
{0x19, 0x40000000},
89739059
{0x1a, 0x40000000}),
8974-
SND_HDA_PIN_QUIRK(0x10ec0285, 0x17aa, "Lenovo", ALC285_FIXUP_THINKPAD_NO_BASS_SPK_HEADSET_JACK,
8975-
{0x14, 0x90170110},
8976-
{0x19, 0x04a11040},
8977-
{0x21, 0x04211020}),
89789060
{}
89799061
};
89809062

sound/usb/mixer_maps.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -337,6 +337,13 @@ static const struct usbmix_name_map bose_companion5_map[] = {
337337
{ 0 } /* terminator */
338338
};
339339

340+
/* Sennheiser Communications Headset [PC 8], the dB value is reported as -6 negative maximum */
341+
static const struct usbmix_dB_map sennheiser_pc8_dB = {-9500, 0};
342+
static const struct usbmix_name_map sennheiser_pc8_map[] = {
343+
{ 9, NULL, .dB = &sennheiser_pc8_dB },
344+
{ 0 } /* terminator */
345+
};
346+
340347
/*
341348
* Dell usb dock with ALC4020 codec had a firmware problem where it got
342349
* screwed up when zero volume is passed; just skip it as a workaround
@@ -593,6 +600,11 @@ static const struct usbmix_ctl_map usbmix_ctl_maps[] = {
593600
.id = USB_ID(0x17aa, 0x1046),
594601
.map = lenovo_p620_rear_map,
595602
},
603+
{
604+
/* Sennheiser Communications Headset [PC 8] */
605+
.id = USB_ID(0x1395, 0x0025),
606+
.map = sennheiser_pc8_map,
607+
},
596608
{ 0 } /* terminator */
597609
};
598610

0 commit comments

Comments
 (0)