telegramdesktop / tdesktop

Telegram Desktop messaging app
https://desktop.telegram.org/
Other
26.26k stars 5.22k forks source link

Handsfree microphone isn't used after profile switch #25394

Closed dsseng closed 1 year ago

dsseng commented 1 year ago

Steps to reproduce

  1. Have PipeWire + WirePlumber setup with Bluetooth profile autoswitching enabled (default on current Fedora)
  2. Connect Bluetooth headphones
  3. Make a call
  4. Check audio connections

Expected behaviour

Telegram uses handsfree microphone (mono input stream)

Actual behaviour

Telegram listens for a stereo stream and gets routed to laptop internal stereo microphone. Needs to be manually switched to make use of headset mic

Operating system

Fedora 36 KDE

Version of Telegram Desktop

Flatpak 4.3.1

Installation source

Flatpak

Logs

Note: this might be needed to be resolved at PipeWire/WirePlumber side. If it is so, ask me.
ilya-fedin commented 1 year ago

Not quite sure, what should we do to fix this? Note we don't have pipewire API experts and are using a cross-platform audio library called OpenAL.

dsseng commented 1 year ago

Does Telegram explicitly ask for a stereo stream from microphone?

ilya-fedin commented 1 year ago

Here's what tdesktop asks OpenAL for: https://github.com/desktop-app/lib_webrtc/blob/9b11599c3c56047cfa4c68b69f1fcc93b602c33a/webrtc/details/webrtc_openal_adm.cpp#L526-L530 I don't know what OpenAL asks pipewire for actually though.

dsseng commented 1 year ago

MONO16. Thank you, I'll try to debug this and likely fix on PipeWire side. Probably this issue should be kept open to avoid duplicates.

ilya-fedin commented 1 year ago

It likely works via pulseaudio or jack compatibility layer (openal prefers jack whenever possible) as openal version in flatpak freedesktop runtime doesn't support pipewire natively

dsseng commented 1 year ago

Uses PA protocol for me

ilya-fedin commented 1 year ago

Probably this issue should be kept open to avoid duplicates.

People create duplicates even if the same issue is open and the latest in the list...

github-actions[bot] commented 1 year ago

Hey there!

This issue was inactive for a long time and will be automatically closed in 30 days if there isn't any further activity. We therefore assume that the user has lost interest or resolved the problem on their own.

Don't worry though; if this is an error, let us know with a comment and we'll be happy to reopen the issue.

Thanks!

dsseng commented 1 year ago

Appears to have been fixed