esp-adf
esp-adf copied to clipboard
MCLK output by GPIO 0 not always desired (AUD-3002)
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)
Hi @ropg
Thanks for your advice!
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.
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)
Hello ADF Team? Is this ticket ever going to be assigned? If it is never getting fixed shall we close it?
It fixed on 57282dde2100ca98f4e48ee3daf8daa7d3406713