arkq / bluez-alsa

Bluetooth Audio ALSA Backend
MIT License
856 stars 188 forks source link

how can an SCO link be reestablished after it has been disconnected by the HF device? #699

Closed Sleepalltheday closed 1 month ago

Sleepalltheday commented 5 months ago

Problem

Reproduction steps

Setup

Additional context

bluealsa: D: io.c:46: BT socket disconnected: Connection reset by peer bluealsa: D: ba-transport.c:462: Closing BT socket duplicate [29]: 31 bluealsa: D: sco.c:504: IO loop: EXIT: sco_msbc_dec_thread: HFP Audio Gateway (mSBC) bluealsa: D: ba-transport.c:1983: Exiting IO thread [ba-sco-dec]: HFP Audio Gateway (mSBC) bluealsa: D: ba-transport.c:462: Closing BT socket duplicate [29]: 30 bluealsa: D: ba-transport.c:903: Releasing SCO link: 29 bluealsa: D: ba-transport.c:1983: Exiting IO thread [ba-sco-enc]: HFP Audio Gateway (mSBC)

Sleepalltheday commented 5 months ago

I found that opening the PCM channel can establish the SCO connection, so should I proceed with this approach?

borine commented 5 months ago

I found that opening the PCM channel can establish the SCO connection

When using BlueALSA, that is in fact the only way to establish the SCO connection. There is an example in the wiki of using bluealsa-rfcomm to simulate a phone transferring call audio to a hands-free device; see RFCOMM with HFP, or if you are using an ALSA application you can use a PCM plugin to take care of the rfcomm messages for you; see HFP AG Helper Plugin for BlueALSA

borine commented 1 month ago

closing due to lack of activity