芯片为ESP32,
A2DP发送音频流到
I2S从机,I2S流配置为
#define I2S_STREAM_CFG() {
.type = AUDIO_STREAM_WRITER,
.i2s_config = {
.mode = I2S_MODE_SLAVE | I2S_MODE_TX | I2S_MODE_RX,
.sample_rate = 44100,
.bits_per_sample = 32,
.channel_format = I2S_CHANNEL_FMT_RIGHT_LEFT,
.communica
tion_format = I2S_COMM_FORMAT_STAND_MSB,
.intr_alloc_flags = ESP_INTR_FLAG_LEVEL2 | ESP_INTR_FLAG_IRAM,
.dma_buf_count = 2,
.dma_buf_len = 256,
.tx_desc_auto_clear = true,
.use_apll = false,
.fixed_mclk = 0,
.mclk_multiple = 0,
},
.i2s_port = I2S_NUM_0,
.use_alc = false,
.volume = 0,
.out_rb_size = 4096,
.task_stack = 4096,
.task_core = 1,
.task_prio = 23,
.stack_in_ext = false,
.multi_out_num = 0,
.uninstall_drv = true,
.need_expand = true,
.expand_src_bits = 16,
}
左声道存在很严重的杂音,
将配置中修改
.channel_format = I2S_COMM_FORMAT_STAND_MSB,直接出错:
W (10580) BT_APPL: new conn_srvc id:19, app_id:1
W (11196) A2DP_STREAM: discard a2dp(0x3ffda894) sink pkt, A2DP_STREAM_QUEUE_SIZE value needs to be expanded
W (11203) A2DP_STREAM: discard a2dp(0x3ffda894) sink pkt, A2DP_STREAM_QUEUE_SIZE value needs to be expanded
W (11296) A2DP_STREAM: discard a2dp(0x3ffda894) sink pkt, A2DP_STREAM_QUEUE_SIZE value needs to be expanded
W (11302) A2DP_STREAM: discard a2dp(0x3ffda894) sink pkt, A2DP_STREAM_QUEUE_SIZE value needs to be expanded