Kconfig.projbuild 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457
  1. menu "Squeezelite-ESP32"
  2. menu "Logging"
  3. config LOGGING_SLIMPROTO
  4. string "logging level for slimproto "
  5. default "info"
  6. help
  7. Set logging level info|debug|sdebug
  8. config LOGGING_STREAM
  9. string "logging level for stream "
  10. default "info"
  11. help
  12. Set logging level info|debug|sdebug
  13. config LOGGING_DECODE
  14. string "logging level for decode"
  15. default "info"
  16. help
  17. Set logging level info|debug|sdebug
  18. config LOGGING_OUTPUT
  19. string "logging level for output"
  20. default "info"
  21. help
  22. Set logging level info|debug|sdebug
  23. endmenu
  24. config AMP_LOCKED
  25. bool
  26. config JACK_LOCKED
  27. bool
  28. config BAT_LOCKED
  29. bool
  30. config I2C_LOCKED
  31. bool
  32. config SPDIF_LOCKED
  33. bool
  34. config LED_LOCKED
  35. bool
  36. config SPKFAULT_LOCKED
  37. bool
  38. config MUTE_GPIO_LEVEL
  39. int
  40. default 0
  41. menu "Target"
  42. choice OUTPUT_TYPE
  43. prompt "Main system"
  44. default BASIC_I2C_BT
  45. help
  46. Type of hardware platform
  47. config SQUEEZEAMP
  48. bool "SqueezeAMP"
  49. select JACK_LOCKED
  50. select BAT_LOCKED
  51. select I2C_LOCKED
  52. select LED_LOCKED
  53. select SPKFAULT_LOCKED
  54. config BASIC_I2C_BT
  55. bool "Generic I2S & Bluetooth"
  56. config TWATCH2020
  57. bool "T-WATCH2020 by LilyGo"
  58. select I2C_LOCKED
  59. config MUSE
  60. bool "Muse"
  61. select JACK_LOCKED
  62. select BAT_LOCKED
  63. select I2C_LOCKED
  64. select AMP_LOCKED
  65. endchoice
  66. config RELEASE_API
  67. string "Software update URL"
  68. default "https://api.github.com/repos/sle118/squeezelite-esp32/releases"
  69. help
  70. Set the URL of the API that the front-end UI will use to fetch software updates
  71. config SQUEEZELITE_ESP32_RELEASE_URL
  72. string "Release URL"
  73. default "https://github.com/sle118/squeezelite-esp32/releases"
  74. help
  75. Set the URL where users can see a list of releases
  76. # you can't change default values once they are set so changing "Target" will not reset
  77. # project name if they are visible config - they have to be silent strings
  78. config PROJECT_NAME
  79. string
  80. default "SqueezeAMP" if SQUEEZEAMP
  81. default "Squeezelite-TWATCH" if TWATCH2020
  82. default "Muse" if MUSE
  83. default "Squeezelite-ESP32"
  84. config FW_PLATFORM_NAME
  85. string
  86. default "SqueezeAmp" if SQUEEZEAMP
  87. default "TWATCH" if TWATCH2020
  88. default "Muse" if MUSE
  89. default "ESP32"
  90. # AGGREGATES - begin
  91. # these parameters are "aggregates" that take precedence. They must have a default value
  92. config DAC_CONFIG
  93. string
  94. default "model=TAS57xx,bck=33,ws=25,do=32,sda=27,scl=26,mute=14:0" if SQUEEZEAMP
  95. default "model=I2S,bck=26,ws=25,do=33,i2c=53,sda=21,scl=22" if TWATCH2020
  96. default "model=I2S,bck=5,ws=25,do=26,di=35,i2c=16,sda=18,scl=23,mck" if MUSE
  97. default ""
  98. config SPDIF_CONFIG
  99. string
  100. default "bck=33,ws=25,do=15" if SQUEEZEAMP
  101. default ""
  102. config GPIO_EXP_CONFIG
  103. string
  104. default ""
  105. config SPI_CONFIG
  106. string
  107. default "dc=27,data=19,clk=18" if TWATCH2020
  108. default "mosi=15,miso=2,clk=14" if MUSE
  109. default ""
  110. config DISPLAY_CONFIG
  111. string
  112. default "SPI,driver=ST7789,width=240,height=240,cs=5,back=12,speed=16000000,HFlip,VFlip" if TWATCH2020
  113. default ""
  114. config ETH_CONFIG
  115. string
  116. default ""
  117. # AGGREGATES - end
  118. config DAC_CONTROLSET
  119. string
  120. 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
  121. default "{\"init\":[ {\"reg\":0,\"val\":128}, {\"reg\":0,\"val\":0}, {\"reg\":25,\"val\":4}, {\"reg\":1,\"val\":80}, {\"reg\":2,\"val\":0}, {\"reg\":8,\"val\":0}, {\"reg\":4,\"val\":192}, {\"reg\":0,\"val\":18}, {\"reg\":1,\"val\":0}, {\"reg\":23,\"val\":24}, {\"reg\":24,\"val\":2}, {\"reg\":38,\"val\":9}, {\"reg\":39,\"val\":144}, {\"reg\":42,\"val\":144}, {\"reg\":43,\"val\":128}, {\"reg\":45,\"val\":128}, {\"reg\":27,\"val\":0}, {\"reg\":26,\"val\":0}, {\"reg\":2,\"val\":240}, {\"reg\":2,\"val\":0}, {\"reg\":29,\"val\":28}, {\"reg\":4,\"val\":48}, {\"reg\":25,\"val\":0} ]}" if MUSE
  122. default ""
  123. config AUDIO_CONTROLS
  124. string
  125. default "[{\"gpio\":32, \"pull\":true, \"debounce\":10, \"normal\":{\"pressed\":\"ACTRLS_VOLDOWN\"}}, {\"gpio\":19, \"pull\":true, \"debounce\":40, \"normal\":{\"pressed\":\"ACTRLS_VOLUP\"}}, {\"gpio\":12, \"pull\":true, \"debounce\":40, \"longpress\":1000, \"normal\":{\"pressed\":\"ACTRLS_TOGGLE\"},\"longpress\":{\"pressed\":\"ACTRLS_POWER\"}}]" if MUSE
  126. default ""
  127. endmenu
  128. menu "Ethernet Options"
  129. visible if BASIC_I2C_BT && (ETH_USE_ESP32_EMAC || ETH_USE_SPI_ETHERNET)
  130. choice
  131. prompt "Ethernet Chipset"
  132. default ETH_NODRIVER
  133. config ETH_NODRIVER
  134. bool "Defined in NVS"
  135. config ETH_LAN8720
  136. bool "Microchip LAN8720 (RMII)"
  137. config ETH_DM9051
  138. bool "Davicom 9051 (SPI)"
  139. endchoice
  140. config ETH_PHY_RST_IO
  141. int "PHY Reset GPIO number" if !ETH_NODRIVER
  142. default -1
  143. help
  144. Set the GPIO number used to reset PHY chip.
  145. Set to -1 to disable PHY chip hardware reset.
  146. config ETH_MDC_IO
  147. int "SMI MDC GPIO number" if ETH_LAN8720
  148. default -1
  149. help
  150. Set the GPIO number used by SMI MDC.
  151. config ETH_MDIO_IO
  152. int "SMI MDIO GPIO number" if ETH_LAN8720
  153. default -1
  154. help
  155. Set the GPIO number used by SMI MDIO.
  156. config ETH_SPI_HOST
  157. int "SPI host number (-1,1 or 2)" if ETH_DM9051
  158. default -1
  159. help
  160. Set to -1 to use system's SPI config (see Various I/O)
  161. Set to 2 or 3 to use a dedicated bus
  162. config ETH_SPI_INTR_IO
  163. int "interrupt" if ETH_DM9051
  164. default -1
  165. config ETH_SPI_CS_IO
  166. int "Chip Select" if ETH_DM9051
  167. default -1
  168. config ETH_SPI_CLK_IO
  169. int "SPI clock" if ETH_SPI_HOST != -1 && ETH_DM9051
  170. default -1
  171. config ETH_SPI_MOSI_IO
  172. int "Data Out" if ETH_SPI_HOST != -1 && ETH_DM9051
  173. default -1
  174. config ETH_SPI_MISO_IO
  175. int "Data In" if ETH_SPI_HOST != -1 && ETH_DM9051
  176. default -1
  177. config ETH_SPI_SPEED
  178. int "SPI speed (Hz)" if ETH_SPI_HOST != -1 && ETH_DM9051
  179. default 20000000
  180. endmenu
  181. menu "Audio settings"
  182. menu "DAC settings"
  183. visible if BASIC_I2C_BT
  184. menu "I2S settings"
  185. config I2S_NUM
  186. int "I2S channel (0 or 1). "
  187. default 0
  188. help
  189. I2S dma channel to use.
  190. config I2S_BCK_IO
  191. int "I2S Bit clock GPIO number. "
  192. default -1
  193. help
  194. I2S Bit Clock gpio pin to use.
  195. config I2S_WS_IO
  196. int "I2S Word Select GPIO number. "
  197. default -1
  198. help
  199. I2S Word Select gpio pin to use.
  200. config I2S_DO_IO
  201. int "I2S Data Output GPIO number. "
  202. default -1
  203. help
  204. I2S data output gpio pin to use.
  205. config I2S_DI_IO
  206. int "I2S Data Input GPIO number. "
  207. default -1
  208. help
  209. I2S data input gpio pin to use (not used mostly, leave it to -1).
  210. endmenu
  211. menu "I2C settings"
  212. config I2C_SDA
  213. int "I2C SDA GPIO number for DAC control. "
  214. default -1
  215. help
  216. I2C data gpio pin to use with DAC (not used mostly, leave it to -1).
  217. config I2C_SCL
  218. int "I2C SCL GPIO number for DAC control. "
  219. default -1
  220. help
  221. I2C clock gpio pin to use with DAC (not used mostly, leave it to -1).
  222. endmenu
  223. config MUTE_GPIO
  224. int "GPIO for muting DAC"
  225. default -1
  226. help
  227. GPIO used to mute DAC (not used mostly, leave it to -1).
  228. config MUTE_GPIO_LEVEL
  229. int "Mute GPIO active level"
  230. depends on MUTE_GPIO != -1
  231. default 1
  232. endmenu
  233. menu "SPDIF settings"
  234. visible if BASIC_I2C_BT
  235. config SDIF_NUM
  236. int "I2S channel for SDPIF (0 or 1)"
  237. default 0
  238. help
  239. I2S dma channel to use.
  240. config SPDIF_BCK_IO
  241. int "SDPIF Bit clock GPIO number"
  242. default I2S_BCK_IO
  243. help
  244. Must be set as SPDIF re-uses I2S but only needs DO (recommendation: set it to I2S Bit clock value)
  245. config SPDIF_WS_IO
  246. int "SPDIF Word Select GPIO number"
  247. default I2S_WS_IO
  248. help
  249. Must be set as SPDIF re-uses I2S but only needs DO (recommendation: set it to I2S Word select value)
  250. config SPDIF_DO_IO
  251. int "SPDIF Data I/O GPIO number"
  252. default -1
  253. help
  254. I2S data output IO use to simulate SPDIF
  255. endmenu
  256. menu "A2DP settings"
  257. config A2DP_SINK_NAME
  258. string "Name of Bluetooth A2DP device"
  259. default "SMSL BT4.2"
  260. help
  261. This is the name of the bluetooth speaker that Squeezelite will try connecting to.
  262. config A2DP_DEV_NAME
  263. string "Name of Squeezelite device to use when connecting to A2DP device"
  264. default "Squeezelite"
  265. help
  266. This is the name of the device that the Bluetooth speaker will see when it is connected to.
  267. config A2DP_CONTROL_DELAY_MS
  268. int "Control loop delay. "
  269. default 500
  270. help
  271. Decreasing this will lead to a more responsive BT control, but might lead to noisy log files if debug is enabled.
  272. config A2DP_CONNECT_TIMEOUT_MS
  273. int "Time out duration when trying to connect to an A2DP audio sink"
  274. default 1000
  275. help
  276. Increasing this value will give more chance for less stable connections to be established.
  277. endmenu
  278. endmenu
  279. menu "Audio Input"
  280. config BT_SINK
  281. bool "Bluetooth receiver"
  282. default y
  283. help
  284. Enable bluetooth sink (Note that you obviously can't at the same time be a Bluetooth receiver and transmitter)
  285. config BT_NAME
  286. depends on BT_SINK
  287. string "Name of Bluetooth A2DP device"
  288. default "ESP32-BT"
  289. help
  290. This is the name of the bluetooth speaker that will be broadcasted
  291. config BT_SINK_PIN
  292. depends on BT_SINK
  293. int "Bluetooth PIN code"
  294. default 1234
  295. config AIRPLAY_SINK
  296. bool "AirPlay receiver"
  297. default y
  298. config AIRPLAY_NAME
  299. depends on AIRPLAY_SINK
  300. string "Name of AirPlay device"
  301. default "ESP32-AirPlay"
  302. help
  303. This is the name of the AirPlay speaker that will be broadcasted
  304. config AIRPLAY_PORT
  305. depends on AIRPLAY_SINK
  306. string "AirPlay listening port"
  307. default 5000
  308. help
  309. AirPlay service listening port
  310. endmenu
  311. menu "Controls"
  312. depends on !MUSE
  313. config AUDIO_CONTROLS
  314. string "Audio buttons set (JSON)"
  315. help
  316. Configuration of buttons (see README for syntax)
  317. endmenu
  318. menu "Display Screen"
  319. depends on !TWATCH2020
  320. config DISPLAY_CONFIG
  321. string "Screen configuraton"
  322. help
  323. Set parameters for display screen, leave empty for no screen
  324. I2C,driver=<model>,width=<pixels>,height=<pixels>[address=<i2c_address>][,HFlip][,VFlip][,rotate]
  325. SPI,driver=<model>,width=<pixels>,height=<pixels>,cs=<gpio>[,HFlip][,VFlip][,rotate]
  326. endmenu
  327. menu "Various I/O"
  328. visible if !TWATCH2020 && !MUSE
  329. config I2C_CONFIG
  330. string "I2C system configuration"
  331. default ""
  332. help
  333. Set parameters of shared I2C interface
  334. sda=<gpio>,scl=<gpio>[,speed=<num>][,port=<0|1>]
  335. config SPI_CONFIG
  336. string "SPI system configuration"
  337. help
  338. Set parameters of shared SPI interface
  339. data=<gpio>,clk=<gpio>[,d/c=<num>][,host=<0|1|2>]
  340. config SET_GPIO
  341. string "Special GPIO configuration"
  342. default ""
  343. help
  344. Set parameters of shared GPIO with special values.
  345. <gpio_1>=Vcc|GND|amp[:0|1]|jack[:0|1][,<gpio_n>=Vcc|GND|amp[:0|1]|jack[:0|1]]
  346. 'amp' => GPIO that is set when playback starts
  347. 'jack' => GPIO used for audio jack detection
  348. 'green', 'red' => GPIO for status LED
  349. '[:0|1] means set the active value for that GPIO can be low or high
  350. config ROTARY_ENCODER
  351. string "Rotary Encoder configuration"
  352. default ""
  353. help
  354. Set GPIO for rotary encoder (quadrature phase). See README on SqueezeESP32 project's GitHub for more details
  355. A=<gpio>,B=<gpio>[,SW=gpio>[[,knobonly[=<ms>]|[,volume][,longpress]]
  356. config GPIO_EXP_CONFIG
  357. string "GPIO expander configuration"
  358. help
  359. Set parameters of GPIO extender
  360. model=<model>[,addr=<addr>][,base=<100..N>][,count=<0..32>][,intr=<gpio>][,port=dac|system]
  361. endmenu
  362. menu "LED configuration"
  363. visible if !SQUEEZEAMP && !TWATCH2020 && !MUSE
  364. config LED_GREEN_GPIO
  365. int "Green led GPIO"
  366. default 12 if SQUEEZEAMP
  367. default 22 if MUSE
  368. default -1
  369. help
  370. Set to -1 for no LED
  371. config LED_GREEN_GPIO_LEVEL
  372. int "Green led ON level"
  373. depends on LED_GREEN_GPIO != -1
  374. default 0 if SQUEEZEAMP || MUSE
  375. default 1
  376. config LED_RED_GPIO
  377. int "Red led GPIO"
  378. default 13 if SQUEEZEAMP
  379. default -1
  380. help
  381. Set to -1 for no LED
  382. config LED_RED_GPIO_LEVEL
  383. int "Red led ON level"
  384. depends on LED_RED_GPIO != -1
  385. default 0 if SQUEEZEAMP
  386. default 1
  387. endmenu
  388. menu "Audio JACK"
  389. visible if !SQUEEZEAMP && !TWATCH2020 && !MUSE
  390. config JACK_GPIO
  391. int "Jack insertion GPIO"
  392. default 34 if SQUEEZEAMP || MUSE
  393. default -1
  394. help
  395. GPIO to detect speaker jack insertion. Set to -1 for no detection.
  396. config JACK_GPIO_LEVEL
  397. depends on JACK_GPIO != -1
  398. int "Level when inserted (0/1)"
  399. default 0
  400. endmenu
  401. menu "Amplifier"
  402. visible if !SQUEEZEAMP && !TWATCH2020 && !MUSE
  403. config AMP_GPIO
  404. int "Amplifier GPIO"
  405. default 21 if MUSE
  406. default -1
  407. help
  408. GPIO to switch on/off amplifier. Set to -1 for no amplifier.
  409. config AMP_GPIO_LEVEL
  410. depends on AMP_GPIO != -1
  411. int "Active level(0/1)"
  412. default 1
  413. endmenu
  414. menu "Speaker Fault"
  415. visible if !SQUEEZEAMP && !TWATCH2020 && !MUSE
  416. config SPKFAULT_GPIO
  417. int "Speaker fault GPIO"
  418. default 2 if SQUEEZEAMP
  419. default -1
  420. help
  421. GPIO to detect speaker fault condition. Set to -1 for no detection.
  422. config SPKFAULT_GPIO_LEVEL
  423. depends on SPKFAULT_GPIO != -1
  424. int "Level when fault (0/1)"
  425. default 0
  426. endmenu
  427. menu "Battery measure"
  428. visible if !SQUEEZEAMP && !TWATCH2020
  429. config BAT_CHANNEL
  430. int "Set channel (0..7)"
  431. default 7 if SQUEEZEAMP
  432. default -1
  433. help
  434. Read a value every 10s on ADC1 on set Channel
  435. config BAT_SCALE
  436. string "Set scaling factor"
  437. depends on BAT_CHANNEL != -1
  438. default "20.24" if SQUEEZEAMP
  439. default ""
  440. help
  441. Set the scaling factor for this 12 bits ADC
  442. endmenu
  443. endmenu