public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* Query on the patch series "define HCI packet size of USB Alts"
@ 2021-02-05 15:52 Sanchayan
  2021-08-14  7:09 ` Igor Kovalenko
  0 siblings, 1 reply; 2+ messages in thread
From: Sanchayan @ 2021-02-05 15:52 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Igor V. Kovalenko

Hello,

We currently have an opened merge request on adding mSBC support to PulseAudio.
https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/254

There currently seems to be an issue in getting the correct MTU. In the test
setup it works with the ofono backend, except for the assumed MTU. For getting
it to work, we had to use a MTU of 24. 48 does not work and renders silence.
getsockopt(card->fd, SOL_SCO, SCO_OPTIONS ... returns 64 which is too large.

The missing bits on the kernel side seems to be the below patch.
https://lore.kernel.org/patchwork/patch/1303411/

Second patch in the above series seem to have been applied but not the first.

The first patch in the series above, when applied seems to fix getsockopt
returning 24 bytes for the MTU. An additional correction on top of that
below

diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
index fd0dcfa9a390..35f9c0743014 100644
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@ -1669,6 +1669,8 @@ static int btusb_switch_alt_setting(struct hci_dev *hdev, int new_alts)
                err = __set_isoc_interface(hdev, new_alts);
                if (err < 0)
                        return err;
+
+               hdev->sco_mtu = hci_packet_size_usb_alt[new_alts];
        }

        if (!test_and_set_bit(BTUSB_ISOC_RUNNING, &data->flags)) {


seems to make it work for all bluetooth usb devices.

Has there been any further development or way to push this forward?

- Sanchayan.

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-08-14  7:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-02-05 15:52 Query on the patch series "define HCI packet size of USB Alts" Sanchayan
2021-08-14  7:09 ` Igor Kovalenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox