diff options
Diffstat (limited to 'sound/pci/hda/patch_hdmi.c')
-rw-r--r-- | sound/pci/hda/patch_hdmi.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c index 6eb209d4b5b9..7348296985fc 100644 --- a/sound/pci/hda/patch_hdmi.c +++ b/sound/pci/hda/patch_hdmi.c | |||
@@ -33,6 +33,7 @@ | |||
33 | #include <linux/slab.h> | 33 | #include <linux/slab.h> |
34 | #include <linux/moduleparam.h> | 34 | #include <linux/moduleparam.h> |
35 | #include <sound/core.h> | 35 | #include <sound/core.h> |
36 | #include <sound/jack.h> | ||
36 | #include "hda_codec.h" | 37 | #include "hda_codec.h" |
37 | #include "hda_local.h" | 38 | #include "hda_local.h" |
38 | 39 | ||
@@ -720,6 +721,8 @@ static void hdmi_intrinsic_event(struct hda_codec *codec, unsigned int res) | |||
720 | &spec->sink_eld[index]); | 721 | &spec->sink_eld[index]); |
721 | /* TODO: do real things about ELD */ | 722 | /* TODO: do real things about ELD */ |
722 | } | 723 | } |
724 | |||
725 | snd_hda_input_jack_report(codec, tag); | ||
723 | } | 726 | } |
724 | 727 | ||
725 | static void hdmi_non_intrinsic_event(struct hda_codec *codec, unsigned int res) | 728 | static void hdmi_non_intrinsic_event(struct hda_codec *codec, unsigned int res) |
@@ -912,6 +915,7 @@ static void hdmi_present_sense(struct hda_codec *codec, hda_nid_t pin_nid, | |||
912 | static int hdmi_add_pin(struct hda_codec *codec, hda_nid_t pin_nid) | 915 | static int hdmi_add_pin(struct hda_codec *codec, hda_nid_t pin_nid) |
913 | { | 916 | { |
914 | struct hdmi_spec *spec = codec->spec; | 917 | struct hdmi_spec *spec = codec->spec; |
918 | int err; | ||
915 | 919 | ||
916 | if (spec->num_pins >= MAX_HDMI_PINS) { | 920 | if (spec->num_pins >= MAX_HDMI_PINS) { |
917 | snd_printk(KERN_WARNING | 921 | snd_printk(KERN_WARNING |
@@ -919,6 +923,12 @@ static int hdmi_add_pin(struct hda_codec *codec, hda_nid_t pin_nid) | |||
919 | return -E2BIG; | 923 | return -E2BIG; |
920 | } | 924 | } |
921 | 925 | ||
926 | err = snd_hda_input_jack_add(codec, pin_nid, | ||
927 | SND_JACK_VIDEOOUT, NULL); | ||
928 | if (err < 0) | ||
929 | return err; | ||
930 | snd_hda_input_jack_report(codec, pin_nid); | ||
931 | |||
922 | hdmi_present_sense(codec, pin_nid, &spec->sink_eld[spec->num_pins]); | 932 | hdmi_present_sense(codec, pin_nid, &spec->sink_eld[spec->num_pins]); |
923 | 933 | ||
924 | spec->pin[spec->num_pins] = pin_nid; | 934 | spec->pin[spec->num_pins] = pin_nid; |
@@ -1120,6 +1130,7 @@ static void generic_hdmi_free(struct hda_codec *codec) | |||
1120 | 1130 | ||
1121 | for (i = 0; i < spec->num_pins; i++) | 1131 | for (i = 0; i < spec->num_pins; i++) |
1122 | snd_hda_eld_proc_free(codec, &spec->sink_eld[i]); | 1132 | snd_hda_eld_proc_free(codec, &spec->sink_eld[i]); |
1133 | snd_hda_input_jack_free(codec); | ||
1123 | 1134 | ||
1124 | kfree(spec); | 1135 | kfree(spec); |
1125 | } | 1136 | } |