Kconfig.projbuild 9.9 KB

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