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