aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sound/pci/hda/patch_analog.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/sound/pci/hda/patch_analog.c b/sound/pci/hda/patch_analog.c
index 49140322e769..845e949a7f63 100644
--- a/sound/pci/hda/patch_analog.c
+++ b/sound/pci/hda/patch_analog.c
@@ -925,6 +925,13 @@ static struct hda_amp_list ad1986a_loopbacks[] = {
925}; 925};
926#endif 926#endif
927 927
928static int is_jack_available(struct hda_codec *codec, hda_nid_t nid)
929{
930 unsigned int conf = snd_hda_codec_read(codec, nid, 0,
931 AC_VERB_GET_CONFIG_DEFAULT, 0);
932 return get_defcfg_connect(conf) != AC_JACK_PORT_NONE;
933}
934
928static int patch_ad1986a(struct hda_codec *codec) 935static int patch_ad1986a(struct hda_codec *codec)
929{ 936{
930 struct ad198x_spec *spec; 937 struct ad198x_spec *spec;
@@ -984,7 +991,8 @@ static int patch_ad1986a(struct hda_codec *codec)
984 spec->multiout.max_channels = 2; 991 spec->multiout.max_channels = 2;
985 spec->multiout.num_dacs = 1; 992 spec->multiout.num_dacs = 1;
986 spec->multiout.dac_nids = ad1986a_laptop_dac_nids; 993 spec->multiout.dac_nids = ad1986a_laptop_dac_nids;
987 spec->multiout.dig_out_nid = 0; 994 if (!is_jack_available(codec, 0x25))
995 spec->multiout.dig_out_nid = 0;
988 spec->input_mux = &ad1986a_laptop_eapd_capture_source; 996 spec->input_mux = &ad1986a_laptop_eapd_capture_source;
989 break; 997 break;
990 case AD1986A_LAPTOP_AUTOMUTE: 998 case AD1986A_LAPTOP_AUTOMUTE:
@@ -995,7 +1003,8 @@ static int patch_ad1986a(struct hda_codec *codec)
995 spec->multiout.max_channels = 2; 1003 spec->multiout.max_channels = 2;
996 spec->multiout.num_dacs = 1; 1004 spec->multiout.num_dacs = 1;
997 spec->multiout.dac_nids = ad1986a_laptop_dac_nids; 1005 spec->multiout.dac_nids = ad1986a_laptop_dac_nids;
998 spec->multiout.dig_out_nid = 0; 1006 if (!is_jack_available(codec, 0x25))
1007 spec->multiout.dig_out_nid = 0;
999 spec->input_mux = &ad1986a_laptop_eapd_capture_source; 1008 spec->input_mux = &ad1986a_laptop_eapd_capture_source;
1000 codec->patch_ops.unsol_event = ad1986a_hp_unsol_event; 1009 codec->patch_ops.unsol_event = ad1986a_hp_unsol_event;
1001 codec->patch_ops.init = ad1986a_hp_init; 1010 codec->patch_ops.init = ad1986a_hp_init;