<div dir="ltr"><div><div><div>Dear Tanu,<br><br></div>Thank you for advice.<br><br></div>I didn't resolve my issue, but I got cause of error in stream callback in the <br></div><div>PA_STREAM_FAILED state.</div><div> pa_context_errno : Access denied<br></div> pa_context_errno(pa_stream_get_context) : Invalid argument<br><div>I got PA_STREAM_FAILED after PA_STREAM_CREATING in the stream callback.<br></div> <br><div><div><div><div><div><div class="gmail_extra">Best Regards,</div><div class="gmail_extra">Shinnosuke Suzuki<br></div><div class="gmail_extra"><div class="gmail_quote">Date: Wed, 11 Oct 2017 17:22:23 +0300<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
From: Tanu Kaskinen <<a href="mailto:tanuk@iki.fi">tanuk@iki.fi</a>><br>
To: General PulseAudio Discussion<br>
<<a href="mailto:pulseaudio-discuss@lists.freedesktop.org">pulseaudio-discuss@lists.<wbr>freedesktop.org</a>><br>
Subject: Re: [pulseaudio-discuss] Couldn't get stream from bluetooth<br>
headset<br>
Message-ID: <<a href="mailto:1507731743.7670.9.camel@iki.fi">1507731743.7670.9.camel@iki.<wbr>fi</a>><br>
Content-Type: text/plain; charset="UTF-8"<br>
<br>
On Wed, 2017-10-11 at 16:49 +0900, Shinnosuke Suzuki wrote:<br>
> Hi all,<br>
><br>
> I'm developing a phone app in OpenWrt with pulseaudio.<br>
><br>
> I couldn't get stream from bluetooth headset using asynchronous API.<br>
> I got PA_CONTEXT_READY with state callback, so I call<br>
> pa_stream_connect_record/pa_<wbr>stream_connect_playback with bluetooth<br>
> headset sink/source.<br>
> I couldn't error with this function, but I got PA_STREAM_FAILED in the each<br>
> of<br>
> the stream callbacks.<br>
><br>
> I got the voice data with pamon command with bluetoooth headset.<br>
> So I think I can connect bluetooth headset correctly.<br>
><br>
> Is there any clue to get cause of error PA_STREAM_FAILED?<br>
<br>
In the stream state callback, use pa_context_errno() to get the error<br>
code (and then you can use pa_strerror() to convert the error code to a<br>
string). Hopefully the error code will provide some hint. There were no<br>
hints in the server log.<br>
<br>
> I attached the pulseaudio log when I get to execute my program.<br>
> It seems that source/sink for bluetooth headset is suspending.<br>
<br>
It's normal that the headset sink and source are suspending if there<br>
are no streams connected to them.<br>
<br>
--<br>
Tanu<br>
<br>
<a href="https://www.patreon.com/tanuk" rel="noreferrer" target="_blank">https://www.patreon.com/tanuk</a><br>
<br>
<br></blockquote></div></div></div></div></div></div></div></div>