From 67cbbc98835d78ebb5bcbbac494afb845680def2 Mon Sep 17 00:00:00 2001 From: Wu Fengguang Date: Sat, 22 Nov 2008 09:40:54 +0800 Subject: [PATCH] --- yaml --- r: 120493 b: refs/heads/master c: acb05993881005cdaf5f8291491b4edcb8f60ef3 h: refs/heads/master i: 120491: 6eab01617c8f40351bdb2c59ccca17593d3e7a08 v: v3 --- [refs] | 2 +- trunk/sound/pci/hda/hda_eld.c | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 1626644faa58..0c5572d7ac76 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 03284c8f23440479de79e8cbf368085ea872884e +refs/heads/master: acb05993881005cdaf5f8291491b4edcb8f60ef3 diff --git a/trunk/sound/pci/hda/hda_eld.c b/trunk/sound/pci/hda/hda_eld.c index 3f10961a17b4..3c580ae07bd6 100644 --- a/trunk/sound/pci/hda/hda_eld.c +++ b/trunk/sound/pci/hda/hda_eld.c @@ -502,7 +502,7 @@ static void hdmi_print_eld_info(struct snd_info_entry *entry, hdmi_print_sad_info(i, e->sad + i, buffer); } -static void hdmi_write_eld_item(struct snd_info_entry *entry, +static void hdmi_write_eld_info(struct snd_info_entry *entry, struct snd_info_buffer *buffer) { struct hdmi_eld *e = entry->private_data; @@ -515,6 +515,11 @@ static void hdmi_write_eld_item(struct snd_info_entry *entry, while (!snd_info_get_line(buffer, line, sizeof(line))) { if (sscanf(line, "%s %llx", name, &val) != 2) continue; + /* + * We don't allow modification to these fields: + * monitor_name manufacture_id product_id + * eld_version edid_version + */ if (!strcmp(name, "connection_type")) e->conn_type = val; else if (!strcmp(name, "port_id")) @@ -548,6 +553,8 @@ static void hdmi_write_eld_item(struct snd_info_entry *entry, e->sad[n].sample_bits = val; else if (!strcmp(sname, "_max_bitrate")) e->sad[n].max_bitrate = val; + else if (!strcmp(sname, "_profile")) + e->sad[n].profile = val; if (n >= e->sad_count) e->sad_count = n + 1; } @@ -567,7 +574,7 @@ int snd_hda_eld_proc_new(struct hda_codec *codec, struct hdmi_eld *eld) return err; snd_info_set_text_ops(entry, eld, hdmi_print_eld_info); - entry->c.text.write = hdmi_write_eld_item; + entry->c.text.write = hdmi_write_eld_info; entry->mode |= S_IWUSR; eld->proc_entry = entry;