Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* Update alc287_fixup_bind_dacs()
@ 2023-09-12  8:28 Kailang
  2023-09-12 10:39 ` Takashi Iwai
  0 siblings, 1 reply; 2+ messages in thread
From: Kailang @ 2023-09-12  8:28 UTC (permalink / raw)
  To: Takashi Iwai (tiwai@suse.de); +Cc:  (alsa-devel@alsa-project.org)

[-- Attachment #1: Type: text/plain, Size: 118 bytes --]

Hi Takashi,

Two speakers platform will common use same function.
So, attach patch was an update.

BR,
Kailang

[-- Attachment #2: 0000-two-speaker-platform.patch --]
[-- Type: application/octet-stream, Size: 1162 bytes --]

From 866966dc46057c2d798ceef6a335f95becd48d4c Mon Sep 17 00:00:00 2001
From: Kailang Yang <kailang@realtek.com>
Date: Tue, 12 Sep 2023 15:31:49 +0800
Subject: [PATCH] ALSA: hda/realtek - Fixed two speaker platform

If system has two speakers and one connect to 0x14 pin, use this function will disable it.

Fixes:e43252db7e20 ("ALSA: hda/realtek - ALC287 I2S speaker platform support")
Signed-off-by: Kailang Yang <kailang@realtek.com>

diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index b7e78bfcffd8..887c1b163865 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -7073,8 +7073,10 @@ static void alc287_fixup_bind_dacs(struct hda_codec *codec,
 	snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn), conn);
 	spec->gen.preferred_dacs = preferred_pairs;
 	spec->gen.auto_mute_via_amp = 1;
-	snd_hda_codec_write_cache(codec, 0x14, 0, AC_VERB_SET_PIN_WIDGET_CONTROL,
-			    0x0); /* Make sure 0x14 was disable */
+	if (spec->gen.autocfg.speaker_pins[0] != 0x14) {
+		snd_hda_codec_write_cache(codec, 0x14, 0, AC_VERB_SET_PIN_WIDGET_CONTROL,
+					0x0); /* Make sure 0x14 was disable */
+	}
 }
 
 

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

end of thread, other threads:[~2023-09-12 10:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-12  8:28 Update alc287_fixup_bind_dacs() Kailang
2023-09-12 10:39 ` Takashi Iwai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox