Maple14: Add EQ/DRC and Volume table
Because the size of MAPLE14 is more biger than other Hana projects,
so need new EQ/DRC and Volume table. Add script for loading cras
config base on "mosys platform chassis". Move orginal Hana configs
to HANA, add Maple14 configs to MAPLE14.
BUG=b:88740531
TEST=emerge-hana chromeos-bsp-hana and confirm cras configs loaded
based on "mosys platform chassis".
Change-Id: Ia7eae8d599c8b9580346f1e8d6a629b34759a101
Reviewed-on: https://chromium-review.googlesource.com/1215123
Commit-Ready: Hao He <hao.he@bitland.corp-partner.google.com>
Tested-by: Hao He <hao.he@bitland.corp-partner.google.com>
Reviewed-by: Philip Chen <philipchen@chromium.org>
Reviewed-by: Hao He <hao.he@bitland.corp-partner.google.com>
(cherry picked from commit f7fa42baa88c5c20a55da1bb767569a79dd43c2f)
Reviewed-on: https://chromium-review.googlesource.com/1235393
Commit-Queue: Philip Chen <philipchen@chromium.org>
Tested-by: Philip Chen <philipchen@chromium.org>
diff --git a/overlay-hana/chromeos-base/chromeos-bsp-hana/chromeos-bsp-hana-0.0.1-r7.ebuild b/overlay-hana/chromeos-base/chromeos-bsp-hana/chromeos-bsp-hana-0.0.1-r7.ebuild
new file mode 120000
index 0000000..a60b799
--- /dev/null
+++ b/overlay-hana/chromeos-base/chromeos-bsp-hana/chromeos-bsp-hana-0.0.1-r7.ebuild
@@ -0,0 +1 @@
+chromeos-bsp-hana-0.0.1.ebuild
\ No newline at end of file
diff --git a/overlay-hana/chromeos-base/chromeos-bsp-hana/files/audio-config/cras-config/dsp.ini b/overlay-hana/chromeos-base/chromeos-bsp-hana/files/audio-config/cras-config/HANA/dsp.ini
similarity index 100%
rename from overlay-hana/chromeos-base/chromeos-bsp-hana/files/audio-config/cras-config/dsp.ini
rename to overlay-hana/chromeos-base/chromeos-bsp-hana/files/audio-config/cras-config/HANA/dsp.ini
diff --git a/overlay-hana/chromeos-base/chromeos-bsp-hana/files/audio-config/cras-config/mtk-rt5650 b/overlay-hana/chromeos-base/chromeos-bsp-hana/files/audio-config/cras-config/HANA/mtk-rt5650
similarity index 100%
rename from overlay-hana/chromeos-base/chromeos-bsp-hana/files/audio-config/cras-config/mtk-rt5650
rename to overlay-hana/chromeos-base/chromeos-bsp-hana/files/audio-config/cras-config/HANA/mtk-rt5650
diff --git a/overlay-hana/chromeos-base/chromeos-bsp-hana/files/audio-config/cras-config/MAPLE14/dsp.ini b/overlay-hana/chromeos-base/chromeos-bsp-hana/files/audio-config/cras-config/MAPLE14/dsp.ini
new file mode 100644
index 0000000..d4be010
--- /dev/null
+++ b/overlay-hana/chromeos-base/chromeos-bsp-hana/files/audio-config/cras-config/MAPLE14/dsp.ini
@@ -0,0 +1,119 @@
+[output_source]
+library=builtin
+label=source
+purpose=playback
+disable=(not (equal? dsp_name "speaker_eq"))
+output_0={src:0}
+output_1={src:1}
+
+[output_sink]
+library=builtin
+label=sink
+purpose=playback
+input_0={dst:0}
+input_1={dst:1}
+
+[drc]
+library=builtin
+label=drc
+input_0={src:0}
+input_1={src:1}
+output_2={intermediate:0}
+output_3={intermediate:1}
+input_4=1 ; emphasis_disabled
+input_5=0 ; f
+input_6=1 ; enable
+input_7=-24 ; threshold
+input_8=30 ; knee
+input_9=12 ; ratio
+input_10=0.003 ; attack
+input_11=0.25 ; release
+input_12=1 ; boost
+input_13=200 ; f
+input_14=1 ; enable
+input_15=-24 ; threshold
+input_16=30 ; knee
+input_17=12 ; ratio
+input_18=0.003 ; attack
+input_19=0.25 ; release
+input_20=-1 ; boost
+input_21=2000 ; f
+input_22=1 ; enable
+input_23=-24 ; threshold
+input_24=30 ; knee
+input_25=12 ; ratio
+input_26=0.003 ; attack
+input_27=0.25 ; release
+input_28=-1 ; boost
+
+[eq2]
+library=builtin
+label=eq2
+input_0={intermediate:0}
+input_1={intermediate:1}
+output_2={dst:0}
+output_3={dst:1}
+input_4=2 ; highpass
+input_5=400 ; freq
+input_6=0 ; Q
+input_7=0 ; gain
+input_8=2 ; highpass
+input_9=400 ; freq
+input_10=0 ; Q
+input_11=0 ; gain
+input_12=6 ; peaking
+input_13=680 ; freq
+input_14=2 ; Q
+input_15=-2 ; gain
+input_16=6 ; peaking
+input_17=680 ; freq
+input_18=2 ; Q
+input_19=-2 ; gain
+input_20=6 ; peaking
+input_21=1300 ; freq
+input_22=2 ; Q
+input_23=-3 ; gain
+input_24=6 ; peaking
+input_25=1300 ; freq
+input_26=2 ; Q
+input_27=-3 ; gain
+input_28=6 ; peaking
+input_29=1800 ; freq
+input_30=1 ; Q
+input_31=-3 ; gain
+input_32=6 ; peaking
+input_33=1800 ; freq
+input_34=1 ; Q
+input_35=-3 ; gain
+input_36=6 ; peaking
+input_37=2000 ; freq
+input_38=1 ; Q
+input_39=-2 ; gain
+input_40=6 ; peaking
+input_41=2000 ; freq
+input_42=1 ; Q
+input_43=-2 ; gain
+input_44=6 ; peaking
+input_45=3500 ; freq
+input_46=1 ; Q
+input_47=-3 ; gain
+input_48=6 ; peaking
+input_49=3500 ; freq
+input_50=1 ; Q
+input_51=-3 ; gain
+input_52=6 ; peaking
+input_53=5000 ; freq
+input_54=1 ; Q
+input_55=-3 ; gain
+input_56=6 ; peaking
+input_57=5000 ; freq
+input_58=1 ; Q
+input_59=-3 ; gain
+input_60=6 ; peaking
+input_61=7000 ; freq
+input_62=1 ; Q
+input_63=-3 ; gain
+input_64=6 ; peaking
+input_65=7000 ; freq
+input_66=1 ; Q
+input_67=-3 ; gain
diff --git a/overlay-hana/chromeos-base/chromeos-bsp-hana/files/audio-config/cras-config/mtk-rt5650 b/overlay-hana/chromeos-base/chromeos-bsp-hana/files/audio-config/cras-config/MAPLE14/mtk-rt5650
similarity index 100%
copy from overlay-hana/chromeos-base/chromeos-bsp-hana/files/audio-config/cras-config/mtk-rt5650
copy to overlay-hana/chromeos-base/chromeos-bsp-hana/files/audio-config/cras-config/MAPLE14/mtk-rt5650
diff --git a/overlay-hana/chromeos-base/chromeos-bsp-hana/files/audio-config/cras-config/get_device_config_dir b/overlay-hana/chromeos-base/chromeos-bsp-hana/files/audio-config/cras-config/get_device_config_dir
new file mode 100755
index 0000000..952e2c6
--- /dev/null
+++ b/overlay-hana/chromeos-base/chromeos-bsp-hana/files/audio-config/cras-config/get_device_config_dir
@@ -0,0 +1,13 @@
+#!/bin/sh
+# Copyright 2015 The Chromium OS Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+CHASSIS="$(mosys platform chassis)"
+CHASSIS_ID="HANA"
+
+if [ "${CHASSIS}" = "MAPLE14" ]; then
+ CHASSIS_ID="MAPLE14"
+fi
+
+echo "/etc/cras/${CHASSIS_ID}"