Kconfig.projbuild 12 KB

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