esp-adf icon indicating copy to clipboard operation
esp-adf copied to clipboard

MCLK output by GPIO 0 not always desired (AUD-3002)

Open ropg opened this issue 3 years ago • 3 comments

components/audio_stream/i2s_stream.c hardcodes:

i2s_mclk_gpio_select(i2s->config.i2s_port, GPIO_NUM_0);

Some boards have no use for this signal or, worse, use this pin for something that does not like to get MCLK there instead. (Such is the case on the M5Stack Core device, see here for details.

Fortunately the i2s_mclk_gpio_select lives in the audio board code, so a custom board driver can replace this with a dummy function. Still weird to hardcode it like this.

(See also #617)

ropg avatar May 13 '21 11:05 ropg

Hi @ropg

Thanks for your advice!

HengYongChao avatar Jun 03 '21 02:06 HengYongChao

I ran into this too... https://www.esp32.com/viewtopic.php?f=20&t=29167&sid=88cdb8efb3afca9974eddca2dca965c0

It seems to me that the audio board layer should be built on top of the adf. Therefore i2s_stream should have no dependency on the audio board driver. My fix for this was to just duplicate the i2s_stream code, fix it and rename the public function so it does not clash. I'll rip it out when this bug is fixed.

felixcollins avatar Aug 26 '22 03:08 felixcollins

A backward compatible fix would be to add a function like this. audio_element_handle_t i2s_stream_init_with_pins(i2s_stream_cfg_t config, i2s_pin_config_t i2s_pin_cfg)

felixcollins avatar Aug 26 '22 04:08 felixcollins

Hello ADF Team? Is this ticket ever going to be assigned? If it is never getting fixed shall we close it?

felixcollins avatar Jun 06 '23 21:06 felixcollins

It fixed on 57282dde2100ca98f4e48ee3daf8daa7d3406713

jason-mao avatar Sep 05 '23 08:09 jason-mao