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>
This commit is contained in:
parent
1e7c10fefa
commit
23ccc2bd24
|
@ -477,6 +477,8 @@ static void hdmi_print_eld_info(struct snd_info_entry *entry,
|
||||||
[4 ... 7] = "reserved"
|
[4 ... 7] = "reserved"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
snd_iprintf(buffer, "monitor_present\t\t%d\n", e->monitor_present);
|
||||||
|
snd_iprintf(buffer, "eld_valid\t\t%d\n", e->eld_valid);
|
||||||
snd_iprintf(buffer, "monitor_name\t\t%s\n", e->monitor_name);
|
snd_iprintf(buffer, "monitor_name\t\t%s\n", e->monitor_name);
|
||||||
snd_iprintf(buffer, "connection_type\t\t%s\n",
|
snd_iprintf(buffer, "connection_type\t\t%s\n",
|
||||||
eld_connection_type_names[e->conn_type]);
|
eld_connection_type_names[e->conn_type]);
|
||||||
|
@ -518,7 +520,11 @@ static void hdmi_write_eld_info(struct snd_info_entry *entry,
|
||||||
* monitor_name manufacture_id product_id
|
* monitor_name manufacture_id product_id
|
||||||
* eld_version edid_version
|
* eld_version edid_version
|
||||||
*/
|
*/
|
||||||
if (!strcmp(name, "connection_type"))
|
if (!strcmp(name, "monitor_present"))
|
||||||
|
e->monitor_present = val;
|
||||||
|
else if (!strcmp(name, "eld_valid"))
|
||||||
|
e->eld_valid = val;
|
||||||
|
else if (!strcmp(name, "connection_type"))
|
||||||
e->conn_type = val;
|
e->conn_type = val;
|
||||||
else if (!strcmp(name, "port_id"))
|
else if (!strcmp(name, "port_id"))
|
||||||
e->port_id = val;
|
e->port_id = val;
|
||||||
|
|
|
@ -569,9 +569,11 @@ struct cea_sad {
|
||||||
* ELD: EDID Like Data
|
* ELD: EDID Like Data
|
||||||
*/
|
*/
|
||||||
struct hdmi_eld {
|
struct hdmi_eld {
|
||||||
|
bool monitor_present;
|
||||||
|
bool eld_valid;
|
||||||
int eld_size;
|
int eld_size;
|
||||||
int baseline_len;
|
int baseline_len;
|
||||||
int eld_ver; /* (eld_ver == 0) indicates invalid ELD */
|
int eld_ver;
|
||||||
int cea_edid_ver;
|
int cea_edid_ver;
|
||||||
char monitor_name[ELD_MAX_MNL + 1];
|
char monitor_name[ELD_MAX_MNL + 1];
|
||||||
int manufacture_id;
|
int manufacture_id;
|
||||||
|
|
|
@ -62,8 +62,6 @@ struct intel_hdmi_spec {
|
||||||
/*
|
/*
|
||||||
* HDMI sink attached to each pin
|
* HDMI sink attached to each pin
|
||||||
*/
|
*/
|
||||||
bool sink_present[INTEL_HDMI_PINS];
|
|
||||||
bool sink_eldv[INTEL_HDMI_PINS];
|
|
||||||
struct hdmi_eld sink_eld[INTEL_HDMI_PINS];
|
struct hdmi_eld sink_eld[INTEL_HDMI_PINS];
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -645,7 +643,7 @@ static void hdmi_setup_audio_infoframe(struct hda_codec *codec, hda_nid_t nid,
|
||||||
for (i = 0; i < spec->num_pins; i++) {
|
for (i = 0; i < spec->num_pins; i++) {
|
||||||
if (spec->pin_cvt[i] != nid)
|
if (spec->pin_cvt[i] != nid)
|
||||||
continue;
|
continue;
|
||||||
if (spec->sink_present[i] != true)
|
if (!spec->sink_eld[i].monitor_present)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
pin_nid = spec->pin[i];
|
pin_nid = spec->pin[i];
|
||||||
|
@ -675,8 +673,8 @@ static void hdmi_intrinsic_event(struct hda_codec *codec, unsigned int res)
|
||||||
if (index < 0)
|
if (index < 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
spec->sink_present[index] = pind;
|
spec->sink_eld[index].monitor_present = pind;
|
||||||
spec->sink_eldv[index] = eldv;
|
spec->sink_eld[index].eld_valid = eldv;
|
||||||
|
|
||||||
if (pind && eldv) {
|
if (pind && eldv) {
|
||||||
hdmi_parse_eld(codec, index);
|
hdmi_parse_eld(codec, index);
|
||||||
|
|
Loading…
Reference in New Issue