Kconfig.projbuild 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356
  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 "Audio settings"
  109. menu "DAC settings"
  110. visible if BASIC_I2C_BT
  111. menu "I2S settings"
  112. config I2S_NUM
  113. int "I2S channel (0 or 1)."
  114. default 0
  115. help
  116. I2S dma channel to use.
  117. config I2S_BCK_IO
  118. int "I2S Bit clock GPIO number."
  119. default -1
  120. help
  121. I2S Bit Clock gpio pin to use.
  122. config I2S_WS_IO
  123. int "I2S Word Select GPIO number."
  124. default -1
  125. help
  126. I2S Word Select gpio pin to use.
  127. config I2S_DO_IO
  128. int "I2S Data Output GPIO number."
  129. default -1
  130. help
  131. I2S data output gpio pin to use.
  132. config I2S_DI_IO
  133. int "I2S Data Input GPIO number."
  134. default -1
  135. help
  136. I2S data input gpio pin to use (not used mostly, leave it to -1).
  137. endmenu
  138. menu "I2C settings"
  139. config I2C_SDA
  140. int "I2C SDA GPIO number for DAC control."
  141. default -1
  142. help
  143. I2C data gpio pin to use with DAC (not used mostly, leave it to -1).
  144. config I2C_SCL
  145. int "I2C SCL GPIO number for DAC control."
  146. default -1
  147. help
  148. I2C clock gpio pin to use with DAC (not used mostly, leave it to -1).
  149. endmenu
  150. config MUTE_GPIO
  151. int "GPIO for muting DAC"
  152. default -1
  153. help
  154. GPIO used to mute DAC (not used mostly, leave it to -1).
  155. config MUTE_GPIO_LEVEL
  156. int "Mute GPIO active level"
  157. depends on MUTE_GPIO != -1
  158. default 1
  159. endmenu
  160. menu "SPDIF settings"
  161. visible if BASIC_I2C_BT
  162. config SDIF_NUM
  163. int "I2S channel for SDPIF (0 or 1)"
  164. default 0
  165. help
  166. I2S dma channel to use.
  167. config SPDIF_BCK_IO
  168. int "SDPIF Bit clock GPIO number"
  169. default I2S_BCK_IO
  170. help
  171. Must be set as SPDIF re-uses I2S but only needs DO (recommendation: set it to I2S Bit clock value)
  172. config SPDIF_WS_IO
  173. int "SPDIF Word Select GPIO number"
  174. default I2S_WS_IO
  175. help
  176. Must be set as SPDIF re-uses I2S but only needs DO (recommendation: set it to I2S Word select value)
  177. config SPDIF_DO_IO
  178. int "SPDIF Data I/O GPIO number"
  179. default -1
  180. help
  181. I2S data output IO use to simulate SPDIF
  182. endmenu
  183. menu "A2DP settings"
  184. config A2DP_SINK_NAME
  185. string "Name of Bluetooth A2DP device"
  186. default "SMSL BT4.2"
  187. help
  188. This is the name of the bluetooth speaker that Squeezelite will try connecting to.
  189. config A2DP_DEV_NAME
  190. string "Name of Squeezelite device to use when connecting to A2DP device"
  191. default "Squeezelite"
  192. help
  193. This is the name of the device that the Bluetooth speaker will see when it is connected to.
  194. config A2DP_CONTROL_DELAY_MS
  195. int "Control loop delay."
  196. default 500
  197. help
  198. Decreasing this will lead to a more responsive BT control,
  199. but might lead to noisy log files if debug is enabled.
  200. config A2DP_CONNECT_TIMEOUT_MS
  201. int "Time out duration when trying to connect to an A2DP audio sink"
  202. default 1000
  203. help
  204. Increasing this value will give more chance for less stable connections to be established.
  205. endmenu
  206. endmenu
  207. menu "Audio Input"
  208. config BT_SINK
  209. bool "Bluetooth receiver"
  210. default y
  211. help
  212. Enable bluetooth sink (Note that you obviously can't at the same time be a Bluetooth receiver and transmitter)
  213. config BT_NAME
  214. depends on BT_SINK
  215. string "Name of Bluetooth A2DP device"
  216. default "ESP32-BT"
  217. help
  218. This is the name of the bluetooth speaker that will be broadcasted
  219. config BT_SINK_PIN
  220. depends on BT_SINK
  221. int "Bluetooth PIN code"
  222. default 1234
  223. config AIRPLAY_SINK
  224. bool "AirPlay receiver"
  225. default y
  226. config AIRPLAY_NAME
  227. depends on AIRPLAY_SINK
  228. string "Name of AirPlay device"
  229. default "ESP32-AirPlay"
  230. help
  231. This is the name of the AirPlay speaker that will be broadcasted
  232. config AIRPLAY_PORT
  233. depends on AIRPLAY_SINK
  234. string "AirPlay listening port"
  235. default "5000"
  236. help
  237. AirPlay service listening port
  238. endmenu
  239. menu "Display Screen"
  240. depends on !TWATCH2020
  241. config DISPLAY_CONFIG
  242. string "Screen configuraton"
  243. help
  244. Set parameters for display screen, leave empty for no screen
  245. I2C,driver=<model>,width=<pixels>,height=<pixels>[address=<i2c_address>][,HFlip][,VFlip][,rotate]
  246. SPI,driver=<model>,width=<pixels>,height=<pixels>,cs=<gpio>[,HFlip][,VFlip][,rotate]
  247. endmenu
  248. menu "Various I/O"
  249. visible if !TWATCH2020
  250. config I2C_CONFIG
  251. string "I2C system configuration"
  252. default ""
  253. help
  254. Set parameters of shared I2C interface
  255. sda=<gpio>,scl=<gpio>[,speed=<num>][,port=<0|1>]
  256. config SPI_CONFIG
  257. string "SPI system configuration"
  258. help
  259. Set parameters of shared SPI interface
  260. data=<gpio>,clk=<gpio>[,d/c=<num>][,host=<0|1|2>]
  261. config SET_GPIO
  262. string "Special GPIO configuration"
  263. default ""
  264. help
  265. Set parameters of shared GPIO with special values.
  266. <gpio_1>=Vcc|GND|amp[:0|1]|jack[:0|1][,<gpio_n>=Vcc|GND|amp[:0|1]|jack[:0|1]]
  267. 'amp' => GPIO that is set when playback starts
  268. 'jack' => GPIO used for audio jack detection
  269. 'green', 'red' => GPIO for status LED
  270. '[:0|1] means set the active value for that GPIO can be low or high
  271. config ROTARY_ENCODER
  272. string "Rotary Encoder configuration"
  273. default ""
  274. help
  275. Set GPIO for rotary encoder (quadrature phase). See README on SqueezeESP32 project's GitHub for more details
  276. A=<gpio>,B=<gpio>[,SW=gpio>[[,knobonly[=<ms>]|[,volume][,longpress]]
  277. endmenu
  278. menu "LED configuration"
  279. visible if !SQUEEZEAMP && !TWATCH2020
  280. config LED_GREEN_GPIO
  281. int "Green led GPIO"
  282. default 12 if SQUEEZEAMP
  283. default -1
  284. help
  285. Set to -1 for no LED
  286. config LED_GREEN_GPIO_LEVEL
  287. int "Green led ON level"
  288. depends on LED_GREEN_GPIO != -1
  289. default 0 if SQUEEZEAMP
  290. default 1
  291. config LED_RED_GPIO
  292. int "Red led GPIO"
  293. default 13 if SQUEEZEAMP
  294. default -1
  295. help
  296. Set to -1 for no LED
  297. config LED_RED_GPIO_LEVEL
  298. int "Red led ON level"
  299. depends on LED_RED_GPIO != -1
  300. default 0 if SQUEEZEAMP
  301. default 1
  302. endmenu
  303. menu "Audio JACK"
  304. visible if !SQUEEZEAMP && !TWATCH2020
  305. config JACK_GPIO
  306. int "Jack insertion GPIO"
  307. default 34 if SQUEEZEAMP
  308. default -1
  309. help
  310. GPIO to detect speaker jack insertion. Set to -1 for no detection.
  311. config JACK_GPIO_LEVEL
  312. depends on JACK_GPIO != -1
  313. int "Level when inserted (0/1)"
  314. default 0
  315. endmenu
  316. menu "Speaker Fault"
  317. visible if !SQUEEZEAMP && !TWATCH2020
  318. config SPKFAULT_GPIO
  319. int "Speaker fault GPIO"
  320. default 2 if SQUEEZEAMP
  321. default -1
  322. help
  323. GPIO to detect speaker fault condition. Set to -1 for no detection.
  324. config SPKFAULT_GPIO_LEVEL
  325. depends on SPKFAULT_GPIO != -1
  326. int "Level when fault (0/1)"
  327. default 0
  328. endmenu
  329. menu "Battery measure"
  330. visible if !SQUEEZEAMP && !TWATCH2020
  331. config BAT_CHANNEL
  332. int "Set channel (0..7)"
  333. default 7 if SQUEEZEAMP
  334. default -1
  335. help
  336. Read a value every 10s on ADC1 on set Channel
  337. config BAT_SCALE
  338. string "Set scaling factor"
  339. depends on BAT_CHANNEL != -1
  340. default "20.24" if SQUEEZEAMP
  341. default ""
  342. help
  343. Set the scaling factor for this 12 bits ADC
  344. endmenu
  345. config DEFAULT_COMMAND_LINE
  346. string "Default command line to execute"
  347. default "squeezelite -o I2S -b 500:2000 -d all=info -C 30"
  348. help
  349. This is the command to run when starting the device
  350. endmenu