[已解决] ESP32-Lyrat V4.3开发板,pipeline_a2dp_source_stream示例项目,蓝牙播放mp3时,声音速度过快
Posted: Sat Nov 20, 2021 4:28 pm
硬件环境:ESP32-Lyrat V4.3开发板
开发环境:
ESP-IDF:v4.4-dev-1447-g9d77aedcf
ESP-ADF:v2.2
1.直接使用pipeline_a2dp_source_stream示例项目来播放boot.mp3音频。在蓝牙耳机连接上后,音频可以播放,但是音频播放的速度比正常快很多;
2.测试了不同的mp3文件和不同的蓝牙耳机,发现还是快进播放;
3.同样的mp3文件,在play_mp3示例项目中,用耳麦或者喇叭方式,可以正常播放;
4.pipeline_bt_source示例项目,也是出现音频播放速度过快,感觉只要通过蓝牙耳机播放,都会如此;
在pipeline_a2dp_source_stream播放时,出现如下错误信息和告警信息
E (9558) BT_L2CAP: l2cab is_cong_cback_context
E (9588) BT_L2CAP: l2cab is_cong_cback_context
E (9608) BT_L2CAP: l2cab is_cong_cback_context
W (10918) FATFS_STREAM: No more data, ret:0
W (11938) BT_APPL: ### UNDERFLOW :: ONLY READ -2 BYTES OUT OF 512 ###
W (11938) BT_APPL: btc_media_aa_prep_sbc_2_send underflow 2, -2
W (11938) BLUETOOTH_SOURCE_EXAMPLE: [ * ] Bluetooth disconnected or suspended
E (11938) BT_APPL: bta_av_str_stopped:audio_open_cnt=1, p_data 0x3f807950
I (11948) BLUETOOTH_SOURCE_EXAMPLE: [ 7 ] Stop audio_pipeline
W (11958) BT_APPL: un-acked a2dp cmd: 3
E (11958) AUDIO_ELEMENT: [file] Element already stopped
W (11968) BT_APPL: ### UNDERFLOW :: ONLY READ -2 BYTES OUT OF 514 ###
E (11968) AUDIO_ELEMENT: [mp3] Element already stopped
W (11978) BT_APPL: btc_media_aa_prep_sbc_2_send underflow 14, -4
W (11988) AUDIO_PIPELINE: There are no listener registered
W (11988) BT_APPL: un-acked a2dp cmd: 3
W (11998) AUDIO_ELEMENT: [bt] Element has not create when AUDIO_ELEMENT_TERMINATE
W (11998) BT_APPL: Media task Scheduled after Suspend
W (12008) AUDIO_ELEMENT: [file] Element has not create when AUDIO_ELEMENT_TERMINATE
W (12018) AUDIO_ELEMENT: [mp3] Element has not create when AUDIO_ELEMENT_TERMINATE
W (12038) BT_AVCT: avct_lcb_last_ccb
W (12038) BT_AVCT: 0: aloc:1, lcb:0x3f80a494/0x3f80a494, ccb:0x3f80a4fc/0x3f80a4fc
W (12048) BT_AVCT: 1: aloc:0, lcb:0x0/0x3f80a494, ccb:0x3f80a514/0x3f80a4fc
W (12048) BT_AVCT: 2: aloc:0, lcb:0x0/0x3f80a494, ccb:0x3f80a52c/0x3f80a4fc
I (12068) BLUETOOTH_SOURCE_EXAMPLE: Device discovery failed, continue to discover...
I (12068) BLUETOOTH_SOURCE_EXAMPLE: Device discovery failed, continue to discover...
W (12078) BT_APPL: [0]: state:1, info:x0, avoid_rs 0
I (12088) BLUETOOTH_SOURCE_EXAMPLE: Discovery started.
W (13218) BT_L2CAP: L2CAP - PSM: 0x0019 not found for deregistration
W (13218) BT_L2CAP: L2CAP - PSM: 0x0017 not found for deregistration
W (13228) BT_L2CAP: L2CAP - PSM: 0x0019 not found for deregistration
W (13228) BT_L2CAP: L2CAP - PSM: 0x0017 not found for deregistration
W (13238) BT_L2CAP: L2CAP - PSM: 0x0019 not found for deregistration
W (13248) BT_L2CAP: L2CAP - PSM: 0x0017 not found for deregistration
请问如何解决?
开发环境:
ESP-IDF:v4.4-dev-1447-g9d77aedcf
ESP-ADF:v2.2
1.直接使用pipeline_a2dp_source_stream示例项目来播放boot.mp3音频。在蓝牙耳机连接上后,音频可以播放,但是音频播放的速度比正常快很多;
2.测试了不同的mp3文件和不同的蓝牙耳机,发现还是快进播放;
3.同样的mp3文件,在play_mp3示例项目中,用耳麦或者喇叭方式,可以正常播放;
4.pipeline_bt_source示例项目,也是出现音频播放速度过快,感觉只要通过蓝牙耳机播放,都会如此;
在pipeline_a2dp_source_stream播放时,出现如下错误信息和告警信息
E (9558) BT_L2CAP: l2cab is_cong_cback_context
E (9588) BT_L2CAP: l2cab is_cong_cback_context
E (9608) BT_L2CAP: l2cab is_cong_cback_context
W (10918) FATFS_STREAM: No more data, ret:0
W (11938) BT_APPL: ### UNDERFLOW :: ONLY READ -2 BYTES OUT OF 512 ###
W (11938) BT_APPL: btc_media_aa_prep_sbc_2_send underflow 2, -2
W (11938) BLUETOOTH_SOURCE_EXAMPLE: [ * ] Bluetooth disconnected or suspended
E (11938) BT_APPL: bta_av_str_stopped:audio_open_cnt=1, p_data 0x3f807950
I (11948) BLUETOOTH_SOURCE_EXAMPLE: [ 7 ] Stop audio_pipeline
W (11958) BT_APPL: un-acked a2dp cmd: 3
E (11958) AUDIO_ELEMENT: [file] Element already stopped
W (11968) BT_APPL: ### UNDERFLOW :: ONLY READ -2 BYTES OUT OF 514 ###
E (11968) AUDIO_ELEMENT: [mp3] Element already stopped
W (11978) BT_APPL: btc_media_aa_prep_sbc_2_send underflow 14, -4
W (11988) AUDIO_PIPELINE: There are no listener registered
W (11988) BT_APPL: un-acked a2dp cmd: 3
W (11998) AUDIO_ELEMENT: [bt] Element has not create when AUDIO_ELEMENT_TERMINATE
W (11998) BT_APPL: Media task Scheduled after Suspend
W (12008) AUDIO_ELEMENT: [file] Element has not create when AUDIO_ELEMENT_TERMINATE
W (12018) AUDIO_ELEMENT: [mp3] Element has not create when AUDIO_ELEMENT_TERMINATE
W (12038) BT_AVCT: avct_lcb_last_ccb
W (12038) BT_AVCT: 0: aloc:1, lcb:0x3f80a494/0x3f80a494, ccb:0x3f80a4fc/0x3f80a4fc
W (12048) BT_AVCT: 1: aloc:0, lcb:0x0/0x3f80a494, ccb:0x3f80a514/0x3f80a4fc
W (12048) BT_AVCT: 2: aloc:0, lcb:0x0/0x3f80a494, ccb:0x3f80a52c/0x3f80a4fc
I (12068) BLUETOOTH_SOURCE_EXAMPLE: Device discovery failed, continue to discover...
I (12068) BLUETOOTH_SOURCE_EXAMPLE: Device discovery failed, continue to discover...
W (12078) BT_APPL: [0]: state:1, info:x0, avoid_rs 0
I (12088) BLUETOOTH_SOURCE_EXAMPLE: Discovery started.
W (13218) BT_L2CAP: L2CAP - PSM: 0x0019 not found for deregistration
W (13218) BT_L2CAP: L2CAP - PSM: 0x0017 not found for deregistration
W (13228) BT_L2CAP: L2CAP - PSM: 0x0019 not found for deregistration
W (13228) BT_L2CAP: L2CAP - PSM: 0x0017 not found for deregistration
W (13238) BT_L2CAP: L2CAP - PSM: 0x0019 not found for deregistration
W (13248) BT_L2CAP: L2CAP - PSM: 0x0017 not found for deregistration
请问如何解决?