ALSA: hda - hdmi: Fix unused slots being enabled in manual and non-PCM mappings
authorAnssi Hannula <anssi.hannula@iki.fi>
Fri, 4 Oct 2013 23:25:41 +0000 (02:25 +0300)
committerTakashi Iwai <tiwai@suse.de>
Mon, 7 Oct 2013 10:47:30 +0000 (12:47 +0200)
commit11f7c52d90b21a51b0bc6a8b642c6ed150bdc219
treeaf5f20f66a34c349dcac2691059f3e9b5861cccc
parent1df5a06abbaa876ecc01ea84064cdffb4f52a1a1
ALSA: hda - hdmi: Fix unused slots being enabled in manual and non-PCM mappings

hdmi_manual_setup_channel_mapping() and hdmi_std_setup_channel_mapping
try to assign ALSA channels to HDMI channel slots and disable (i.e.
silence) other slots.

However, they try to disable a slot by using AC_VERB_SET_CHAN_SLOT with
parameter ((alsa_ch << 8) | 0xf), while the correct parameter is
((0xf << 8) | hdmi_slot), i.e. the slot should be unassigned, not the
ALSA channel.

Fix that by actually disabling the unused slots.

Note that this bug did not cause any (reported) issues because slots
incorrectly having audio are normally ignored by a receiver if the CEA
channel allocation used does not map that slot to any speaker.
Additionally, the converter channel count configuration limits the
number of actually active channels in any case.

Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/patch_hdmi.c