]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
ALSA: hda - allow multi-channel HDMI audio playback when ELD is not present
authorWu Fengguang <fengguang.wu@intel.com>
Wed, 11 Feb 2009 07:22:28 +0000 (15:22 +0800)
committerTakashi Iwai <tiwai@suse.de>
Wed, 11 Feb 2009 08:08:47 +0000 (09:08 +0100)
The YAMAHA AV-X1800 requires audio infoframe to include speaker-channel
mapping to play >2 channel HDMI audio. In theory that mapping should be
derived from its speaker configurations contained in its ELD. However we
currently cannot get ELD in console before the KMS functionalities are ready.
This is a more or less general issue at least in the near future. As a
workaround, we propose to allow playback of mult-channel audio when ELD
is not available.

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/patch_intelhdmi.c

index 3564f4e4b74c035d8d88b1193d2a93498789942c..a8643509e2afe76b5cb4ef6391847f35b01745b9 100644 (file)
@@ -419,13 +419,17 @@ static int hdmi_setup_channel_allocation(struct hda_codec *codec,
        /*
         * CA defaults to 0 for basic stereo audio
         */
-       if (!eld->eld_ver)
-               return 0;
-       if (!eld->spk_alloc)
-               return 0;
        if (channels <= 2)
                return 0;
 
+       /*
+        * HDMI sink's ELD info cannot always be retrieved for now, e.g.
+        * in console or for audio devices. Assume the highest speakers
+        * configuration, to _not_ prohibit multi-channel audio playback.
+        */
+       if (!eld->spk_alloc)
+               eld->spk_alloc = 0xffff;
+
        /*
         * expand ELD's speaker allocation mask
         *