From ae7a893ce9b41c788217439b742698d65d289f4d Mon Sep 17 00:00:00 2001 From: Pauli Virtanen Date: Thu, 10 Jul 2025 15:21:16 +0300 Subject: [PATCH] bluez5: aac: fix for A2DP v1.4 using rfa bits for more channels A2DP v1.4 uses the rfa bits for adding 5.1 and 7.1 configurations. Clear those bits properly when sending configuration, in case remote device sets them. --- spa/plugins/bluez5/a2dp-codec-caps.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/spa/plugins/bluez5/a2dp-codec-caps.h b/spa/plugins/bluez5/a2dp-codec-caps.h index d775ce101..b58e33624 100644 --- a/spa/plugins/bluez5/a2dp-codec-caps.h +++ b/spa/plugins/bluez5/a2dp-codec-caps.h @@ -116,8 +116,10 @@ #define AAC_SAMPLING_FREQ_88200 0x0002 #define AAC_SAMPLING_FREQ_96000 0x0001 -#define AAC_CHANNELS_1 0x02 -#define AAC_CHANNELS_2 0x01 +#define AAC_CHANNELS_1 0x08 +#define AAC_CHANNELS_2 0x04 +#define AAC_CHANNELS_5_1 0x02 +#define AAC_CHANNELS_7_1 0x01 #define AAC_GET_BITRATE(a) ((a).bitrate1 << 16 | \ (a).bitrate2 << 8 | (a).bitrate3) @@ -341,8 +343,7 @@ typedef struct { typedef struct { uint8_t object_type; uint8_t frequency1; - uint8_t rfa:2; - uint8_t channels:2; + uint8_t channels:4; uint8_t frequency2:4; uint8_t bitrate1:7; uint8_t vbr:1; @@ -403,8 +404,7 @@ typedef struct { uint8_t object_type; uint8_t frequency1; uint8_t frequency2:4; - uint8_t channels:2; - uint8_t rfa:2; + uint8_t channels:4; uint8_t vbr:1; uint8_t bitrate1:7; uint8_t bitrate2;