FS#73888 - [pulseaudio-bluetooth] No sound from headphones after upgrading to 15.0-3

Attached to Project: Arch Linux
Opened by Alexander Lyashuk (crem) - Saturday, 19 February 2022, 13:50 GMT
Last edited by Jan Alexander Steffens (heftig) - Wednesday, 23 February 2022, 03:35 GMT
Task Type Bug Report
Category Packages: Testing
Status Closed
Assigned To Jan Alexander Steffens (heftig)
David Runge (dvzrv)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

After upgrading [pulseaudio-bluetooth] [pulseaudio] [libpulse] to 15.0-3, no sound comes out of my bluetooth headphones anymore.

- The headphones are successfully paired/connected (in blueman-manager)
- pavucontrol correctly shows the headphones as the sink, and when the sound is supposed to happen, the VU meter line jumps as it should. I also checked that volume sliders are correct and nothing is muted.
- When I route sound to other devices (non-bluetooth, ordinary sound output rather than bluetooth headphones), sound works.
- Headphones model is SONY WH-1000XM4.

Rolling back to 15.0-2 resolves the issue.


pulseaudio-bluetooth 15.0-3
pulseaudio 15.0-3
libpulse 15.0-3

Will be glad to provide logs if needed.
This task depends upon

Closed by  Jan Alexander Steffens (heftig)
Wednesday, 23 February 2022, 03:35 GMT
Reason for closing:  Fixed
Additional comments about closing:  15.0-4
Comment by Marcell Meszaros (MarsSeed) - Saturday, 19 February 2022, 19:08 GMT
While your headphone is connected via Bluetooth, what are the outputs of the following two commands for you?

LANG=C pactl list cards | grep 'Name: bluez_card' | sed -E 's|^.*Name: (bluez_card.*)|\1|' | xargs -I % pactl send-message /card/%/bluez list-codecs

LANG=C pactl list cards | grep 'Name: bluez_card' | sed -E 's|^.*Name: (bluez_card.*)|\1|' | xargs -I % pactl send-message /card/%/bluez get-codec
Comment by Alexander Lyashuk (crem) - Saturday, 19 February 2022, 19:21 GMT
With 15.0-2:

~ $ LANG=C pactl list cards | grep 'Name: bluez_card' | sed -E 's|^.*Name: (bluez_card.*)|\1|' | xargs -I % pactl send-message /card/%/bluez list-codecs
[{"name":"sbc","description":"SBC"},{"name":"sbc_xq_453","description":"SBC XQ 453kbps"},{"name":"sbc_xq_512","description":"SBC XQ 512kbps"},{"name":"sbc_xq_552","description":"SBC XQ 552kbps"}]

~ $ LANG=C pactl list cards | grep 'Name: bluez_card' | sed -E 's|^.*Name: (bluez_card.*)|\1|' | xargs -I % pactl send-message /card/%/bluez get-codec
"sbc"


With 15.0-3:

~ $ LANG=C pactl list cards | grep 'Name: bluez_card' | sed -E 's|^.*Name: (bluez_card.*)|\1|' | xargs -I % pactl send-message /card/%/bluez list-codecs
[{"name":"sbc","description":"SBC"},{"name":"sbc_xq_453","description":"SBC XQ 453kbps"},{"name":"sbc_xq_512","description":"SBC XQ 512kbps"},{"name":"sbc_xq_552","description":"SBC XQ 552kbps"},{"name":"ldac_hq","description":"LDAC (High Quality)"},{"name":"ldac_sq","description":"LDAC (Standard Quality)"},{"name":"ldac_mq","description":"LDAC (Mobile Quality)"}]

~ $ LANG=C pactl list cards | grep 'Name: bluez_card' | sed -E 's|^.*Name: (bluez_card.*)|\1|' | xargs -I % pactl send-message /card/%/bluez get-codec
"ldac_hq"
Comment by Alexander Lyashuk (crem) - Saturday, 19 February 2022, 19:43 GMT
Sounds like a bug in upstream/hardware, same headphones: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/1124

If you think it's indeed the case, I assume this bug report can be closed..
Comment by Marcell Meszaros (MarsSeed) - Saturday, 19 February 2022, 19:50 GMT
Could you try to run the following with 15.0-3 and test if you still don't have sound?
(It will switch the codec from the autoselected "ldac_hq" to "ldac_sq".)

LANG=C pactl list cards | grep 'Name: bluez_card' | sed -E 's|^.*Name: (bluez_card.*)|\1|' | xargs -I % pactl send-message /card/%/bluez switch-codec '"ldac_sq"'

If still no sound, try the following (switch to "ldac_mq") ('Mobile Quality', supposedly the least good):

LANG=C pactl list cards | grep 'Name: bluez_card' | sed -E 's|^.*Name: (bluez_card.*)|\1|' | xargs -I % pactl send-message /card/%/bluez switch-codec '"ldac_mq"'

And if still no sound, or if sound quality is bad, you can switch to SBC codec used by PulseAudio 15.0-2:

LANG=C pactl list cards | grep 'Name: bluez_card' | sed -E 's|^.*Name: (bluez_card.*)|\1|' | xargs -I % pactl send-message /card/%/bluez switch-codec '"sbc"'


Please kindly report back your result(s) about which command enables your headphone to play sound.
Comment by Alexander Lyashuk (crem) - Saturday, 19 February 2022, 20:02 GMT
Thanks for your help in debugging the issue.

I don't have any sound with any of "ldac_hq", "ldaq_sq", "ldac_mq", only switching to "sbc" helps (for completenes: "sbc_xq_453", "sbc_xq_512" and "sbc_xq_552" also work).
Comment by Marcell Meszaros (MarsSeed) - Saturday, 19 February 2022, 20:05 GMT
LDAC support in GStreamer indeed can be the culprit.

Meanwhile, I think you could use your headphone with the "sbc" codec, or with a higher-quality variant like "sbc_xq_512" or "sbc_xq_552", e.g.:

LANG=C pactl list cards | grep 'Name: bluez_card' | sed -E 's|^.*Name: (bluez_card.*)|\1|' | xargs -I % pactl send-message /card/%/bluez switch-codec '"sbc_xq_512"'
Comment by Marcell Meszaros (MarsSeed) - Saturday, 19 February 2022, 20:34 GMT
TLDR for @devs:

pulseaudio-bluetooth 15.0-3: upstream issue: no audio when using LDAC codecs with some headphones (e.g. Sony XM4)
Comment by Alexander Lyashuk (crem) - Sunday, 20 February 2022, 12:24 GMT
FYI I revived the pulseaudio issue https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/1124, and it looks like they already have a patch which did fix a problem for me.
Comment by Marcell Meszaros (MarsSeed) - Sunday, 20 February 2022, 14:33 GMT
@crem Nice work! So it turns out this is an "upstream+" issue.
PulseAudio uses GStreamer for LDAC. GStreamer creates a not fully LDAC-conformant RTP header.

The PulseAudio patch* works around that GStreamer issue by bypassing GStreamer rtpldacpay element when sending LDAC payload.
(* patch linked by PA dev @igor.v.kovalenko in this comment: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/1124#note_1265866 )

Not sure what's the best course of action for Arch. The patch fixes the issue but currently it is not part of a Merge Request.

Though as pulseaudio-bluetooth 15.0-3 is in Testing, I'd apply the fix for now and let testers try it.
Seems completely safe to add this patch since it only changes one PulseAudio file specific to Bluetooth GStreamer LDAC codec usage:
"src/modules/bluetooth/a2dp-codec-ldac-gst.c"
Comment by Jan Alexander Steffens (heftig) - Sunday, 20 February 2022, 16:35 GMT
I would prefer to patch GStreamer instead of hacking around the problem in PulseAudio.
Comment by Alexander Lyashuk (crem) - Tuesday, 22 February 2022, 09:03 GMT
FYI they have merged the workaround patch to pulseaudio, https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/689

Loading...