mirror of
https://github.com/sle118/squeezelite-esp32.git
synced 2025-12-09 21:17:18 +03:00
GPIO 7 might be used by error - release
This commit is contained in:
@@ -228,7 +228,7 @@ void output_init_i2s(log_level level, char *device, unsigned output_buf_size, ch
|
|||||||
char *dac_config = config_alloc_get_str("dac_config", CONFIG_DAC_CONFIG, "model=i2s,bck=" STR(CONFIG_I2S_BCK_IO)
|
char *dac_config = config_alloc_get_str("dac_config", CONFIG_DAC_CONFIG, "model=i2s,bck=" STR(CONFIG_I2S_BCK_IO)
|
||||||
",ws=" STR(CONFIG_I2S_WS_IO) ",do=" STR(CONFIG_I2S_DO_IO)
|
",ws=" STR(CONFIG_I2S_WS_IO) ",do=" STR(CONFIG_I2S_DO_IO)
|
||||||
",sda=" STR(CONFIG_I2C_SDA) ",scl=" STR(CONFIG_I2C_SCL)
|
",sda=" STR(CONFIG_I2C_SDA) ",scl=" STR(CONFIG_I2C_SCL)
|
||||||
",mute" STR(CONFIG_MUTE_GPIO));
|
",mute=" STR(CONFIG_MUTE_GPIO));
|
||||||
|
|
||||||
i2s_pin_config_t i2s_dac_pin, i2s_spdif_pin;
|
i2s_pin_config_t i2s_dac_pin, i2s_spdif_pin;
|
||||||
set_i2s_pin(spdif_config, &i2s_spdif_pin);
|
set_i2s_pin(spdif_config, &i2s_spdif_pin);
|
||||||
@@ -284,7 +284,7 @@ void output_init_i2s(log_level level, char *device, unsigned output_buf_size, ch
|
|||||||
char model[32] = "i2s";
|
char model[32] = "i2s";
|
||||||
if ((p = strcasestr(dac_config, "model")) != NULL) sscanf(p, "%*[^=]=%31[^,]", model);
|
if ((p = strcasestr(dac_config, "model")) != NULL) sscanf(p, "%*[^=]=%31[^,]", model);
|
||||||
if ((p = strcasestr(dac_config, "mute")) != NULL) {
|
if ((p = strcasestr(dac_config, "mute")) != NULL) {
|
||||||
char mute[8];
|
char mute[8] = "";
|
||||||
sscanf(p, "%*[^=]=%7[^,]", mute);
|
sscanf(p, "%*[^=]=%7[^,]", mute);
|
||||||
mute_control.gpio = atoi(mute);
|
mute_control.gpio = atoi(mute);
|
||||||
if ((p = strchr(mute, ':')) != NULL) mute_control.active = atoi(p + 1);
|
if ((p = strchr(mute, ':')) != NULL) mute_control.active = atoi(p + 1);
|
||||||
|
|||||||
Reference in New Issue
Block a user