#
#	LOCUSONUS RPI STREAM BOX SETUP
#	------------------------------
#	version: version 4.3.0 (%ARCH)
#
#	Locusonus RPI Streambox initialization file
#	is used for configuring important information in your RPI stream's box.
#	more information @ http://locusonus.org/streambox/
#
#	Once your RPi is online, it is also possible to use the web server interface to edit this file.
#	http://streambox.local/   -- where 'streambox' is your hostname, see the advanced network section below.
#
#	If you can't access to your web interface using your hostname (i.e. the mDNS address), you are not probably on 
#	the same local network: your streambox is behind another router, or behind your smartphone network, a global 
#	network, etc. Alternatively, you can also use the streambox's IP address directly.
#	
#	Ethernet and USB tethering are always enabled (using the DHCP protocol by default).
#	To find your streambox address and edit this file from your Androïd browser, use a network scan application.
#	If you need a static IP address, configure the appropriate network in the advanced network section below.
#
#	If you want access to your streambox from an external network, you must configure your router first.
#	Disclaimer — use at your own risk, no firewall is setup.
#	
#
#	Please note: no space between the variable name, the '=' character and the variable value.
#	Please note: the '#' character before each line specify a comment, don not remove.
#



# Enter your Locusonus Soundmap stream/account.

LOGIN=""
PASSWORD=""




# ---------------------------------------------------------------------------------------------------------------------
#	AUDIO CONFIGURATION
# ---------------------------------------------------------------------------------------------------------------------

# If you have multiple sound cards connected (e.g. for testing), enter the card interface index to use for streaming.
# The first capture device detected is selected by default, i.e. the card index "1".

SOUNDCARD="1"

# Or create and use a virtual two-channel device with the two first audio input: yes or no (default "no").
# The virtual stereo device is in fact two interleaved mono streams, the real devices will drift out of sync over time.

VIRTUAL_STEREO="no"


# Audio output configuration.
#
#	- AUDIO_CHANNEL, the number of channels for the output: 1 for mono, 2 for stereo.
#	- AUDIO_QUALITY, the audio quality between 0 and 1 (default 0.3).
#	  Quality 0 is roughly equivalent to 64kbps average, 0.5 is roughly 160kbps, and 1 gives about 400kbps.
#	  Most people seeking very-near-CD-quality audio encode at a quality of 0.5 or, for lossless stereo coupling, 0.6.
#	- AUDIO_SAMPLERATE, the audio sample rate in Hz: try "8000", "11025", "16000", "22050", "32000", "44100" or "48000"

AUDIO_CHANNEL="1"
AUDIO_QUALITY="0.3"
AUDIO_SAMPLERATE="44100"




# ---------------------------------------------------------------------------------------------------------------------
#	NETWORK CONFIGURATION
# ---------------------------------------------------------------------------------------------------------------------

# Complete lines below to use a Wireless connection.
# Wired connection are always enabled by default.
#
#	- WIFI_ENABLE, turn on/off your wireless connection on boot: yes or no (default "no").
#	- WIFI_SSID, the name of the network to connect to.
#	- WIFI_KEY, the secret key to a WEP or WPA encrypted network (i.e. the Wi-Fi password).
#	- WIFI_SECURITY, the network security type: wpa, wep or none for non secure networks.
#	- WIFI_SSID_IS_HIDDEN, whether or not the specified network is a hidden network: yes or no (default "no").
#	- WIFI_KEY_IS_HEXADECIMAL, if the secret key is hexadecimal: yes or no (default "no").

WIFI_ENABLE="no"
WIFI_SSID=""
WIFI_KEY=""
WIFI_SECURITY="wpa"
WIFI_SSID_IS_HIDDEN="no"
WIFI_KEY_IS_HEXADECIMAL="no"



# Complete lines below to use an USB GPRS/3G/4G modem connection.
# Wired connection are always enabled by default.
#
#	- MODEM_ENABLE, turn on/off your GPRS/3G/4G modem connection on boot: yes or no (default "no").
#	- MODEM_APN, the access point (apn) to connect on. This is specific to your ISP.
#	- MODEM_USER, the username to connect with, as often as not required (default "").
#	- MODEM_PASSWORD, the password to connect with, as often as not required (default "").
#	- MODEM_PIN, if your modem requires a PIN to unlock, set it here (defaults to "")
#	- MODEM_PHONE, the number to dial (default to "*99#").
#	- MODEM_MODE, specify the connection mode. Can be one of '3Gpref', '3Gonly', 'GPRSpref', 'GPRSonly', 'None'.
#	  This generates AT commands specific to certain Huawei modems. All other devices should use the default "none".

MODEM_ENABLE="no"
MODEM_APN=""
MODEM_USER=""
MODEM_PASSWORD=""
MODEM_PIN=""
MODEM_PHONE=""
MODEM_MODE="None"




# ---------------------------------------------------------------------------------------------------------------------
#	ADVANCED AUDIO CONFIGURATION
# ---------------------------------------------------------------------------------------------------------------------

# IQaudIO audio card settings.
#
#	- IQAUDIO_INPUT, select one input below (default "mems") :
#
#		- mems 		to record from the on board digital MEMS microphone
#		- mic		to record from the mono/stereo mic input (electret)
#		- aux		to record from the stereo aux input

IQAUDIO_INPUT="mems"

#	- IQAUDIO_MEMS_GAIN, MEMS input gain         : min=-6.00dB max=36.00dB (default 24)
#	- IQAUDIO_MIC_L_GAIN, mic input gain (left)  : min=-6.00dB max=36.00dB (default 24)
#	- IQAUDIO_MIC_R_GAIN, mic input gain (right) : min=-6.00dB max=36.00dB (default 24)
#	- IQAUDIO_AUX_GAIN, stereo aux input gain    : min=-54.00dB max=15.00dB (default 0)
#	- IQAUDIO_MIX_PGA, mixin PGA (programmable-gain amplifier) : min=-4.50dB max=18.00dB (default 6)
#	- IQAUDIO_ADC_GAIN, ADC (Analogue to Digital Convertor)    : min=-78.00dB max=11.25dB (default 0 for aux, 1.5 otherwise)

IQAUDIO_MEMS_GAIN="24"
IQAUDIO_MIC_L_GAIN="24"
IQAUDIO_MIC_R_GAIN="24"
IQAUDIO_AUX_GAIN="0"
IQAUDIO_MIX_PGA="6"
IQAUDIO_ADC_GAIN="1.5"



# Cirrus Logic/Wolfson audio card settings.
# Please note: only one input can be used for recording.
#
#	- CIRRUS_INPUT, select one input below (default "mems") :
#
#		- mems 		to record from the on board digital MEMS microphones
#		- mic		to record from the mic (or headset)
#		- linein	to record from the line input
#		- micbias	to record from the line input + bias voltage
#		- spdifin	to record from the S/PDIF receiver

CIRRUS_INPUT="mems"

#	- CIRRUS_INL_VOL, audio interface volume (left)  : min=-32.00dB max=16.00dB (default 0)
#	- CIRRUS_INR_VOL, audio interface volume (right) : min=-32.00dB max=16.00dB (default 0)
#	- CIRRUS_INL_PGA, programmable-gain amplifier (left)  : min=0.00dB max=31.00dB (default 0)
#	- CIRRUS_INR_PGA, programmable-gain amplifier (right) : min=0.00dB max=31.00dB (default 0)
#	- CIRRUS_INL_DIG, digital input gain (left)  : min=-64.00dB max=31.50dB (default -6 for mems, 0 otherwise)
#	- CIRRUS_INR_DIG, digital input gain (right) : min=-64.00dB max=31.50dB (default -6 for mems, 0 otherwise)

CIRRUS_INL_VOL="0"
CIRRUS_INR_VOL="0"
CIRRUS_INL_PGA="0"
CIRRUS_INR_PGA="0"
CIRRUS_INL_DIG="-6"
CIRRUS_INR_DIG="-6"

#	- CIRRUS_HEADPHONE, turn on/off playback to the headphone output (default "yes").
#	- CIRRUS_LINE_OUT, turn on/off playback to the line output (default "yes").
#	- CIRRUS_SPEAKER, turn on/off playback to the speakers output (default "no").
#	- CIRRUS_SPDIF_OUT, turn on/off playback to the S/PDIF transmitter (default "no").

CIRRUS_HEADPHONE="yes"
CIRRUS_LINE_OUT="yes"
CIRRUS_SPEAKER="no"
CIRRUS_SPDIF_OUT="no"



# Blue Icicle audio card settings.
#
#	- BLUEICICLE_IN_GAIN, input gain: min=-8.00dB, max=14.00dB (default 0)

BLUEICICLE_IN_GAIN="0"




# ---------------------------------------------------------------------------------------------------------------------
#	ADVANCED NETWORK CONFIGURATION
# ---------------------------------------------------------------------------------------------------------------------

# To tether statically your Androïd smartphone over USB, enter the IP address below.
# To use your phone Wi-Fi access point (hotspot), configure the wireless settings above.
#
# Procedure: connect the phone to your streambox using an USB cable. Enable the tethering option from your phone.
# This is usually done from Settings -> Wireless & Networks -> Internet tethering (or Tethering & portable hotspot for 
# more recent versions).
#
# To find your streambox dynamic address (by default) and edit this file from your Androïd browser, use a network scan
# application.
#
#	- USBTETHERING_STATIC_ADDRESS, enter a static IP address or leave blank to use DHCP (default "").
#	  note: this address must be in your smartphone's address range.

USBTETHERING_STATIC_ADDRESS=""



# Specify the hostname for this stream box.
# This is optional but could be usefull if you have multiple RPI device connected to the same network.
#
# 	- to check your stream status or configure this file via HTTP, use this address:
#	  http://[HOSTNAME].local/
#	- for maintenance and for experimented users, you can access this stream box using this command:
# 	  ssh locusonus@[HOSTNAME].local (password: locusonus)
# 	- to access or transfert to/from this stream box via SFTP, use these parameters:
#	  server: [HOSTNAME].local
#	  username: locusonus (password:locusonus)
#
# The HOSTNAME should be an internet-style hostname, only the ASCII letters 'a' through 'z' (in a case-insensitive
# manner, lower case is safer), the digits '0' through '9', and the hyphen ('-'). No other symbols, punctuation 
# characters, or white space are permitted.
# The original specification (RFC 952) mandated that hostnames could not start with a digit or with a hyphen, and must 
# not end with a hyphen.
# Limit the hostname to 63 characters, which is the length of a DNS label.
# For examples, read the end of this documentation http://www.freedesktop.org/wiki/Software/systemd/hostnamed/

HOSTNAME="streambox"



# Name Resolution configurationn.
# These settings control local DNS and LLMNR name resolution.
# For more explanations, read options description on this documentation
# https://man.archlinux.org/man/core/systemd/resolved.conf.5.en
#
#   - DNS, a space-separated list of IPv4 and IPv6 addresses to use as system DNS servers, ex: 
#     DNS="208.67.222.222 208.67.220.220" to use OpenDNS Servers. Leave blank to use the default configuration 
#     (default "")
#   - FALLBACK_DNS, a space-separated list of IPv4 and IPv6 addresses to use as the fallback DNS servers.
#     Leave blank to use the default configuration (default "")
#   - DNSSEC, allow the Domain Name System Security Extensions (DNSSEC) to be validated locally, excluding LLMNR and 
#     Multicast DNS: yes or no (default "no")
#   - DNS_OVER_TLS, allow all connections to the server to be encrypted: yes or no (default "no")
#     (requires a DNS server that supports DNS-over-TLS)
#   - MULTICAST_DNS, enable full Multicast DNS responder and resolver support on the local host:
#     yes or no (default "no")
#   - LLMNR, enable full Link-Local Multicast Name Resolution (LLMNR) responder and resolver support on the local host:
#     yes or no (default "yes")

DNS=""
FALLBACK_DNS=""
DNSSEC="no"
DNS_OVER_TLS="no"
MULTICAST_DNS="no"
LLMNR="yes"



# Remote Access: configure your stream box anytime, anywhere.
# From outside, go to your Locusonus Soundmap stream/account to retrieve your stream box remote address
# http://locusonus.org/soundmap/admin/
#
#	- REMOTE_ACCESS, turn on/off the remote access service: yes or no (default "no")
#	- REMOTE_ACCESS_HTTP_PORT and REMOTE_ACCESS_SSH_PORT, manually specify a particular port
#	  or leave blank to use a random port (default "")
#
# Warning: UPnP must be activated on your router to open automatically NAT/PAT rules.

REMOTE_ACCESS="no"
REMOTE_ACCESS_HTTP_PORT=""
REMOTE_ACCESS_SSH_PORT=""




# ---------------------------------------------------------------------------------------------------------------------
#	GEOLOCATION CONFIGURATION
# ---------------------------------------------------------------------------------------------------------------------

# Enable or disable GPS tracking.
# The latitude and longitude of the Streambox will be automatically recorded in the server database in order to correctly
# point the stream on the map.
#
#   - GPS_ENABLE, enable or disable the automatic geolocation: yes or no (default "no")
#   - GPS_FREQUENCY, set the update frequency in seconds. Set to 0 or leave blank to save the location once on boot.

GPS_ENABLE="no"
GPS_FREQUENCY="60"




# ---------------------------------------------------------------------------------------------------------------------
#	GPIO INTERFACE CONFIGURATION
# ---------------------------------------------------------------------------------------------------------------------

# Enable or disable the LED status display (web and on Air): yes or no
# For more informations, read documentation @ http://locusonus.org/streambox/statusled/

STATUSLED="no"
