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

Shinnosuke Suzuki suzukisn at gmail.com
Mon Oct 23 11:28:08 UTC 2017


I set the second parameter of pa_stream_connect_record with NULL.
I could get PA_STREAM READY in the stream callback!

OK
 pa_stream_connect_record(s, NULL, NULL, 0)

NG
 pa_stream_connect_record(s, source, NULL, 0)
  (source : bluez_source.00_14_BE_8A_7B_FE)

I got a problem, but I can't understand mechanism.
I checked the pactl like this:
root at OpenWrt:/opt/ipkt/lib# pactl info list
Server String: /var/run/pulse/native
Library Protocol Version: 30
Server Protocol Version: 30
Is Local: yes
Client Index: 3
Tile Size: 4056
User Name: pulse
Host Name: OpenWrt
Server Name: pulseaudio
Server Version: 6.0-dirty
Default Sample Specification: s16be 2ch 44100Hz
Default Channel Map: front-left,front-right
Default Sink: bluez_sink.00_14_BE_8A_7B_FE
Default Source: bluez_source.00_14_BE_8A_7B_FE
Cookie: e5ae:1788

I used the second parameter of pa_stream_connect_record as a
bluez_source.00_14_BE_8A_7B_FE.
This is a same value of default source.
What is the difference on this?

Best Regards,
Shinnnosuke Suzuki

2017-10-23 1:10 GMT+09:00 Tanu Kaskinen <tanuk at iki.fi>:

> On Sat, 2017-10-21 at 12:11 +0900, Shinnosuke Suzuki wrote:
> > Sorry for leading you to misunderstand.
> >
> > > Doesn't your compiler warn you about passing an argument of wrong type
> > > to pa_context_errno()? The function expects a pa_context object, but in
> > > the first case you're passing it a pa_stream object.
> >
> > I got warning in the first case, so I changed the code like this:
> >
> > switch(pa_stream_get_state(s)){
> > case PA_STREAM_FAILED:
> >   printf("%s\n, pa_strerror(pa_context_errno(
> pa_stream_get_context(s))));
> >
> > After that, I got error “Invalid argument”.
>
> Ok, then this is starting to look less strange. You're probably giving
> some bad argument to the pa_stream_connect_* functions.
>
> --
> Tanu
>
> https://www.patreon.com/tanuk
>



-- 
--
Shinnosuke Suzuki
E-mail : suzukisn at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/pulseaudio-discuss/attachments/20171023/8df01257/attachment-0001.html>


More information about the pulseaudio-discuss mailing list