diff mbox

[alsa-lib] conf/ucm: ROCKCHIP-I2S: add Rockchip I2S UCM config.

Message ID 1462429926-9464-1-git-send-email-enric.balletbo@collabora.com (mailing list archive)
State New, archived
Headers show

Commit Message

Enric Balletbo i Serra May 5, 2016, 6:32 a.m. UTC
Taken from the ChromeOS sources, this configuration was tested on Veyron
Jerry based Chromebook from Google.

Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
---
 src/conf/ucm/Makefile.am                    |  2 +-
 src/conf/ucm/ROCKCHIP-I2S/HiFi.conf         | 94 +++++++++++++++++++++++++++++
 src/conf/ucm/ROCKCHIP-I2S/ROCKCHIP-I2S.conf |  6 ++
 3 files changed, 101 insertions(+), 1 deletion(-)
 create mode 100644 src/conf/ucm/ROCKCHIP-I2S/HiFi.conf
 create mode 100644 src/conf/ucm/ROCKCHIP-I2S/ROCKCHIP-I2S.conf

Comments

Takashi Iwai May 9, 2016, 1 p.m. UTC | #1
On Thu, 05 May 2016 08:32:06 +0200,
Enric Balletbo i Serra wrote:
> 
> Taken from the ChromeOS sources, this configuration was tested on Veyron
> Jerry based Chromebook from Google.
> 
> Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>

Applied now.  The necessary changes for Makefile.am and
src/conf/ucm/ROCKCHIP-I2S/Makefile.am were missing, so I added them
manually.


thanks,

Takashi


> ---
>  src/conf/ucm/Makefile.am                    |  2 +-
>  src/conf/ucm/ROCKCHIP-I2S/HiFi.conf         | 94 +++++++++++++++++++++++++++++
>  src/conf/ucm/ROCKCHIP-I2S/ROCKCHIP-I2S.conf |  6 ++
>  3 files changed, 101 insertions(+), 1 deletion(-)
>  create mode 100644 src/conf/ucm/ROCKCHIP-I2S/HiFi.conf
>  create mode 100644 src/conf/ucm/ROCKCHIP-I2S/ROCKCHIP-I2S.conf
> 
> diff --git a/src/conf/ucm/Makefile.am b/src/conf/ucm/Makefile.am
> index e6a6325..d1d51e5 100644
> --- a/src/conf/ucm/Makefile.am
> +++ b/src/conf/ucm/Makefile.am
> @@ -1 +1 @@
> -SUBDIRS=DAISY-I2S PandaBoard PandaBoardES SDP4430 tegraalc5632 PAZ00 GoogleNyan broadwell-rt286
> +SUBDIRS=DAISY-I2S PandaBoard PandaBoardES SDP4430 tegraalc5632 PAZ00 GoogleNyan broadwell-rt286 ROCKCHIP-I2S
> diff --git a/src/conf/ucm/ROCKCHIP-I2S/HiFi.conf b/src/conf/ucm/ROCKCHIP-I2S/HiFi.conf
> new file mode 100644
> index 0000000..7bfe995
> --- /dev/null
> +++ b/src/conf/ucm/ROCKCHIP-I2S/HiFi.conf
> @@ -0,0 +1,94 @@
> +SectionVerb {
> +	Value {
> +		OutputDspName "speaker_eq"
> +		MinBufferLevel "512"
> +	}
> +
> +	EnableSequence [
> +		cdev "hw:ROCKCHIPI2S"
> +
> +		cset "name='Left Speaker Mixer Left DAC Switch' on"
> +		cset "name='Right Speaker Mixer Right DAC Switch' on"
> +		cset "name='Headphone Left Switch' off"
> +		cset "name='Headphone Right Switch' off"
> +		cset "name='Digital EQ 3 Band Switch' off"
> +		cset "name='Digital EQ 5 Band Switch' off"
> +		cset "name='Digital EQ 7 Band Switch' off"
> +		cset "name='Biquad Switch' off"
> +		cset "name='Filter Mode' Music"
> +		cset "name='ADC Oversampling Rate' 0"
> +
> +		cset "name='DMIC Mux' DMIC"
> +		cset "name='MIC2 Mux' IN34"
> +		cset "name='Right ADC Mixer MIC2 Switch' on"
> +		cset "name='Left ADC Mixer MIC2 Switch' on"
> +		cset "name='MIC2 Volume' 20"
> +		cset "name='Headset Mic Switch' off"
> +		cset "name='Int Mic Switch' on"
> +
> +		cset "name='ADCR Boost Volume' 4"
> +		cset "name='ADCL Boost Volume' 4"
> +		cset "name='ADCR Volume' 11"
> +		cset "name='ADCL Volume' 11"
> +
> +		cset "name='Left Speaker Mixer Left DAC Switch' on"
> +		cset "name='Right Speaker Mixer Right DAC Switch' on"
> +		cset "name='Speaker Left Mixer Volume' 2"
> +		cset "name='Speaker Right Mixer Volume' 2"
> +		cset "name='Record Path DC Blocking' on"
> +		cset "name='Playback Path DC Blocking' on"
> +
> +		cset "name='Speaker Left Switch' on"
> +		cset "name='Speaker Right Switch' on"
> +		cset "name='Speaker Switch' on"
> +	]
> +
> +	DisableSequence [
> +	]
> +}
> +
> +SectionDevice."Headphone".0 {
> +	Value {
> +		JackName "ROCKCHIP-I2S Headset Jack"
> +		OutputDspName ""
> +	}
> +
> +	EnableSequence [
> +		cdev "hw:ROCKCHIPI2S"
> +
> +		cset "name='Speaker Switch' off"
> +		cset "name='Headphone Left Switch' on"
> +		cset "name='Headphone Right Switch' on"
> +	]
> +	DisableSequence [
> +		cdev "hw:ROCKCHIPI2S"
> +
> +		cset "name='Headphone Left Switch' off"
> +		cset "name='Headphone Right Switch' off"
> +		cset "name='Speaker Switch' on"
> +	]
> +}
> +
> +SectionDevice."Mic".0 {
> +	Value {
> +		JackName "ROCKCHIP-I2S Headset Jack"
> +	}
> +
> +	EnableSequence [
> +		cdev "hw:ROCKCHIPI2S"
> +
> +		cset "name='Int Mic Switch' off"
> +		cset "name='DMIC Mux' ADC"
> +		cset "name='Headset Mic Switch' on"
> +		cset "name='Record Path DC Blocking' on"
> +	]
> +
> +	DisableSequence [
> +		cdev "hw:ROCKCHIPI2S"
> +
> +		cset "name='Headset Mic Switch' off"
> +		cset "name='DMIC Mux' DMIC"
> +		cset "name='Int Mic Switch' on"
> +		cset "name='Record Path DC Blocking' off"
> +	]
> +}
> diff --git a/src/conf/ucm/ROCKCHIP-I2S/ROCKCHIP-I2S.conf b/src/conf/ucm/ROCKCHIP-I2S/ROCKCHIP-I2S.conf
> new file mode 100644
> index 0000000..0c399b0
> --- /dev/null
> +++ b/src/conf/ucm/ROCKCHIP-I2S/ROCKCHIP-I2S.conf
> @@ -0,0 +1,6 @@
> +Comment "Rockchip card"
> +
> +SectionUseCase."HiFi" {
> +	File "HiFi.conf"
> +	Comment "Default"
> +}
> -- 
> 2.1.0
> 
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
>
diff mbox

Patch

diff --git a/src/conf/ucm/Makefile.am b/src/conf/ucm/Makefile.am
index e6a6325..d1d51e5 100644
--- a/src/conf/ucm/Makefile.am
+++ b/src/conf/ucm/Makefile.am
@@ -1 +1 @@ 
-SUBDIRS=DAISY-I2S PandaBoard PandaBoardES SDP4430 tegraalc5632 PAZ00 GoogleNyan broadwell-rt286
+SUBDIRS=DAISY-I2S PandaBoard PandaBoardES SDP4430 tegraalc5632 PAZ00 GoogleNyan broadwell-rt286 ROCKCHIP-I2S
diff --git a/src/conf/ucm/ROCKCHIP-I2S/HiFi.conf b/src/conf/ucm/ROCKCHIP-I2S/HiFi.conf
new file mode 100644
index 0000000..7bfe995
--- /dev/null
+++ b/src/conf/ucm/ROCKCHIP-I2S/HiFi.conf
@@ -0,0 +1,94 @@ 
+SectionVerb {
+	Value {
+		OutputDspName "speaker_eq"
+		MinBufferLevel "512"
+	}
+
+	EnableSequence [
+		cdev "hw:ROCKCHIPI2S"
+
+		cset "name='Left Speaker Mixer Left DAC Switch' on"
+		cset "name='Right Speaker Mixer Right DAC Switch' on"
+		cset "name='Headphone Left Switch' off"
+		cset "name='Headphone Right Switch' off"
+		cset "name='Digital EQ 3 Band Switch' off"
+		cset "name='Digital EQ 5 Band Switch' off"
+		cset "name='Digital EQ 7 Band Switch' off"
+		cset "name='Biquad Switch' off"
+		cset "name='Filter Mode' Music"
+		cset "name='ADC Oversampling Rate' 0"
+
+		cset "name='DMIC Mux' DMIC"
+		cset "name='MIC2 Mux' IN34"
+		cset "name='Right ADC Mixer MIC2 Switch' on"
+		cset "name='Left ADC Mixer MIC2 Switch' on"
+		cset "name='MIC2 Volume' 20"
+		cset "name='Headset Mic Switch' off"
+		cset "name='Int Mic Switch' on"
+
+		cset "name='ADCR Boost Volume' 4"
+		cset "name='ADCL Boost Volume' 4"
+		cset "name='ADCR Volume' 11"
+		cset "name='ADCL Volume' 11"
+
+		cset "name='Left Speaker Mixer Left DAC Switch' on"
+		cset "name='Right Speaker Mixer Right DAC Switch' on"
+		cset "name='Speaker Left Mixer Volume' 2"
+		cset "name='Speaker Right Mixer Volume' 2"
+		cset "name='Record Path DC Blocking' on"
+		cset "name='Playback Path DC Blocking' on"
+
+		cset "name='Speaker Left Switch' on"
+		cset "name='Speaker Right Switch' on"
+		cset "name='Speaker Switch' on"
+	]
+
+	DisableSequence [
+	]
+}
+
+SectionDevice."Headphone".0 {
+	Value {
+		JackName "ROCKCHIP-I2S Headset Jack"
+		OutputDspName ""
+	}
+
+	EnableSequence [
+		cdev "hw:ROCKCHIPI2S"
+
+		cset "name='Speaker Switch' off"
+		cset "name='Headphone Left Switch' on"
+		cset "name='Headphone Right Switch' on"
+	]
+	DisableSequence [
+		cdev "hw:ROCKCHIPI2S"
+
+		cset "name='Headphone Left Switch' off"
+		cset "name='Headphone Right Switch' off"
+		cset "name='Speaker Switch' on"
+	]
+}
+
+SectionDevice."Mic".0 {
+	Value {
+		JackName "ROCKCHIP-I2S Headset Jack"
+	}
+
+	EnableSequence [
+		cdev "hw:ROCKCHIPI2S"
+
+		cset "name='Int Mic Switch' off"
+		cset "name='DMIC Mux' ADC"
+		cset "name='Headset Mic Switch' on"
+		cset "name='Record Path DC Blocking' on"
+	]
+
+	DisableSequence [
+		cdev "hw:ROCKCHIPI2S"
+
+		cset "name='Headset Mic Switch' off"
+		cset "name='DMIC Mux' DMIC"
+		cset "name='Int Mic Switch' on"
+		cset "name='Record Path DC Blocking' off"
+	]
+}
diff --git a/src/conf/ucm/ROCKCHIP-I2S/ROCKCHIP-I2S.conf b/src/conf/ucm/ROCKCHIP-I2S/ROCKCHIP-I2S.conf
new file mode 100644
index 0000000..0c399b0
--- /dev/null
+++ b/src/conf/ucm/ROCKCHIP-I2S/ROCKCHIP-I2S.conf
@@ -0,0 +1,6 @@ 
+Comment "Rockchip card"
+
+SectionUseCase."HiFi" {
+	File "HiFi.conf"
+	Comment "Default"
+}