linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [Bug 215576] New: HSP/HFP mSBC profile broken with QCA6174
@ 2022-02-07 18:00 bugzilla-daemon
  2022-02-08  6:49 ` Thorsten Leemhuis
                   ` (21 more replies)
  0 siblings, 22 replies; 25+ messages in thread
From: bugzilla-daemon @ 2022-02-07 18:00 UTC (permalink / raw)
  To: linux-bluetooth

https://bugzilla.kernel.org/show_bug.cgi?id=215576

            Bug ID: 215576
           Summary: HSP/HFP mSBC profile broken with QCA6174
           Product: Drivers
           Version: 2.5
    Kernel Version: 5.16.7
          Hardware: x86-64
                OS: Linux
              Tree: Mainline
            Status: NEW
          Severity: normal
          Priority: P1
         Component: Bluetooth
          Assignee: linux-bluetooth@vger.kernel.org
          Reporter: mike@mjones.io
        Regression: No

Created attachment 300405
  --> https://bugzilla.kernel.org/attachment.cgi?id=300405&action=edit
dmesg with 5.16.7

Between v5.15 and v5.16, mSBC via pipewire stopped working with the QCA6174
adapter.

Switching to the HSP/HFP profile with mSBC codec in pipewire produces a loud
buzzing sound, and the microphone does not function. When using PulseAudio
instead of pipewire, the buzzing is absent but audio input/output also don't
work.

Other users are reporting the same issue at [1].

I ran a git bisect between these two versions and the issue seems to have been
caused by this commit:

[b2af264ad3af437238c9500aa830ebcafb180e05] Bluetooth: Add support for
HCI_Enhanced_Setup_Synchronous_Connection command

[1] https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/2019

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are the assignee for the bug.

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

* Re: [Bug 215576] New: HSP/HFP mSBC profile broken with QCA6174
  2022-02-07 18:00 [Bug 215576] New: HSP/HFP mSBC profile broken with QCA6174 bugzilla-daemon
@ 2022-02-08  6:49 ` Thorsten Leemhuis
  2022-02-08  6:49 ` [Bug 215576] " bugzilla-daemon
                   ` (20 subsequent siblings)
  21 siblings, 0 replies; 25+ messages in thread
From: Thorsten Leemhuis @ 2022-02-08  6:49 UTC (permalink / raw)
  To: bugzilla-daemon, linux-bluetooth, regressions

[TLDR: I'm adding the regression report below to regzbot, the Linux
kernel regression tracking bot; all text you find below is compiled from
a few templates paragraphs you might have encountered already already
from similar mails.]

Hi, this is your Linux kernel regression tracker speaking.

CCing the regression mailing list, as it should be in the loop for all
regressions, as explained here:
https://www.kernel.org/doc/html/latest/admin-guide/reporting-issues.html

On 07.02.22 19:00, bugzilla-daemon@kernel.org wrote:
> https://bugzilla.kernel.org/show_bug.cgi?id=215576
> 
>             Bug ID: 215576
>            Summary: HSP/HFP mSBC profile broken with QCA6174
>            Product: Drivers
>            Version: 2.5
>     Kernel Version: 5.16.7
>           Hardware: x86-64
>                 OS: Linux
>               Tree: Mainline
>             Status: NEW
>           Severity: normal
>           Priority: P1
>          Component: Bluetooth
>           Assignee: linux-bluetooth@vger.kernel.org
>           Reporter: mike@mjones.io
>         Regression: No
> 
> Created attachment 300405
>   --> https://bugzilla.kernel.org/attachment.cgi?id=300405&action=edit
> dmesg with 5.16.7
> 
> Between v5.15 and v5.16, mSBC via pipewire stopped working with the QCA6174
> adapter.
> 
> Switching to the HSP/HFP profile with mSBC codec in pipewire produces a loud
> buzzing sound, and the microphone does not function. When using PulseAudio
> instead of pipewire, the buzzing is absent but audio input/output also don't
> work.
> 
> Other users are reporting the same issue at [1].
> 
> I ran a git bisect between these two versions and the issue seems to have been
> caused by this commit:
> 
> [b2af264ad3af437238c9500aa830ebcafb180e05] Bluetooth: Add support for
> HCI_Enhanced_Setup_Synchronous_Connection command
> 
> [1] https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/2019

To be sure this issue doesn't fall through the cracks unnoticed, I'm
adding it to regzbot, my Linux kernel regression tracking bot:

#regzbot ^introduced b2af264ad3af437238c9500aa830ebcafb180e05
#regzbot title bluetooth: HSP/HFP mSBC profile broken with QCA6174
#regzbot ignore-activity
#regzbot link https://bugzilla.kernel.org/show_bug.cgi?id=215576

Reminder for developers: when fixing the issue, please add a 'Link:'
tags pointing to the report (the mail quoted above) using
lore.kernel.org/r/, as explained in
'Documentation/process/submitting-patches.rst' and
'Documentation/process/5.Posting.rst'. This allows the bot to connect
the report with any patches posted or committed to fix the issue; this
again allows the bot to show the current status of regressions and
automatically resolve the issue when the fix hits the right tree.

I'm sending this to everyone that got the initial report, to make them
aware of the tracking. I also hope that messages like this motivate
people to directly get at least the regression mailing list and ideally
even regzbot involved when dealing with regressions, as messages like
this wouldn't be needed then.

Don't worry, I'll send further messages wrt to this regression just to
the lists (with a tag in the subject so people can filter them away), if
they are relevant just for regzbot. With a bit of luck no such messages
will be needed anyway.

Ciao, Thorsten (wearing his 'the Linux kernel's regression tracker' hat)

P.S.: As the Linux kernel's regression tracker I'm getting a lot of
reports on my table. I can only look briefly into most of them and lack
knowledge about most of the areas they concern. I thus unfortunately
will sometimes get things wrong or miss something important. I hope
that's not the case here; if you think it is, don't hesitate to tell me
in a public reply, it's in everyone's interest to set the public record
straight.

-- 
Additional information about regzbot:

If you want to know more about regzbot, check out its web-interface, the
getting start guide, and the references documentation:

https://linux-regtracking.leemhuis.info/regzbot/
https://gitlab.com/knurd42/regzbot/-/blob/main/docs/getting_started.md
https://gitlab.com/knurd42/regzbot/-/blob/main/docs/reference.md

The last two documents will explain how you can interact with regzbot
yourself if your want to.

Hint for reporters: when reporting a regression it's in your interest to
CC the regression list and tell regzbot about the issue, as that ensures
the regression makes it onto the radar of the Linux kernel's regression
tracker -- that's in your interest, as it ensures your report won't fall
through the cracks unnoticed.

Hint for developers: you normally don't need to care about regzbot once
it's involved. Fix the issue as you normally would, just remember to
include 'Link:' tag in the patch descriptions pointing to all reports
about the issue. This has been expected from developers even before
regzbot showed up for reasons explained in
'Documentation/process/submitting-patches.rst' and
'Documentation/process/5.Posting.rst'.


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

* [Bug 215576] HSP/HFP mSBC profile broken with QCA6174
  2022-02-07 18:00 [Bug 215576] New: HSP/HFP mSBC profile broken with QCA6174 bugzilla-daemon
  2022-02-08  6:49 ` Thorsten Leemhuis
@ 2022-02-08  6:49 ` bugzilla-daemon
  2022-02-09 17:27 ` bugzilla-daemon
                   ` (19 subsequent siblings)
  21 siblings, 0 replies; 25+ messages in thread
From: bugzilla-daemon @ 2022-02-08  6:49 UTC (permalink / raw)
  To: linux-bluetooth

https://bugzilla.kernel.org/show_bug.cgi?id=215576

--- Comment #1 from The Linux kernel's regression tracker (Thorsten Leemhuis) (regressions@leemhuis.info) ---
[TLDR: I'm adding the regression report below to regzbot, the Linux
kernel regression tracking bot; all text you find below is compiled from
a few templates paragraphs you might have encountered already already
from similar mails.]

Hi, this is your Linux kernel regression tracker speaking.

CCing the regression mailing list, as it should be in the loop for all
regressions, as explained here:
https://www.kernel.org/doc/html/latest/admin-guide/reporting-issues.html

On 07.02.22 19:00, bugzilla-daemon@kernel.org wrote:
> https://bugzilla.kernel.org/show_bug.cgi?id=215576
> 
>             Bug ID: 215576
>            Summary: HSP/HFP mSBC profile broken with QCA6174
>            Product: Drivers
>            Version: 2.5
>     Kernel Version: 5.16.7
>           Hardware: x86-64
>                 OS: Linux
>               Tree: Mainline
>             Status: NEW
>           Severity: normal
>           Priority: P1
>          Component: Bluetooth
>           Assignee: linux-bluetooth@vger.kernel.org
>           Reporter: mike@mjones.io
>         Regression: No
> 
> Created attachment 300405
>   --> https://bugzilla.kernel.org/attachment.cgi?id=300405&action=edit
> dmesg with 5.16.7
> 
> Between v5.15 and v5.16, mSBC via pipewire stopped working with the QCA6174
> adapter.
> 
> Switching to the HSP/HFP profile with mSBC codec in pipewire produces a loud
> buzzing sound, and the microphone does not function. When using PulseAudio
> instead of pipewire, the buzzing is absent but audio input/output also don't
> work.
> 
> Other users are reporting the same issue at [1].
> 
> I ran a git bisect between these two versions and the issue seems to have
> been
> caused by this commit:
> 
> [b2af264ad3af437238c9500aa830ebcafb180e05] Bluetooth: Add support for
> HCI_Enhanced_Setup_Synchronous_Connection command
> 
> [1] https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/2019

To be sure this issue doesn't fall through the cracks unnoticed, I'm
adding it to regzbot, my Linux kernel regression tracking bot:

#regzbot ^introduced b2af264ad3af437238c9500aa830ebcafb180e05
#regzbot title bluetooth: HSP/HFP mSBC profile broken with QCA6174
#regzbot ignore-activity
#regzbot link https://bugzilla.kernel.org/show_bug.cgi?id=215576

Reminder for developers: when fixing the issue, please add a 'Link:'
tags pointing to the report (the mail quoted above) using
lore.kernel.org/r/, as explained in
'Documentation/process/submitting-patches.rst' and
'Documentation/process/5.Posting.rst'. This allows the bot to connect
the report with any patches posted or committed to fix the issue; this
again allows the bot to show the current status of regressions and
automatically resolve the issue when the fix hits the right tree.

I'm sending this to everyone that got the initial report, to make them
aware of the tracking. I also hope that messages like this motivate
people to directly get at least the regression mailing list and ideally
even regzbot involved when dealing with regressions, as messages like
this wouldn't be needed then.

Don't worry, I'll send further messages wrt to this regression just to
the lists (with a tag in the subject so people can filter them away), if
they are relevant just for regzbot. With a bit of luck no such messages
will be needed anyway.

Ciao, Thorsten (wearing his 'the Linux kernel's regression tracker' hat)

P.S.: As the Linux kernel's regression tracker I'm getting a lot of
reports on my table. I can only look briefly into most of them and lack
knowledge about most of the areas they concern. I thus unfortunately
will sometimes get things wrong or miss something important. I hope
that's not the case here; if you think it is, don't hesitate to tell me
in a public reply, it's in everyone's interest to set the public record
straight.

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are the assignee for the bug.

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

* [Bug 215576] HSP/HFP mSBC profile broken with QCA6174
  2022-02-07 18:00 [Bug 215576] New: HSP/HFP mSBC profile broken with QCA6174 bugzilla-daemon
  2022-02-08  6:49 ` Thorsten Leemhuis
  2022-02-08  6:49 ` [Bug 215576] " bugzilla-daemon
@ 2022-02-09 17:27 ` bugzilla-daemon
  2022-02-14 15:09 ` bugzilla-daemon
                   ` (18 subsequent siblings)
  21 siblings, 0 replies; 25+ messages in thread
From: bugzilla-daemon @ 2022-02-09 17:27 UTC (permalink / raw)
  To: linux-bluetooth

https://bugzilla.kernel.org/show_bug.cgi?id=215576

Mike Jones (mike@mjones.io) changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Regression|No                          |Yes

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are the assignee for the bug.

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

* [Bug 215576] HSP/HFP mSBC profile broken with QCA6174
  2022-02-07 18:00 [Bug 215576] New: HSP/HFP mSBC profile broken with QCA6174 bugzilla-daemon
                   ` (2 preceding siblings ...)
  2022-02-09 17:27 ` bugzilla-daemon
@ 2022-02-14 15:09 ` bugzilla-daemon
  2022-02-18 14:15 ` bugzilla-daemon
                   ` (17 subsequent siblings)
  21 siblings, 0 replies; 25+ messages in thread
From: bugzilla-daemon @ 2022-02-14 15:09 UTC (permalink / raw)
  To: linux-bluetooth

https://bugzilla.kernel.org/show_bug.cgi?id=215576

--- Comment #2 from wavexx@thregr.org ---
Same regression on a mediatek mt7921e, so unlikely to be controller specific?
I also confirm that downgrading to 5.15 fixes mSBC.

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are the assignee for the bug.

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

* [Bug 215576] HSP/HFP mSBC profile broken with QCA6174
  2022-02-07 18:00 [Bug 215576] New: HSP/HFP mSBC profile broken with QCA6174 bugzilla-daemon
                   ` (3 preceding siblings ...)
  2022-02-14 15:09 ` bugzilla-daemon
@ 2022-02-18 14:15 ` bugzilla-daemon
  2022-02-18 20:55   ` Luiz Augusto von Dentz
  2022-02-18 20:55 ` bugzilla-daemon
                   ` (16 subsequent siblings)
  21 siblings, 1 reply; 25+ messages in thread
From: bugzilla-daemon @ 2022-02-18 14:15 UTC (permalink / raw)
  To: linux-bluetooth

https://bugzilla.kernel.org/show_bug.cgi?id=215576

The Linux kernel's regression tracker (Thorsten Leemhuis) (regressions@leemhuis.info) changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |marcel@holtmann.org,
                   |                            |regressions@leemhuis.info

--- Comment #3 from The Linux kernel's regression tracker (Thorsten Leemhuis) (regressions@leemhuis.info) ---
hey bluetooth maintainers, what the status here? This regression was reported
more than ten days ago, it was bisected, and a second person roughly confirms
it, nevertheless there wasn't a single reply yet. Is somebody looking into
this?

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are the assignee for the bug.

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

* Re: [Bug 215576] HSP/HFP mSBC profile broken with QCA6174
  2022-02-18 14:15 ` bugzilla-daemon
@ 2022-02-18 20:55   ` Luiz Augusto von Dentz
  0 siblings, 0 replies; 25+ messages in thread
From: Luiz Augusto von Dentz @ 2022-02-18 20:55 UTC (permalink / raw)
  To: bugzilla-daemon, Kiran K; +Cc: linux-bluetooth

Hi Kiran,

On Fri, Feb 18, 2022 at 6:35 AM <bugzilla-daemon@kernel.org> wrote:
>
> https://bugzilla.kernel.org/show_bug.cgi?id=215576
>
> The Linux kernel's regression tracker (Thorsten Leemhuis) (regressions@leemhuis.info) changed:
>
>            What    |Removed                     |Added
> ----------------------------------------------------------------------------
>                  CC|                            |marcel@holtmann.org,
>                    |                            |regressions@leemhuis.info
>
> --- Comment #3 from The Linux kernel's regression tracker (Thorsten Leemhuis) (regressions@leemhuis.info) ---
> hey bluetooth maintainers, what the status here? This regression was reported
> more than ten days ago, it was bisected, and a second person roughly confirms
> it, nevertheless there wasn't a single reply yet. Is somebody looking into
> this?
>
> --
> You may reply to this email to add a comment.
>
> You are receiving this mail because:
> You are the assignee for the bug.

Looks like a regression introduced by:

https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git/commit/?id=b2af264ad3af437238c9500aa830ebcafb180e05

It seems BT_VOICE sets BT_CODEC_TRANSPARENT when perhaps should be
setting BT_CODEC_MSBC:

diff --git a/net/bluetooth/sco.c b/net/bluetooth/sco.c
index 8eabf41b2993..b35c772efc7e 100644
--- a/net/bluetooth/sco.c
+++ b/net/bluetooth/sco.c
@@ -879,15 +879,9 @@ static int sco_sock_setsockopt(struct socket
*sock, int level, int optname,
                }

                sco_pi(sk)->setting = voice.setting;
-               hdev = hci_get_route(&sco_pi(sk)->dst, &sco_pi(sk)->src,
-                                    BDADDR_BREDR);
-               if (!hdev) {
-                       err = -EBADFD;
-                       break;
-               }
-               if (enhanced_sco_capable(hdev) &&
-                   voice.setting == BT_VOICE_TRANSPARENT)
-                       sco_pi(sk)->codec.id = BT_CODEC_TRANSPARENT;
+               if (voice.setting == BT_VOICE_TRANSPARENT)
+                       sco_pi(sk)->codec.id = BT_CODEC_MSBC;
+
                hci_dev_put(hdev);
                break;
-- 
Luiz Augusto von Dentz

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

* [Bug 215576] HSP/HFP mSBC profile broken with QCA6174
  2022-02-07 18:00 [Bug 215576] New: HSP/HFP mSBC profile broken with QCA6174 bugzilla-daemon
                   ` (4 preceding siblings ...)
  2022-02-18 14:15 ` bugzilla-daemon
@ 2022-02-18 20:55 ` bugzilla-daemon
  2022-02-18 21:44   ` [Bug,215576] " bluez.test.bot
  2022-02-26 15:03 ` [Bug 215576] " bugzilla-daemon
                   ` (15 subsequent siblings)
  21 siblings, 1 reply; 25+ messages in thread
From: bugzilla-daemon @ 2022-02-18 20:55 UTC (permalink / raw)
  To: linux-bluetooth

https://bugzilla.kernel.org/show_bug.cgi?id=215576

--- Comment #4 from Luiz Von Dentz (luiz.dentz@gmail.com) ---
Hi Kiran,

On Fri, Feb 18, 2022 at 6:35 AM <bugzilla-daemon@kernel.org> wrote:
>
> https://bugzilla.kernel.org/show_bug.cgi?id=215576
>
> The Linux kernel's regression tracker (Thorsten Leemhuis)
> (regressions@leemhuis.info) changed:
>
>            What    |Removed                     |Added
> ----------------------------------------------------------------------------
>                  CC|                            |marcel@holtmann.org,
>                    |                            |regressions@leemhuis.info
>
> --- Comment #3 from The Linux kernel's regression tracker (Thorsten Leemhuis)
> (regressions@leemhuis.info) ---
> hey bluetooth maintainers, what the status here? This regression was reported
> more than ten days ago, it was bisected, and a second person roughly confirms
> it, nevertheless there wasn't a single reply yet. Is somebody looking into
> this?
>
> --
> You may reply to this email to add a comment.
>
> You are receiving this mail because:
> You are the assignee for the bug.

Looks like a regression introduced by:

https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git/commit/?id=b2af264ad3af437238c9500aa830ebcafb180e05

It seems BT_VOICE sets BT_CODEC_TRANSPARENT when perhaps should be
setting BT_CODEC_MSBC:

diff --git a/net/bluetooth/sco.c b/net/bluetooth/sco.c
index 8eabf41b2993..b35c772efc7e 100644
--- a/net/bluetooth/sco.c
+++ b/net/bluetooth/sco.c
@@ -879,15 +879,9 @@ static int sco_sock_setsockopt(struct socket
*sock, int level, int optname,
                }

                sco_pi(sk)->setting = voice.setting;
-               hdev = hci_get_route(&sco_pi(sk)->dst, &sco_pi(sk)->src,
-                                    BDADDR_BREDR);
-               if (!hdev) {
-                       err = -EBADFD;
-                       break;
-               }
-               if (enhanced_sco_capable(hdev) &&
-                   voice.setting == BT_VOICE_TRANSPARENT)
-                       sco_pi(sk)->codec.id = BT_CODEC_TRANSPARENT;
+               if (voice.setting == BT_VOICE_TRANSPARENT)
+                       sco_pi(sk)->codec.id = BT_CODEC_MSBC;
+
                hci_dev_put(hdev);
                break;

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are the assignee for the bug.

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

* RE: [Bug,215576] HSP/HFP mSBC profile broken with QCA6174
  2022-02-18 20:55 ` bugzilla-daemon
@ 2022-02-18 21:44   ` bluez.test.bot
  0 siblings, 0 replies; 25+ messages in thread
From: bluez.test.bot @ 2022-02-18 21:44 UTC (permalink / raw)
  To: linux-bluetooth, bugzilla-daemon

[-- Attachment #1: Type: text/plain, Size: 478 bytes --]

This is an automated email and please do not reply to this email.

Dear Submitter,

Thank you for submitting the patches to the linux bluetooth mailing list.
While preparing the CI tests, the patches you submitted couldn't be applied to the current HEAD of the repository.

----- Output -----
error: corrupt patch at line 41
hint: Use 'git am --show-current-patch' to see the failed patch


Please resolve the issue and submit the patches again.


---
Regards,
Linux Bluetooth


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

* [Bug 215576] HSP/HFP mSBC profile broken with QCA6174
  2022-02-07 18:00 [Bug 215576] New: HSP/HFP mSBC profile broken with QCA6174 bugzilla-daemon
                   ` (5 preceding siblings ...)
  2022-02-18 20:55 ` bugzilla-daemon
@ 2022-02-26 15:03 ` bugzilla-daemon
  2022-02-26 15:31 ` bugzilla-daemon
                   ` (14 subsequent siblings)
  21 siblings, 0 replies; 25+ messages in thread
From: bugzilla-daemon @ 2022-02-26 15:03 UTC (permalink / raw)
  To: linux-bluetooth

https://bugzilla.kernel.org/show_bug.cgi?id=215576

--- Comment #5 from wavexx@thregr.org ---
I tried applying this patch, even though removing the error checking didn't
look right to me. Indeed, after, when trying this, it results in BUG: kernel
NULL pointer dereference, with the stack directly located here:

Feb 26 15:21:16 kernel:  sco_sock_setsockopt+0x110/0x530 [bluetooth]

Changing just codec.id = BT_CODEC_MSBC doesn't work either (results in a brief
noise on the headset).

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are the assignee for the bug.

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

* [Bug 215576] HSP/HFP mSBC profile broken with QCA6174
  2022-02-07 18:00 [Bug 215576] New: HSP/HFP mSBC profile broken with QCA6174 bugzilla-daemon
                   ` (6 preceding siblings ...)
  2022-02-26 15:03 ` [Bug 215576] " bugzilla-daemon
@ 2022-02-26 15:31 ` bugzilla-daemon
  2022-02-26 16:21 ` bugzilla-daemon
                   ` (13 subsequent siblings)
  21 siblings, 0 replies; 25+ messages in thread
From: bugzilla-daemon @ 2022-02-26 15:31 UTC (permalink / raw)
  To: linux-bluetooth

https://bugzilla.kernel.org/show_bug.cgi?id=215576

--- Comment #6 from wavexx@thregr.org ---
Commit b2af264ad3af437238c9500aa830ebcafb180e05 doesn't revert cleanly
anymore. Looking at the code however, it's obvious that just setting
BT_CODEC_MSBC can't work, since hci_enhanced_setup_sync_conn itself
only handles TRANSPARENT (which looks like it's already mSBC underneath)
and CVSD.

However I tried to brutally disable enhanced synchronous connection
support, which is what the commit adds, by doing:

> diff -rud linux-5.16.11.Orig/include/net/bluetooth/hci_core.h
> linux-5.16.11/include/net/bluetooth/hci_core.h
> --- linux-5.16.11.Orig/include/net/bluetooth/hci_core.h 2022-02-23
> 12:06:08.000000000 +0100
> +++ linux-5.16.11/include/net/bluetooth/hci_core.h      2022-02-26
> 16:00:44.896727458 +0100
> @@ -1465,7 +1465,8 @@
>  #define use_ll_privacy(dev) ((dev)->le_features[0] & HCI_LE_LL_PRIVACY)
> 
>  /* Use enhanced synchronous connection if command is supported */
> -#define enhanced_sco_capable(dev) ((dev)->commands[29] & 0x08)
> +#define enhanced_sco_capable(dev) (false)
> 
>  /* Use ext scanning if set ext scan param and ext scan enable is supported
>  */
>  #define use_ext_scan(dev) (((dev)->commands[37] & 0x20) && \

and this "unbreaks" mSBC even on a current kernel.

I'm not familiar with BT at all, but again doesn't seem to be a
controller-specific issue at all.

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are the assignee for the bug.

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

* [Bug 215576] HSP/HFP mSBC profile broken with QCA6174
  2022-02-07 18:00 [Bug 215576] New: HSP/HFP mSBC profile broken with QCA6174 bugzilla-daemon
                   ` (7 preceding siblings ...)
  2022-02-26 15:31 ` bugzilla-daemon
@ 2022-02-26 16:21 ` bugzilla-daemon
  2022-02-27 17:00 ` bugzilla-daemon
                   ` (12 subsequent siblings)
  21 siblings, 0 replies; 25+ messages in thread
From: bugzilla-daemon @ 2022-02-26 16:21 UTC (permalink / raw)
  To: linux-bluetooth

https://bugzilla.kernel.org/show_bug.cgi?id=215576

--- Comment #7 from Mike Jones (mike@mjones.io) ---
Thanks for looking into this, Luiz, and thanks wavexx for your experiments! I
can confirm the same results on my system: the first patch (codec.id =
BT_CODEC_MSBC) doesn't work, but wavexx's workaround to disable enhanced SCO
results in fully-functional mSBC.

I've managed to find a laptop with an Intel AX200, and here mSBC works fine on
an unpatched v5.16.11 kernel. So this issue doesn't seem to affect all
adapters.

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are the assignee for the bug.

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

* [Bug 215576] HSP/HFP mSBC profile broken with QCA6174
  2022-02-07 18:00 [Bug 215576] New: HSP/HFP mSBC profile broken with QCA6174 bugzilla-daemon
                   ` (8 preceding siblings ...)
  2022-02-26 16:21 ` bugzilla-daemon
@ 2022-02-27 17:00 ` bugzilla-daemon
  2022-03-09 11:50 ` bugzilla-daemon
                   ` (11 subsequent siblings)
  21 siblings, 0 replies; 25+ messages in thread
From: bugzilla-daemon @ 2022-02-27 17:00 UTC (permalink / raw)
  To: linux-bluetooth

https://bugzilla.kernel.org/show_bug.cgi?id=215576

pav@iki.fi changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pav@iki.fi

--- Comment #8 from pav@iki.fi ---
If switching back to non-enhanced sco connect is what it takes, then maybe it
should be enabled only when userspace has set some codec offload setting at
least until someone finds a proper fix. Maybe along these lines:
https://patchwork.kernel.org/project/bluetooth/patch/20220227163430.24694-1-pav@iki.fi/

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are the assignee for the bug.

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

* [Bug 215576] HSP/HFP mSBC profile broken with QCA6174
  2022-02-07 18:00 [Bug 215576] New: HSP/HFP mSBC profile broken with QCA6174 bugzilla-daemon
                   ` (9 preceding siblings ...)
  2022-02-27 17:00 ` bugzilla-daemon
@ 2022-03-09 11:50 ` bugzilla-daemon
  2022-03-29 20:21 ` bugzilla-daemon
                   ` (10 subsequent siblings)
  21 siblings, 0 replies; 25+ messages in thread
From: bugzilla-daemon @ 2022-03-09 11:50 UTC (permalink / raw)
  To: linux-bluetooth

https://bugzilla.kernel.org/show_bug.cgi?id=215576

--- Comment #9 from wavexx@thregr.org ---
Any consensus at least of what a proper fix would look like? I have to rebuild
a new kernel for this laptop and I can help test around @pav's patch if needed.

Is Kiran in the loop?

I no longer have access to an AX20? chipset to make some tests on it sadly.

Maybe we just need to check a controller capabilities flag for E-SCO in
addition to the device's own capabilities.

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are the assignee for the bug.

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

* [Bug 215576] HSP/HFP mSBC profile broken with QCA6174
  2022-02-07 18:00 [Bug 215576] New: HSP/HFP mSBC profile broken with QCA6174 bugzilla-daemon
                   ` (10 preceding siblings ...)
  2022-03-09 11:50 ` bugzilla-daemon
@ 2022-03-29 20:21 ` bugzilla-daemon
  2022-05-27 10:52 ` bugzilla-daemon
                   ` (9 subsequent siblings)
  21 siblings, 0 replies; 25+ messages in thread
From: bugzilla-daemon @ 2022-03-29 20:21 UTC (permalink / raw)
  To: linux-bluetooth

https://bugzilla.kernel.org/show_bug.cgi?id=215576

--- Comment #10 from Luiz Von Dentz (luiz.dentz@gmail.com) ---
Posted a new series about this:

https://patchwork.kernel.org/project/bluetooth/list/?series=627309

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are the assignee for the bug.

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

* [Bug 215576] HSP/HFP mSBC profile broken with QCA6174
  2022-02-07 18:00 [Bug 215576] New: HSP/HFP mSBC profile broken with QCA6174 bugzilla-daemon
                   ` (11 preceding siblings ...)
  2022-03-29 20:21 ` bugzilla-daemon
@ 2022-05-27 10:52 ` bugzilla-daemon
  2022-05-27 22:59 ` bugzilla-daemon
                   ` (8 subsequent siblings)
  21 siblings, 0 replies; 25+ messages in thread
From: bugzilla-daemon @ 2022-05-27 10:52 UTC (permalink / raw)
  To: linux-bluetooth

https://bugzilla.kernel.org/show_bug.cgi?id=215576

--- Comment #11 from wavexx@thregr.org ---
So did the series got accepted/merged, and did it land in linux yet? (patchwork
now shows me just an empty page..).

Just checking on the 5.18 trunk I don't see any change besides minor other
fixes.

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are the assignee for the bug.

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

* [Bug 215576] HSP/HFP mSBC profile broken with QCA6174
  2022-02-07 18:00 [Bug 215576] New: HSP/HFP mSBC profile broken with QCA6174 bugzilla-daemon
                   ` (12 preceding siblings ...)
  2022-05-27 10:52 ` bugzilla-daemon
@ 2022-05-27 22:59 ` bugzilla-daemon
  2022-05-28  0:15 ` bugzilla-daemon
                   ` (7 subsequent siblings)
  21 siblings, 0 replies; 25+ messages in thread
From: bugzilla-daemon @ 2022-05-27 22:59 UTC (permalink / raw)
  To: linux-bluetooth

https://bugzilla.kernel.org/show_bug.cgi?id=215576

Daniel Wennberg (daniel.wennberg@gmail.com) changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |daniel.wennberg@gmail.com

--- Comment #12 from Daniel Wennberg (daniel.wennberg@gmail.com) ---
I'm a rookie here but it looks like the fix entered the mainline tree with this
merge:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=7e062cda7d90543ac8c7700fc7c5527d0c0f22ad

The fix itself is this commit and its immediate parents:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=d44e1dbda36fff5d7c2586683c4adc0963aef908

So it looks like it will be included in the 5.19 release. Hugely appreciated!

However, not having a functioning bluetooth HSP mode is incredibly inconvenient
in the age of Zoom, and there are now three major revisions where this is
broken: 5.16, 5.17, and 5.18. Any chance we'll see some backports to get this
in people's hands faster?

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are the assignee for the bug.

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

* [Bug 215576] HSP/HFP mSBC profile broken with QCA6174
  2022-02-07 18:00 [Bug 215576] New: HSP/HFP mSBC profile broken with QCA6174 bugzilla-daemon
                   ` (13 preceding siblings ...)
  2022-05-27 22:59 ` bugzilla-daemon
@ 2022-05-28  0:15 ` bugzilla-daemon
  2022-05-30 11:12 ` bugzilla-daemon
                   ` (6 subsequent siblings)
  21 siblings, 0 replies; 25+ messages in thread
From: bugzilla-daemon @ 2022-05-28  0:15 UTC (permalink / raw)
  To: linux-bluetooth

https://bugzilla.kernel.org/show_bug.cgi?id=215576

--- Comment #13 from Daniel Wennberg (daniel.wennberg@gmail.com) ---
The regression tracker expressed a similar sentiment here:
https://patchwork.kernel.org/project/bluetooth/patch/20220401233826.122544-1-luiz.dentz@gmail.com/#24810088

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are the assignee for the bug.

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

* [Bug 215576] HSP/HFP mSBC profile broken with QCA6174
  2022-02-07 18:00 [Bug 215576] New: HSP/HFP mSBC profile broken with QCA6174 bugzilla-daemon
                   ` (14 preceding siblings ...)
  2022-05-28  0:15 ` bugzilla-daemon
@ 2022-05-30 11:12 ` bugzilla-daemon
  2022-06-18 19:17 ` bugzilla-daemon
                   ` (5 subsequent siblings)
  21 siblings, 0 replies; 25+ messages in thread
From: bugzilla-daemon @ 2022-05-30 11:12 UTC (permalink / raw)
  To: linux-bluetooth

https://bugzilla.kernel.org/show_bug.cgi?id=215576

--- Comment #14 from The Linux kernel's regression tracker (Thorsten Leemhuis) (regressions@leemhuis.info) ---
> Any chance we'll see some backports to get this in people's hands faster?

The maintainers just need to ask the stable to to backport this; note sure,
maybe asking them for this on the mailing list might lead to better results.

But even if they don't do that, there is a good chance that this might be
backported within the next two weeks

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are the assignee for the bug.

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

* [Bug 215576] HSP/HFP mSBC profile broken with QCA6174
  2022-02-07 18:00 [Bug 215576] New: HSP/HFP mSBC profile broken with QCA6174 bugzilla-daemon
                   ` (15 preceding siblings ...)
  2022-05-30 11:12 ` bugzilla-daemon
@ 2022-06-18 19:17 ` bugzilla-daemon
  2022-06-19 16:46 ` bugzilla-daemon
                   ` (4 subsequent siblings)
  21 siblings, 0 replies; 25+ messages in thread
From: bugzilla-daemon @ 2022-06-18 19:17 UTC (permalink / raw)
  To: linux-bluetooth

https://bugzilla.kernel.org/show_bug.cgi?id=215576

--- Comment #15 from wavexx@thregr.org ---
Created attachment 301217
  --> https://bugzilla.kernel.org/attachment.cgi?id=301217&action=edit
Add HCI_QUIRK_BROKEN_ENHANCED_SETUP_SYNC_CONN to btmtk to fix mSBC

I'm testing now 5.18.5 (from debian unstable) where this has been backported.

Still broken on mt7921e, mSBM doesn't work.

I see no quirk set there. Adding HCI_QUIRK_BROKEN_ENHANCED_SETUP_SYNC_CONN to
btmtk fixes it.

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are the assignee for the bug.

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

* [Bug 215576] HSP/HFP mSBC profile broken with QCA6174
  2022-02-07 18:00 [Bug 215576] New: HSP/HFP mSBC profile broken with QCA6174 bugzilla-daemon
                   ` (16 preceding siblings ...)
  2022-06-18 19:17 ` bugzilla-daemon
@ 2022-06-19 16:46 ` bugzilla-daemon
  2022-06-19 17:08 ` bugzilla-daemon
                   ` (3 subsequent siblings)
  21 siblings, 0 replies; 25+ messages in thread
From: bugzilla-daemon @ 2022-06-19 16:46 UTC (permalink / raw)
  To: linux-bluetooth

https://bugzilla.kernel.org/show_bug.cgi?id=215576

--- Comment #16 from The Linux kernel's regression tracker (Thorsten Leemhuis) (regressions@leemhuis.info) ---
(In reply to wavexx from comment #15)
> Created attachment 301217 [details]
> Add HCI_QUIRK_BROKEN_ENHANCED_SETUP_SYNC_CONN to btmtk to fix mSBC

Thx. FWIW, this might easily get lost here. Would be really good if you could
sent this to the bluetooth maintainers, ideally as a proper patch with
changelog and everything:


BLUETOOTH DRIVERS
M:      Marcel Holtmann <marcel@holtmann.org>
M:      Johan Hedberg <johan.hedberg@gmail.com>
M:      Luiz Augusto von Dentz <luiz.dentz@gmail.com>
L:      linux-bluetooth@vger.kernel.org
S:      Supported
W:      http://www.bluez.org/
T:      git
git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth.git
T:      git
git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git
F:      drivers/bluetooth/

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are the assignee for the bug.

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

* [Bug 215576] HSP/HFP mSBC profile broken with QCA6174
  2022-02-07 18:00 [Bug 215576] New: HSP/HFP mSBC profile broken with QCA6174 bugzilla-daemon
                   ` (17 preceding siblings ...)
  2022-06-19 16:46 ` bugzilla-daemon
@ 2022-06-19 17:08 ` bugzilla-daemon
  2022-06-19 17:47 ` bugzilla-daemon
                   ` (2 subsequent siblings)
  21 siblings, 0 replies; 25+ messages in thread
From: bugzilla-daemon @ 2022-06-19 17:08 UTC (permalink / raw)
  To: linux-bluetooth

https://bugzilla.kernel.org/show_bug.cgi?id=215576

--- Comment #17 from wavexx@thregr.org ---
Well I hope it's not going to get lost _in_ the bug tracker ;)

At the moment I'd be happy if some maintainer simply made the commit. For a one
line change I'd rather not start cloning yet another repo...

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are the assignee for the bug.

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

* [Bug 215576] HSP/HFP mSBC profile broken with QCA6174
  2022-02-07 18:00 [Bug 215576] New: HSP/HFP mSBC profile broken with QCA6174 bugzilla-daemon
                   ` (18 preceding siblings ...)
  2022-06-19 17:08 ` bugzilla-daemon
@ 2022-06-19 17:47 ` bugzilla-daemon
  2022-07-04 15:55 ` bugzilla-daemon
  2022-07-05  9:30 ` bugzilla-daemon
  21 siblings, 0 replies; 25+ messages in thread
From: bugzilla-daemon @ 2022-06-19 17:47 UTC (permalink / raw)
  To: linux-bluetooth

https://bugzilla.kernel.org/show_bug.cgi?id=215576

--- Comment #18 from The Linux kernel's regression tracker (Thorsten Leemhuis) (regressions@leemhuis.info) ---
(In reply to wavexx from comment #17)
> Well I hope it's not going to get lost _in_ the bug tracker ;)

To quote
https://www.kernel.org/doc/html/latest/admin-guide/reporting-issues.html:

Very few subsystems use a bug tracker, and only some of those rely on
bugzilla.kernel.org.

> At the moment I'd be happy if some maintainer simply made the commit. For a
> one line change I'd rather not start cloning yet another repo...

With a bit of luck that will work. But if you don't hear anything within the
next few days, you really want to send it by mail. A simple mail with a patch
like the one you applied here might do the trick with a bit of luck.

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are the assignee for the bug.

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

* [Bug 215576] HSP/HFP mSBC profile broken with QCA6174
  2022-02-07 18:00 [Bug 215576] New: HSP/HFP mSBC profile broken with QCA6174 bugzilla-daemon
                   ` (19 preceding siblings ...)
  2022-06-19 17:47 ` bugzilla-daemon
@ 2022-07-04 15:55 ` bugzilla-daemon
  2022-07-05  9:30 ` bugzilla-daemon
  21 siblings, 0 replies; 25+ messages in thread
From: bugzilla-daemon @ 2022-07-04 15:55 UTC (permalink / raw)
  To: linux-bluetooth

https://bugzilla.kernel.org/show_bug.cgi?id=215576

Dmitry Nezhevenko (dion@inhex.net) changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dion@inhex.net

--- Comment #19 from Dmitry Nezhevenko (dion@inhex.net) ---
I think that I've same problem with followed bluetooth adapter:

Bus 001 Device 005: ID 8087:0026 Intel Corp.

[   41.184754] Bluetooth: hci0: Bootloader revision 0.4 build 0 week 30 2018
[   41.185760] Bluetooth: hci0: Device revision is 2
[   41.185769] Bluetooth: hci0: Secure boot is enabled
[   41.185775] Bluetooth: hci0: OTP lock is enabled
[   41.185780] Bluetooth: hci0: API lock is enabled
[   41.185784] Bluetooth: hci0: Debug lock is disabled
[   41.185789] Bluetooth: hci0: Minimum firmware build 1 week 10 2014
[   41.187739] Bluetooth: hci0: Found device firmware: intel/ibt-19-0-4.sfi
[   41.187762] Bluetooth: hci0: Boot Address: 0x24800
[   41.187763] Bluetooth: hci0: Firmware Version: 191-21.21
[   41.884145] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[   41.884148] Bluetooth: BNEP filters: protocol multicast
[   41.884150] Bluetooth: BNEP socket layer initialized
[   42.786061] Bluetooth: hci0: Waiting for firmware download to complete
[   42.786699] Bluetooth: hci0: Firmware loaded in 1561482 usecs
[   42.786723] Bluetooth: hci0: Waiting for device to boot
[   42.801703] Bluetooth: hci0: Device booted in 14639 usecs
[   42.801733] Bluetooth: hci0: Found Intel DDC parameters:
intel/ibt-19-0-4.ddc
[   42.803713] Bluetooth: hci0: Applying Intel DDC parameters completed
[   42.804752] Bluetooth: hci0: Firmware revision 0.0 build 191 week 21 2021
[   42.887147] Bluetooth: RFCOMM TTY layer initialized
[   42.887153] Bluetooth: RFCOMM socket layer initialized
[   42.887156] Bluetooth: RFCOMM ver 1.11


Also running debian 5.18.5 kernel and getting cracking sound recorded from mic.

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are the assignee for the bug.

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

* [Bug 215576] HSP/HFP mSBC profile broken with QCA6174
  2022-02-07 18:00 [Bug 215576] New: HSP/HFP mSBC profile broken with QCA6174 bugzilla-daemon
                   ` (20 preceding siblings ...)
  2022-07-04 15:55 ` bugzilla-daemon
@ 2022-07-05  9:30 ` bugzilla-daemon
  21 siblings, 0 replies; 25+ messages in thread
From: bugzilla-daemon @ 2022-07-05  9:30 UTC (permalink / raw)
  To: linux-bluetooth

https://bugzilla.kernel.org/show_bug.cgi?id=215576

--- Comment #20 from The Linux kernel's regression tracker (Thorsten Leemhuis) (regressions@leemhuis.info) ---
(In reply to Dmitry Nezhevenko from comment #19)
> I think that I've same problem with followed bluetooth adapter:

See the advice given in Comment 16 (and Comment 18, too) of this bug. In short:
best to report this by mail (or a new ticket).

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are the assignee for the bug.

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

end of thread, other threads:[~2022-07-05  9:31 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-07 18:00 [Bug 215576] New: HSP/HFP mSBC profile broken with QCA6174 bugzilla-daemon
2022-02-08  6:49 ` Thorsten Leemhuis
2022-02-08  6:49 ` [Bug 215576] " bugzilla-daemon
2022-02-09 17:27 ` bugzilla-daemon
2022-02-14 15:09 ` bugzilla-daemon
2022-02-18 14:15 ` bugzilla-daemon
2022-02-18 20:55   ` Luiz Augusto von Dentz
2022-02-18 20:55 ` bugzilla-daemon
2022-02-18 21:44   ` [Bug,215576] " bluez.test.bot
2022-02-26 15:03 ` [Bug 215576] " bugzilla-daemon
2022-02-26 15:31 ` bugzilla-daemon
2022-02-26 16:21 ` bugzilla-daemon
2022-02-27 17:00 ` bugzilla-daemon
2022-03-09 11:50 ` bugzilla-daemon
2022-03-29 20:21 ` bugzilla-daemon
2022-05-27 10:52 ` bugzilla-daemon
2022-05-27 22:59 ` bugzilla-daemon
2022-05-28  0:15 ` bugzilla-daemon
2022-05-30 11:12 ` bugzilla-daemon
2022-06-18 19:17 ` bugzilla-daemon
2022-06-19 16:46 ` bugzilla-daemon
2022-06-19 17:08 ` bugzilla-daemon
2022-06-19 17:47 ` bugzilla-daemon
2022-07-04 15:55 ` bugzilla-daemon
2022-07-05  9:30 ` bugzilla-daemon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).