Using onboard Digital Microphone with audio_i2s

Hi, I am currently outputting some audio (1000hz sine wave) via audio_i2s_blk_comp_cb_register and audio_i2s_set_next_buf (from audio_i2s.h) through the line out audio jack. My next step would be to capture sound from a microphone and play it back in real time. I noticed that the nrf5340 comes with a built-in microphone that can be initialized with the following:

LOG_INF("PDM turned on");
ret = cs47l63_comm_reg_conf_write(pdm_mic_enable_configure,
				  ARRAY_SIZE(pdm_mic_enable_configure));
if (ret) {
	return ret;
}

My question is how would I access the data from the built-in microphone? Is it through the rx_buf of audio_i2s_set_next_buf or something else entirely? Thanks!

Parents Reply Children
No Data
Related