Closed dibyanugraha closed 3 years ago
I noticed several custom roms had the same problems (?) from simple google search. I found some makefile includes libldacBT_dec in the PRODUCT_PACKAGE section -- it's missing here. Do we need specific vendor blob in order to build that?
Unfortunately, there is no official way to build libldacBT_dec
in either AOSP or LineageOS, and most devices do not have this lib in their vendor proprietary files. I also searched for it but got few valuable results (like this one). I have no Bluetooth TWS devices to have a test, and most custom ROMs on Mi-4c should have similar audio issues (especially after Android 10).
Is this problem also happened to normal wireless earphones? Also, could you try playing an audio file twice (start → stop rather than pause → play again) before connecting to TWS devices and continue playing?
Yes the problem persists in any case. If I start playing the audio using speaker, it plays normally, however when I paired the tws device, the audio from the speaker immediately stops, the tws automatically disconnects. It will reconnect eventually, but if I keep try play the audio again, it will disconnect again.
I think the link that you mention to Lineage gerrit is broken. Could you please take a look again?
Yes the problem persists in any case. If I start playing the audio using speaker, it plays normally, however when I paired the tws device, the audio from the speaker immediately stops, the tws automatically disconnects. It will reconnect eventually, but if I keep try play the audio again, it will disconnect again.
I think the link that you mention to Lineage gerrit is broken. Could you please take a look again?
Maybe some audio changes after Android 9 break the compatibility of the old vendor blobs on Mi-4c. At least, I remember that my device worked properly when connected to an old Bluetooth speaker using SBC codec. The link has been updated (there was an extra "." at the end).
Well it's indeed unfortunate if the problem is on the vendor's blob. But you could please create a test build where this is enabled?
https://gerrit.aicp-rom.com/c/AICP/device_htc_oce/+/97280
I saw similar patch is applied on sd660 tree (redmi note 5, whyred) and redmi-mt6768 (redmi note 9, merlin). If it's somehow "force" create that file -- although perhaps unusable, or broken -- at least we both know that maybe it's impossible to have BT audio on this post Android 9.
Well it's indeed unfortunate if the problem is on the vendor's blob. But you could please create a test build where this is enabled?
https://gerrit.aicp-rom.com/c/AICP/device_htc_oce/+/97280
I saw similar patch is applied on sd660 tree (redmi note 5, whyred) and redmi-mt6768 (redmi note 9, merlin). If it's somehow "force" create that file -- although perhaps unusable, or broken -- at least we both know that maybe it's impossible to have BT audio on this post Android 9.
There is no make target called libldacBT_dec
, so nothing will be built after all. I tried to add it to device.mk
and rebuilt the ROM, but I cannot find libldacBT_dec.so
in system partition (like picture).
I understand. Thanks for testing it. Really sorry for wasting your time. Anyway, since you mentioned it, I realized indeed the system audio decoder is broken. I play using Musicolet which has its own decoder. When it uses its own decoder, the audio plays. But when I switched to system decoder, it won't, no matter what I did. Same when I used the default Lineage music app, the audio won't play. I play aac/m4a file.
Describe the bug Bluetooth TWS device can not play audio (tested with Edifier X3). Bluetooth keeps disconnecting then reconnecting if audio forced to play (audio is automatically stopped)
To Reproduce Steps to reproduce the behavior: Pair TWS bluetooth audio device, play any audio using any music player (I used Musicolet), error occurred.
Expected behavior TWS paired bluetooth device play the audio without any problem.
Screenshots/Logs
logcat error
04-02 23:23:43.801 E/QTI PowerHAL(445): Failed to perform launch boost 04-02 23:23:44.169 E/Layer (464): [Surface(name=AppWindowToken{c8a8cc token=Token{20182ff ActivityRecord{6976a1e u0 com.pluscubed.matlog/com.pluscubed.logcat.ui.LogcatActivity t114}}})/@0x7003fc9 - animation-leash#0] No local sync point found 04-02 23:23:44.169 E/Layer (464): [Surface(name=AppWindowToken{c8a8cc token=Token{20182ff ActivityRecord{6976a1e u0 com.pluscubed.matlog/com.pluscubed.logcat.ui.LogcatActivity t114}}})/@0x7003fc9 - animation-leash#0] No local sync point found 04-02 23:23:44.169 E/Layer (464): [Surface(name=AppWindowToken{8c6c9c5 token=Token{37a183c ActivityRecord{b3e4a2f u0 com.android.launcher3/.lineage.LineageLauncher t96}}})/@0x3f076f2 - animation-leash#0] No local sync point found 04-02 23:23:44.169 E/Layer (464): [Surface(name=AppWindowToken{8c6c9c5 token=Token{37a183c ActivityRecord{b3e4a2f u0 com.android.launcher3/.lineage.LineageLauncher t96}}})/@0x3f076f2 - animation-leash#0] No local sync point found 04-02 23:23:46.356 E/QTI PowerHAL(445): Failed to perform launch boost 04-02 23:23:46.388 E/system_server(735): Invalid ID 0x00000000. 04-02 23:23:46.774 E/OMXNodeInstance(534): setConfig(0xf729a840:google.mp3.decoder, ConfigPriority(0x6f800002)) ERROR: Undefined(0x80001001) 04-02 23:23:46.787 E/Layer (464): [Surface(name=AppWindowToken{112516f token=Token{4a9ac4e ActivityRecord{cf23b49 u0 in.krosbits.musicolet/.MusicActivity t111}}})/@0x4c388b9 - animation-leash#0] No local sync point found 04-02 23:23:46.788 E/Layer (464): [Surface(name=AppWindowToken{112516f token=Token{4a9ac4e ActivityRecord{cf23b49 u0 in.krosbits.musicolet/.MusicActivity t111}}})/@0x4c388b9 - animation-leash#0] No local sync point found 04-02 23:23:46.788 E/Layer (464): [Surface(name=AppWindowToken{8c6c9c5 token=Token{37a183c ActivityRecord{b3e4a2f u0 com.android.launcher3/.lineage.LineageLauncher t96}}})/@0x3f076f2 - animation-leash#0] No local sync point found 04-02 23:23:46.788 E/Layer (464): [Surface(name=AppWindowToken{8c6c9c5 token=Token{37a183c ActivityRecord{b3e4a2f u0 com.android.launcher3/.lineage.LineageLauncher t96}}})/@0x3f076f2 - animation-leash#0] No local sync point found 04-02 23:23:46.957 E/WCNSS_FILTER(9666): wcnss_acquire_wakelock wake lock not initialized 04-02 23:23:47.273 F/libc (9624): Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0 in tid 9681 (bt_a2dp_source_), pid 9624 (droid.bluetooth) 04-02 23:23:47.285 F/libc (9948): failed to exec crash_dump helper: No such file or directory 04-02 23:23:47.299 F/libc (9624): crash_dump helper failed to exec 04-02 23:23:47.313 E/WCNSS_FILTER(9666): handle_command_writes: This indicates the close of other end 04-02 23:23:47.313 E/WCNSS_FILTER(9666): wcnss_filter client is terminated 04-02 23:23:47.313 E/WCNSS_FILTER(9666): clean Value = 0 04-02 23:23:47.314 E/WCNSS_FILTER(9666): wcnss_acquire_wakelock wake lock not initialized 04-02 23:23:47.314 E/bt_a2dp_hw(460): a2dp_ctrl_receive: receive control data failed: error(Connection reset by peer) 04-02 23:23:47.314 E/bt_a2dp_hw(460): a2dp_command: A2DP COMMAND A2DP_CTRL_GET_PRESENTATION_POSITION: no ACK 04-02 23:23:47.315 E/bt_a2dp_hw(460): skt_write: write failed with error(Broken pipe) 04-02 23:23:47.315 E/WCNSS_FILTER(9666): wcnss_release_wakelock wake lock not initialized 04-02 23:23:47.315 E/WCNSS_FILTER(9666): Done with this Life!!! 04-02 23:23:47.327 E/BluetoothManagerService(735): MESSAGE_BLUETOOTH_SERVICE_DISCONNECTED(2) 04-02 23:23:47.327 E/BluetoothManagerService(735): MESSAGE_BLUETOOTH_SERVICE_DISCONNECTED(1) 04-02 23:23:47.328 E/soundtrigger(460): audio_extn_sound_trigger_set_parameters: str_params NULL 04-02 23:23:47.329 E/BluetoothDevice(735): BT not enabled. Cannot get Bluetooth Class 04-02 23:23:47.329 E/BluetoothDevice(735): BT not enabled. Cannot get Remote Device name 04-02 23:23:47.330 E/BluetoothDevice(2092): BT not enabled. Cannot get bond state 04-02 23:23:47.330 E/BluetoothDevice(2092): BT not enabled. Cannot get bond state 04-02 23:23:47.330 E/soundtrigger(460): audio_extn_sound_trigger_set_parameters: str_params NULL 04-02 23:23:47.344 E/BluetoothDevice(4739): BT not enabled. Cannot get bond state 04-02 23:23:47.344 E/BluetoothDevice(4739): BT not enabled. Cannot get bond state 04-02 23:23:47.346 E/bt_a2dp_hw(460): skt_connect: failed to connect (Connection refused) 04-02 23:23:47.597 E/bt_a2dp_hw(460): skt_connect: failed to connect (Connection refused) 04-02 23:23:47.810 E/droid.bluetoot(9956): Not starting debugger since process cannot load the jdwp agent. 04-02 23:23:47.847 E/bt_a2dp_hw(460): skt_connect: failed to connect (Connection refused) 04-02 23:23:47.997 E/bt_btif_storage(9956): btif_storage_get_adapter_property: Controller not ready! Unable to return Bluetooth Address 04-02 23:23:47.997 E/BluetoothServiceJni(9956): adapter_properties_callback: Status 1 is incorrect 04-02 23:23:48.097 E/bt_a2dp_hw(460): a2dp_command: failure to open ctrl path: command=A2DP_CTRL_CMD_START 04-02 23:23:48.098 E/bt_a2dp_hw(460): start_audio_datapath: Audiopath start failed (status -1) 04-02 23:23:48.127 E/bt_a2dp_hw(460): skt_connect: failed to connect (Connection refused) 04-02 23:23:48.128 E/soundtrigger(460): audio_extn_sound_trigger_set_parameters: str_params NULL 04-02 23:23:48.377 E/bt_a2dp_hw(460): skt_connect: failed to connect (Connection refused) 04-02 23:23:48.629 E/bt_a2dp_hw(460): skt_connect: failed to connect (Connection refused) 04-02 23:23:48.879 E/bt_a2dp_hw(460): a2dp_command: failure to open ctrl path: command=A2DP_CTRL_CMD_START 04-02 23:23:48.879 E/bt_a2dp_hw(460): start_audio_datapath: Audiopath start failed (status -1) 04-02 23:23:48.884 E/soundtrigger(460): audio_extn_sound_trigger_set_parameters: str_params NULL 04-02 23:23:48.886 E/soundtrigger(460): audio_extn_sound_trigger_set_parameters: str_params NULL 04-02 23:23:48.902 E/bt_a2dp_hw(460): skt_connect: failed to connect (Connection refused) 04-02 23:23:48.904 E/soundtrigger(460): audio_extn_sound_trigger_set_parameters: str_params NULL 04-02 23:23:49.153 E/bt_a2dp_hw(460): skt_connect: failed to connect (Connection refused) 04-02 23:23:49.404 E/bt_a2dp_hw(460): skt_connect: failed to connect (Connection refused) 04-02 23:23:49.654 E/bt_a2dp_hw(460): a2dp_command: failure to open ctrl path: command=A2DP_CTRL_CMD_START 04-02 23:23:49.654 E/bt_a2dp_hw(460): start_audio_datapath: Audiopath start failed (status -1) 04-02 23:23:49.676 E/bt_a2dp_hw(460): skt_connect: failed to connect (Connection refused) 04-02 23:23:49.929 E/bt_a2dp_hw(460): skt_connect: failed to connect (Connection refused) 04-02 23:23:50.181 E/bt_a2dp_hw(460): skt_connect: failed to connect (Connection refused) 04-02 23:23:50.431 E/bt_a2dp_hw(460): a2dp_command: failure to open ctrl path: command=A2DP_CTRL_CMD_START 04-02 23:23:50.431 E/bt_a2dp_hw(460): start_audio_datapath: Audiopath start failed (status -1) 04-02 23:23:50.480 E/bt_a2dp_hw(460): skt_connect: failed to connect (Connection refused) 04-02 23:23:50.730 E/bt_a2dp_hw(460): skt_connect: failed to connect (Connection refused) 04-02 23:23:50.733 E/BluetoothManagerService(735): MESSAGE_TIMEOUT_BIND 04-02 23:23:50.982 E/bt_a2dp_hw(460): skt_connect: failed to connect (Connection refused) 04-02 23:23:51.232 E/bt_a2dp_hw(460): a2dp_command: failure to open ctrl path: command=A2DP_CTRL_CMD_STOP 04-02 23:23:51.232 E/bt_a2dp_hw(460): stop_audio_datapath: audiopath stop failed 04-02 23:23:51.336 E/audio_hw_extn(460): audio_extn_perf_lock_acquire: Incorrect params, Failed to acquire perf lock, err 04-02 23:23:51.364 E/bt_vendor(9956): Stopping HCI filter as part of CTRL:OFF 04-02 23:23:51.385 E/audio_hw_extn(460): audio_extn_perf_lock_release: Perf lock release error 04-02 23:23:52.050 E/WCNSS_FILTER(9998): main: open (/proc/sysrq-trigger) fail - Permission denied (13) 04-02 23:23:52.050 E/Diag_Lib(9998): Diag_LSM_Init: Failed to open handle to diag driver, error = 2 04-02 23:23:52.051 E/WCNSS_FILTER(9998): Failed to init diag 04-02 23:23:52.051 E/WCNSS_FILTER(9998): wcnss_wakelock_init Failed to open wakelock file 04-02 23:23:52.224 E/bt_vendor(9956): connect_to_local_socket: ACCEPT 04-02 23:23:52.224 E/bt_vendor(9956): connect_to_local_socket: Connection succeeded 04-02 23:23:52.225 E/WCNSS_FILTER(9998): wcnss_acquire_wakelock wake lock not initialized 04-02 23:23:52.352 E/bt_btif_storage(9956): btif_storage_get_adapter_property: Controller ready! 04-02 23:23:52.420 E/a2dp_vendor_ldac_decoder(9956): A2DP_VendorLoadDecoderLdac: cannot open LDAC decoder library libldacBT_dec.so: dlopen failed: library "libldacBT_dec.so" not found 04-02 23:23:52.420 E/a2dp_vendor_ldac(9956): init: cannot load the decoder 04-02 23:23:52.420 E/a2dp_vendor_ldac_decoder(9956): A2DP_VendorLoadDecoderLdac: cannot open LDAC decoder library libldacBT_dec.so: dlopen failed: library "libldacBT_dec.so" not found 04-02 23:23:52.420 E/a2dp_vendor_ldac(9956): init: cannot load the decoder 04-02 23:23:52.421 E/a2dp_vendor_ldac_decoder(9956): A2DP_VendorLoadDecoderLdac: cannot open LDAC decoder library libldacBT_dec.so: dlopen failed: library "libldacBT_dec.so" not found 04-02 23:23:52.421 E/a2dp_vendor_ldac(9956): init: cannot load the decoder 04-02 23:23:52.421 E/a2dp_vendor_ldac_decoder(9956): A2DP_VendorLoadDecoderLdac: cannot open LDAC decoder library libldacBT_dec.so: dlopen failed: library "libldacBT_dec.so" not found 04-02 23:23:52.421 E/a2dp_vendor_ldac(9956): init: cannot load the decoder 04-02 23:23:52.422 E/a2dp_vendor_ldac_decoder(9956): A2DP_VendorLoadDecoderLdac: cannot open LDAC decoder library libldacBT_dec.so: dlopen failed: library "libldacBT_dec.so" not found 04-02 23:23:52.422 E/a2dp_vendor_ldac(9956): init: cannot load the decoder 04-02 23:23:52.422 E/a2dp_vendor_ldac_decoder(9956): A2DP_VendorLoadDecoderLdac: cannot open LDAC decoder library libldacBT_dec.so: dlopen failed: library "libldacBT_dec.so" not found 04-02 23:23:52.422 E/a2dp_vendor_ldac(9956): init: cannot load the decoder 04-02 23:23:52.453 E/soundtrigger(460): audio_extn_sound_trigger_set_parameters: str_params NULL 04-02 23:23:52.453 E/audio_hw_hfp(460): stop_hfp: Could not find the usecase (14) in the list 04-02 23:23:52.500 E/PhoneInterfaceManager(2229): [PhoneIntfMgr] getEnvironment (please complete the following information):
Additional context No custom kernel, nor Xposed. Almost vanilla from scratch - clean flash, flash latest kernel, install magisk only to record log using MatLog.
Notes I noticed several custom roms had the same problems (?) from simple google search. I found some makefile includes libldacBT_dec in the PRODUCT_PACKAGE section -- it's missing here. Do we need specific vendor blob in order to build that?