arkq / bluez-alsa

Bluetooth Audio ALSA Backend
MIT License
864 stars 189 forks source link

Fix msbc on Realtek USB adapters #638

Closed borine closed 1 year ago

borine commented 1 year ago

Enables use of mSBC with Realtek USB adapters by applying a manufacturer-specific sco socket mtu value. This PR is a temporary measure until a more general mSBC over USB fix can be found (for example PR #550). See #637 for description of the problem being addressed.

Current BlueALSA sources result in silence being played, and bluealsa debug output shows D: ../../src/hci.c:150: USB adjusted SCO MTU: 28: 24. With this PR, audio is played correctly and bluealsa debug output shows D: ../../src/hci.c:150: USB adjusted SCO MTU: 28: 72

Fixes #637

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage has no change and project coverage change: -0.06 :warning:

Comparison is base (2709a34) 70.81% compared to head (8144e29) 70.76%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #638 +/- ## ========================================== - Coverage 70.81% 70.76% -0.06% ========================================== Files 48 48 Lines 8995 8999 +4 ========================================== - Hits 6370 6368 -2 - Misses 2625 2631 +6 ``` | [Impacted Files](https://app.codecov.io/gh/Arkq/bluez-alsa/pull/638?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Arkadiusz+Bokowy) | Coverage Δ | | |---|---|---| | [src/ba-transport.c](https://app.codecov.io/gh/Arkq/bluez-alsa/pull/638?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Arkadiusz+Bokowy#diff-c3JjL2JhLXRyYW5zcG9ydC5j) | `79.08% <0.00%> (ø)` | | | [src/bluealsa-config.c](https://app.codecov.io/gh/Arkq/bluez-alsa/pull/638?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Arkadiusz+Bokowy#diff-c3JjL2JsdWVhbHNhLWNvbmZpZy5j) | `100.00% <ø> (ø)` | | | [src/hci.c](https://app.codecov.io/gh/Arkq/bluez-alsa/pull/638?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Arkadiusz+Bokowy#diff-c3JjL2hjaS5j) | `3.70% <0.00%> (-0.20%)` | :arrow_down: | | [src/sco.c](https://app.codecov.io/gh/Arkq/bluez-alsa/pull/638?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Arkadiusz+Bokowy#diff-c3JjL3Njby5j) | `48.55% <0.00%> (ø)` | | ... and [1 file with indirect coverage changes](https://app.codecov.io/gh/Arkq/bluez-alsa/pull/638/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Arkadiusz+Bokowy)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.