diff options
author | Wu Fengguang <fengguang.wu@intel.com> | 2009-11-17 23:38:01 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2009-11-18 01:37:49 -0500 |
commit | 23ccc2bd246a5bdb1ac03dc9040a0585c1890ef3 (patch) | |
tree | cbe53b086f16a4009378264bb16fabc5243cec16 | |
parent | 1e7c10fefadb42d9300305c7de57bea365855e9b (diff) |
ALSA: intelhdmi - export monitor-presence and ELD-valid status
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r-- | sound/pci/hda/hda_eld.c | 8 | ||||
-rw-r--r-- | sound/pci/hda/hda_local.h | 4 | ||||
-rw-r--r-- | sound/pci/hda/patch_intelhdmi.c | 8 |
3 files changed, 13 insertions, 7 deletions
diff --git a/sound/pci/hda/hda_eld.c b/sound/pci/hda/hda_eld.c index 20fa6aee29c0..de50cfcf644e 100644 --- a/sound/pci/hda/hda_eld.c +++ b/sound/pci/hda/hda_eld.c | |||
@@ -477,6 +477,8 @@ static void hdmi_print_eld_info(struct snd_info_entry *entry, | |||
477 | [4 ... 7] = "reserved" | 477 | [4 ... 7] = "reserved" |
478 | }; | 478 | }; |
479 | 479 | ||
480 | snd_iprintf(buffer, "monitor_present\t\t%d\n", e->monitor_present); | ||
481 | snd_iprintf(buffer, "eld_valid\t\t%d\n", e->eld_valid); | ||
480 | snd_iprintf(buffer, "monitor_name\t\t%s\n", e->monitor_name); | 482 | snd_iprintf(buffer, "monitor_name\t\t%s\n", e->monitor_name); |
481 | snd_iprintf(buffer, "connection_type\t\t%s\n", | 483 | snd_iprintf(buffer, "connection_type\t\t%s\n", |
482 | eld_connection_type_names[e->conn_type]); | 484 | eld_connection_type_names[e->conn_type]); |
@@ -518,7 +520,11 @@ static void hdmi_write_eld_info(struct snd_info_entry *entry, | |||
518 | * monitor_name manufacture_id product_id | 520 | * monitor_name manufacture_id product_id |
519 | * eld_version edid_version | 521 | * eld_version edid_version |
520 | */ | 522 | */ |
521 | if (!strcmp(name, "connection_type")) | 523 | if (!strcmp(name, "monitor_present")) |
524 | e->monitor_present = val; | ||
525 | else if (!strcmp(name, "eld_valid")) | ||
526 | e->eld_valid = val; | ||
527 | else if (!strcmp(name, "connection_type")) | ||
522 | e->conn_type = val; | 528 | e->conn_type = val; |
523 | else if (!strcmp(name, "port_id")) | 529 | else if (!strcmp(name, "port_id")) |
524 | e->port_id = val; | 530 | e->port_id = val; |
diff --git a/sound/pci/hda/hda_local.h b/sound/pci/hda/hda_local.h index d4a3d0942c00..070b74384d43 100644 --- a/sound/pci/hda/hda_local.h +++ b/sound/pci/hda/hda_local.h | |||
@@ -569,9 +569,11 @@ struct cea_sad { | |||
569 | * ELD: EDID Like Data | 569 | * ELD: EDID Like Data |
570 | */ | 570 | */ |
571 | struct hdmi_eld { | 571 | struct hdmi_eld { |
572 | bool monitor_present; | ||
573 | bool eld_valid; | ||
572 | int eld_size; | 574 | int eld_size; |
573 | int baseline_len; | 575 | int baseline_len; |
574 | int eld_ver; /* (eld_ver == 0) indicates invalid ELD */ | 576 | int eld_ver; |
575 | int cea_edid_ver; | 577 | int cea_edid_ver; |
576 | char monitor_name[ELD_MAX_MNL + 1]; | 578 | char monitor_name[ELD_MAX_MNL + 1]; |
577 | int manufacture_id; | 579 | int manufacture_id; |
diff --git a/sound/pci/hda/patch_intelhdmi.c b/sound/pci/hda/patch_intelhdmi.c index 82312c67f8dd..095c993f4b76 100644 --- a/sound/pci/hda/patch_intelhdmi.c +++ b/sound/pci/hda/patch_intelhdmi.c | |||
@@ -62,8 +62,6 @@ struct intel_hdmi_spec { | |||
62 | /* | 62 | /* |
63 | * HDMI sink attached to each pin | 63 | * HDMI sink attached to each pin |
64 | */ | 64 | */ |
65 | bool sink_present[INTEL_HDMI_PINS]; | ||
66 | bool sink_eldv[INTEL_HDMI_PINS]; | ||
67 | struct hdmi_eld sink_eld[INTEL_HDMI_PINS]; | 65 | struct hdmi_eld sink_eld[INTEL_HDMI_PINS]; |
68 | 66 | ||
69 | /* | 67 | /* |
@@ -645,7 +643,7 @@ static void hdmi_setup_audio_infoframe(struct hda_codec *codec, hda_nid_t nid, | |||
645 | for (i = 0; i < spec->num_pins; i++) { | 643 | for (i = 0; i < spec->num_pins; i++) { |
646 | if (spec->pin_cvt[i] != nid) | 644 | if (spec->pin_cvt[i] != nid) |
647 | continue; | 645 | continue; |
648 | if (spec->sink_present[i] != true) | 646 | if (!spec->sink_eld[i].monitor_present) |
649 | continue; | 647 | continue; |
650 | 648 | ||
651 | pin_nid = spec->pin[i]; | 649 | pin_nid = spec->pin[i]; |
@@ -675,8 +673,8 @@ static void hdmi_intrinsic_event(struct hda_codec *codec, unsigned int res) | |||
675 | if (index < 0) | 673 | if (index < 0) |
676 | return; | 674 | return; |
677 | 675 | ||
678 | spec->sink_present[index] = pind; | 676 | spec->sink_eld[index].monitor_present = pind; |
679 | spec->sink_eldv[index] = eldv; | 677 | spec->sink_eld[index].eld_valid = eldv; |
680 | 678 | ||
681 | if (pind && eldv) { | 679 | if (pind && eldv) { |
682 | hdmi_parse_eld(codec, index); | 680 | hdmi_parse_eld(codec, index); |