aiy-board-audio: Initial commit of the first debian package

This imports the base files needed to make a debian package, and sets us up with
our first audio-related package containing the audio routing information
pulseaudio needs.

Change-Id: I8da93a7787949444f9f1b31e7c2a5840c7c65b0c
diff --git a/debian/aiy-board-audio.install b/debian/aiy-board-audio.install
new file mode 100644
index 0000000..3c29d34
--- /dev/null
+++ b/debian/aiy-board-audio.install
@@ -0,0 +1 @@
+usr /
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..98a2553
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,5 @@
+aiy-board-audio (0.1) UNRELEASED; urgency=medium
+
+  * Initial release.
+
+ -- June Tate-Gans <jtgans@google.com>  Mon, 04 Jun 2018 16:14:00 -0800
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 0000000..f599e28
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+10
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..6b9299b
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,14 @@
+Source: aiy-board-audio
+Maintainer: AIY Projects <support-aiyprojects@google.com>
+
+Package: aiy-board-audio
+Section: sound
+Priority: required
+Architecture: all
+Depends: pulseaudio
+Description: Audio and routing settings for the AIY Board
+ This package is a semi-metapackage that includes audio route settings,
+ as well as dependencies on pulseaudio.
+ .
+ This package and it's dependencies are required to make the AIY
+ Board's audio components function as intended.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..818407c
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,7 @@
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: aiy-board-audio
+Source: https://aiyprojects.withgoogle.com
+
+Files: *
+Copyright: Copyright 2018 Google, LLC <support-aiyprojects@google.com>
+License: Apache-2.0
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..ea37544
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,8 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+
+# Uncomment this to turn on verbose mode.
+# export DH_VERBOSE=1
+
+%:
+	dh $@
diff --git a/usr/share/alsa/ucm/aiy-board-audio/HiFi.conf b/usr/share/alsa/ucm/aiy-board-audio/HiFi.conf
new file mode 100644
index 0000000..44988fc
--- /dev/null
+++ b/usr/share/alsa/ucm/aiy-board-audio/HiFi.conf
@@ -0,0 +1,119 @@
+SectionVerb {
+	# ALSA PCM
+	Value {
+		TQ "HiFi"
+
+		# ALSA PCM device for HiFi
+		PlaybackPCM "hw:0"
+		CapturePCM "hw:0"
+	}
+
+	EnableSequence [
+		cdev "hw:0"
+
+		cset "name='DAC1 Playback Volume' 80,80"
+
+		# Output Configuration
+		cset "name='DAC1 MIXL DAC1 Switch' on"
+		cset "name='DAC1 MIXR DAC1 Switch' on"
+		cset "name='Stereo DAC MIXL DAC L1 Switch' on"
+		cset "name='Stereo DAC MIXR DAC R1 Switch' on"
+
+		cset "name='HPOVOL MIXL DAC1 Switch' on"
+		cset "name='HPOVOL MIXR DAC1 Switch' on"
+		cset "name='HPOVOL L Switch' on"
+		cset "name='HPOVOL R Switch' on"
+		cset "name='HPO MIX HPVOL Switch' on"
+		cset "name='Headphone Switch' on"
+		cset "name='Headphone Playback Volume' 75"
+
+		cset "name='SPK MIXL DAC L1 Switch' on"
+		cset "name='SPK MIXR DAC R1 Switch' on"
+		cset "name='SPKVOL L Switch' on"
+		cset "name='SPKVOL R Switch' on"
+		cset "name='SPOL MIX SPKVOL L Switch' on"
+		cset "name='SPOR MIX SPKVOL R Switch' on"
+		cset "name='Speaker Switch' on"
+		cset "name='Speaker Playback Volume' 75"
+
+		# Input Configuration
+		cset "name='ADC Capture Volume' 65,65"
+		cset "name='ADC Boost Capture Volume' 1,1"
+		cset "name='RECMIXL BST1 Switch' on"
+		cset "name='RECMIXR BST2 Switch' on"
+		# cset "name='Stereo ADC1 Mux' 'ADC'"
+		cset "name='Sto1 ADC MIXL ADC1 Switch' on"
+		cset "name='Sto1 ADC MIXR ADC1 Switch' on"
+		cset "name='Int Mic Switch' on"
+	]
+
+	DisableSequence [
+		cdev "hw:0"
+	]
+}
+
+SectionDevice."Speaker".0 {
+	Comment "Speaker"
+
+	Value {
+		PlaybackChannels "2"
+	}
+
+	ConflictingDevice [
+		"Headphone"
+	]
+
+	EnableSequence [
+		cdev "hw:0"
+		cset "name='Speaker Channel Switch' on"
+		cset "name='Speaker Switch' on"
+	]
+
+	DisableSequence [
+		cdev "hw:0"
+		cset "name='Speaker Channel Switch' off"
+		cset "name='Speaker Switch' off"
+	]
+}
+
+SectionDevice."Headphone".0 {
+	Comment "Headphones"
+
+	Value {
+		PlaybackChannels "2"
+		JackControl "Headphone Jack"
+		JackDev "/dev/input/event0"
+	}
+
+	ConflictingDevice [
+		"Speaker"
+	]
+
+	EnableSequence [
+		cdev "hw:0"
+		cset "name='Headphone Channel Switch' on"
+		cset "name='Headphone Switch' on"
+	]
+
+	DisableSequence [
+		cdev "hw:0"
+		cset "name='Headphone Channel Switch' off"
+		cset "name='Headphone Switch' off"
+	]
+}
+
+SectionDevice."Mic".0 {
+	Comment "Internal Microphone"
+
+	Value {
+		CaptureChannels "2"
+		CapturePriority "150"
+	}
+
+	EnableSequence [
+	]
+
+	DisableSequence [
+	]
+}
+
diff --git a/usr/share/alsa/ucm/aiy-board-audio/aiy-voicebonnet.conf b/usr/share/alsa/ucm/aiy-board-audio/aiy-voicebonnet.conf
new file mode 100644
index 0000000..ac03d52
--- /dev/null
+++ b/usr/share/alsa/ucm/aiy-board-audio/aiy-voicebonnet.conf
@@ -0,0 +1,6 @@
+Comment "Google AIY Voice Bonnet"
+SectionUseCase."HiFi" {
+	File "HiFi.conf"
+	Comment "Default"
+}
+