Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 252110
b: refs/heads/master
c: 5875c2c
h: refs/heads/master
v: v3
  • Loading branch information
Daniel Mack authored and Takashi Iwai committed May 25, 2011
1 parent a75ae80 commit f3352f8
Show file tree
Hide file tree
Showing 8 changed files with 195 additions and 217 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9477c58e3308f54a108a5d1eb9621830b329b0ca
refs/heads/master: 5875c2cb7633ca280c2ece43389d6a6f3c00e951
2 changes: 1 addition & 1 deletion trunk/sound/pci/hda/hda_codec.c
Original file line number Diff line number Diff line change
Expand Up @@ -4719,7 +4719,7 @@ int snd_hda_parse_pin_def_config(struct hda_codec *codec,
cfg->dig_out_pins[0], cfg->dig_out_pins[1]);
snd_printd(" inputs:");
for (i = 0; i < cfg->num_inputs; i++) {
snd_printd(" %s=0x%x",
snd_printdd(" %s=0x%x",
hda_get_autocfg_input_label(codec, cfg, i),
cfg->inputs[i].pin);
}
Expand Down
21 changes: 18 additions & 3 deletions trunk/sound/pci/hda/hda_eld.c
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,23 @@ static int hdmi_update_eld(struct hdmi_eld *e,
return -EINVAL;
}

static int hdmi_eld_valid(struct hda_codec *codec, hda_nid_t nid)
{
int eldv;
int present;

present = snd_hda_pin_sense(codec, nid);
eldv = (present & AC_PINSENSE_ELDV);
present = (present & AC_PINSENSE_PRESENCE);

#ifdef CONFIG_SND_DEBUG_VERBOSE
printk(KERN_INFO "HDMI: sink_present = %d, eld_valid = %d\n",
!!present, !!eldv);
#endif

return eldv && present;
}

int snd_hdmi_get_eld_size(struct hda_codec *codec, hda_nid_t nid)
{
return snd_hda_codec_read(codec, nid, 0, AC_VERB_GET_HDMI_DIP_SIZE,
Expand All @@ -326,7 +343,7 @@ int snd_hdmi_get_eld(struct hdmi_eld *eld,
int size;
unsigned char *buf;

if (!eld->eld_valid)
if (!hdmi_eld_valid(codec, nid))
return -ENOENT;

size = snd_hdmi_get_eld_size(codec, nid);
Expand Down Expand Up @@ -460,8 +477,6 @@ static void hdmi_print_eld_info(struct snd_info_entry *entry,

snd_iprintf(buffer, "monitor_present\t\t%d\n", e->monitor_present);
snd_iprintf(buffer, "eld_valid\t\t%d\n", e->eld_valid);
if (!e->eld_valid)
return;
snd_iprintf(buffer, "monitor_name\t\t%s\n", e->monitor_name);
snd_iprintf(buffer, "connection_type\t\t%s\n",
eld_connection_type_names[e->conn_type]);
Expand Down
Loading

0 comments on commit f3352f8

Please sign in to comment.