From: Wu Fengguang <wfg@linux.intel.com>
To: Takashi Iwai <tiwai@suse.de>
Cc: alsa-devel <alsa-devel@alsa-project.org>
Subject: [PATCH 4/7] hda - ELD proc interface write updates
Date: Sat, 22 Nov 2008 09:40:54 +0800 [thread overview]
Message-ID: <20081122014309.145463485@linux.intel.com> (raw)
In-Reply-To: 20081122014050.348491872@linux.intel.com
[-- Attachment #1: alsa-eld-proc-more.patch --]
[-- Type: text/plain, Size: 1865 bytes --]
- 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>
---
sound/pci/hda/hda_eld.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
--- sound-2.6.orig/sound/pci/hda/hda_eld.c
+++ sound-2.6/sound/pci/hda/hda_eld.c
@@ -502,7 +502,7 @@ static void hdmi_print_eld_info(struct s
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 s
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 s
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_code
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;
--
next prev parent reply other threads:[~2008-11-22 3:09 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-22 1:40 [PATCH 0/7] minor HDMI cleanups and fixes Wu Fengguang
2008-11-22 1:40 ` [PATCH 1/7] hda - minor HDMI code cleanups Wu Fengguang
2008-11-22 1:40 ` [PATCH 2/7] hda - report selected CA index for Audio InfoFrame Wu Fengguang
2008-11-22 1:40 ` [PATCH 3/7] hda - make HDMI messages more user friendly Wu Fengguang
2008-11-22 1:40 ` Wu Fengguang [this message]
2008-11-22 1:40 ` [PATCH 5/7] hda - document the ELD proc interface Wu Fengguang
2008-11-22 1:40 ` [PATCH 6/7] hda - fix DisplayPort naming Wu Fengguang
2008-11-22 1:40 ` [PATCH 7/7] hda - fix build warning when CONFIG_PROC_FS=n Wu Fengguang
2008-11-22 10:19 ` [PATCH 0/7] minor HDMI cleanups and fixes Takashi Iwai
2008-11-22 10:22 ` Wu Fengguang
2008-11-22 13:12 ` Serato patch review LCID Fire
2008-11-24 6:24 ` Takashi Iwai
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20081122014309.145463485@linux.intel.com \
--to=wfg@linux.intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=tiwai@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox