Skip to content

Add support for lyrat mini v1.2 and es8311 #165

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

Open
wants to merge 1 commit into
base: master-cmake
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,21 @@ XMT - 3.3V

Use the `squeezelite-esp32-I2S-4MFlash-sdkconfig.defaults` configuration file.

### ESP32 LyraT Mini v1.2

This board is one of the [audio developpement board](https://docs.espressif.com/projects/esp-adf/en/latest/design-guide/dev-boards/get-started-esp32-lyrat-mini.html) designed by espressif for their ESP-ADF (Espressif Audio Development Framework). It uses ESP32-WROVER-E as it core and ES8311 as DAC.
A jack connector can be used or an HP output.
It also contains 2 LEDS (one green, one blue) and 8 Buttons. Those buttons are not supported for now.
An ADC is also present on the board, but not used in squeezelite use case.

As for now, audio playback and LEDs are working.

Use the `squeezelite-esp32-I2S-4MFlash-sdkconfig.defaults` configuration file.

- i2c_config: `scl=25,sda=18,speed=400000,port=1`
- dac_config: `model=es8311,bck=5,ws=25,do=26,sda=18,scl=23,i2c=24`
- set_GPIO: `22=green,27=red,19=jack`

### SqueezeAmpToo !

And the super cool project https://github.com/rochuck/squeeze-amp-too
Expand Down Expand Up @@ -183,7 +198,7 @@ bck=<gpio>,ws=<gpio>,do=<gpio>[,mck][,mute=<gpio>[:0|1][,model=TAS57xx|TAS5713|A
```
if "model" is not set or is not recognized, then default "I2S" is used. The option "mck" is used for some codecs that require a master clock (although they should not). Only GPIO0 can be used as MCLK and be aware that this cannot coexit with RMII Ethernet (see ethernet section below). I2C parameters are optional and only needed if your DAC requires an I2C control (See 'dac_controlset' below). Note that "i2c" parameters are decimal, hex notation is not allowed.

So far, TAS57xx, TAS5713, AC101, WM8978 and ES8388 are recognized models where the proper init sequence/volume/power controls are sent. For other codecs that might require an I2C commands, please use the parameter "dac_controlset" that allows definition of simple commands to be sent over i2c for init, power, speakder and headset on and off using a JSON syntax:
So far, TAS57xx, TAS5713, AC101, WM8978, ES8388 and ES8311 are recognized models where the proper init sequence/volume/power controls are sent. For other codecs that might require an I2C commands, please use the parameter "dac_controlset" that allows definition of simple commands to be sent over i2c for init, power, speakder and headset on and off using a JSON syntax:
```json
{ <command>: [ {"reg":<register>,"val":<value>,"mode":<nothing>|"or"|"and"}, ... {{"reg":<register>,"val":<value>,"mode":<nothing>|"or"|"and"} ],
<command>: [ {"reg":<register>,"val":<value>,"mode":<nothing>|"or"|"and"}, ... {{"reg":<register>,"val":<value>,"mode":<nothing>|"or"|"and"} ],
Expand Down
14 changes: 14 additions & 0 deletions components/squeezelite/external/dac_external.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,23 @@ static struct {
{\"reg\":26,\"val\":0}, {\"reg\":27,\"val\":0}, {\"reg\":25,\"val\":50}, {\"reg\":38,\"val\":0}, \
{\"reg\":39,\"val\":184}, {\"reg\":42,\"val\":184}, {\"reg\":46,\"val\":30}, {\"reg\":47,\"val\":30}, \
{\"reg\":48,\"val\":30}, {\"reg\":49,\"val\":30}, {\"reg\":2,\"val\":170}]}" },
{ "es8311", true,
"{\"init\":[ \
{\"reg\":1,\"val\":48}, {\"reg\":2,\"val\":0}, {\"reg\":3,\"val\":16}, {\"reg\":22,\"val\":36}, \
{\"reg\":4,\"val\":16}, {\"reg\":5,\"val\":0}, {\"reg\":11,\"val\":0}, {\"reg\":12,\"val\":0}, \
{\"reg\":16,\"val\":31}, {\"reg\":17,\"val\":127}, {\"reg\":0,\"val\":128}, {\"reg\":0,\"val\":128}, \
{\"reg\":1,\"val\":63}, {\"reg\":1,\"val\":63}, {\"reg\":2,\"val\":0}, {\"reg\":5,\"val\":0}, \
{\"reg\":3,\"val\":16}, {\"reg\":4,\"val\":16}, {\"reg\":7,\"val\":0}, {\"reg\":8,\"val\":255}, \
{\"reg\":6,\"val\":3}, {\"reg\":1,\"val\":63}, {\"reg\":6,\"val\":3}, {\"reg\":19,\"val\":16}, \
{\"reg\":27,\"val\":10}, {\"reg\":28,\"val\":106}, {\"reg\":9,\"val\":12}, {\"reg\":10,\"val\":12}, \
{\"reg\":9,\"val\":12}, {\"reg\":10,\"val\":12}, {\"reg\":50,\"val\":178}, {\"reg\":9,\"val\":12}, \
{\"reg\":10,\"val\":12}, {\"reg\":23,\"val\":191}, {\"reg\":14,\"val\":2} ,{\"reg\":18,\"val\":0}, \
{\"reg\":20,\"val\":26}, {\"reg\":20,\"val\":26}, {\"reg\":13,\"val\":1}, {\"reg\":21,\"val\":64}, \
{\"reg\":55,\"val\":72}, {\"reg\":69,\"val\":0}, {\"reg\":50,\"val\":200}]}" },
{ NULL, false, NULL }
};


/****************************************************************************************
* init
*/
Expand Down