Skip to contentSkip to conversation

ALSA: hda/analog - Handle inverted EAPD properly in vmaster hook

PATCH New Takashi Iwai 1 participant 2 messages Dec 2, 2013 Sound

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 ALSA: hda/analog - Handle inverted EAPD properly in vmaster hook

ad_vmaster_eapd_hook() needs to handle the inverted EAPD case properly, too. Otherwise the output gets broken on Lenovo N100 with AD1986A codec.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=64971

---
 sound/pci/hda/patch_analog.c | 2 ++
 1 file changed, 2 insertions(+)
sound/pci/hda/patch_analog.c +2 -0
index 34d86ec5d3dd..f6351b8e0f5d 100644
@@ -147,6 +147,8 @@ static void ad_vmaster_eapd_hook(void *private_data, int enabled)
 
 	if (!spec->eapd_nid)
 		return;
+	if (codec->inv_eapd)
+		enabled = !enabled;
 	snd_hda_codec_update_cache(codec, spec->eapd_nid, 0,
 				   AC_VERB_SET_EAPD_BTLENABLE,
 				   enabled ? 0x02 : 0x00);
Signature · 1 line
1.8.4.4
#1 lore raw

PATCH 2/2 ALSA: hda - Use always amps for auto-mute on AD1986A codec

It seems that AD1986A cannot manage the dynamic pin on/off for auto-muting, but rather gets confused. Since each output has own amp, let's use it instead.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=64971

---
 sound/pci/hda/patch_analog.c | 3 +++
 1 file changed, 3 insertions(+)
sound/pci/hda/patch_analog.c +3 -0
index f6351b8e0f5d..cac015be3325 100644
@@ -361,6 +361,9 @@ static int patch_ad1986a(struct hda_codec *codec)
 	 */
 	spec->gen.multiout.no_share_stream = 1;
 
+	/* AD1986A can't manage the dynamic pin on/off smoothly */
+	spec->gen.auto_mute_via_amp = 1;
+
 	snd_hda_pick_fixup(codec, ad1986a_fixup_models, ad1986a_fixup_tbl,
 			   ad1986a_fixups);
 	snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PRE_PROBE);
Signature · 1 line
1.8.4.4