mirror of
https://git.kernel.org/pub/scm/bluetooth/bluez.git
synced 2024-11-16 16:54:38 +08:00
tools/avinfo: Add partial support for Sony LDAC
Contents of Vendor Specific Value in codec information is unknown at the moment so only raw value is printed.
This commit is contained in:
parent
3e8b659270
commit
101b439a6a
@ -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 {
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user