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
No Data
Reply
  • Thanks for sharing , but I've since abandoned Nordic's ecosystem.

    I repeatedly failed to accomplish every attempt at anything I tried; audio, radio, even display. It was so frustrating and demoralizing that I actually began to resent programming altogether, a singular satisfaction I've enjoyed since my youth.

    Rather than torture myself further at a time when my capacity for disappointment is already strained to the breaking point, I simply shelved my Audio DK and relegated it to the pile of regrettable purchases. I'm just not smart enough, and no matter how hard I studied, all of my inspired ideas remained beyond my reach.

    I'm glad you found my nrfadk-hello_codec repo helpful, and I've left it up on github so that other beginners might discover assistance where I was afforded absolutely none, but that's as far as I ever got before admitting defeat.

    Congratulations on your success, and I wish you well with your future endeavors.

Children
No Data
Related