Configuring I2S chip #647
Replies: 8 comments 2 replies
-
The I2SStream is only good enough if you use a DAC or ADC that does not need any software configuration. I suggest that you go thru the Hardware Wiki of the AudioTools to see the different options.
For audio chips that require a separate software driver the architecture of the AudioTools is to provide separate Stream classes: in your case this is the AudioKitStream. These classes all rely on separate Driver projects. In your case the AudioKit project: https://github.com/pschatzmann/arduino-audiokit
How to set up your AudioKit is described in the Readme: : If I got it right, your described pins match with option 5 which is set as default.
I suggest that you also read the documentation in the Wiki of the AudioKit to get more information about your board.
|
Beta Was this translation helpful? Give feedback.
-
Thanks a lot for your quick reply! So if I understand correctly, chips without I2C don't need any extra library and can just be hooked up to the I2S pins of the ESP and use the I2SStream class, chips that do have I2C/SPI communication require an extra library for the setup of the chip, and use the class from the library, otherwise it won't work. Of course I'm also reading the wiki, but it wasn't entirely clear to me if the extra library was mandatory or optional. |
Beta Was this translation helpful? Give feedback.
-
It's working by trial and error I selected
My guess would be that this should be set to Line In mode, but where can I do this in the library? |
Beta Was this translation helpful? Give feedback.
-
This is a known bug in the es8388 based AI Thinker boards: You can't deactivate the microphones... |
Beta Was this translation helpful? Give feedback.
-
Oh that’s quite sad. So the best solution to remove the clipping for now would be to add a voltage divider before the board line input to convert line signal from the record player to a mic signal? |
Beta Was this translation helpful? Give feedback.
-
When I am connecting devices via AUX and put up the volume of the input device, the input is usually so high that the microphone is not disturbing. The recommended solution if you have only a weak input signal is to desolder the microphones. ps. the AudioKit with the AC101 and LyraT boards (which also have a es8388) do not have this problem. |
Beta Was this translation helpful? Give feedback.
-
The mics are not really a problem now, the issue is that it seems to expect a mic level, so I assume it is increasing the gain with about +50dB, but I’m already giving it a line level so it’s clipping on the web stream. |
Beta Was this translation helpful? Give feedback.
-
So why don't you just change the input volume / gain ? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, I'm just starting with ESP32 audio. I'm struggling a bit with the setup of the audio chip. I want to (eventually) have whole house multiroom audio. I tried SqueezeliteESP32 which seems to work fine. Now I would like to see if I can convert the line signal from a phono preamp to an audio stream which can be opened in LMS.
For development I have the AI thinker development board with the A1S with the following pinout (copied from Squeezelite config):
model=ES8388,bck=27,ws=25,do=26,sda=33,scl=32,i2c=16
Now when trying to write the code for an audio stream I see there is also a audio kit library, do I need to use that or will the following example code also work?
Because I'm completely new to this topic and I2S I don't fully understand the difference between all kinds of chips and why this particular chip also has a lot of config options via I2C. I don't see any config for I2C in this code, but I also don't see I2C options in the audiokit library, so I'm a bit confused.
Eventually I'll make my own universal PCB with WROOM module and I2S DAC/ADC (which can either be configured as analog audio to network stream or as network (stream, Spotify, media server, etc.) to audio), probably without Chinese ES8388, but with something from Texas Instruments, so I would like to be able to just change some pins in code and have the same code running on my own board.
Beta Was this translation helpful? Give feedback.
All reactions