[pulseaudio-discuss] bluetooth headset connection and disconnection status

Tanu Kaskinen tanuk at iki.fi
Tue May 1 08:33:03 UTC 2018


On Tue, 2018-05-01 at 10:00 +0900, Shinnosuke Suzuki wrote:
> Hi,
> 
> > Thank you for your advice.
> > I would like to use libpulse, but I couldn’t make it properly.
> > So I use parec/pacat command.
> > I'll get information from “pactl list cards”.
> 
> I could get status for bluetooth headset connection with pactl.
> But pactl command seems to use exclusion control, when I use pact/parec to send/recv voice packet, 
> pactl command stops voice packet of pact/parec only while executing pactl command.
> I confirmed parec pact and pactl with trace-cmd.

It's true that when the server processes the "list cards" command from
pactl, packets to/from parec/pacat are not processed during time, but
sending the card information shouldn't take a long time, so it sounds
strange that you'd observe audio drop-outs. Does your application
perhaps itself stop processing the audio to/from pacat/parec while it's
running pactl?

What latency parameters do you give to parec and pacat? If you increase
the latency, does that get rid of the audio drop-outs?

> I would like to implement monitoring bluetooth connection during the voice call with bluetooth headset.
> Is there any solution on this?
> Do I have to use pa_context_get_card_info_list of libpulse?

If the problem is at the server side, then using
pa_context_get_card_info_list() won't help, because that's what pactl
uses anyway. But I'm not sure if the problem is in the server or in
your application.

-- 
Tanu

https://liberapay.com/tanuk
https://www.patreon.com/tanuk


More information about the pulseaudio-discuss mailing list