video: tegra: dc: Add basic audio EDID
ScottPeterson [Wed, 20 Jul 2011 20:29:10 +0000 (13:29 -0700)]
Add support so that when the EDID is read from
an HDMI display we set the spk_alloc flag to
Left+Right, even if the optional SPeaker Allocation
Block is not present. This provides a default audio
configuration.

Bug  849686

Reviewed-on: http://git-master/r/42173
(cherry picked from commit 13bbb59bfe687944923bceb1b2f60020546ce082)

Original-Change-Id: I8306f261a7cbc640693d777c2a2453c2ef1da6b3
Reviewed-on: http://git-master/r/44610
Tested-by: Scott Peterson <speterson@nvidia.com>
Reviewed-by: Scott Peterson <speterson@nvidia.com>

Rebase-Id: R970aebba6518b2a38de1d51dcf6ba1475688c72f

drivers/video/tegra/dc/edid.c

index 8fb78c6..215fccc 100644 (file)
@@ -180,6 +180,14 @@ int tegra_edid_parse_ext_block(u8 *raw, int idx, struct tegra_edid *edid)
                if (*ptr <= 3)
                        edid->eld.eld_ver = 0x02;
                edid->eld.cea_edid_ver = ptr[1];
+
+               /* check for basic audio support in CEA 861 block */
+               if(raw[3] & (1<<6)) {
+                       /* For basic audio, set spk_alloc to Left+Right.
+                        * If there is a Speaker Alloc block this will
+                        * get over written with that value */
+                       edid->eld.spk_alloc = 1;
+               }
        }
        ptr = &raw[4];