Kconfig.projbuild 11 KB

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