arkq / bluez-alsa

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

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

Closed Sleepalltheday closed 3 months ago

Sleepalltheday commented 6 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 6 months ago

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

borine commented 6 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 3 months ago

closing due to lack of activity