From b154f60e8eab3b2e16b56f0ee7e048ba787831f9 Mon Sep 17 00:00:00 2001 From: philippe44 Date: Sat, 26 Aug 2023 19:49:31 -0700 Subject: [PATCH 1/2] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 4e472b1a..e817d6d3 100644 --- a/README.md +++ b/README.md @@ -251,7 +251,7 @@ The NVS parameter "metadata_config" sets how metadata is displayed for AirPlay a - 'artwork' enables coverart display, if available (does not work for Bluetooth). The optional parameter indicates if the artwork should be resized (1) to fit the available space. Note that the built-in resizer can only do 2,4 and 8 downsizing, so fit is not optimal. The artwork will be placed at the right of the display for landscape displays and underneath the two information lines for others (there is no user option to tweak that). ### Infrared -You can use any IR receiver compatible with NEC protocol (38KHz). Vcc, GND and output are the only pins that need to be connected, no pullup, no filtering capacitor, it's a straight connection. +You can use any IR receiver compatible with NEC protocol (38KHz) or RC5. Vcc, GND and output are the only pins that need to be connected, no pullup, no filtering capacitor, it's a straight connection. The IR codes are send "as is" to LMS, so only a Logitech SB remote from Boom, Classic or Touch will work. I think the file Slim_Devices_Remote.ir in the "server" directory of LMS can be modified to adapt to other codes, but I've not tried that. @@ -275,7 +275,7 @@ The `` parameter set the GPIO associated to an IR receiver. No need to add p Syntax is: ``` -=Vcc|GND|amp[:1|0]|ir|jack[:0|1]|green[:0|1]|red[:0|1]|spkfault[:0|1][,] +=Vcc|GND|amp[:1|0]|ir[:nec|rc5]|jack[:0|1]|green[:0|1]|red[:0|1]|spkfault[:0|1][,] ``` You can define the defaults for jack, spkfault leds at compile time but nvs parameter takes precedence except for named configurations ((SqueezeAMP, Muse ...) where these are forced at runtime. **Note that gpio 36 and 39 are input only and cannot use interrupt. When set to jack or speaker fault, a 100ms polling checks their value but that's expensive** From ca7670f754a4562c473a25d28d3d58967fbadace Mon Sep 17 00:00:00 2001 From: wizmo2 Date: Sun, 27 Aug 2023 16:02:57 -0400 Subject: [PATCH 2/2] fix DAC config to add I2S (either 'I2S' or blank) (#293) Co-authored-by: Wizmo2 --- README.md | 2 +- components/platform_console/cmd_config.c | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index e817d6d3..114c4f8c 100644 --- a/README.md +++ b/README.md @@ -174,7 +174,7 @@ Default and only "host" is 1 as others are used already by flash and spiram. The ### DAC/I2S The NVS parameter "dac_config" set the gpio used for i2s communication with your DAC. You can define the defaults at compile time but nvs parameter takes precedence except for named configurations ``` -bck=,ws=,do=[,mck=0|1|2][,mute=[:0|1][,model=TAS57xx|TAS5713|AC101|I2S][,sda=,scl=[,i2c=]] +bck=,ws=,do=[,mck=0|1|2][,mute=[:0|1][,model=TAS57xx|TAS5713|AC101|WM8978|ES8388|I2S][,sda=,scl=[,i2c=]] ``` 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. diff --git a/components/platform_console/cmd_config.c b/components/platform_console/cmd_config.c index f4179dc9..e33d4f7e 100644 --- a/components/platform_console/cmd_config.c +++ b/components/platform_console/cmd_config.c @@ -712,7 +712,7 @@ static int do_i2s_cmd(int argc, char **argv) cmd_send_messaging(argv[0],MESSAGING_ERROR,"DAC Configuration is locked on this platform\n"); return 1; } - strcpy(i2s_dac_pin.model, "I2S"); + //strcpy(i2s_dac_pin.model, "I2S"); ESP_LOGD(TAG,"Processing i2s command %s with %d parameters",argv[0],argc); esp_err_t err=ESP_OK; @@ -1076,7 +1076,7 @@ static char * get_log_level_options(const char * longname){ // loop through dac_set and concatenate model name separated with | static char * get_dac_list(){ - const char * ES8388_MODEL_NAME = "ES8388|"; + const char * EXTRA_MODEL_NAMES = "ES8388|I2S"; char * dac_list=NULL; size_t total_len=0; for(int i=0;dac_set[i];i++){ @@ -1087,7 +1087,7 @@ static char * get_dac_list(){ break; } } - total_len+=strlen(ES8388_MODEL_NAME); + total_len+=strlen(EXTRA_MODEL_NAMES); dac_list = malloc_init_external(total_len+1); if(dac_list){ for(int i=0;dac_set[i];i++){ @@ -1099,7 +1099,7 @@ static char * get_dac_list(){ break; } } - strcat(dac_list,ES8388_MODEL_NAME); + strcat(dac_list,EXTRA_MODEL_NAMES); } return dac_list; } @@ -1270,7 +1270,7 @@ static void register_cspot_config(){ } #endif static void register_i2s_config(void){ - i2s_args.model_name = arg_str1(NULL,"model_name",STR_OR_BLANK(get_dac_list()),"DAC Model Name"); + i2s_args.model_name = arg_str0(NULL,"model_name",STR_OR_BLANK(get_dac_list()),"DAC Model Name"); i2s_args.clear = arg_lit0(NULL, "clear", "Clear configuration"); i2s_args.clock = arg_int0(NULL,"clock","","Clock GPIO. e.g. 33"); i2s_args.wordselect = arg_int0(NULL,"wordselect","","Word Select GPIO. e.g. 25");