Skip to content

Commit

Permalink
Update Line-Input.md
Browse files Browse the repository at this point in the history
Updated for WM8978/Puca DSP board with line-in
  • Loading branch information
troyhacks authored Nov 20, 2023
1 parent 1cf24ba commit 8eb7632
Showing 1 changed file with 31 additions and 2 deletions.
33 changes: 31 additions & 2 deletions docs/soundreactive/Line-Input.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ Looking to add line-in with I2S support? You might want to try I2S ADC boards th
* [CirrusLogic CS5343](https://www.cirrus.com/products/cs5343-44/)
* [AKM AK5720](https://www.akm.com/eu/en/products/audio/audio-adc/ak5720et/) ([datasheet](https://www.akm.com/content/dam/documents/products/audio/audio-adc/ak5720vt/ak5720vt-en-datasheet.pdf))
* [Ti PCM1808](https://www.ti.com/product/PCM1808) or [Ti PCM1802](https://www.ti.com/product/PCM1802)
* ES8388
* [ES8388](https://datasheet.lcsc.com/lcsc/1912111437_Everest-semi-Everest-Semiconductor-ES8388_C365736.pdf)
* [WM8978](https://www.mouser.com/datasheet/2/76/WM8978_v4.5-1141768.pdf)

Many I2S ADC boards expect an additional MCLK signal ("Main Clock" aka "System Clock" aka "Master Clock" aka "Memory Clock"). MCLK is sometimes labelled SCLK for "system clock". For these boards with 4 data pins, use our `Generic I2S with MCLK` input driver, and connect MCLK pin to GPIO pin 0, 1, or 3 on ESP32.

## Pmod I2S2
<img src="https://user-images.githubusercontent.com/91616163/197608486-cafcdf75-8039-4cb9-9d96-182d835c52c3.JPG" width="24%" height="24%" />
https://digilent.com/reference/pmod/pmodi2s2/start


##
<img src="https://user-images.githubusercontent.com/91616163/193432590-176d20e8-2432-4eca-86f9-86cda91aa873.jpg" width="40%" height="40%" /> &nbsp; &nbsp;

Expand Down Expand Up @@ -65,6 +65,8 @@ The on-board microphones are not currently supported - line-in is much better re
<img src="https://user-images.githubusercontent.com/91616163/193413239-e3fd9567-a64d-464c-bdc6-2a2ce69c0df5.png" width="40%" height="40%" />
Note: the underside of ESP32 overhang shows ESP32-A1S 2974

Line-in should be internally routed to line-out, allowing these boards to be used in the middle of a line-level signal path.

### Pin Config

The LyraT v4.3 and some AiThinker v2.2 boards use the following pin config:
Expand All @@ -88,3 +90,30 @@ Note: the underside of ESP32 overhang shows ESP32-A1S B221 and B238 on two board
* I2S MCLK = 0
* I2C SDA = 33
* I2C SCL = 32

## WM8978

This audio chip reqires I2C commands to initialize properly. "Line-in mode" has been hard-coded into the initialization and will be used when "WM8978" is selected.

The on-board microphones are not currently supported - line-in is much better regardless.

Support for the WM8978 chipset is derived from the [Puca DSP board](https://github.com/ohmic-net/puca_dsp):

![image](https://github.com/MoonModules/WLED-Docs/assets/5659019/a97d0ecc-a024-42c2-99f3-aef11c17ec35)

Curently the Puca DSP on-board microphones may leak some sound in extremely loud environments, but the line-in will overpower this signal when presented. This is being investigated.

Line-in should be internally routed to line-out, allowing this board to be used in the middle of a line-level signal path.

### Pin Config

The Puca DSP board pins are as follows:

* Type: WM8978
* I2S SD = 27
* I2S WS = 25
* I2S SCK = 23
* I2S MCLK = 0
* I2C SDA = 19 (set in global)
* I2C SCL = 18 (set in global)

0 comments on commit 8eb7632

Please sign in to comment.