arm:video:dc Audio EDID improvements
ScottPeterson [Tue, 26 Jul 2011 21:54:14 +0000 (14:54 -0700)]
Finer grain determination of audio capabilities
for HDMI devices. TO enable audio we have to have
basic audio supported in the EDID plus at least one
Short Audio Descriptor block.

Reviewed-on: http://git-master/r/43304
(cherry picked from commit aaadcb7a4f8501dc71c6185e111fab1427bb7286)

Original-Change-Id: I30c818cdc77ccb351f304bd3639f28a5d370f36b
Reviewed-on: http://git-master/r/45568
Reviewed-by: Jonathan Mayo <jmayo@nvidia.com>
Reviewed-by: Sumit Bhattacharya <sumitb@nvidia.com>
Reviewed-by: Scott Peterson <speterson@nvidia.com>
Tested-by: Scott Peterson <speterson@nvidia.com>

Rebase-Id: R608c722e0481a4e2a4f8294c4358569f7970e722

drivers/video/tegra/dc/edid.c

index 215fccc..c2d9991 100644 (file)
@@ -172,6 +172,7 @@ int tegra_edid_parse_ext_block(u8 *raw, int idx, struct tegra_edid *edid)
        u8 code;
        int len;
        int i;
+       bool basic_audio = false;
 
        ptr = &raw[0];
 
@@ -186,7 +187,7 @@ int tegra_edid_parse_ext_block(u8 *raw, int idx, struct tegra_edid *edid)
                        /* 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;
+                       basic_audio = true;
                }
        }
        ptr = &raw[4];
@@ -212,6 +213,9 @@ int tegra_edid_parse_ext_block(u8 *raw, int idx, struct tegra_edid *edid)
                                edid->eld.sad[i] = ptr[i + 1];
                        len++;
                        ptr += len; /* adding the header */
+                       /* Got an audio data block so enable audio */
+                       if(basic_audio == true)
+                               edid->eld.spk_alloc = 1;
                        break;
                }
                /* case 2 is commented out for now */