2
0

Kconfig.projbuild 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409
  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 TARGET_LOCKED
  25. bool
  26. default n
  27. config AMP_LOCKED
  28. bool
  29. config JACK_LOCKED
  30. bool
  31. config BAT_LOCKED
  32. bool
  33. config I2C_LOCKED
  34. bool
  35. config SPDIF_LOCKED
  36. bool
  37. config LED_LOCKED
  38. bool
  39. config SPKFAULT_LOCKED
  40. bool
  41. config MUTE_GPIO_LEVEL
  42. int
  43. default 0
  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 TARGET_LOCKED
  58. config MUSE
  59. bool "Muse"
  60. select JACK_LOCKED
  61. select BAT_LOCKED
  62. select I2C_LOCKED
  63. select AMP_LOCKED
  64. select TARGET_LOCKED
  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 TARGET_LOCKED
  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, \"long_press\":1000, \"normal\":{\"pressed\":\"ACTRLS_VOLDOWN\"}, \"longpress\":{\"pressed\":\"ACTRLS_PREV\"}}, {\"gpio\":19, \"pull\":true, \"long_press\":1000, \"normal\":{\"pressed\":\"ACTRLS_VOLUP\"}, \"longpress\":{\"pressed\":\"ACTRLS_NEXT\"}}, {\"gpio\":12, \"pull\":true, \"long_press\":1000, \"normal\":{\"pressed\":\"ACTRLS_TOGGLE\"},\"longpress\":{\"pressed\":\"ACTRLS_POWER\"}}]" if MUSE
  132. default ""
  133. config BAT_CONFIG
  134. string
  135. default "channel=7,scale=20.24,atten=0" if SQUEEZEAMP
  136. default "channel=5,scale=7.00,atten=3,cells=1" if MUSE
  137. default ""
  138. config TARGET
  139. string
  140. default "muse" if MUSE
  141. default ""
  142. endmenu
  143. menu "Audio settings"
  144. menu "DAC settings"
  145. visible if BASIC_I2C_BT
  146. menu "I2S settings"
  147. config I2S_NUM
  148. int "I2S channel (0 or 1). "
  149. default 0
  150. help
  151. I2S dma channel to use.
  152. config I2S_BCK_IO
  153. int "I2S Bit clock GPIO number. "
  154. default -1
  155. help
  156. I2S Bit Clock gpio pin to use.
  157. config I2S_WS_IO
  158. int "I2S Word Select GPIO number. "
  159. default -1
  160. help
  161. I2S Word Select gpio pin to use.
  162. config I2S_DO_IO
  163. int "I2S Data Output GPIO number. "
  164. default -1
  165. help
  166. I2S data output gpio pin to use.
  167. config I2S_DI_IO
  168. int "I2S Data Input GPIO number. "
  169. default -1
  170. help
  171. I2S data input gpio pin to use (not used mostly, leave it to -1).
  172. endmenu
  173. menu "I2C settings"
  174. config I2C_SDA
  175. int "I2C SDA GPIO number for DAC control. "
  176. default -1
  177. help
  178. I2C data gpio pin to use with DAC (not used mostly, leave it to -1).
  179. config I2C_SCL
  180. int "I2C SCL GPIO number for DAC control. "
  181. default -1
  182. help
  183. I2C clock gpio pin to use with DAC (not used mostly, leave it to -1).
  184. endmenu
  185. config MUTE_GPIO
  186. int "GPIO for muting DAC"
  187. default -1
  188. help
  189. GPIO used to mute DAC (not used mostly, leave it to -1).
  190. config MUTE_GPIO_LEVEL
  191. int "Mute GPIO active level"
  192. depends on MUTE_GPIO != -1
  193. default 1
  194. endmenu
  195. menu "SPDIF settings"
  196. visible if BASIC_I2C_BT
  197. config SDIF_NUM
  198. int "I2S channel for SDPIF (0 or 1)"
  199. default 0
  200. help
  201. I2S dma channel to use.
  202. config SPDIF_BCK_IO
  203. int "SDPIF Bit clock GPIO number"
  204. default I2S_BCK_IO
  205. help
  206. Must be set as SPDIF re-uses I2S but only needs DO (recommendation: set it to I2S Bit clock value)
  207. config SPDIF_WS_IO
  208. int "SPDIF Word Select GPIO number"
  209. default I2S_WS_IO
  210. help
  211. Must be set as SPDIF re-uses I2S but only needs DO (recommendation: set it to I2S Word select value)
  212. config SPDIF_DO_IO
  213. int "SPDIF Data I/O GPIO number"
  214. default -1
  215. help
  216. I2S data output IO use to simulate SPDIF
  217. endmenu
  218. menu "A2DP settings"
  219. config A2DP_SINK_NAME
  220. string "Name of Bluetooth A2DP device"
  221. default "SMSL BT4.2"
  222. help
  223. This is the name of the bluetooth speaker that Squeezelite will try connecting to.
  224. config A2DP_DEV_NAME
  225. string "Name of Squeezelite device to use when connecting to A2DP device"
  226. default "Squeezelite"
  227. help
  228. This is the name of the device that the Bluetooth speaker will see when it is connected to.
  229. config A2DP_CONTROL_DELAY_MS
  230. int "Control loop delay. "
  231. default 500
  232. help
  233. Decreasing this will lead to a more responsive BT control, but might lead to noisy log files if debug is enabled.
  234. config A2DP_CONNECT_TIMEOUT_MS
  235. int "Time out duration when trying to connect to an A2DP audio sink"
  236. default 1000
  237. help
  238. Increasing this value will give more chance for less stable connections to be established.
  239. endmenu
  240. endmenu
  241. menu "Audio Input"
  242. config BT_SINK
  243. bool "Bluetooth receiver"
  244. default y
  245. help
  246. Enable bluetooth sink (Note that you obviously can't at the same time be a Bluetooth receiver and transmitter)
  247. config BT_NAME
  248. depends on BT_SINK
  249. string "Name of Bluetooth A2DP device"
  250. default "ESP32-BT"
  251. help
  252. This is the name of the bluetooth speaker that will be broadcasted
  253. config BT_SINK_PIN
  254. depends on BT_SINK
  255. int "Bluetooth PIN code"
  256. default 1234
  257. config AIRPLAY_SINK
  258. bool "AirPlay receiver"
  259. default y
  260. config AIRPLAY_NAME
  261. depends on AIRPLAY_SINK
  262. string "Name of AirPlay device"
  263. default "ESP32-AirPlay"
  264. help
  265. This is the name of the AirPlay speaker that will be broadcasted
  266. config AIRPLAY_PORT
  267. depends on AIRPLAY_SINK
  268. string "AirPlay listening port"
  269. default 5000
  270. help
  271. AirPlay service listening port
  272. endmenu
  273. menu "Controls"
  274. depends on !MUSE
  275. config AUDIO_CONTROLS
  276. string "Audio buttons set (JSON)"
  277. help
  278. Configuration of buttons (see README for syntax)
  279. endmenu
  280. menu "Display Screen"
  281. depends on !TWATCH2020
  282. config DISPLAY_CONFIG
  283. string "Screen configuraton"
  284. help
  285. Set parameters for display screen, leave empty for no screen
  286. I2C,driver=<model>,width=<pixels>,height=<pixels>[address=<i2c_address>][,HFlip][,VFlip][,rotate]
  287. SPI,driver=<model>,width=<pixels>,height=<pixels>,cs=<gpio>[,HFlip][,VFlip][,rotate]
  288. endmenu
  289. menu "Various I/O"
  290. visible if !TWATCH2020 && !MUSE
  291. config I2C_CONFIG
  292. string "I2C system configuration"
  293. default ""
  294. help
  295. Set parameters of shared I2C interface
  296. sda=<gpio>,scl=<gpio>[,speed=<num>][,port=<0|1>]
  297. config SPI_CONFIG
  298. string "SPI system configuration"
  299. help
  300. Set parameters of shared SPI interface
  301. data=<gpio>,clk=<gpio>[,d/c=<num>][,host=<0|1|2>]
  302. config SET_GPIO
  303. string "Special GPIO configuration"
  304. default ""
  305. help
  306. Set parameters of shared GPIO with special values.
  307. <gpio_1>=Vcc|GND|amp[:0|1]|jack[:0|1][,<gpio_n>=Vcc|GND|amp[:0|1]|jack[:0|1]]
  308. 'amp' => GPIO that is set when playback starts
  309. 'jack' => GPIO used for audio jack detection
  310. 'green', 'red' => GPIO for status LED
  311. '[:0|1] means set the active value for that GPIO can be low or high
  312. config ROTARY_ENCODER
  313. string "Rotary Encoder configuration"
  314. default ""
  315. help
  316. Set GPIO for rotary encoder (quadrature phase). See README on SqueezeESP32 project's GitHub for more details
  317. A=<gpio>,B=<gpio>[,SW=gpio>[[,knobonly[=<ms>]|[,volume][,longpress]]
  318. config GPIO_EXP_CONFIG
  319. string "GPIO expander configuration"
  320. help
  321. Set parameters of GPIO extender
  322. model=<model>[,addr=<addr>][,base=<100..N>][,count=<0..32>][,intr=<gpio>][,port=dac|system]
  323. endmenu
  324. menu "LED configuration"
  325. visible if !TARGET_LOCKED
  326. config LED_GREEN_GPIO
  327. int "Green led GPIO"
  328. default 12 if SQUEEZEAMP
  329. default -1
  330. help
  331. Set to -1 for no LED
  332. config LED_GREEN_GPIO_LEVEL
  333. int "Green led ON level"
  334. depends on LED_GREEN_GPIO != -1
  335. default 0 if SQUEEZEAMP || MUSE
  336. default 1
  337. config LED_RED_GPIO
  338. int "Red led GPIO"
  339. default 13 if SQUEEZEAMP
  340. default -1
  341. help
  342. Set to -1 for no LED
  343. config LED_RED_GPIO_LEVEL
  344. int "Red led ON level"
  345. depends on LED_RED_GPIO != -1
  346. default 0 if SQUEEZEAMP
  347. default 1
  348. endmenu
  349. menu "Audio JACK"
  350. visible if !TARGET_LOCKED
  351. config JACK_GPIO
  352. int "Jack insertion GPIO"
  353. default 34 if SQUEEZEAMP || MUSE
  354. default -1
  355. help
  356. GPIO to detect speaker jack insertion. Set to -1 for no detection.
  357. config JACK_GPIO_LEVEL
  358. depends on JACK_GPIO != -1
  359. int "Level when inserted (0/1)"
  360. default 0
  361. endmenu
  362. menu "Amplifier"
  363. visible if !TARGET_LOCKED
  364. config AMP_GPIO
  365. int "Amplifier GPIO"
  366. default 21 if MUSE
  367. default -1
  368. help
  369. GPIO to switch on/off amplifier. Set to -1 for no amplifier.
  370. config AMP_GPIO_LEVEL
  371. depends on AMP_GPIO != -1
  372. int "Active level(0/1)"
  373. default 1
  374. endmenu
  375. menu "Speaker Fault"
  376. visible if !TARGET_LOCKED
  377. config SPKFAULT_GPIO
  378. int "Speaker fault GPIO"
  379. default 2 if SQUEEZEAMP
  380. default -1
  381. help
  382. GPIO to detect speaker fault condition. Set to -1 for no detection.
  383. config SPKFAULT_GPIO_LEVEL
  384. depends on SPKFAULT_GPIO != -1
  385. int "Level when fault (0/1)"
  386. default 0
  387. endmenu
  388. menu "Battery measure"
  389. visible if !TARGET_LOCKED
  390. config BAT_CONFIG
  391. string "Battery acquisitiong configuration"
  392. help
  393. Sets parameters for battery voltage measure
  394. channel=<0..7>,scale=<ratio_to_4096>,atten=<adc_atten>,cells=<1..3>
  395. endmenu
  396. endmenu