mirror of
https://github.com/sle118/squeezelite-esp32.git
synced 2025-12-11 14:07:11 +03:00
porting master changes
There is a divergence in accessors.c that I've not resolved
This commit is contained in:
@@ -21,6 +21,7 @@ menu "Squeezelite-ESP32"
|
||||
help
|
||||
Set logging level info|debug|sdebug
|
||||
endmenu
|
||||
|
||||
config JACK_LOCKED
|
||||
bool
|
||||
config BAT_LOCKED
|
||||
@@ -33,59 +34,109 @@ menu "Squeezelite-ESP32"
|
||||
bool
|
||||
config SPKFAULT_LOCKED
|
||||
bool
|
||||
menu "Audio Output"
|
||||
choice OUTPUT_TYPE
|
||||
prompt "Output Type"
|
||||
default BASIC_I2C_BT
|
||||
help
|
||||
Type of hardware platform
|
||||
config SQUEEZEAMP
|
||||
bool "SqueezeAMP"
|
||||
select JACK_LOCKED
|
||||
select BAT_LOCKED
|
||||
select I2C_LOCKED
|
||||
select SPDIF_LOCKED
|
||||
select LED_LOCKED
|
||||
select SPKFAULT_LOCKED
|
||||
config A1S
|
||||
bool "ESP32-A1S module"
|
||||
select I2C_LOCKED
|
||||
config BASIC_I2C_BT
|
||||
bool "Generic I2S & Bluetooth"
|
||||
endchoice
|
||||
|
||||
menu "DAC I2S settings"
|
||||
config MUTE_GPIO_LEVEL
|
||||
int
|
||||
default 0
|
||||
|
||||
# AGGREGATES - begin
|
||||
# these parameters are "aggregates" that take precedence. The must have a default value
|
||||
config DAC_CONFIG
|
||||
string
|
||||
default "model=TAS57xx,bck=33,ws=25,do=32,sda=27,scl=26,mute=14:0" if SQUEEZEAMP
|
||||
default "model=AC101,bck=27,ws=26,do=25,di=35,sda=33,scl=32" if A1S
|
||||
default "model=I2S,bck=26,ws=25,do=33,i2c=106,sda=21,scl=22" if TWATCH2020
|
||||
default ""
|
||||
config SPDIF_CONFIG
|
||||
string
|
||||
default "bck=33,ws=25,do=15" if SQUEEZEAMP
|
||||
default ""
|
||||
config SPI_CONFIG
|
||||
string
|
||||
default "dc=27,data=19,clk=18" if TWATCH2020
|
||||
default ""
|
||||
config DISPLAY_CONFIG
|
||||
string
|
||||
default "SPI,driver=ST7789,width=240,height=240,cs=5,back=12,speed=16000000,HFlip,VFlip" if TWATCH2020
|
||||
default ""
|
||||
config DAC_CONTROLSET
|
||||
string
|
||||
default "{ \"init\": [ {\"reg\":41, \"val\":128}, {\"reg\":18, \"val\":255} ], \"poweron\": [ {\"reg\":18, \"val\":64, \"mode\":\"or\"} ], \"poweroff\": [ {\"reg\":18, \"val\":191, \"mode\":\"and\"} ] }" if TWATCH2020
|
||||
default ""
|
||||
# AGGREGATES - end
|
||||
|
||||
choice OUTPUT_TYPE
|
||||
prompt "Main system"
|
||||
default BASIC_I2C_BT
|
||||
help
|
||||
Type of hardware platform
|
||||
config SQUEEZEAMP
|
||||
bool "SqueezeAMP"
|
||||
select JACK_LOCKED
|
||||
select BAT_LOCKED
|
||||
select I2C_LOCKED
|
||||
select LED_LOCKED
|
||||
select SPKFAULT_LOCKED
|
||||
config A1S
|
||||
bool "ESP32-A1S module"
|
||||
select I2C_LOCKED
|
||||
config TWATCH2020
|
||||
bool "T-WATCH2020 by LilyGo"
|
||||
select I2C_LOCKED
|
||||
config BASIC_I2C_BT
|
||||
bool "Generic I2S & Bluetooth"
|
||||
endchoice
|
||||
|
||||
menu "Audio settings"
|
||||
menu "DAC settings"
|
||||
visible if BASIC_I2C_BT
|
||||
config I2S_NUM
|
||||
int "I2S channel (0 or 1). "
|
||||
default 0
|
||||
help
|
||||
I2S dma channel to use.
|
||||
config I2S_BCK_IO
|
||||
int "I2S Bit clock GPIO number. "
|
||||
default 33 if !A1S
|
||||
default 27 if A1S
|
||||
help
|
||||
I2S Bit Clock gpio pin to use.
|
||||
config I2S_WS_IO
|
||||
int "I2S Word Select GPIO number. "
|
||||
default 25 if !A1S
|
||||
default 26 if A1S
|
||||
help
|
||||
I2S Word Select gpio pin to use.
|
||||
config I2S_DO_IO
|
||||
int "I2S Data Output GPIO number. "
|
||||
default 32 if !A1S
|
||||
default 25 if A1S
|
||||
help
|
||||
I2S data output gpio pin to use.
|
||||
config I2S_DI_IO
|
||||
int "I2S Data Input GPIO number. "
|
||||
default -1 if !A1S
|
||||
default 35 if A1S
|
||||
help
|
||||
I2S data input gpio pin to use (not used mostly, leave it to -1).
|
||||
|
||||
menu "I2S settings"
|
||||
config I2S_NUM
|
||||
int "I2S channel (0 or 1). "
|
||||
default 0
|
||||
help
|
||||
I2S dma channel to use.
|
||||
config I2S_BCK_IO
|
||||
int "I2S Bit clock GPIO number. "
|
||||
default 33
|
||||
help
|
||||
I2S Bit Clock gpio pin to use.
|
||||
config I2S_WS_IO
|
||||
int "I2S Word Select GPIO number. "
|
||||
default 25
|
||||
help
|
||||
I2S Word Select gpio pin to use.
|
||||
config I2S_DO_IO
|
||||
int "I2S Data Output GPIO number. "
|
||||
default 32
|
||||
help
|
||||
I2S data output gpio pin to use.
|
||||
config I2S_DI_IO
|
||||
int "I2S Data Input GPIO number. "
|
||||
default -1 if !A1S
|
||||
help
|
||||
I2S data input gpio pin to use (not used mostly, leave it to -1).
|
||||
endmenu
|
||||
menu "I2C settings"
|
||||
config I2C_SDA
|
||||
int "I2C SDA GPIO number for DAC control. "
|
||||
default -1
|
||||
help
|
||||
I2C data gpio pin to use with DAC (not used mostly, leave it to -1).
|
||||
config I2C_SCL
|
||||
int "I2C SCL GPIO number for DAC control. "
|
||||
default -1
|
||||
help
|
||||
I2C clock gpio pin to use with DAC (not used mostly, leave it to -1).
|
||||
endmenu
|
||||
config MUTE_GPIO
|
||||
int "GPIO for muting DAC"
|
||||
default -1
|
||||
help
|
||||
GPIO used to mute DAC (not used mostly, leave it to -1).
|
||||
config MUTE_GPIO_LEVEL
|
||||
int "Mute GPIO active level"
|
||||
depends on MUTE_GPIO != -1
|
||||
default 1
|
||||
endmenu
|
||||
|
||||
menu "SPDIF settings"
|
||||
@@ -107,9 +158,7 @@ menu "Squeezelite-ESP32"
|
||||
Must be set as SPDIF re-uses I2S but only needs DO (recommendation: set it to I2S Word select value)
|
||||
config SPDIF_DO_IO
|
||||
int "SPDIF Data I/O GPIO number"
|
||||
default 15 if SQUEEZEAMP
|
||||
default I2S_DO_IO if !A1S
|
||||
default -1 if A1S
|
||||
default -1
|
||||
help
|
||||
I2S data output IO use to simulate SPDIF
|
||||
endmenu
|
||||
@@ -181,16 +230,17 @@ menu "Squeezelite-ESP32"
|
||||
endmenu
|
||||
|
||||
menu "Display Screen"
|
||||
depends on !TWATCH2020
|
||||
config DISPLAY_CONFIG
|
||||
string "Screen configuraton"
|
||||
default ""
|
||||
help
|
||||
Set parameters for display screen, leave empty for no screen
|
||||
I2C,width=<pixels>,height=<pixels>[address=<i2c_address>][,HFlip][,VFlip]
|
||||
SPI,width=<pixels>,height=<pixels>,cs=<gpio>[,HFlip][,VFlip]
|
||||
I2C,driver=<model>,width=<pixels>,height=<pixels>[address=<i2c_address>][,HFlip][,VFlip][,rotate]
|
||||
SPI,driver=<model>,width=<pixels>,height=<pixels>,cs=<gpio>[,HFlip][,VFlip][,rotate]
|
||||
endmenu
|
||||
|
||||
menu "Various I/O"
|
||||
visible if !TWATCH2020
|
||||
config I2C_CONFIG
|
||||
string "I2C system configuration"
|
||||
default ""
|
||||
@@ -199,7 +249,6 @@ menu "Squeezelite-ESP32"
|
||||
sda=<gpio>,scl=<gpio>[,speed=<num>][,port=<0|1>]
|
||||
config SPI_CONFIG
|
||||
string "SPI system configuration"
|
||||
default ""
|
||||
help
|
||||
Set parameters of shared SPI interface
|
||||
data=<gpio>,clk=<gpio>[,d/c=<num>][,host=<0|1|2>]
|
||||
@@ -208,7 +257,7 @@ menu "Squeezelite-ESP32"
|
||||
default ""
|
||||
help
|
||||
Set parameters of shared GPIO with special values.
|
||||
<gpio_1>=Vcc|GND|amp|jack[:0|1][,<gpio_n>=Vcc|GND|amp|jack[:0|1]]
|
||||
<gpio_1>=Vcc|GND|amp[:0|1]|jack[:0|1][,<gpio_n>=Vcc|GND|amp[:0|1]|jack[:0|1]]
|
||||
'amp' => GPIO that is set when playback starts
|
||||
'jack' => GPIO used for audio jack detection
|
||||
'green', 'red' => GPIO for status LED
|
||||
@@ -218,40 +267,39 @@ menu "Squeezelite-ESP32"
|
||||
default ""
|
||||
help
|
||||
Set GPIO for rotary encoder (quadrature phase). See README on SqueezeESP32 project's GitHub for more details
|
||||
A=<gpio>,B=<gpio>[,SW=gpio>[,volume][,longpress]]
|
||||
|
||||
A=<gpio>,B=<gpio>[,SW=gpio>[[,knobonly[=<ms>]|[,volume][,longpress]]
|
||||
endmenu
|
||||
menu "LED configuration"
|
||||
visible if !SQUEEZEAMP
|
||||
visible if !SQUEEZEAMP && !TWATCH2020
|
||||
config LED_GREEN_GPIO
|
||||
int "Green led GPIO"
|
||||
default -1 if !SQUEEZEAMP
|
||||
default 12 if SQUEEZEAMP
|
||||
default 12 if SQUEEZEAMP
|
||||
default -1
|
||||
help
|
||||
Set to -1 for no LED
|
||||
config LED_GREEN_GPIO_LEVEL
|
||||
int "Green led ON level"
|
||||
depends on LED_GREEN_GPIO != -1
|
||||
default 0 if SQUEEZEAMP
|
||||
default 1 if !SQUEEZEAMP
|
||||
default 1
|
||||
config LED_RED_GPIO
|
||||
int "Red led GPIO"
|
||||
default -1 if !SQUEEZEAMP
|
||||
default 13 if SQUEEZEAMP
|
||||
default -1
|
||||
help
|
||||
Set to -1 for no LED
|
||||
config LED_RED_GPIO_LEVEL
|
||||
int "Red led ON level"
|
||||
depends on LED_RED_GPIO != -1
|
||||
default 0 if SQUEEZEAMP
|
||||
default 1 if !SQUEEZEAMP
|
||||
default 1
|
||||
endmenu
|
||||
menu "Audio JACK"
|
||||
visible if !SQUEEZEAMP
|
||||
visible if !SQUEEZEAMP && !TWATCH2020
|
||||
config JACK_GPIO
|
||||
int "Jack insertion GPIO"
|
||||
default -1 if !SQUEEZEAMP
|
||||
default 34 if SQUEEZEAMP
|
||||
default -1
|
||||
help
|
||||
GPIO to detect speaker jack insertion. Set to -1 for no detection.
|
||||
config JACK_GPIO_LEVEL
|
||||
@@ -260,11 +308,11 @@ menu "Squeezelite-ESP32"
|
||||
default 0
|
||||
endmenu
|
||||
menu "Speaker Fault"
|
||||
visible if !SQUEEZEAMP
|
||||
visible if !SQUEEZEAMP && !TWATCH2020
|
||||
config SPKFAULT_GPIO
|
||||
int "Speaker fault GPIO"
|
||||
default -1 if !SQUEEZEAMP
|
||||
default 2 if SQUEEZEAMP
|
||||
default -1
|
||||
help
|
||||
GPIO to detect speaker fault condition. Set to -1 for no detection.
|
||||
config SPKFAULT_GPIO_LEVEL
|
||||
@@ -273,18 +321,18 @@ menu "Squeezelite-ESP32"
|
||||
default 0
|
||||
endmenu
|
||||
menu "Battery measure"
|
||||
visible if !SQUEEZEAMP
|
||||
visible if !SQUEEZEAMP && !TWATCH2020
|
||||
config BAT_CHANNEL
|
||||
int "Set channel (0..7)"
|
||||
default -1 if !SQUEEZEAMP
|
||||
default 7 if SQUEEZEAMP
|
||||
default -1
|
||||
help
|
||||
Read a value every 10s on ADC1 on set Channel
|
||||
config BAT_SCALE
|
||||
string "Set scaling factor"
|
||||
depends on BAT_CHANNEL != -1
|
||||
default "" if !SQUEEZEAMP
|
||||
default "20.24" if SQUEEZEAMP
|
||||
default ""
|
||||
help
|
||||
Set the scaling factor for this 12 bits ADC
|
||||
endmenu
|
||||
|
||||
Reference in New Issue
Block a user