diff options
author | Anssi Hannula <anssi.hannula@iki.fi> | 2013-10-24 14:10:36 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2013-10-24 16:54:13 -0400 |
commit | 89250f84644676c1ed6a09acef1033e14596a402 (patch) | |
tree | 2af9f7e5277faad79f336ab27ad6fe89859478d7 /sound/pci/hda/patch_hdmi.c | |
parent | 5a61358433b1f89b500f2c365746c73cb7a27e2f (diff) |
ALSA: hda - hdmi: Add ELD emulation for ATI/AMD codecs
ATI/AMD HDMI/DP codecs do not include standard HDA ELD (EDID-like data)
support.
In place of providing access to an ELD buffer, various vendor-specific
verbs are provided to provide the relevant information. Revision ID 3
and later (0x100300 as reported by procfs codec#X) have support for
providing more information than the previous revisions (but only if
supported by the display driver).
Generate ELD from the information provided by the vendor-specific verbs
on ATI/AMD codecs.
The specification is available at:
http://www.x.org/docs/AMD/AMD_HDA_verbs_v2.pdf
v2: moved code to hda_eld.c and cleaned it up
v3: adapted to hdmi_ops infrastructure
Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
Tested-by: Peter Frühberger <fritsch@xbmc.org> # v2
Tested-by: Olivier Langlois <olivier@trillion01.com> # v2
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/patch_hdmi.c')
-rw-r--r-- | sound/pci/hda/patch_hdmi.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c index 1114be018e5a..0307ae87bef3 100644 --- a/sound/pci/hda/patch_hdmi.c +++ b/sound/pci/hda/patch_hdmi.c | |||
@@ -2821,6 +2821,14 @@ static int patch_nvhdmi_8ch_7x(struct hda_codec *codec) | |||
2821 | #define ATI_MULTICHANNEL_MODE_PAIRED 0 | 2821 | #define ATI_MULTICHANNEL_MODE_PAIRED 0 |
2822 | #define ATI_MULTICHANNEL_MODE_SINGLE 1 | 2822 | #define ATI_MULTICHANNEL_MODE_SINGLE 1 |
2823 | 2823 | ||
2824 | static int atihdmi_pin_get_eld(struct hda_codec *codec, hda_nid_t nid, | ||
2825 | unsigned char *buf, int *eld_size) | ||
2826 | { | ||
2827 | /* call hda_eld.c ATI/AMD-specific function */ | ||
2828 | return snd_hdmi_get_eld_ati(codec, nid, buf, eld_size, | ||
2829 | is_amdhdmi_rev3_or_later(codec)); | ||
2830 | } | ||
2831 | |||
2824 | static void atihdmi_pin_setup_infoframe(struct hda_codec *codec, hda_nid_t pin_nid, int ca, | 2832 | static void atihdmi_pin_setup_infoframe(struct hda_codec *codec, hda_nid_t pin_nid, int ca, |
2825 | int active_channels, int conn_type) | 2833 | int active_channels, int conn_type) |
2826 | { | 2834 | { |
@@ -3048,6 +3056,7 @@ static int patch_atihdmi(struct hda_codec *codec) | |||
3048 | 3056 | ||
3049 | spec = codec->spec; | 3057 | spec = codec->spec; |
3050 | 3058 | ||
3059 | spec->ops.pin_get_eld = atihdmi_pin_get_eld; | ||
3051 | spec->ops.pin_get_slot_channel = atihdmi_pin_get_slot_channel; | 3060 | spec->ops.pin_get_slot_channel = atihdmi_pin_get_slot_channel; |
3052 | spec->ops.pin_set_slot_channel = atihdmi_pin_set_slot_channel; | 3061 | spec->ops.pin_set_slot_channel = atihdmi_pin_set_slot_channel; |
3053 | spec->ops.pin_setup_infoframe = atihdmi_pin_setup_infoframe; | 3062 | spec->ops.pin_setup_infoframe = atihdmi_pin_setup_infoframe; |