public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
From: Sanchayan <maitysanchayan@gmail.com>
To: linux-bluetooth@vger.kernel.org
Cc: "Igor V. Kovalenko" <igor.v.kovalenko@gmail.com>
Subject: Query on the patch series "define HCI packet size of USB Alts"
Date: Fri, 5 Feb 2021 21:22:23 +0530	[thread overview]
Message-ID: <YB1pt8WXsHO2gP5A@core-precision> (raw)

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.

             reply	other threads:[~2021-02-05 22:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-05 15:52 Sanchayan [this message]
2021-08-14  7:09 ` Query on the patch series "define HCI packet size of USB Alts" Igor Kovalenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YB1pt8WXsHO2gP5A@core-precision \
    --to=maitysanchayan@gmail.com \
    --cc=igor.v.kovalenko@gmail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox