<span style="font-family:arial,helvetica,sans-serif; font-size:12px"></span>Hi, <br>
<br>
Here's a very simple and non-intrusive patch that enables SBC XQ (dual channel 452kbps / bipool 2x38) with automatic fallback to joint stereo.<br>
This Bluetooth dual channel mode is allowed by A2DP specifications, is far below BT bandwidth limits, and has been tested on hundreds devices without any problem for more than 2 years (on Pulseaudio).<br>
<br>
I can move it to github if you wish :)<br>
<br>
All the best<br>
jp<br>
<br>
diff -rNaud pipewire-0.3.18/spa/plugins/bluez5/a2dp-codec-sbc.c pipewire-0.3.18-HQ/spa/plugins/bluez5/a2dp-codec-sbc.c<br>
--- pipewire-0.3.18/spa/plugins/bluez5/a2dp-codec-sbc.c 2020-12-15 12:45:21.000000000 +0100<br>
+++ pipewire-0.3.18-HQ/spa/plugins/bluez5/a2dp-codec-sbc.c 2020-12-26 15:36:10.992155069 +0100<br>
@@ -95,22 +95,22 @@<br>
switch (mode) {<br>
case SBC_CHANNEL_MODE_MONO:<br>
case SBC_CHANNEL_MODE_DUAL_CHANNEL:<br>
- return 31;<br>
+ return 38;<br>
<br>
case SBC_CHANNEL_MODE_STEREO:<br>
case SBC_CHANNEL_MODE_JOINT_STEREO:<br>
- return 53;<br>
+ return 64;<br>
}<br>
return 53;<br>
case SBC_SAMPLING_FREQ_48000:<br>
switch (mode) {<br>
case SBC_CHANNEL_MODE_MONO:<br>
case SBC_CHANNEL_MODE_DUAL_CHANNEL:<br>
- return 29;<br>
+ return 36;<br>
<br>
case SBC_CHANNEL_MODE_STEREO:<br>
case SBC_CHANNEL_MODE_JOINT_STEREO:<br>
- return 51;<br>
+ return 62;<br>
}<br>
return 51;<br>
}<br>
@@ -140,12 +140,12 @@<br>
else<br>
return -ENOTSUP;<br>
<br>
- if (conf.channel_mode & SBC_CHANNEL_MODE_JOINT_STEREO)<br>
+ if (conf.channel_mode & SBC_CHANNEL_MODE_DUAL_CHANNEL)<br>
+ conf.channel_mode = SBC_CHANNEL_MODE_DUAL_CHANNEL;<br>
+ else if (conf.channel_mode & SBC_CHANNEL_MODE_JOINT_STEREO)<br>
conf.channel_mode = SBC_CHANNEL_MODE_JOINT_STEREO;<br>
else if (conf.channel_mode & SBC_CHANNEL_MODE_STEREO)<br>
conf.channel_mode = SBC_CHANNEL_MODE_STEREO;<br>
- else if (conf.channel_mode & SBC_CHANNEL_MODE_DUAL_CHANNEL)<br>
- conf.channel_mode = SBC_CHANNEL_MODE_DUAL_CHANNEL;<br>
else if (conf.channel_mode & SBC_CHANNEL_MODE_MONO)<br>
conf.channel_mode = SBC_CHANNEL_MODE_MONO;<br>
else