[pulseaudio-discuss] Couldn't get stream from bluetooth headset

Tanu Kaskinen tanuk at iki.fi
Wed Oct 11 14:22:23 UTC 2017


On Wed, 2017-10-11 at 16:49 +0900, Shinnosuke Suzuki wrote:
> Hi all,
> 
> I'm developing a phone app in OpenWrt with pulseaudio.
> 
> I couldn't get stream from bluetooth headset using asynchronous API.
> I got PA_CONTEXT_READY with state callback, so I call
> pa_stream_connect_record/pa_stream_connect_playback with bluetooth
> headset sink/source.
> I couldn't error with this function, but I got PA_STREAM_FAILED in the each
> of
> the stream callbacks.
> 
> I got the voice data with pamon command with bluetoooth headset.
> So I think I can connect bluetooth headset correctly.
> 
> Is there any clue to get cause of error PA_STREAM_FAILED?

In the stream state callback, use pa_context_errno() to get the error
code (and then you can use pa_strerror() to convert the error code to a
string). Hopefully the error code will provide some hint. There were no
hints in the server log.

> I attached the pulseaudio log when I get to execute my program.
> It seems that source/sink for bluetooth headset is suspending.

It's normal that the headset sink and source are suspending if there
are no streams connected to them.

-- 
Tanu

https://www.patreon.com/tanuk


More information about the pulseaudio-discuss mailing list