<html><head><style>p{margin-top:0px;margin-bottom:0px;}</style></head><body><div style="font-size:13px; font-family:SimSun,serif;"><div style="font-variant-ligatures: normal; font-variant-caps: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial;"><span style="color: rgb(0, 0, 0); font-size: 13px; font-style: normal; font-weight: 400; font-family: Arial, sans-serif;">Hi pulseaudio community,</span></div><div style="font-variant-ligatures: normal; font-variant-caps: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial;"><span style="color: rgb(0, 0, 0); font-size: 13px; font-style: normal; font-weight: 400; font-family: Arial, sans-serif;"> I am a developer who want to use your 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.</span></div><div style="font-variant-ligatures: normal; font-variant-caps: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial;"><span style="color: rgb(0, 0, 0); font-size: 13px; font-style: normal; font-weight: 400; font-family: Arial, sans-serif;"> But what confuse me is that if my android device in mute the a2dp_source will disappear, when i play a music in my android device again, a new a2dp_source show up.This led to webrtc's AudioDeviceModule switch to a new audio device.</span><br><span style="color: rgb(0, 0, 0); font-size: 13px; font-style: normal; font-weight: 400; font-family: Arial, sans-serif;"> What could i do if i want to keep a2dp_source alive even there is no audio data transporting by bluetooth?</span></div><div style="font-variant-ligatures: normal; font-variant-caps: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial;"><span style="color: rgb(0, 0, 0); font-size: 13px; font-style: normal; font-weight: 400; font-family: Arial, sans-serif;"> I checked pulseaudio's log and find that after bluetooth transport state playing-> idle, your module-bluez5-device will shutdown related threads and free source.And i checked code of </span><span style="color: rgb(0, 0, 0); font-size: 13px; font-style: normal; font-weight: 400; font-family: Arial, sans-serif;">module-bluez5-device.c, if transport's state is </span><span style="color: rgb(0, 0, 0); font-family: Arial, sans-serif; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: pre; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; float: none; display: inline !important;">PA_BLUETOOTH_TRANSPORT_STATE_IDLE, it will set pa_card_profile_available to be </span><span style="color: rgb(36, 41, 46); font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: pre; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; float: none; display: inline !important;"><span style="color: rgb(0, 0, 0); font-family: Arial, sans-serif;">PA_AVAILABLE_UNKNOWN.</span><span style="color: rgb(0, 0, 0); font-family: Arial, sans-serif;">
</span></span><span style="color: rgb(0, 0, 0); font-family: Arial, sans-serif; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: pre; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; float: none; display: inline !important;"> I am not sure what will happen if i set pa_card_profile_available to be </span><span style="color: rgb(0, 0, 0); font-family: Arial, sans-serif; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: pre; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; float: none; display: inline !important;">PA_AVAILABLE_YES when pa transport state is </span><span style="color: rgb(0, 0, 0); font-family: Arial, sans-serif; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: pre; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; float: none; display: inline !important;">PA_BLUETOOTH_TRANSPORT_STATE_IDLE.</span></div><div style="font-variant-ligatures: normal; font-variant-caps: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial;"><span style="color: rgb(0, 0, 0); font-family: Arial, sans-serif; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: pre; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; float: none; display: inline !important;"> Will it led to any issue?Or maybe it could keep a2dp_source keep alive?
Could you please give me some help?I will be vary thankful.
By the way, i submitted a stack overflow question at here </span><a href="https://stackoverflow.com/questions/52384880/pulseaudio-a2dp-source-disappears-after-bluetooth-device-audio-stopped" target="_blank">https://stackoverflow.com/questions/52384880/pulseaudio-a2dp-source-disappears-after-bluetooth-device-audio-stopped</a></div></div></body></html><table style='display:none'><tr><td><img src="https://ack.mail.navercorp.com/readReceipt/notify/?img=R9KmaxgwKAKXKAtYaqumFxKmMoMlpxglaxKZMqK%2FFA%2B0FAF4Kqu%2FFxurtzFXp6UmKZl5W63474lcWNFlbX30WLloWrdQaXI9WHF0MBkv16YRpz0qMXkqbdIn1BFdbZl4b4k0pzkq1X3TbVlTb4b%3D.gif" border="0"/></td></tr></table>