This is an automatic generated email to let you know that the following patch 
were queued:

Subject: edid-decode: add support for new CTA-861.6 Audio Coding Types
Author:  Hans Verkuil <[email protected]>
Date:    Thu Sep 16 11:14:00 2021 +0200

Adding Auro-Cx and MPEG-D USAC support as per CTA-861.6.

Also improve the checks for reserved bits in the Short Audio
Descriptors.

Signed-off-by: Hans Verkuil <[email protected]>

 parse-cta-block.cpp | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

---

diff --git a/parse-cta-block.cpp b/parse-cta-block.cpp
index 8de6e6bf0008..aafed1b495d5 100644
--- a/parse-cta-block.cpp
+++ b/parse-cta-block.cpp
@@ -269,6 +269,8 @@ static std::string audio_ext_format(unsigned char x)
        case 11: return "MPEG-H 3D Audio";
        case 12: return "AC-4";
        case 13: return "L-PCM 3D Audio";
+       case 14: return "Auro-Cx";
+       case 15: return "MPEG-D USAC";
        default: break;
        }
        fail("Unknown Audio Ext Format 0x%02x.\n", x);
@@ -345,9 +347,24 @@ static void cta_audio_block(const unsigned char *x, 
unsigned length)
                        printf("      Max channels: %u\n",
                               (((x[i + 1] & 0x80) >> 3) | ((x[i] & 0x80) >> 4) 
|
                                (x[i] & 0x07))+1);
+               else if ((ext_format == 12 || ext_format == 14) && (x[i] & 
0x07))
+                       fail("Bits F10-F12 must be 0.\n");
                else
                        printf("      Max channels: %u\n", (x[i] & 0x07)+1);
 
+               if ((format == 1 || format == 14) && (x[i + 2] & 0xf8))
+                       fail("Bits F33-F37 must be 0.\n");
+               if (ext_format != 13 && (x[i+1] & 0x80))
+                       fail("Bit F27 must be 0.\n");
+
+               // Several sample rates are not supported in certain formats
+               if (ext_format == 12 && (x[i+1] & 0x29))
+                       fail("Bits F20, F23 and F25 must be 0.\n");
+               if (ext_format >= 4 && ext_format <= 6 && (x[i+1] & 0x60))
+                       fail("Bits F25 and F26 must be 0.\n");
+               if ((ext_format == 8 || ext_format == 10 || ext_format == 15) 
&& (x[i+1] & 0x60))
+                       fail("Bits F25 and F26 must be 0.\n");
+
                printf("      Supported sample rates (kHz):%s%s%s%s%s%s%s\n",
                       (x[i+1] & 0x40) ? " 192" : "",
                       (x[i+1] & 0x20) ? " 176.4" : "",
@@ -394,6 +411,8 @@ static void cta_audio_block(const unsigned char *x, 
unsigned length)
                                       (x[i+2] & 1) ? "implicitly and 
explicitly" : "only implicitly");
                        if (ext_format == 6 && (x[i+2] & 1))
                                printf("      Supports 22.2ch System H\n");
+               } else if (ext_format == 12 || ext_format == 14) {
+                       printf("      Audio Format Code dependent value: %u\n", 
x[i+2] & 7);
                }
        }
 }

_______________________________________________
linuxtv-commits mailing list
[email protected]
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits

Reply via email to