[Pipewire-devel] Patch for SBC XQ support in Pipewire
George Kiagiadakis
mail at gkiagia.gr
Wed Jan 6 10:42:14 UTC 2021
Hi,
The best way to move this forward would be to create a merge request on gitlab:
https://gitlab.freedesktop.org/pipewire/pipewire/-/merge_requests
Best regards,
George
‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Friday, January 1st, 2021 at 12:32, Hyperion <hyp3ri0n at sfr.fr> wrote:
> Hi,
>
> Here's a very simple and non-intrusive patch that enables SBC XQ (dual channel 452kbps / bipool 2x38) with automatic fallback to joint stereo.
> 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).
>
> I can move it to github if you wish :)
>
> All the best
> jp
>
> 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
> --- pipewire-0.3.18/spa/plugins/bluez5/a2dp-codec-sbc.c2020-12-15 12:45:21.000000000 +0100
> +++ pipewire-0.3.18-HQ/spa/plugins/bluez5/a2dp-codec-sbc.c2020-12-26 15:36:10.992155069 +0100
> @@ -95,22 +95,22 @@
> switch (mode) {
> case SBC_CHANNEL_MODE_MONO:
> case SBC_CHANNEL_MODE_DUAL_CHANNEL:
> -return 31;
> +return 38;
>
> case SBC_CHANNEL_MODE_STEREO:
> case SBC_CHANNEL_MODE_JOINT_STEREO:
> -return 53;
> +return 64;
> }
> return 53;
> case SBC_SAMPLING_FREQ_48000:
> switch (mode) {
> case SBC_CHANNEL_MODE_MONO:
> case SBC_CHANNEL_MODE_DUAL_CHANNEL:
> -return 29;
> +return 36;
>
> case SBC_CHANNEL_MODE_STEREO:
> case SBC_CHANNEL_MODE_JOINT_STEREO:
> -return 51;
> +return 62;
> }
> return 51;
> }
> @@ -140,12 +140,12 @@
> else
> return -ENOTSUP;
>
> -if (conf.channel_mode & SBC_CHANNEL_MODE_JOINT_STEREO)
> +if (conf.channel_mode & SBC_CHANNEL_MODE_DUAL_CHANNEL)
> +conf.channel_mode = SBC_CHANNEL_MODE_DUAL_CHANNEL;
> +else if (conf.channel_mode & SBC_CHANNEL_MODE_JOINT_STEREO)
> conf.channel_mode = SBC_CHANNEL_MODE_JOINT_STEREO;
> else if (conf.channel_mode & SBC_CHANNEL_MODE_STEREO)
> conf.channel_mode = SBC_CHANNEL_MODE_STEREO;
> -else if (conf.channel_mode & SBC_CHANNEL_MODE_DUAL_CHANNEL)
> -conf.channel_mode = SBC_CHANNEL_MODE_DUAL_CHANNEL;
> else if (conf.channel_mode & SBC_CHANNEL_MODE_MONO)
> conf.channel_mode = SBC_CHANNEL_MODE_MONO;
> else
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/pipewire-devel/attachments/20210106/516fefa4/attachment.htm>
More information about the Pipewire-devel
mailing list