Skip to content

How do I use the PCM1808 with this library? and is there a way to switch inputs? (e.g. switching from A2DP to the adc to act as an wired audio input) #1796

Answered by pschatzmann
AyceBenz asked this question in Q&A
Discussion options

You must be logged in to vote

As you can see in my Wiki, I have never used the PCM1818. So read it's datasheet so that you know how to use it!
Here are a couple of key points:

  • most likey it only supports 24 or 32 bits
  • you need to provide it a master clock (via GPIO0)
  • try to find out if it can be used in slave mode (with the ESP32 as master) which is more flexible. If not you need to set the ESP32 to slave mode and to the provided sample rate from the module
  • try to find out how to set the format: I suggest to prefer standard I2S which is used by default in my API, otherwise you need to define it when you configure I2S.

If you have one AudioSink and multiple sources, just make sure that only one of them can write!

And…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by pschatzmann
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants