Skip to content

Commit e8fa236

Browse files
mschiu77tiwai
authored andcommitted
ALSA: hda: Apply volume control on speaker+lineout for HP EliteStudio AIO
This hardware has ALC274 codec with speaker NID 0x17 and line out NID 0x16 for audio output. The line out is routed correctly but the speaker is not. Thus the volume can't be controlled. This patch removes DAC NID 0x06 (without volume control) from the connection list for speaker NID 0x17. Routing both speaker and line out pins to DAC NID 0x02 which controls the output volume. Signed-off-by: Chris Chiu <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
1 parent f406005 commit e8fa236

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

sound/pci/hda/patch_realtek.c

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6742,6 +6742,25 @@ static void alc274_fixup_bind_dacs(struct hda_codec *codec,
67426742
codec->power_save_node = 0;
67436743
}
67446744

6745+
/* avoid DAC 0x06 for speaker switch 0x17; it has no volume control */
6746+
static void alc274_fixup_hp_aio_bind_dacs(struct hda_codec *codec,
6747+
const struct hda_fixup *fix, int action)
6748+
{
6749+
static const hda_nid_t conn[] = { 0x02, 0x03 }; /* exclude 0x06 */
6750+
/* The speaker is routed to the Node 0x06 by a mistake, thus the
6751+
* speaker's volume can't be adjusted since the node doesn't have
6752+
* Amp-out capability. Assure the speaker and lineout pin to be
6753+
* coupled with DAC NID 0x02.
6754+
*/
6755+
static const hda_nid_t preferred_pairs[] = {
6756+
0x16, 0x02, 0x17, 0x02, 0x21, 0x03, 0
6757+
};
6758+
struct alc_spec *spec = codec->spec;
6759+
6760+
snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn), conn);
6761+
spec->gen.preferred_dacs = preferred_pairs;
6762+
}
6763+
67456764
/* avoid DAC 0x06 for bass speaker 0x17; it has no volume control */
67466765
static void alc289_fixup_asus_ga401(struct hda_codec *codec,
67476766
const struct hda_fixup *fix, int action)
@@ -7970,6 +7989,7 @@ enum {
79707989
ALC294_FIXUP_BASS_SPEAKER_15,
79717990
ALC283_FIXUP_DELL_HP_RESUME,
79727991
ALC294_FIXUP_ASUS_CS35L41_SPI_2,
7992+
ALC274_FIXUP_HP_AIO_BIND_DACS,
79737993
};
79747994

79757995
/* A special fixup for Lenovo C940 and Yoga Duet 7;
@@ -10340,6 +10360,10 @@ static const struct hda_fixup alc269_fixups[] = {
1034010360
.chained = true,
1034110361
.chain_id = ALC294_FIXUP_ASUS_HEADSET_MIC,
1034210362
},
10363+
[ALC274_FIXUP_HP_AIO_BIND_DACS] = {
10364+
.type = HDA_FIXUP_FUNC,
10365+
.v.func = alc274_fixup_hp_aio_bind_dacs,
10366+
},
1034310367
};
1034410368

1034510369
static const struct hda_quirk alc269_fixup_tbl[] = {
@@ -10774,6 +10798,7 @@ static const struct hda_quirk alc269_fixup_tbl[] = {
1077410798
SND_PCI_QUIRK(0x103c, 0x8ce0, "HP SnowWhite", ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED),
1077510799
SND_PCI_QUIRK(0x103c, 0x8cf5, "HP ZBook Studio 16", ALC245_FIXUP_CS35L41_SPI_4_HP_GPIO_LED),
1077610800
SND_PCI_QUIRK(0x103c, 0x8d01, "HP ZBook Power 14 G12", ALC285_FIXUP_HP_GPIO_LED),
10801+
SND_PCI_QUIRK(0x103c, 0x8d18, "HP EliteStudio 8 AIO", ALC274_FIXUP_HP_AIO_BIND_DACS),
1077710802
SND_PCI_QUIRK(0x103c, 0x8d84, "HP EliteBook X G1i", ALC285_FIXUP_HP_GPIO_LED),
1077810803
SND_PCI_QUIRK(0x103c, 0x8d85, "HP EliteBook 14 G12", ALC285_FIXUP_HP_GPIO_LED),
1077910804
SND_PCI_QUIRK(0x103c, 0x8d86, "HP Elite X360 14 G12", ALC285_FIXUP_HP_GPIO_LED),
@@ -10793,6 +10818,7 @@ static const struct hda_quirk alc269_fixup_tbl[] = {
1079310818
SND_PCI_QUIRK(0x103c, 0x8da1, "HP 16 Clipper OmniBook X", ALC287_FIXUP_CS35L41_I2C_2),
1079410819
SND_PCI_QUIRK(0x103c, 0x8da7, "HP 14 Enstrom OmniBook X", ALC287_FIXUP_CS35L41_I2C_2),
1079510820
SND_PCI_QUIRK(0x103c, 0x8da8, "HP 16 Piston OmniBook X", ALC287_FIXUP_CS35L41_I2C_2),
10821+
SND_PCI_QUIRK(0x103c, 0x8dd4, "HP EliteStudio 8 AIO", ALC274_FIXUP_HP_AIO_BIND_DACS),
1079610822
SND_PCI_QUIRK(0x103c, 0x8de8, "HP Gemtree", ALC245_FIXUP_TAS2781_SPI_2),
1079710823
SND_PCI_QUIRK(0x103c, 0x8de9, "HP Gemtree", ALC245_FIXUP_TAS2781_SPI_2),
1079810824
SND_PCI_QUIRK(0x103c, 0x8dec, "HP EliteBook 640 G12", ALC236_FIXUP_HP_GPIO_LED),

0 commit comments

Comments
 (0)