<div dir="ltr"><div><div><div>In addition to that, I got message on dmesg when I execute program:<br><br>[329517.380000] input: 00:14:BE:8A:7B:FE as /devices/virtual/input/input3<br>[329521.980000] Bluetooth: hci0 SCO packet for unknown connection handle 65<br>[329522.000000] Bluetooth: hci0 SCO packet for unknown connection handle 65<br>[329522.020000] Bluetooth: hci0 SCO packet for unknown connection handle 65<br><br></div>So Pulseaudio seems to start SCO connection.</div><div><br></div>Best Regards,<br></div>Shinnosuke Suzuki<br><div><div><div><div class="gmail_extra"><div class="gmail_quote">2017-10-18 17:29 GMT+09:00 Shinnosuke Suzuki <span dir="ltr"><<a href="mailto:suzukisn@gmail.com" target="_blank">suzukisn@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Dear tanu,<span class=""><br><div><br>>Are the two pa_context pointers different? You should have just one<br>
>context.</div><div><br></div></span><div>Yes, I called function like this in the stream callback: (s : pa_stream *s)<br></div><div>switch(pa_stream_get_state){<br></div><div> case <span class="m_-3487435975155922979gmail-im">PA_STREAM_FAILED</span>:</div><div><span class="m_-3487435975155922979gmail-im"> </span><span class="m_-3487435975155922979gmail-im"><span class="m_-3487435975155922979gmail-im"> printf("%s\n, </span><span class="m_-3487435975155922979gmail-im"><span class="m_-3487435975155922979gmail-im">pa_strerror(</span>pa_context_errno(<wbr>s)); </span><span class="m_-3487435975155922979gmail-im"></span></span><span class="m_-3487435975155922979gmail-im"><br></span></div><div><span class="m_-3487435975155922979gmail-im"> printf("%s\n, pa_strerror(pa_context_errno(<wbr>pa_stream_get_context(s))));</span></div><div class="gmail_extra"><div class="gmail_extra"><span class="m_-3487435975155922979gmail-im">I check the argument, first one is wrong argument, so I got error "Invalid argument" in second printf().<br></span></div><div class="gmail_extra"><span class="m_-3487435975155922979gmail-im"><br></span></div><div class="gmail_extra"><span class="m_-3487435975155922979gmail-im">So, I have additional question.</span></div><div class="gmail_extra"><span class="m_-3487435975155922979gmail-im">I could call pa_stream_new, pa_stream_connect_record and </span><br><span class="m_-3487435975155922979gmail-im"><span class="m_-3487435975155922979gmail-im">pa_stream_connect_playback without error in context state callback with PA_CONTEXT_READY.<br></span></span></div><div class="gmail_extra"><span class="m_-3487435975155922979gmail-im"><span class="m_-3487435975155922979gmail-im">I think I can call these function correctly. I can't understand this process is "Invalid argument".<br></span></span></div><div class="gmail_extra"><span class="m_-3487435975155922979gmail-im">Is something coming up? <br></span></div><div class="gmail_extra"><span class="m_-3487435975155922979gmail-im"><br></span></div><span class="m_-3487435975155922979gmail-im">Best Regards,</span></div><div class="gmail_extra"><span class="m_-3487435975155922979gmail-im">Shinnosuke Suzuki</span><br></div><div class="gmail_extra"><div class="gmail_extra"><div><div class="h5"><div class="gmail_quote">2017-10-15 18:07 GMT+09:00 Tanu Kaskinen <span dir="ltr"><<a href="mailto:tanuk@iki.fi" target="_blank">tanuk@iki.fi</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="m_-3487435975155922979gmail-">On Sun, 2017-10-15 at 17:02 +0900, Shinnosuke Suzuki wrote:<br>
> Dear tanu,<br>
><br>
> > There can be only one error at a time, but here you list two errors. In<br>
> > what situations these errors happen?<br>
><br>
> I got two errors at the same point in the stream callback with a state<br>
> PA_STREAM_FAILED.<br>
> I got the errors by two ways, one is to call only pa_context_errno,<br>
> the other is to call pa_context_errno(pa_stream_get<wbr>_context()).<br>
<br>
</span>Are the two pa_context pointers different? You should have just one<br>
context.<br>
<span class="m_-3487435975155922979gmail-HOEnZb"><font color="#888888"><br>
--<br>
Tanu<br>
<br>
<a href="https://www.patreon.com/tanuk" rel="noreferrer" target="_blank">https://www.patreon.com/tanuk</a><br>
</font></span></blockquote></div><br><br clear="all"><br></div></div><span class="">-- <br><div class="m_-3487435975155922979gmail_signature">--<br>Shinnosuke Suzuki<br>E-mail : <a href="mailto:suzukisn@gmail.com" target="_blank">suzukisn@gmail.com</a></div>
</span></div></div></div>
</blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">--<br>Shinnosuke Suzuki<br>E-mail : <a href="mailto:suzukisn@gmail.com" target="_blank">suzukisn@gmail.com</a></div>
</div></div></div></div></div>