Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 248494
b: refs/heads/master
c: 07acecc
h: refs/heads/master
v: v3
  • Loading branch information
David Henningsson authored and Takashi Iwai committed May 19, 2011
1 parent c08e83f commit 36b8e27
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b896b4ebf0c136b51b184ea9f39247701e332005
refs/heads/master: 07acecc11139efbc8d0401576e81dc8c188cb092
2 changes: 2 additions & 0 deletions trunk/sound/pci/hda/hda_codec.c
Original file line number Diff line number Diff line change
Expand Up @@ -5055,6 +5055,8 @@ static const char *get_jack_default_name(struct hda_codec *codec, hda_nid_t nid,
return "Line-out";
case SND_JACK_HEADSET:
return "Headset";
case SND_JACK_VIDEOOUT:
return "HDMI/DP";
default:
return "Misc";
}
Expand Down
11 changes: 11 additions & 0 deletions trunk/sound/pci/hda/patch_hdmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
#include <linux/slab.h>
#include <linux/moduleparam.h>
#include <sound/core.h>
#include <sound/jack.h>
#include "hda_codec.h"
#include "hda_local.h"

Expand Down Expand Up @@ -720,6 +721,8 @@ static void hdmi_intrinsic_event(struct hda_codec *codec, unsigned int res)
&spec->sink_eld[index]);
/* TODO: do real things about ELD */
}

snd_hda_input_jack_report(codec, tag);
}

static void hdmi_non_intrinsic_event(struct hda_codec *codec, unsigned int res)
Expand Down Expand Up @@ -912,13 +915,20 @@ static void hdmi_present_sense(struct hda_codec *codec, hda_nid_t pin_nid,
static int hdmi_add_pin(struct hda_codec *codec, hda_nid_t pin_nid)
{
struct hdmi_spec *spec = codec->spec;
int err;

if (spec->num_pins >= MAX_HDMI_PINS) {
snd_printk(KERN_WARNING
"HDMI: no space for pin %d\n", pin_nid);
return -E2BIG;
}

err = snd_hda_input_jack_add(codec, pin_nid,
SND_JACK_VIDEOOUT, NULL);
if (err < 0)
return err;
snd_hda_input_jack_report(codec, pin_nid);

hdmi_present_sense(codec, pin_nid, &spec->sink_eld[spec->num_pins]);

spec->pin[spec->num_pins] = pin_nid;
Expand Down Expand Up @@ -1120,6 +1130,7 @@ static void generic_hdmi_free(struct hda_codec *codec)

for (i = 0; i < spec->num_pins; i++)
snd_hda_eld_proc_free(codec, &spec->sink_eld[i]);
snd_hda_input_jack_free(codec);

kfree(spec);
}
Expand Down

0 comments on commit 36b8e27

Please sign in to comment.