Kconfig.projbuild 11 KB

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