Kconfig.projbuild 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491
  1. menu "Airplay ESP Configuration"
  2. # Board configuration is now in components/boards/Kconfig.projbuild
  3. menu "LED Configuration"
  4. config LED_STATUS_BRIGHTNESS
  5. int "Status LED brightness (0-100% duty for the on phase)"
  6. range 0 255
  7. default 60
  8. help
  9. Brightness level for the status LED (0=off, 255=max).
  10. config LED_STATUS_INVERT
  11. bool "Invert Status LED output (active-low)"
  12. default y
  13. help
  14. If enabled, the status LED output is inverted (active-low).
  15. Use this if your LED is connected with inverted logic
  16. (e.g., LED cathode to GPIO instead of anode).
  17. config LED_ERROR_INVERT
  18. bool "Invert Error LED output (active-low)"
  19. default y
  20. help
  21. If enabled, the error LED output is inverted (active-low).
  22. Use this if your LED is connected with inverted logic
  23. (e.g., LED cathode to GPIO instead of anode).
  24. menu "Status LED Behavior"
  25. choice LED_STATUS_ON_PLAYING
  26. prompt "Status LED when playing"
  27. default LED_STATUS_PLAYING_STEADY
  28. config LED_STATUS_PLAYING_STEADY
  29. bool "Steady"
  30. config LED_STATUS_PLAYING_BLINK_FAST
  31. bool "Blink fast"
  32. config LED_STATUS_PLAYING_VU
  33. bool "VU meter"
  34. endchoice
  35. choice LED_STATUS_ON_PAUSED
  36. prompt "Status LED when paused"
  37. default LED_STATUS_PAUSED_BLINK_MEDIUM
  38. config LED_STATUS_PAUSED_OFF
  39. bool "Off"
  40. config LED_STATUS_PAUSED_STEADY
  41. bool "Steady"
  42. config LED_STATUS_PAUSED_BLINK_SLOW
  43. bool "Blink slow"
  44. config LED_STATUS_PAUSED_BLINK_MEDIUM
  45. bool "Blink medium"
  46. endchoice
  47. choice LED_STATUS_ON_STANDBY
  48. prompt "Status LED when standby"
  49. default LED_STATUS_STANDBY_BLINK_SLOW
  50. config LED_STATUS_STANDBY_OFF
  51. bool "Off"
  52. config LED_STATUS_STANDBY_BLINK_SLOW
  53. bool "Blink slow"
  54. config LED_STATUS_STANDBY_BLINK_MEDIUM
  55. bool "Blink medium"
  56. endchoice
  57. endmenu
  58. menu "RGB LED Behavior"
  59. choice LED_RGB_ON_PLAYING
  60. prompt "RGB LED when playing"
  61. default LED_RGB_PLAYING_VU
  62. config LED_RGB_PLAYING_OFF
  63. bool "Off"
  64. config LED_RGB_PLAYING_STEADY
  65. bool "Steady color"
  66. config LED_RGB_PLAYING_VU
  67. bool "VU meter"
  68. endchoice
  69. choice LED_RGB_ON_PAUSED
  70. prompt "RGB LED when paused"
  71. default LED_RGB_PAUSED_STEADY
  72. config LED_RGB_PAUSED_OFF
  73. bool "Off"
  74. config LED_RGB_PAUSED_STEADY
  75. bool "Steady color"
  76. endchoice
  77. choice LED_RGB_ON_STANDBY
  78. prompt "RGB LED when standby"
  79. default LED_RGB_STANDBY_OFF
  80. config LED_RGB_STANDBY_OFF
  81. bool "Off"
  82. config LED_RGB_STANDBY_STEADY
  83. bool "Steady color"
  84. endchoice
  85. config LED_RGB_COLOR_PAUSED
  86. hex "RGB color when paused (hex)"
  87. default 0x000033
  88. help
  89. RGB color in hex (0xRRGGBB) for paused state.
  90. config LED_RGB_COLOR_STANDBY
  91. hex "RGB color when standby (hex)"
  92. default 0x001100
  93. help
  94. RGB color in hex (0xRRGGBB) for standby state.
  95. endmenu
  96. endmenu
  97. menu "WiFi Configuration"
  98. config DEFAULT_AP_SSID
  99. string "Access Point SSID"
  100. default "ESP32-AirPlay-Setup"
  101. help
  102. SSID (network name) the ESP32 will broadcast.
  103. config DEFAULT_AP_PASSWORD
  104. string "Access Point Password"
  105. default ""
  106. help
  107. Password used for the Access Point. Leave empty and set AUTH MODE to WIFI_AUTH_OPEN for no password.
  108. config DEFAULT_AP_CHANNEL
  109. int "Access Point WiFi Channel"
  110. default 1
  111. help
  112. Be careful you might not see the access point if you use a channel not allowed in your country.
  113. endmenu
  114. menu "Audio Output"
  115. choice AUDIO_OUTPUT_TYPE
  116. prompt "Audio output type"
  117. default AUDIO_OUTPUT_I2S
  118. help
  119. Select the audio output backend.
  120. config AUDIO_OUTPUT_I2S
  121. bool "I2S (standard DAC)"
  122. config AUDIO_OUTPUT_SPDIF
  123. bool "SPDIF (bit-banged via I2S)"
  124. config AUDIO_OUTPUT_USB
  125. bool "USB Audio Class (UAC)"
  126. depends on IDF_TARGET_ESP32S3 || IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32P4
  127. help
  128. Output audio over USB as a UAC device.
  129. The ESP32 appears as a USB audio source to the connected host
  130. (e.g. a USB amplifier or a PC for testing with Audacity).
  131. Requires a chip with USB OTG support.
  132. The USB stream defaults to 48 kHz and must match the UAC
  133. sample-rate setting. AirPlay audio is resampled automatically
  134. when needed.
  135. endchoice
  136. choice OUTPUT_SAMPLE_RATE
  137. prompt "Output sample rate"
  138. default OUTPUT_SAMPLE_RATE_44100
  139. depends on !DAC_TAS57XX && !DAC_TAS58XX && !AUDIO_OUTPUT_USB
  140. help
  141. Sample rate for I2S/SPDIF output. If the AirPlay source sends a
  142. different rate, the audio is resampled automatically.
  143. config OUTPUT_SAMPLE_RATE_44100
  144. bool "44100 Hz (native AirPlay, no resampling)"
  145. config OUTPUT_SAMPLE_RATE_48000
  146. bool "48000 Hz (resampled from 44100)"
  147. endchoice
  148. config OUTPUT_SAMPLE_RATE_HZ
  149. int
  150. default 48000 if AUDIO_OUTPUT_USB
  151. default 48000 if OUTPUT_SAMPLE_RATE_48000
  152. default 44100
  153. config RESAMPLER_TAPS
  154. int "Resampler filter taps (quality)" if OUTPUT_SAMPLE_RATE_48000
  155. range 4 64
  156. default 28 if IDF_TARGET_ESP32S3
  157. default 12 if IDF_TARGET_ESP32
  158. default 16
  159. help
  160. Number of taps for the sinc resampler filters.
  161. More taps = better quality but higher CPU cost.
  162. Must be a multiple of 4.
  163. ESP32-S3 (hardware FPU): 28 recommended.
  164. ESP32 (no FPU): 12 recommended.
  165. endmenu
  166. menu "Bluetooth Configuration"
  167. depends on BT_A2DP_ENABLE
  168. config BT_PIN_CODE
  169. string "Bluetooth pairing PIN code"
  170. default "05032026"
  171. help
  172. Static PIN code used for legacy Bluetooth pairing.
  173. Must be 1-16 digits. Connecting devices will be
  174. prompted to enter this PIN.
  175. config BT_SSP_ENABLED
  176. bool "Enable Secure Simple Pairing (SSP)"
  177. default n
  178. help
  179. Enable SSP for Bluetooth 2.1+ devices. When enabled,
  180. modern devices use numeric comparison (both sides
  181. confirm a displayed number) instead of the legacy PIN.
  182. A screen is required for this.
  183. endmenu
  184. menu "Display Configuration"
  185. config DISPLAY_ENABLED
  186. bool "Enable display"
  187. default n
  188. help
  189. Enable an I2C or SPI OLED display for showing track metadata,
  190. playback position, and a progress bar.
  191. if DISPLAY_ENABLED
  192. choice DISPLAY_DRIVER
  193. prompt "Display driver"
  194. default DISPLAY_DRIVER_SSD1306
  195. help
  196. Select the display controller IC.
  197. config DISPLAY_DRIVER_SSD1306
  198. bool "SSD1306 (128x64) OLED"
  199. config DISPLAY_DRIVER_SH1106
  200. bool "SH1106 (128x64) OLED"
  201. config DISPLAY_DRIVER_SSD1309
  202. bool "SSD1309 (128x64) OLED"
  203. config DISPLAY_DRIVER_SH1107
  204. bool "SH1107 (128x128) OLED"
  205. config DISPLAY_DRIVER_ST7789
  206. bool "ST7789 TFT"
  207. endchoice
  208. choice DISPLAY_HEIGHT
  209. prompt "Display height"
  210. default DISPLAY_HEIGHT_64
  211. depends on !DISPLAY_DRIVER_ST7789
  212. help
  213. Select the display pixel height. 128x32 displays use
  214. a compact two-line layout with scrolling text.
  215. config DISPLAY_HEIGHT_64
  216. bool "64 pixels (128x64)"
  217. config DISPLAY_HEIGHT_32
  218. bool "32 pixels (128x32)"
  219. depends on !DISPLAY_DRIVER_SSD1309 && !DISPLAY_DRIVER_SH1107
  220. endchoice
  221. choice DISPLAY_BUS
  222. prompt "Display bus"
  223. default DISPLAY_BUS_I2C
  224. depends on !DISPLAY_DRIVER_ST7789
  225. help
  226. Select the communication bus for the display.
  227. config DISPLAY_BUS_I2C
  228. bool "I2C"
  229. config DISPLAY_BUS_SPI
  230. bool "SPI"
  231. endchoice
  232. if DISPLAY_BUS_I2C
  233. config DISPLAY_I2C_SDA
  234. int "Display I2C SDA GPIO"
  235. default 21
  236. help
  237. GPIO pin for the display I2C data line.
  238. config DISPLAY_I2C_SCL
  239. int "Display I2C SCL GPIO"
  240. default 22
  241. help
  242. GPIO pin for the display I2C clock line.
  243. config DISPLAY_I2C_ADDR
  244. hex "Display I2C address (7-bit)"
  245. default 0x3C
  246. help
  247. 7-bit I2C address of the OLED display.
  248. Common values: 0x3C or 0x3D.
  249. endif
  250. if DISPLAY_BUS_SPI || DISPLAY_DRIVER_ST7789
  251. config DISPLAY_SPI_CLK
  252. int "Display SPI CLK GPIO"
  253. default 18
  254. help
  255. GPIO pin for the display SPI clock line.
  256. config DISPLAY_SPI_MOSI
  257. int "Display SPI MOSI GPIO"
  258. default 23
  259. help
  260. GPIO pin for the display SPI data (MOSI) line.
  261. config DISPLAY_SPI_CS
  262. int "Display SPI CS GPIO"
  263. default 5
  264. help
  265. GPIO pin for the display SPI chip select.
  266. config DISPLAY_SPI_DC
  267. int "Display SPI DC GPIO"
  268. default 16
  269. help
  270. GPIO pin for the display SPI data/command select.
  271. config DISPLAY_SPI_RST
  272. int "Display SPI RST GPIO"
  273. default -1
  274. help
  275. GPIO pin for the display reset line.
  276. Set to -1 if not connected.
  277. config DISPLAY_BL_GPIO
  278. int "Display backlight GPIO"
  279. default -1
  280. depends on DISPLAY_DRIVER_ST7789
  281. help
  282. GPIO pin for the display backlight.
  283. Set to -1 if not used or always on.
  284. config DISPLAY_ST7789_WIDTH
  285. int "ST7789 display width"
  286. default 320
  287. depends on DISPLAY_DRIVER_ST7789
  288. help
  289. Horizontal resolution exposed to LVGL after panel
  290. rotation/mirroring.
  291. config DISPLAY_ST7789_HEIGHT
  292. int "ST7789 display height"
  293. default 170
  294. depends on DISPLAY_DRIVER_ST7789
  295. help
  296. Vertical resolution exposed to LVGL after panel
  297. rotation/mirroring.
  298. config DISPLAY_ST7789_GAP_X
  299. int "ST7789 panel X gap"
  300. default 0
  301. depends on DISPLAY_DRIVER_ST7789
  302. help
  303. X offset passed to esp_lcd_panel_set_gap().
  304. config DISPLAY_ST7789_GAP_Y
  305. int "ST7789 panel Y gap"
  306. default 35
  307. depends on DISPLAY_DRIVER_ST7789
  308. help
  309. Y offset passed to esp_lcd_panel_set_gap().
  310. endif
  311. config DISPLAY_FLIP
  312. bool "Flip display 180 degrees"
  313. default n
  314. help
  315. Rotate the display output 180 degrees.
  316. config DISPLAY_UPDATE_MS
  317. int "Display refresh interval (ms)"
  318. default 500
  319. range 100 5000
  320. help
  321. How often the display redraws in milliseconds.
  322. endif
  323. endmenu
  324. menu "AirPlay Protocol"
  325. config AIRPLAY_FORCE_V1
  326. bool "Legacy mode: advertise AirPlay v1 (classic) only"
  327. default n
  328. help
  329. By default the receiver accepts BOTH AirPlay 1 (classic
  330. RAOP, used by TuneBlade, AirMusic, shairtunes2, older iOS
  331. fallback) and AirPlay 2 (HomeKit pairing, HAP-encrypted
  332. transport, used by current iOS). Protocol selection is
  333. automatic based on the request shape.
  334. Enable this option only if AirPlay 2 advertisement causes
  335. problems on your network (e.g. iOS preferring AirPlay 2
  336. with broken FairPlay verification). It hides the
  337. _airplay._tcp service entirely, leaving only _raop._tcp
  338. for classic RAOP clients. iOS will fall back to AirPlay 1
  339. with DACP remote control.
  340. When disabled (default), the receiver advertises as an
  341. AirPlay 2 device. Modern iOS uses the MRP (Media Remote
  342. Protocol) for remote control in AirPlay 2 mode, which
  343. is not implemented, so hardware play/pause falls back
  344. to local mute.
  345. Note: AirPlay v1 does not support RSA key exchange for
  346. audio encryption in this codebase. The receiver will
  347. advertise et=0 (no encryption). If iOS refuses to connect,
  348. audio encryption support may need to be added.
  349. config AIRPLAY_TIMING_THRESHOLD_MS
  350. int "Early/late timing threshold for buffered streams (ms)"
  351. default 10
  352. range 2 200
  353. help
  354. Maximum amount a frame may be early or late (in milliseconds)
  355. before the timing engine holds it as pending (early) or drops
  356. it (late). Buffered AirPlay 2 streams (AAC, type 103) have a
  357. deep jitter buffer, so a tight threshold keeps tight sync
  358. without causing drop-outs.
  359. config AIRPLAY_RT_TIMING_THRESHOLD_MS
  360. int "Early/late timing threshold for unbuffered streams (ms)"
  361. default 50
  362. range 2 500
  363. help
  364. Same as above but for unbuffered realtime streams (ALAC over
  365. UDP, type 96). Realtime streams have little or no jitter
  366. buffer to absorb scheduling hiccups (e.g. when image/metadata
  367. arrives on the RTSP connection), so a tight threshold causes
  368. audible drop-outs. A larger threshold tolerates the jitter at
  369. the cost of slightly looser sync. Increase this if you still
  370. hear drop-outs on AirPlay 1 / realtime playback.
  371. config ENABLE_AIRPLAY_ARTWORK
  372. bool "Enable cover-art / artwork reception"
  373. default n
  374. help
  375. Receive cover-art images. Enable it only if you have a display
  376. cabable of and want album art.
  377. endmenu
  378. menu "Button Configuration"
  379. config BTN_PLAY_PAUSE_GPIO
  380. int "Play/Pause button GPIO (-1 to disable)"
  381. default -1
  382. range -1 48
  383. help
  384. GPIO pin for the play/pause button (active-low, internal pull-up).
  385. Set to -1 to disable.
  386. config BTN_VOLUME_UP_GPIO
  387. int "Volume Up button GPIO (-1 to disable)"
  388. default -1
  389. range -1 48
  390. help
  391. GPIO pin for the volume up button (active-low, internal pull-up).
  392. Supports long-press auto-repeat.
  393. Set to -1 to disable.
  394. config BTN_VOLUME_DOWN_GPIO
  395. int "Volume Down button GPIO (-1 to disable)"
  396. default -1
  397. range -1 48
  398. help
  399. GPIO pin for the volume down button (active-low, internal pull-up).
  400. Supports long-press auto-repeat.
  401. Set to -1 to disable.
  402. config BTN_NEXT_GPIO
  403. int "Next Track button GPIO (-1 to disable)"
  404. default -1
  405. range -1 48
  406. help
  407. GPIO pin for the next track button (active-low, internal pull-up).
  408. Set to -1 to disable.
  409. config BTN_PREV_GPIO
  410. int "Previous Track button GPIO (-1 to disable)"
  411. default -1
  412. range -1 48
  413. help
  414. GPIO pin for the previous track button (active-low, internal pull-up).
  415. Set to -1 to disable.
  416. config BTN_PLAY_PAUSE_DOUBLE_CLICK
  417. bool "Play/Pause double-click cycles channel mode"
  418. default n
  419. help
  420. When enabled, a single play/pause press is deferred until the
  421. double-click window expires. Two presses within that window
  422. cycle the audio channel mode instead of play/pause.
  423. endmenu
  424. endmenu