ALSA: HDMI - Setup channel mapping for non_pcm audio
authorWang Xingchao <xingchao.wang@intel.com>
Thu, 6 Sep 2012 02:02:38 +0000 (10:02 +0800)
committerTakashi Iwai <tiwai@suse.de>
Thu, 6 Sep 2012 06:50:35 +0000 (08:50 +0200)
For HBR stream test, use straight channel mapping way.
when switched back to "speaker-test -c8", even the audio
infoframe is up-to-date, there should be correct channel mapping setup.

Signed-off-by: Wang Xingchao <xingchao.wang@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/patch_hdmi.c

index a6835bd9d9b59696ca3aabe7d4ca2802814d5cd0..5361298be4d09e8d9a1646cd223964b97a271981 100644 (file)
@@ -780,6 +780,11 @@ static void hdmi_setup_audio_infoframe(struct hda_codec *codec, int pin_idx,
                hdmi_fill_audio_infoframe(codec, pin_nid,
                                            ai.bytes, sizeof(ai));
                hdmi_start_infoframe_trans(codec, pin_nid);
+       } else {
+               /* For non-pcm audio switch, setup new channel mapping
+                * accordingly */
+               if (per_cvt->non_pcm != non_pcm)
+                       hdmi_setup_channel_mapping(codec, pin_nid, cvt_nid, non_pcm, ca);
        }
 
        per_cvt->non_pcm = non_pcm;