diff options
author | Wu Fengguang <wfg@linux.intel.com> | 2008-11-21 20:40:54 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2008-11-22 05:15:21 -0500 |
commit | acb05993881005cdaf5f8291491b4edcb8f60ef3 (patch) | |
tree | dd0ae665347d5cdab0922a6a6e8cbaceab68395a /sound | |
parent | 03284c8f23440479de79e8cbf368085ea872884e (diff) |
ALSA: hda - ELD proc interface write updates
- rename ELD proc write routine to hdmi_write_eld_info()
- support modifying WMAPro's profile
Write to some ELD fields (monitor_name, manufacture_id, product_id,
eld_version, edid_version) are deliberately not supported, since that
won't correct wrong behaviors and only leads to confusions.
Signed-off-by: Wu Fengguang <wfg@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/pci/hda/hda_eld.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/sound/pci/hda/hda_eld.c b/sound/pci/hda/hda_eld.c index 3f10961a17b4..3c580ae07bd6 100644 --- a/sound/pci/hda/hda_eld.c +++ b/sound/pci/hda/hda_eld.c | |||
@@ -502,7 +502,7 @@ static void hdmi_print_eld_info(struct snd_info_entry *entry, | |||
502 | hdmi_print_sad_info(i, e->sad + i, buffer); | 502 | hdmi_print_sad_info(i, e->sad + i, buffer); |
503 | } | 503 | } |
504 | 504 | ||
505 | static void hdmi_write_eld_item(struct snd_info_entry *entry, | 505 | static void hdmi_write_eld_info(struct snd_info_entry *entry, |
506 | struct snd_info_buffer *buffer) | 506 | struct snd_info_buffer *buffer) |
507 | { | 507 | { |
508 | struct hdmi_eld *e = entry->private_data; | 508 | struct hdmi_eld *e = entry->private_data; |
@@ -515,6 +515,11 @@ static void hdmi_write_eld_item(struct snd_info_entry *entry, | |||
515 | while (!snd_info_get_line(buffer, line, sizeof(line))) { | 515 | while (!snd_info_get_line(buffer, line, sizeof(line))) { |
516 | if (sscanf(line, "%s %llx", name, &val) != 2) | 516 | if (sscanf(line, "%s %llx", name, &val) != 2) |
517 | continue; | 517 | continue; |
518 | /* | ||
519 | * We don't allow modification to these fields: | ||
520 | * monitor_name manufacture_id product_id | ||
521 | * eld_version edid_version | ||
522 | */ | ||
518 | if (!strcmp(name, "connection_type")) | 523 | if (!strcmp(name, "connection_type")) |
519 | e->conn_type = val; | 524 | e->conn_type = val; |
520 | else if (!strcmp(name, "port_id")) | 525 | else if (!strcmp(name, "port_id")) |
@@ -548,6 +553,8 @@ static void hdmi_write_eld_item(struct snd_info_entry *entry, | |||
548 | e->sad[n].sample_bits = val; | 553 | e->sad[n].sample_bits = val; |
549 | else if (!strcmp(sname, "_max_bitrate")) | 554 | else if (!strcmp(sname, "_max_bitrate")) |
550 | e->sad[n].max_bitrate = val; | 555 | e->sad[n].max_bitrate = val; |
556 | else if (!strcmp(sname, "_profile")) | ||
557 | e->sad[n].profile = val; | ||
551 | if (n >= e->sad_count) | 558 | if (n >= e->sad_count) |
552 | e->sad_count = n + 1; | 559 | e->sad_count = n + 1; |
553 | } | 560 | } |
@@ -567,7 +574,7 @@ int snd_hda_eld_proc_new(struct hda_codec *codec, struct hdmi_eld *eld) | |||
567 | return err; | 574 | return err; |
568 | 575 | ||
569 | snd_info_set_text_ops(entry, eld, hdmi_print_eld_info); | 576 | snd_info_set_text_ops(entry, eld, hdmi_print_eld_info); |
570 | entry->c.text.write = hdmi_write_eld_item; | 577 | entry->c.text.write = hdmi_write_eld_info; |
571 | entry->mode |= S_IWUSR; | 578 | entry->mode |= S_IWUSR; |
572 | eld->proc_entry = entry; | 579 | eld->proc_entry = entry; |
573 | 580 | ||