From: Wu Fengguang <wfg@linux.intel.com>
To: Shane W <shane-intel@csy.ca>
Cc: alsa-devel <alsa-devel@alsa-project.org>,
"Ma, Ling" <ling.ma@intel.com>,
intel-gfx@lists.freedesktop.org, Takashi Iwai <tiwai@suse.de>,
xorg@lists.freedesktop.org, "Fu, Michael" <michael.fu@intel.com>
Subject: Re: [Intel-gfx] [RFC][PATCH] ELD routines and proc interface
Date: Fri, 21 Nov 2008 11:41:50 +0800 [thread overview]
Message-ID: <20081121034150.GA11242@localhost> (raw)
In-Reply-To: <20081121014649.GA12072@csy.ca>
On Thu, Nov 20, 2008 at 05:46:49PM -0800, Shane W wrote:
> On Fri, Nov 21, 2008 at 09:36:55AM +0800, Wu Fengguang wrote:
> > Yes it's unexpected. Do you know its real speaker numbers and
> > allocations? Does it provide some number of line-out ports?
>
> There are six speakers connected, fl, ct, fr, rl, rr and lfe.
Hi Shane,
Apply this patch and run "echo speakers f > /proc/asound/card0/eld\#3".
That will make the ELD "speakers" field right.
Thanks,
Fengguang
---
support writing to the ELD proc file
Allow users to fix quicks of ELD ROMs by writing new values to the ELD proc
interface. The format is one or more lines of "name hex_value".
Users can add/remove/modify up to 32 SAD(Short Audio Descriptor) entries.
Signed-off-by: Wu Fengguang <wfg@linux.intel.com>
---
sound/pci/hda/hda_eld.c | 56 ++++++++++++++++++++++++++++++++++++++
1 file changed, 56 insertions(+)
--- sound-2.6.orig/sound/pci/hda/hda_eld.c
+++ sound-2.6/sound/pci/hda/hda_eld.c
@@ -500,6 +500,59 @@ 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,
+ struct snd_info_buffer *buffer)
+{
+ struct hdmi_eld *e = entry->private_data;
+ char line[64];
+ char name[64];
+ char *sname;
+ long long val;
+ int n;
+
+ while (!snd_info_get_line(buffer, line, sizeof(line))) {
+ if (sscanf(line, "%s %llx", name, &val) != 2)
+ continue;
+ if (!strcmp(name, "connection_type"))
+ e->conn_type = val;
+ else if (!strcmp(name, "port_id"))
+ e->port_id = val;
+ else if (!strcmp(name, "support_hdcp"))
+ e->support_hdcp = val;
+ else if (!strcmp(name, "support_ai"))
+ e->support_ai = val;
+ else if (!strcmp(name, "audio_sync_delay"))
+ e->aud_synch_delay = val;
+ else if (!strcmp(name, "speakers"))
+ e->spk_alloc = val;
+ else if (!strcmp(name, "sad_count"))
+ e->sad_count = val;
+ else if (!strncmp(name, "sad", 3)) {
+ sname = name + 4;
+ n = name[3] - '0';
+ if (name[4] >= '0' && name[4] <= '9') {
+ sname++;
+ n = 10 * n + name[4] - '0';
+ }
+ if (n < 0 || n > 31) /* double the CEA limit */
+ continue;
+ if (!strcmp(sname, "_coding_type"))
+ e->sad[n].format = val;
+ else if (!strcmp(sname, "_channels"))
+ e->sad[n].channels = val;
+ else if (!strcmp(sname, "_rates"))
+ e->sad[n].rates = val;
+ else if (!strcmp(sname, "_bits"))
+ e->sad[n].sample_bits = val;
+ else if (!strcmp(sname, "_max_bitrate"))
+ e->sad[n].max_bitrate = val;
+ if (n >= e->sad_count)
+ e->sad_count = n + 1;
+ }
+ }
+}
+
+
int snd_hda_eld_proc_new(struct hda_codec *codec, struct hdmi_eld *eld)
{
char name[32];
@@ -512,6 +565,9 @@ 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->mode |= S_IWUSR;
+
return 0;
}
next prev parent reply other threads:[~2008-11-21 3:42 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-13 2:21 [RFC][PATCH] ELD routines and proc interface Wu Fengguang
2008-11-13 7:26 ` Takashi Iwai
2008-11-14 1:34 ` Wu Fengguang
2008-11-14 7:25 ` Takashi Iwai
2008-11-14 7:38 ` Wu Fengguang
2008-11-14 7:43 ` Takashi Iwai
2008-11-14 7:47 ` Wu Fengguang
2008-11-14 7:50 ` Takashi Iwai
2008-11-14 8:02 ` Wu Fengguang
[not found] ` <20081119071135.GA17733@csy.ca>
2008-11-19 7:17 ` Wu Fengguang
[not found] ` <20081119075545.GA19833@csy.ca>
2008-11-19 8:08 ` Wu Fengguang
2008-11-19 9:39 ` [alsa-devel] " Wu Fengguang
[not found] ` <20081119200201.GA23246@csy.ca>
[not found] ` <20081120010204.GA25454@localhost>
[not found] ` <20081120200606.GA4164@csy.ca>
2008-11-21 1:36 ` Wu Fengguang
2008-11-21 1:42 ` [PATCH] properly print ELD sample bits Wu Fengguang
2008-11-21 7:41 ` Takashi Iwai
[not found] ` <20081121014649.GA12072@csy.ca>
2008-11-21 1:59 ` [Intel-gfx] [RFC][PATCH] ELD routines and proc interface Wu Fengguang
2008-11-21 3:41 ` Wu Fengguang [this message]
2008-11-21 7:44 ` Takashi Iwai
2008-11-21 7:47 ` Wu Fengguang
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=20081121034150.GA11242@localhost \
--to=wfg@linux.intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=ling.ma@intel.com \
--cc=michael.fu@intel.com \
--cc=shane-intel@csy.ca \
--cc=tiwai@suse.de \
--cc=xorg@lists.freedesktop.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.