Kconfig.projbuild 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440
  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. config DAC_CONTROLSET
  118. string
  119. 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
  120. 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
  121. default ""
  122. # AGGREGATES - end
  123. endmenu
  124. menu "Ethernet Options"
  125. visible if BASIC_I2C_BT && (ETH_USE_ESP32_EMAC || ETH_USE_SPI_ETHERNET)
  126. choice
  127. prompt "Ethernet Chipset"
  128. default ETH_NODRIVER
  129. config ETH_NODRIVER
  130. bool "Defined in NVS"
  131. config ETH_LAN8720
  132. bool "Microchip LAN8720 (RMII)"
  133. config ETH_DM9051
  134. bool "Davicom 9051 (SPI)"
  135. endchoice
  136. config ETH_PHY_RST_IO
  137. int "PHY Reset GPIO number" if !ETH_NODRIVER
  138. default -1
  139. help
  140. Set the GPIO number used to reset PHY chip.
  141. Set to -1 to disable PHY chip hardware reset.
  142. config ETH_MDC_IO
  143. int "SMI MDC GPIO number" if ETH_LAN8720
  144. default -1
  145. help
  146. Set the GPIO number used by SMI MDC.
  147. config ETH_MDIO_IO
  148. int "SMI MDIO GPIO number" if ETH_LAN8720
  149. default -1
  150. help
  151. Set the GPIO number used by SMI MDIO.
  152. config ETH_SPI_HOST
  153. int "SPI host number (-1,1 or 2)" if ETH_DM9051
  154. default -1
  155. help
  156. Set to -1 to use system's SPI config (see Various I/O)
  157. Set to 2 or 3 to use a dedicated bus
  158. config ETH_SPI_INTR_IO
  159. int "interrupt" if ETH_DM9051
  160. default -1
  161. config ETH_SPI_CS_IO
  162. int "Chip Select" if ETH_DM9051
  163. default -1
  164. config ETH_SPI_CLK_IO
  165. int "SPI clock" if ETH_SPI_HOST != -1 && ETH_DM9051
  166. default -1
  167. config ETH_SPI_MOSI_IO
  168. int "Data Out" if ETH_SPI_HOST != -1 && ETH_DM9051
  169. default -1
  170. config ETH_SPI_MISO_IO
  171. int "Data In" if ETH_SPI_HOST != -1 && ETH_DM9051
  172. default -1
  173. config ETH_SPI_SPEED
  174. int "SPI speed (Hz)" if ETH_SPI_HOST != -1 && ETH_DM9051
  175. default 20000000
  176. endmenu
  177. menu "Audio settings"
  178. menu "DAC settings"
  179. visible if BASIC_I2C_BT
  180. menu "I2S settings"
  181. config I2S_NUM
  182. int "I2S channel (0 or 1). "
  183. default 0
  184. help
  185. I2S dma channel to use.
  186. config I2S_BCK_IO
  187. int "I2S Bit clock GPIO number. "
  188. default -1
  189. help
  190. I2S Bit Clock gpio pin to use.
  191. config I2S_WS_IO
  192. int "I2S Word Select GPIO number. "
  193. default -1
  194. help
  195. I2S Word Select gpio pin to use.
  196. config I2S_DO_IO
  197. int "I2S Data Output GPIO number. "
  198. default -1
  199. help
  200. I2S data output gpio pin to use.
  201. config I2S_DI_IO
  202. int "I2S Data Input GPIO number. "
  203. default -1
  204. help
  205. I2S data input gpio pin to use (not used mostly, leave it to -1).
  206. endmenu
  207. menu "I2C settings"
  208. config I2C_SDA
  209. int "I2C SDA GPIO number for DAC control. "
  210. default -1
  211. help
  212. I2C data gpio pin to use with DAC (not used mostly, leave it to -1).
  213. config I2C_SCL
  214. int "I2C SCL GPIO number for DAC control. "
  215. default -1
  216. help
  217. I2C clock gpio pin to use with DAC (not used mostly, leave it to -1).
  218. endmenu
  219. config MUTE_GPIO
  220. int "GPIO for muting DAC"
  221. default -1
  222. help
  223. GPIO used to mute DAC (not used mostly, leave it to -1).
  224. config MUTE_GPIO_LEVEL
  225. int "Mute GPIO active level"
  226. depends on MUTE_GPIO != -1
  227. default 1
  228. endmenu
  229. menu "SPDIF settings"
  230. visible if BASIC_I2C_BT
  231. config SDIF_NUM
  232. int "I2S channel for SDPIF (0 or 1)"
  233. default 0
  234. help
  235. I2S dma channel to use.
  236. config SPDIF_BCK_IO
  237. int "SDPIF Bit clock GPIO number"
  238. default I2S_BCK_IO
  239. help
  240. Must be set as SPDIF re-uses I2S but only needs DO (recommendation: set it to I2S Bit clock value)
  241. config SPDIF_WS_IO
  242. int "SPDIF Word Select GPIO number"
  243. default I2S_WS_IO
  244. help
  245. Must be set as SPDIF re-uses I2S but only needs DO (recommendation: set it to I2S Word select value)
  246. config SPDIF_DO_IO
  247. int "SPDIF Data I/O GPIO number"
  248. default -1
  249. help
  250. I2S data output IO use to simulate SPDIF
  251. endmenu
  252. menu "A2DP settings"
  253. config A2DP_SINK_NAME
  254. string "Name of Bluetooth A2DP device"
  255. default "SMSL BT4.2"
  256. help
  257. This is the name of the bluetooth speaker that Squeezelite will try connecting to.
  258. config A2DP_DEV_NAME
  259. string "Name of Squeezelite device to use when connecting to A2DP device"
  260. default "Squeezelite"
  261. help
  262. This is the name of the device that the Bluetooth speaker will see when it is connected to.
  263. config A2DP_CONTROL_DELAY_MS
  264. int "Control loop delay. "
  265. default 500
  266. help
  267. Decreasing this will lead to a more responsive BT control, but might lead to noisy log files if debug is enabled.
  268. config A2DP_CONNECT_TIMEOUT_MS
  269. int "Time out duration when trying to connect to an A2DP audio sink"
  270. default 1000
  271. help
  272. Increasing this value will give more chance for less stable connections to be established.
  273. endmenu
  274. endmenu
  275. menu "Audio Input"
  276. config BT_SINK
  277. bool "Bluetooth receiver"
  278. default y
  279. help
  280. Enable bluetooth sink (Note that you obviously can't at the same time be a Bluetooth receiver and transmitter)
  281. config BT_NAME
  282. depends on BT_SINK
  283. string "Name of Bluetooth A2DP device"
  284. default "ESP32-BT"
  285. help
  286. This is the name of the bluetooth speaker that will be broadcasted
  287. config BT_SINK_PIN
  288. depends on BT_SINK
  289. int "Bluetooth PIN code"
  290. default 1234
  291. config AIRPLAY_SINK
  292. bool "AirPlay receiver"
  293. default y
  294. config AIRPLAY_NAME
  295. depends on AIRPLAY_SINK
  296. string "Name of AirPlay device"
  297. default "ESP32-AirPlay"
  298. help
  299. This is the name of the AirPlay speaker that will be broadcasted
  300. config AIRPLAY_PORT
  301. depends on AIRPLAY_SINK
  302. string "AirPlay listening port"
  303. default 5000
  304. help
  305. AirPlay service listening port
  306. endmenu
  307. menu "Display Screen"
  308. depends on !TWATCH2020
  309. config DISPLAY_CONFIG
  310. string "Screen configuraton"
  311. help
  312. Set parameters for display screen, leave empty for no screen
  313. I2C,driver=<model>,width=<pixels>,height=<pixels>[address=<i2c_address>][,HFlip][,VFlip][,rotate]
  314. SPI,driver=<model>,width=<pixels>,height=<pixels>,cs=<gpio>[,HFlip][,VFlip][,rotate]
  315. endmenu
  316. menu "Various I/O"
  317. visible if !TWATCH2020 && !MUSE
  318. config I2C_CONFIG
  319. string "I2C system configuration"
  320. default ""
  321. help
  322. Set parameters of shared I2C interface
  323. sda=<gpio>,scl=<gpio>[,speed=<num>][,port=<0|1>]
  324. config SPI_CONFIG
  325. string "SPI system configuration"
  326. help
  327. Set parameters of shared SPI interface
  328. data=<gpio>,clk=<gpio>[,d/c=<num>][,host=<0|1|2>]
  329. config SET_GPIO
  330. string "Special GPIO configuration"
  331. default ""
  332. help
  333. Set parameters of shared GPIO with special values.
  334. <gpio_1>=Vcc|GND|amp[:0|1]|jack[:0|1][,<gpio_n>=Vcc|GND|amp[:0|1]|jack[:0|1]]
  335. 'amp' => GPIO that is set when playback starts
  336. 'jack' => GPIO used for audio jack detection
  337. 'green', 'red' => GPIO for status LED
  338. '[:0|1] means set the active value for that GPIO can be low or high
  339. config ROTARY_ENCODER
  340. string "Rotary Encoder configuration"
  341. default ""
  342. help
  343. Set GPIO for rotary encoder (quadrature phase). See README on SqueezeESP32 project's GitHub for more details
  344. A=<gpio>,B=<gpio>[,SW=gpio>[[,knobonly[=<ms>]|[,volume][,longpress]]
  345. config GPIO_EXP_CONFIG
  346. string "GPIO expander configuration"
  347. help
  348. Set parameters of GPIO extender
  349. model=<model>[,addr=<addr>][,base=<100..N>][,count=<0..32>][,intr=<gpio>][,port=dac|system]
  350. endmenu
  351. menu "LED configuration"
  352. visible if !SQUEEZEAMP && !TWATCH2020 && !MUSE
  353. config LED_GREEN_GPIO
  354. int "Green led GPIO"
  355. default 12 if SQUEEZEAMP
  356. default 22 if MUSE
  357. default -1
  358. help
  359. Set to -1 for no LED
  360. config LED_GREEN_GPIO_LEVEL
  361. int "Green led ON level"
  362. depends on LED_GREEN_GPIO != -1
  363. default 0 if SQUEEZEAMP || MUSE
  364. default 1
  365. config LED_RED_GPIO
  366. int "Red led GPIO"
  367. default 13 if SQUEEZEAMP
  368. default -1
  369. help
  370. Set to -1 for no LED
  371. config LED_RED_GPIO_LEVEL
  372. int "Red led ON level"
  373. depends on LED_RED_GPIO != -1
  374. default 0 if SQUEEZEAMP
  375. default 1
  376. endmenu
  377. menu "Audio JACK"
  378. visible if !SQUEEZEAMP && !TWATCH2020 && !MUSE
  379. config JACK_GPIO
  380. int "Jack insertion GPIO"
  381. default 34 if SQUEEZEAMP || MUSE
  382. default -1
  383. help
  384. GPIO to detect speaker jack insertion. Set to -1 for no detection.
  385. config JACK_GPIO_LEVEL
  386. depends on JACK_GPIO != -1
  387. int "Level when inserted (0/1)"
  388. default 0
  389. endmenu
  390. menu "Amplifier"
  391. visible if !SQUEEZEAMP && !TWATCH2020 && !MUSE
  392. config AMP_GPIO
  393. int "Amplifier GPIO"
  394. default 21 if MUSE
  395. default -1
  396. help
  397. GPIO to switch on/off amplifier. Set to -1 for no amplifier.
  398. config AMP_GPIO_LEVEL
  399. depends on AMP_GPIO != -1
  400. int "Active level(0/1)"
  401. default 1
  402. endmenu
  403. menu "Speaker Fault"
  404. visible if !SQUEEZEAMP && !TWATCH2020 && !MUSE
  405. config SPKFAULT_GPIO
  406. int "Speaker fault GPIO"
  407. default 2 if SQUEEZEAMP
  408. default -1
  409. help
  410. GPIO to detect speaker fault condition. Set to -1 for no detection.
  411. config SPKFAULT_GPIO_LEVEL
  412. depends on SPKFAULT_GPIO != -1
  413. int "Level when fault (0/1)"
  414. default 0
  415. endmenu
  416. menu "Battery measure"
  417. visible if !SQUEEZEAMP && !TWATCH2020
  418. config BAT_CHANNEL
  419. int "Set channel (0..7)"
  420. default 7 if SQUEEZEAMP
  421. default -1
  422. help
  423. Read a value every 10s on ADC1 on set Channel
  424. config BAT_SCALE
  425. string "Set scaling factor"
  426. depends on BAT_CHANNEL != -1
  427. default "20.24" if SQUEEZEAMP
  428. default ""
  429. help
  430. Set the scaling factor for this 12 bits ADC
  431. endmenu
  432. endmenu