Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
ropg opened this issue May 13, 2021 · 5 comments
Closed

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

ropg opened this issue May 13, 2021 · 5 comments
Labels
Type: New Feature New feature or request

Comments

@ropg
Copy link

ropg commented May 13, 2021

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)

@github-actions github-actions bot changed the title MCLK output by GPIO 0 not always desired MCLK output by GPIO 0 not always desired (AUD-3002) May 13, 2021
@HengYongChao
Copy link
Contributor

Hi @ropg

Thanks for your advice!

@jason-mao jason-mao added the Type: New Feature New feature or request label Feb 7, 2022
@felixcollins
Copy link

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
Copy link

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
Copy link

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

@jason-mao
Copy link
Collaborator

It fixed on 57282dd

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: New Feature New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants