diff options
author | Anssi Hannula <anssi.hannula@iki.fi> | 2013-12-10 15:46:34 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2013-12-11 01:12:07 -0500 |
commit | c9a6338aecdb92f9d015ecc26d203e54250bebbb (patch) | |
tree | d39b4a450a4b06352f5945d39750e35daeb95216 /sound/pci | |
parent | ebb93c057dda376414fbc499ad6ace9b527dff5a (diff) |
ALSA: hda - hdmi: Fix IEC958 ctl indexes for some simple HDMI devices
In case a single HDA card has both HDMI and S/PDIF outputs, the S/PDIF
outputs will have their IEC958 controls created starting from index 16
and the HDMI controls will be created starting from index 0.
However, HDMI simple_playback_build_controls() as used by old VIA and
NVIDIA codecs incorrectly requests the IEC958 controls to be created
with an S/PDIF type instead of HDMI.
In case the card has other codecs that have HDMI outputs, the controls
will be created with wrong index=16, causing them to e.g. be unreachable
by the ALSA "hdmi" alias.
Fix that by making simple_playback_build_controls() request controls
with HDMI indexes.
Not many cards have an affected configuration, but e.g. ASUS M3N78-VM
contains an integrated NVIDIA HDA "card" with:
- a VIA codec that has, among others, an S/PDIF pin incorrectly
labelled as an HDMI pin, and
- an NVIDIA MCP7x HDMI codec.
Reported-by: MysterX on #openelec
Tested-by: MysterX on #openelec
Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
Cc: <stable@vger.kernel.org> # 3.8+
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci')
-rw-r--r-- | sound/pci/hda/patch_hdmi.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c index c4a66ef6cf6f..f281c8068557 100644 --- a/sound/pci/hda/patch_hdmi.c +++ b/sound/pci/hda/patch_hdmi.c | |||
@@ -2337,8 +2337,9 @@ static int simple_playback_build_controls(struct hda_codec *codec) | |||
2337 | int err; | 2337 | int err; |
2338 | 2338 | ||
2339 | per_cvt = get_cvt(spec, 0); | 2339 | per_cvt = get_cvt(spec, 0); |
2340 | err = snd_hda_create_spdif_out_ctls(codec, per_cvt->cvt_nid, | 2340 | err = snd_hda_create_dig_out_ctls(codec, per_cvt->cvt_nid, |
2341 | per_cvt->cvt_nid); | 2341 | per_cvt->cvt_nid, |
2342 | HDA_PCM_TYPE_HDMI); | ||
2342 | if (err < 0) | 2343 | if (err < 0) |
2343 | return err; | 2344 | return err; |
2344 | return simple_hdmi_build_jack(codec, 0); | 2345 | return simple_hdmi_build_jack(codec, 0); |