All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ALSA: hda/realtek: Headphone volume is controlled by Front mixer
@ 2021-05-22  3:47 Hui Wang
  2021-05-22  6:49 ` Takashi Iwai
  0 siblings, 1 reply; 2+ messages in thread
From: Hui Wang @ 2021-05-22  3:47 UTC (permalink / raw)
  To: alsa-devel, tiwai, stable

On some ASUS and MSI machines, the audio codec is alc1220 and the
Headphone is connected to audio mixer 0xf and DAC 0x5, in theory
the Headphone volume is controlled by DAC 0x5 (Heapdhone Playback
Volume), but somehow it is controlled by DAC 0x2 (Front Playback
Volume), maybe this is a defect on the codec alc1220.

Because of this issue, the PA couldn't switch the headphone and
Lineout correctly, If we apply the quirk CLEVO_P950 to those machines,
the Lineout and Headphone will share the audio mixer 0xc and DAC 0x2,
and generate Headphone+LO mixer, then PA could handle them when
switching between them.

BugLink: https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/1206
Cc: <stable@vger.kernel.org>
Signed-off-by: Hui Wang <hui.wang@canonical.com>
---
 sound/pci/hda/patch_realtek.c | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index c6b5db831ed0..3d40d32ef3ba 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -2603,6 +2603,28 @@ static const struct hda_model_fixup alc882_fixup_models[] = {
 	{}
 };
 
+static const struct snd_hda_pin_quirk alc882_pin_fixup_tbl[] = {
+	SND_HDA_PIN_QUIRK(0x10ec1220, 0x1043, "ASUS", ALC1220_FIXUP_CLEVO_P950,
+		{0x14, 0x01014010},
+		{0x15, 0x01011012},
+		{0x16, 0x01016011},
+		{0x18, 0x01a19040},
+		{0x19, 0x02a19050},
+		{0x1a, 0x0181304f},
+		{0x1b, 0x0221401f},
+		{0x1e, 0x01456130}),
+	SND_HDA_PIN_QUIRK(0x10ec1220, 0x1462, "MS-7C35", ALC1220_FIXUP_CLEVO_P950,
+		{0x14, 0x01015010},
+		{0x15, 0x01011012},
+		{0x16, 0x01011011},
+		{0x18, 0x01a11040},
+		{0x19, 0x02a19050},
+		{0x1a, 0x0181104f},
+		{0x1b, 0x0221401f},
+		{0x1e, 0x01451130}),
+	{}
+};
+
 /*
  * BIOS auto configuration
  */
@@ -2644,6 +2666,7 @@ static int patch_alc882(struct hda_codec *codec)
 
 	snd_hda_pick_fixup(codec, alc882_fixup_models, alc882_fixup_tbl,
 		       alc882_fixups);
+	snd_hda_pick_pin_fixup(codec, alc882_pin_fixup_tbl, alc882_fixups, true);
 	snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PRE_PROBE);
 
 	alc_auto_parse_customize_define(codec);
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ALSA: hda/realtek: Headphone volume is controlled by Front mixer
  2021-05-22  3:47 [PATCH] ALSA: hda/realtek: Headphone volume is controlled by Front mixer Hui Wang
@ 2021-05-22  6:49 ` Takashi Iwai
  0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2021-05-22  6:49 UTC (permalink / raw)
  To: Hui Wang; +Cc: alsa-devel, stable

On Sat, 22 May 2021 05:47:41 +0200,
Hui Wang wrote:
> 
> On some ASUS and MSI machines, the audio codec is alc1220 and the
> Headphone is connected to audio mixer 0xf and DAC 0x5, in theory
> the Headphone volume is controlled by DAC 0x5 (Heapdhone Playback
> Volume), but somehow it is controlled by DAC 0x2 (Front Playback
> Volume), maybe this is a defect on the codec alc1220.
> 
> Because of this issue, the PA couldn't switch the headphone and
> Lineout correctly, If we apply the quirk CLEVO_P950 to those machines,
> the Lineout and Headphone will share the audio mixer 0xc and DAC 0x2,
> and generate Headphone+LO mixer, then PA could handle them when
> switching between them.
> 
> BugLink: https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/1206
> Cc: <stable@vger.kernel.org>
> Signed-off-by: Hui Wang <hui.wang@canonical.com>

Thanks, applied.


Takashi

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-05-22  6:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-22  3:47 [PATCH] ALSA: hda/realtek: Headphone volume is controlled by Front mixer Hui Wang
2021-05-22  6:49 ` Takashi Iwai

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.