From: Wu Fengguang <fengguang.wu@intel.com>
To: Takashi Iwai <tiwai@suse.de>
Cc: alsa-devel@alsa-project.org,
"Wu Fengguang" <fengguang.wu@intel.com>,
"Shane W" <shane-alsa@csy.ca>,
"David Härdeman" <david@hardeman.nu>
Subject: [PATCH 03/10] intelhdmi - export monitor-presence and ELD-valid status
Date: Wed, 18 Nov 2009 12:38:01 +0800 [thread overview]
Message-ID: <20091118043935.026962859@intel.com> (raw)
In-Reply-To: 20091118043758.141785140@intel.com
[-- Attachment #1: hdmi-export-presence-eld.patch --]
[-- Type: text/plain, Size: 2679 bytes --]
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
---
sound/pci/hda/hda_eld.c | 8 +++++++-
sound/pci/hda/hda_local.h | 4 +++-
sound/pci/hda/patch_intelhdmi.c | 8 +++-----
3 files changed, 13 insertions(+), 7 deletions(-)
--- sound-2.6.orig/sound/pci/hda/patch_intelhdmi.c 2009-11-02 15:17:26.000000000 +0800
+++ sound-2.6/sound/pci/hda/patch_intelhdmi.c 2009-11-02 15:18:47.000000000 +0800
@@ -62,8 +62,6 @@ struct intel_hdmi_spec {
/*
* 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];
/*
@@ -645,7 +643,7 @@ static void hdmi_setup_audio_infoframe(s
for (i = 0; i < spec->num_pins; i++) {
if (spec->pin_cvt[i] != nid)
continue;
- if (spec->sink_present[i] != true)
+ if (!spec->sink_eld[i].monitor_present)
continue;
pin_nid = spec->pin[i];
@@ -675,8 +673,8 @@ static void hdmi_intrinsic_event(struct
if (index < 0)
return;
- spec->sink_present[index] = pind;
- spec->sink_eldv[index] = eldv;
+ spec->sink_eld[index].monitor_present = pind;
+ spec->sink_eld[index].eld_valid = eldv;
if (pind && eldv) {
hdmi_parse_eld(codec, index);
--- sound-2.6.orig/sound/pci/hda/hda_eld.c 2009-11-02 15:14:30.000000000 +0800
+++ sound-2.6/sound/pci/hda/hda_eld.c 2009-11-02 15:24:04.000000000 +0800
@@ -477,6 +477,8 @@ static void hdmi_print_eld_info(struct s
[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, "connection_type\t\t%s\n",
eld_connection_type_names[e->conn_type]);
@@ -518,7 +520,11 @@ static void hdmi_write_eld_info(struct s
* monitor_name manufacture_id product_id
* 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;
else if (!strcmp(name, "port_id"))
e->port_id = val;
--- sound-2.6.orig/sound/pci/hda/hda_local.h 2009-11-02 15:14:30.000000000 +0800
+++ sound-2.6/sound/pci/hda/hda_local.h 2009-11-02 15:21:11.000000000 +0800
@@ -516,9 +516,11 @@ struct cea_sad {
* ELD: EDID Like Data
*/
struct hdmi_eld {
+ bool monitor_present;
+ bool eld_valid;
int eld_size;
int baseline_len;
- int eld_ver; /* (eld_ver == 0) indicates invalid ELD */
+ int eld_ver;
int cea_edid_ver;
char monitor_name[ELD_MAX_MNL + 1];
int manufacture_id;
next prev parent reply other threads:[~2009-11-18 4:42 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-18 4:37 [PATCH 00/10] Intel HDMI fixes v2 Wu Fengguang
2009-11-18 4:37 ` [PATCH 01/10] intelhdmi - fix audio infoframe fill size Wu Fengguang
2009-11-18 4:38 ` [PATCH 02/10] intelhdmi - fix channel mapping slot mask Wu Fengguang
2009-11-18 4:38 ` Wu Fengguang [this message]
2009-11-18 4:38 ` [PATCH 04/10] hda - introduce snd_hda_jack_detect() and snd_hda_pin_sense() Wu Fengguang
2009-11-18 4:38 ` [PATCH 05/10] intelhdmi - probe for monitor/eld presence at module init time Wu Fengguang
2009-11-18 9:04 ` Takashi Iwai
2009-11-18 9:16 ` Wu Fengguang
2009-11-18 4:38 ` [PATCH 06/10] intelhdmi - separate out infoframe checksum routine Wu Fengguang
2009-11-18 4:38 ` [PATCH 07/10] intelhdmi - sticky infoframe Wu Fengguang
2009-11-18 4:38 ` [PATCH 08/10] intelhdmi - sticky stream id and format Wu Fengguang
2009-11-18 4:38 ` [PATCH 09/10] intelhdmi - sticky channel count Wu Fengguang
2009-11-18 4:38 ` [PATCH 10/10] hda - show EPSS capability in proc Wu Fengguang
2009-11-18 4:58 ` [PATCH 00/10] Intel HDMI fixes v2 Wu Fengguang
2009-11-18 7:04 ` 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=20091118043935.026962859@intel.com \
--to=fengguang.wu@intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=david@hardeman.nu \
--cc=shane-alsa@csy.ca \
--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 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.