aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/patch_hdmi.c
diff options
context:
space:
mode:
authorAnssi Hannula <anssi.hannula@iki.fi>2013-02-03 10:55:45 -0500
committerTakashi Iwai <tiwai@suse.de>2013-02-04 04:26:44 -0500
commit20608731f479d48be6bcb88e727f360ddf98ddaf (patch)
tree0d9ddfb2b8958e53e34bd4efea38b9490138ab08 /sound/pci/hda/patch_hdmi.c
parent8058e14259ddc8c1824387198fc53700ed4cccc9 (diff)
ALSA: hda - Fix default multichannel HDMI mapping regression
Commit d45e6889ee69456a4d5b1bbb32252f460cd48fa9 ("ALSA: hda - Provide the proper channel mapping for generic HDMI driver") added support for custom channel maps in the HDA HDMI driver. Due to a mistake in an 'if' condition the custom map is always used even when no such map has been set. This causes incorrect channel mapping for multichannel audio by default. Pass per_pin->chmap_set to hdmi_setup_channel_mapping() as a parameter so that it can use it for detecting if a custom map has been set instead of checking if map is NULL (which is never the case). Reported-by: Staffan Lindberg <pike@xbmc.org> Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi> Cc: stable@vger.kernel.org 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.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c
index 807a2aa1ff38..e85959f72047 100644
--- a/sound/pci/hda/patch_hdmi.c
+++ b/sound/pci/hda/patch_hdmi.c
@@ -714,9 +714,10 @@ static void hdmi_setup_fake_chmap(unsigned char *map, int ca)
714 714
715static void hdmi_setup_channel_mapping(struct hda_codec *codec, 715static void hdmi_setup_channel_mapping(struct hda_codec *codec,
716 hda_nid_t pin_nid, bool non_pcm, int ca, 716 hda_nid_t pin_nid, bool non_pcm, int ca,
717 int channels, unsigned char *map) 717 int channels, unsigned char *map,
718 bool chmap_set)
718{ 719{
719 if (!non_pcm && map) { 720 if (!non_pcm && chmap_set) {
720 hdmi_manual_setup_channel_mapping(codec, pin_nid, 721 hdmi_manual_setup_channel_mapping(codec, pin_nid,
721 channels, map); 722 channels, map);
722 } else { 723 } else {
@@ -905,7 +906,8 @@ static void hdmi_setup_audio_infoframe(struct hda_codec *codec, int pin_idx,
905 pin_nid, 906 pin_nid,
906 channels); 907 channels);
907 hdmi_setup_channel_mapping(codec, pin_nid, non_pcm, ca, 908 hdmi_setup_channel_mapping(codec, pin_nid, non_pcm, ca,
908 channels, per_pin->chmap); 909 channels, per_pin->chmap,
910 per_pin->chmap_set);
909 hdmi_stop_infoframe_trans(codec, pin_nid); 911 hdmi_stop_infoframe_trans(codec, pin_nid);
910 hdmi_fill_audio_infoframe(codec, pin_nid, 912 hdmi_fill_audio_infoframe(codec, pin_nid,
911 ai.bytes, sizeof(ai)); 913 ai.bytes, sizeof(ai));
@@ -915,7 +917,8 @@ static void hdmi_setup_audio_infoframe(struct hda_codec *codec, int pin_idx,
915 * accordingly */ 917 * accordingly */
916 if (per_pin->non_pcm != non_pcm) 918 if (per_pin->non_pcm != non_pcm)
917 hdmi_setup_channel_mapping(codec, pin_nid, non_pcm, ca, 919 hdmi_setup_channel_mapping(codec, pin_nid, non_pcm, ca,
918 channels, per_pin->chmap); 920 channels, per_pin->chmap,
921 per_pin->chmap_set);
919 } 922 }
920 923
921 per_pin->non_pcm = non_pcm; 924 per_pin->non_pcm = non_pcm;