menu "Squeezelite-ESP32"
	menu "Logging"
		config LOGGING_SLIMPROTO
        	string "logging level for slimproto "
        	default "info"
        	help
        		Set logging level info|debug|sdebug
		config LOGGING_STREAM
        	string "logging level for stream "
        	default "info"
        	help
        		Set logging level info|debug|sdebug
   		config LOGGING_DECODE
        	string "logging level for decode"
        	default "info"
        	help
        		Set logging level info|debug|sdebug 	
   		config LOGGING_OUTPUT
        	string "logging level for output"
        	default "info"
        	help
        		Set logging level info|debug|sdebug 	
	endmenu
    menu "Audio CODEC libraries"
    config INCLUDE_FLAC
        bool "FLAC"
        default 1
        help
            Include FLAC library for flc decoding.
    config INCLUDE_FAAD
        bool "FAAD"
        default 1
        help
            Include FAAD library for aac decoding.
    config INCLUDE_MAD
        bool "MAD"
        default 1
        help
            Include mad library for mp3 decoding.
	config INCLUDE_VORBIS
        bool "VORBIS"
        default 1
        help
            Include vorbis/ogg library for ogg/vorbis decoding.			
	config INCLUDE_ALAC
        bool "ALAC"
        default 1
        help
            Include alac library for alac decoding.			
	config INCLUDE_OPUS
        bool "OPUS"
        default 1
        help
            Include opus library for opus decoding.						
	   
    endmenu
	menu "Audio Output"
		choice OUTPUT_TYPE
	        prompt "Output Type"
	        default BASIC_I2C_BT
	        help
	            Type of hardware platform
	        config SQUEEZEAMP 
	            bool "SqueezeAMP (TAS575x & Bluetooth)"
	        config BASIC_I2C_BT
	            bool "Generic I2S & Bluetooth"
	    endchoice
	  	
		menu "DAC I2S settings" 
			depends on BASIC_I2C_BT
	    	config I2S_NUM         
		        int "I2S channel (0 or 1). "
		        default 0
		        help
		            I2S dma channel to use.  
		    config I2S_BCK_IO         
		        int "I2S Bit clock GPIO number. "
		        default 26
		        help
		            I2S Bit Clock gpio pin to use.  
		    config I2S_WS_IO         
		        int "I2S Word Select GPIO number. "
		        default 25
		        help
		            I2S Word Select gpio pin to use.
		    config I2S_DO_IO         
		        int "I2S Data I/O GPIO number. "
		        default 22
		        help
		            I2S data I/O gpio pin to use.
		    choice 
	  			prompt "Bit Depth for I2S output"
		        default I2S_BITS_PER_CHANNEL_16
		        config I2S_BITS_PER_CHANNEL_24
		            bool "24 Bits"
		        config I2S_BITS_PER_CHANNEL_16
		            bool "16 Bits"
		        config I2S_BITS_PER_CHANNEL_8
		            bool "8 Bits"
		    endchoice
			config I2S_BITS_PER_CHANNEL
			    int
			    default 16
			    default 16 if I2S_BITS_PER_CHANNEL_16
			    default 24 if I2S_BITS_PER_CHANNEL_24
			    default 8 if I2S_BITS_PER_CHANNEL_8
		endmenu
		
		menu "SPDIF settings" 
		    depends on BASIC_I2C_BT
			config SDIF_NUM         
		        int "SDPIF/I2S channel (0 or 1)"
		        default 0
		        help
		            I2S dma channel to use.  
		    config SPDIF_BCK_IO         
		        int "SDPIF/I2S Bit clock GPIO number"
		        default 26
		        help
		            Not used but must be configured.  
		    config SPDIF_WS_IO         
		        int "SPDIF/I2S Word Select GPIO number"
		        default 25
		        help
		            Not used but must be configured.  
		    config SPDIF_DO_IO         
		        int "I2S Data I/O GPIO number"
		        default 15
		        help
		            SPDIF/I2S data I/O gpio pin to use
		endmenu
				
		menu "A2DP settings"
		    config A2DP_SINK_NAME
		        string "Name of Bluetooth A2DP device"
		        default "SMSL BT4.2"
		        help
		            This is the name of the bluetooth speaker that Squeezelite will try connecting to.
		    config A2DP_DEV_NAME
		        string "Name of Squeezelite device to use when connecting to A2DP device"
		        default "Squeezelite"
		        help
		            This is the name of the device that the Bluetooth speaker will see when it is connected to.
		    config A2DP_CONTROL_DELAY_MS
		        int "Control loop delay. "
		        default 500
		        help
		            Decreasing this will lead to a more responsive BT control, but might lead to noisy log files if debug is enabled.
		    config A2DP_CONNECT_TIMEOUT_MS
		    	int "Time out duration when trying to connect to an A2DP audio sink"
		        default 1000
		        help
		            Increasing this value will give more chance for less stable connections to be established.	   
		endmenu
	endmenu
	
	menu "Audio Input"
		config BT_SINK
			bool "Bluetooth receiver"
			default y
			help
				Enable bluetooth sink (Note that you obviously can't at the same time be a Bluetooth receiver and transmitter)
		config BT_NAME
			depends on BT_SINK
			string "Name of Bluetooth A2DP device"
		        default "ESP32-BT"
		    help
				This is the name of the bluetooth speaker that will be broadcasted			
		config BT_SINK_PIN		
			depends on BT_SINK		
			int "Bluetooth PIN code"
		        default 1234
		config AIRPLAY_SINK
			bool "AirPlay receiver"
			default y
		config AIRPLAY_NAME
			depends on AIRPLAY_SINK
			string "Name of AirPlay device"
				default "ESP32-AirPlay"
		    help
				This is the name of the AirPlay speaker that will be broadcasted		
		config AIRPLAY_PORT
			depends on AIRPLAY_SINK
			string "AirPlay listening port"
				default 5000
		    help
				AirPlay service listening port
	endmenu	

	menu "Display Screen"
		config DISPLAY_CONFIG
			string "Screen configuraton"
			default ""
			help
				Set parameters for display screen, leave empty for no screen
				I2C,width=<size>,height=<size>
				SPI,width=<size>,height=<size>,select=<gpio>
		config DISPLAY_I2C_SPEED
			int "I2C bus speed"
				default 250000
	endmenu	
	
	menu "Various I/O"
		config I2C_CONFIG
			string "I2C system configuration"
			default ""
			help
				Set parameters of shared I2C interface
				sda=<gpio>,scl=<gpio>,speed=<num>,port=<0|1>
		config LED_GREEN_GPIO
			int "Green led GPIO"
			default -1
			help
				Set to -1 for no LED
		config LED_RED_GPIO				
			int "Red led GPIO"
			default -1
			help
				Set to -1 for no LED
	endmenu	
	
endmenu