Ask for help about pulseaudio bluez-device module

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi pulseaudio community,
â??
I am a developer who want to use module-bluez-device to transport my android devices' audio data to linux server.And i already did it, i could use webrtc native lib to capture the a2dp_source's audio data.
â??
â??But what confuse me is that when bluetooth transport state change from playing to idle, a2dp_source will disappear, which led to webrtc's audio device capture module change to use another sound device like microphone of my linux server.
â??
And if bluetooth state change from idle to playing(play a music on the android), a new a2dp_source show up, but webrtc's audio capture module wouldn't change to use the new a2dp_source, that is my problem.
â??
When i connect to my android device, and execute pactl list sources, a2dp_source state is SUSPENDED and id is 96(Source #96).
â??
Then i play a music in my android, the a2dp_source state change to RUNNING.

After that i stop music in my android, the a2dp_source state will keep for maybe 3 seconds, and finally disappear.
â??
If i play music in my android again, a new a2dp_source show up with id 98 and state is RUNING.

I tracked the invoke stack after bluez transport state changing from playing to idle.

PA_BLUETOOTH_HOOK_TRANSPORT_STATE_CHANGED(playing to idle)â??
â??
pa_card_profile_set_available(cp, PA_AVAILABLE_UNKNOWN)[module-bluez5-device.c]
â??
profile_available_hook_callback[module-bluetooth-policy.c]
â??
find_best_profile[module-bluetooth-policy.c]
if (card->active_profile.available == PA_AVAILABLE_UNKNOWN && anyotherProfile.available == PA_AVAILABLE_YES) {
//change to anyotherProfile
}
At here,anyotherProfile = off
â??
set_profile_cb & stop_thread [module-bluez5-device.c]
â??
a2dp_source disappear

If i am right, what resolution do you think is best should i take?


Best regards,
Yang Chen

Sent from YoMail for Gmail
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/pulseaudio-discuss/attachments/20180921/0fd26513/attachment.html>


[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux