[alsa-devel] [PATCH] Fix automute issue on HP T5735

Takashi Iwai tiwai at suse.de
Sun Jan 17 13:25:24 CET 2010


At Fri, 15 Jan 2010 11:56:19 -0500,
Lee Trager wrote:
> 
> The following patch fixes an issue where when you plug something into
> the headphone jack the internal speaker does not automute. This also
> will close alsa bug #0004766

Hm, the present quirk is already broken as its changing 0x15 with
alc_automute_amp().  There are already mixer elements with these NIDs,
and changing dynamically via unsol event conflicts with the mixers.
Also, alc_automute_amp() shouldn't be called in setup callback but in
init_hook callback instead.

I wonder whether the output pin control works with your device.  If it
does, it's much easier.  For example, how about the patch below?


thanks,

Takashi

---
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 7e0ea37..b0c8ae0 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -10490,7 +10490,7 @@ static void alc262_hp_t5735_setup(struct hda_codec *codec)
 	struct alc_spec *spec = codec->spec;
 
 	spec->autocfg.hp_pins[0] = 0x15;
-	spec->autocfg.speaker_pins[0] = 0x0c; /* HACK: not actually a pin */
+	spec->autocfg.speaker_pins[0] = 0x14;
 }
 
 static struct snd_kcontrol_new alc262_hp_t5735_mixer[] = {
@@ -11919,9 +11919,9 @@ static struct alc_config_preset alc262_presets[] = {
 		.num_channel_mode = ARRAY_SIZE(alc262_modes),
 		.channel_mode = alc262_modes,
 		.input_mux = &alc262_capture_source,
-		.unsol_event = alc_automute_amp_unsol_event,
+		.unsol_event = alc_sku_unsol_event,
 		.setup = alc262_hp_t5735_setup,
-		.init_hook = alc_automute_amp,
+		.init_hook = alc_inithook,
 	},
 	[ALC262_HP_RP5700] = {
 		.mixers = { alc262_hp_rp5700_mixer },


More information about the Alsa-devel mailing list