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

pwm_audio: is it possible to use for mono configurations? how? (AEGHB-936) #452

Closed
3 tasks done
doragasu opened this issue Jan 5, 2025 · 2 comments
Closed
3 tasks done

Comments

@doragasu
Copy link

doragasu commented Jan 5, 2025

Answers checklist.

  • I have read the documentation ESP-IDF Programming Guide and the issue is not addressed there.
  • I have updated my IDF branch (master or release) to the latest version and checked that the issue is present there.
  • I have searched the issue tracker for a similar issue and not found a similar issue.

General issue report

It is not clear in the documentation if this component supports mono configurations (with a single speaker). I only want to play mono wav files, and it is not clear if this is supported and if affirmative how should one configure this mode. Should I set bot L and R channels to the same GPIO? Should I set one to an invalid value (like -1)?

In the documentation and sources, there is enum pwm_audio_channel_t that has as a possible value PWM_AUDIO_CH_MONO, but I cannot see this enum used anywhere in the sources.

@github-actions github-actions bot changed the title pwm_audio: is it possible to use for mono configurations? how? pwm_audio: is it possible to use for mono configurations? how? (AEGHB-936) Jan 5, 2025
@YanKE01
Copy link
Contributor

YanKE01 commented Jan 6, 2025

Hi, @doragasu . Thank you very much for your interest in pwm_audio. If you are not using the left channel, you can set ledc_channel_left in pwm_audio_config_t to -1, and the same applies for the right channel.

@doragasu
Copy link
Author

doragasu commented Jan 7, 2025

Thanks for the clarification. Closing.

@doragasu doragasu closed this as completed Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants