summaryrefslogtreecommitdiff
path: root/sound/pci/hda/hda_eld.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-12-08 07:47:46 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2009-12-08 07:47:46 -0800
commita421018e8c10e5593a1fee076af72a66c3fe8ca3 (patch)
tree2854511845d0e07d33726a13eda6de1059a5c9df /sound/pci/hda/hda_eld.c
parent3ad1f3b35e8309ec93454dbf89beaafcdb5312da (diff)
parent86e1d57e4f24ca27ce813bdc2afaac4adafcbaf4 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6: (294 commits) S3C64XX: Staticise platform data for PCM devices ASoC: Rename controls with a / in wm_hubs snd-fm801: autodetect SF64-PCR (tuner-only) card ALSA: tea575x-tuner: fix mute ASoC: au1x: dbdma2: plug memleak in pcm device creation error path ASoC: au1x: dbdma2: fix oops on soc device removal. ALSA: hda - Fix memory leaks in the previous patch ALSA: hda - Add ALC661/259, ALC892/888VD support ALSA: opti9xx: remove snd_opti9xx fields ALSA: aaci - Clean up duplicate code ALSA: usb - Fix mixer map for Hercules Gamesurround Muse Pocket LT ALSA: hda - Add position_fix quirk for HP dv3 ALSA: hda - Add a pin-fix for FSC Amilo Pi1505 ALSA: hda - Fix Cxt5047 test mode ASoC: pxa/raumfeld: adopt new snd_soc_dai_set_pll() API ASoC: sh: fsi: Add runtime PM support sh: ms7724se: Add runtime PM support for FSI ALSA: hda - Add a position_fix quirk for MSI Wind U115 ALSA: opti-miro: add PnP detection ALSA: opti-miro: separate comon probing code ...
Diffstat (limited to 'sound/pci/hda/hda_eld.c')
-rw-r--r--sound/pci/hda/hda_eld.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/sound/pci/hda/hda_eld.c b/sound/pci/hda/hda_eld.c
index 9446a5abea1..4228f2fe595 100644
--- a/sound/pci/hda/hda_eld.c
+++ b/sound/pci/hda/hda_eld.c
@@ -309,17 +309,12 @@ out_fail:
return -EINVAL;
}
-static int hdmi_present_sense(struct hda_codec *codec, hda_nid_t nid)
-{
- return snd_hda_codec_read(codec, nid, 0, AC_VERB_GET_PIN_SENSE, 0);
-}
-
static int hdmi_eld_valid(struct hda_codec *codec, hda_nid_t nid)
{
int eldv;
int present;
- present = hdmi_present_sense(codec, nid);
+ present = snd_hda_pin_sense(codec, nid);
eldv = (present & AC_PINSENSE_ELDV);
present = (present & AC_PINSENSE_PRESENCE);
@@ -477,6 +472,8 @@ static void hdmi_print_eld_info(struct snd_info_entry *entry,
[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 +515,11 @@ static void hdmi_write_eld_info(struct snd_info_entry *entry,
* 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;
@@ -560,13 +561,14 @@ static void hdmi_write_eld_info(struct snd_info_entry *entry,
}
-int snd_hda_eld_proc_new(struct hda_codec *codec, struct hdmi_eld *eld)
+int snd_hda_eld_proc_new(struct hda_codec *codec, struct hdmi_eld *eld,
+ int index)
{
char name[32];
struct snd_info_entry *entry;
int err;
- snprintf(name, sizeof(name), "eld#%d", codec->addr);
+ snprintf(name, sizeof(name), "eld#%d.%d", codec->addr, index);
err = snd_card_proc_new(codec->bus->card, name, &entry);
if (err < 0)
return err;