Diff between 3e8b659270d9621968a77da96bd1bbe5de11d11f and 101b439a6a3815d0ffcaa86ac0b099ef9061778a

Changed Files

File Additions Deletions Status
profiles/audio/a2dp-codecs.h +8 -0 modified
tools/avinfo.c +12 -0 modified

Full Patch

diff --git a/profiles/audio/a2dp-codecs.h b/profiles/audio/a2dp-codecs.h
index 4d2584d..e9da0bf 100644
--- a/profiles/audio/a2dp-codecs.h
+++ b/profiles/audio/a2dp-codecs.h
@@ -141,6 +141,9 @@
 #define APTX_SAMPLING_FREQ_44100	0x02
 #define APTX_SAMPLING_FREQ_48000	0x01
 
+#define LDAC_VENDOR_ID			0x0000012d
+#define LDAC_CODEC_ID			0x00aa
+
 typedef struct {
 	uint32_t vendor_id;
 	uint16_t codec_id;
@@ -186,6 +189,11 @@ typedef struct {
 	uint8_t frequency:4;
 } __attribute__ ((packed)) a2dp_aptx_t;
 
+typedef struct {
+	a2dp_vendor_codec_t info;
+	uint8_t unknown[2];
+} __attribute__ ((packed)) a2dp_ldac_t;
+
 #elif __BYTE_ORDER == __BIG_ENDIAN
 
 typedef struct {
diff --git a/tools/avinfo.c b/tools/avinfo.c
index 3f406ca..cc756f1 100644
--- a/tools/avinfo.c
+++ b/tools/avinfo.c
@@ -181,6 +181,16 @@ static void print_aptx(a2dp_aptx_t *aptx)
 	printf("\n");
 }
 
+static void print_ldac(a2dp_ldac_t *ldac)
+{
+	printf("\t\tVendor Specific Value (LDAC)");
+
+	printf("\n\t\t\tUnknown: %02x %02x", ldac->unknown[0],
+							ldac->unknown[1]);
+
+	printf("\n");
+}
+
 static void print_vendor(a2dp_vendor_codec_t *vendor)
 {
 	uint32_t vendor_id = btohl(vendor->vendor_id);
@@ -194,6 +204,8 @@ static void print_vendor(a2dp_vendor_codec_t *vendor)
 
 	if (vendor_id == APTX_VENDOR_ID && codec_id == APTX_CODEC_ID)
 		print_aptx((void *) vendor);
+	else if (vendor_id == LDAC_VENDOR_ID && codec_id == LDAC_CODEC_ID)
+		print_ldac((void *) vendor);
 }
 
 static void print_mpeg24(a2dp_aac_t *aac)