From ffb79e1e8ca26ee4dcbbf98b4dd37735e6a6f705 Mon Sep 17 00:00:00 2001 From: philippe44 Date: Wed, 11 Oct 2023 15:36:21 -0700 Subject: [PATCH] Update README.md --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 264ce47e3..bf05f9ec8 100644 --- a/README.md +++ b/README.md @@ -187,7 +187,7 @@ bck=,ws=,do=[,mck=0|1|2][,mute=[:0|1][,model=TAS57xx|TAS ``` 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). By default GPIO0 is used as MCLK and only recent builds (post mid-2023) can use 1 or 2. Also 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 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, speaker and headset on and off using a JSON syntax: ```json { : [ {"reg":,"val":,"mode":|"or"|"and"}, ... {{"reg":,"val":,"mode":|"or"|"and"} ], : [ {"reg":,"val":,"mode":|"or"|"and"}, ... {{"reg":,"val":,"mode":|"or"|"and"} ], @@ -197,6 +197,8 @@ Where `` is one of init, poweron, poweroff, speakeron, speakeroff, head This is standard JSON notation, so if you are not familiar with it, Google is your best friend. Be aware that the '...' means you can have as many entries as you want, it's not part of the syntax. Every section is optional, but it does not make sense to set i2c in the 'dac_config' parameter and not setting anything here. The parameter 'mode' allows to *or* the register with the value or to *and* it. Don't set 'mode' if you simply want to write. The 'val parameter can be an array [v1, v2,...] to write a serie of bytes in a single i2c burst (in that case 'mode' is ignored). **Note that all values must be decimal**. You can use a validator like [this](https://jsonlint.com) to verify your syntax +The 'power' command is used when powering on/off the DAC after the idle period (see -C option of squeezelite) and the 'speaker/headset' commands are sent when switching between speakers and headsets (see headset jack detection). + NB: For named configurations ((SqueezeAMP, Muse ... all except I2S), all this is ignored. For know codecs, the built-in sequences can be overwritten using dac_controlset **Please note that you can not use the same GPIO or port as the I2C.**