- Remove hackish modprobe install scripts for auto-loading OSS and sequencer modules (bsc#1136562); it's invoked from systemd unit file included in alsa-utils now - Backport upstream fixes: 0001-pcm-direct-Add-generic-hw_ptr_alignment-function-for.patch 0002-pcm-dshare-Added-hw_ptr_alignment-option-in-configur.patch 0003-pcm-dsnoop-Added-hw_ptr_alignment-option-in-configur.patch 0004-pcm-file-add-support-for-infile-reading-in-non-inter.patch 0005-pcm-file-use-snd_pcm_file_areas_read_infile-for-read.patch 0006-pcm-file-add-missing-unlock-on-early-return.patch 0007-ucm-Add-UCM-profile-for-CX2072X-codec-on-Baytrail-Ch.patch 0008-pcm-add-mmap_begin-callback-to-snd_pcm_fast_ops_t-ap.patch 0009-pcm-file-add-infile-read-support-for-mmap-mode.patch 0010-aserver-fix-resource-leak-coverity.patch 0011-src-conf.c-add-missing-va_end-call-coverity.patch 0012-config-parse_string-fix-the-dynamic-buffer-allocatio.patch 0013-control_shm-remove-duplicate-code-coverity.patch 0014-control_shm-add-missing-socket-close-to-the-error-pa.patch 0015-pcm-fix-memory-leak-in-_snd_pcm_parse_config_chmaps-.patch 0016-pcm_file-call-pclose-correctly-for-popen-coverity.patch 0017-pcm_hw-close-file-descriptor-in-the-error-path-in-sn.patch 0018-rawmidi-use-snd_dlobj_cache_get2-in-rawmidi-open-cov.patch 0019-rawmidi_hw-add-sanity-check-for-the-invalid-stream-a.patch 0020-topology-various-coverity-fixes.patch 0021-ucm-coverity-fixes.patch 0022-pcm_file-coverity-fixes-including-double-locking.patch 0023-topology-next-round-of-coverity-fixes.patch 0024-pcm_file-another-locking-fix-coverity.patch 0025-ucm-another-coverity-fix-in-uc_mgr_config_load.patch - Drop the downstream CX2072X UCM profile, which is replaced with OBS-URL: https://build.opensuse.org/request/show/706089 OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/alsa?expand=0&rev=253
302 lines
9.0 KiB
Diff
302 lines
9.0 KiB
Diff
From 108a2f43791fe769fd58726881b12ad908ebd2e0 Mon Sep 17 00:00:00 2001
|
|
From: Takashi Iwai <tiwai@suse.de>
|
|
Date: Thu, 18 Apr 2019 20:40:18 +0200
|
|
Subject: [PATCH 07/25] ucm: Add UCM profile for CX2072X codec on
|
|
Baytrail/Cherrytrail profiles
|
|
|
|
Adding a new Conexant CX2072X codec profile and reusing the existing
|
|
BYT/CHT platform snippets.
|
|
|
|
Currently tested only on ASUS E200HA laptop.
|
|
|
|
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|
---
|
|
configure.ac | 2 ++
|
|
src/conf/ucm/Makefile.am | 1 +
|
|
src/conf/ucm/bytcht-cx2072x/HiFi.conf | 24 ++++++++++++++++++++++++
|
|
src/conf/ucm/bytcht-cx2072x/Makefile.am | 4 ++++
|
|
src/conf/ucm/bytcht-cx2072x/bytcht-cx2072x.conf | 8 ++++++++
|
|
src/conf/ucm/codecs/Makefile.am | 1 +
|
|
src/conf/ucm/codecs/cx2072x/DisableSeq.conf | 7 +++++++
|
|
src/conf/ucm/codecs/cx2072x/EnableSeq.conf | 13 +++++++++++++
|
|
src/conf/ucm/codecs/cx2072x/HeadPhones.conf | 24 ++++++++++++++++++++++++
|
|
src/conf/ucm/codecs/cx2072x/HeadsetMic.conf | 25 +++++++++++++++++++++++++
|
|
src/conf/ucm/codecs/cx2072x/InternalMic.conf | 24 ++++++++++++++++++++++++
|
|
src/conf/ucm/codecs/cx2072x/Makefile.am | 6 ++++++
|
|
src/conf/ucm/codecs/cx2072x/Speaker.conf | 23 +++++++++++++++++++++++
|
|
13 files changed, 162 insertions(+)
|
|
create mode 100644 src/conf/ucm/bytcht-cx2072x/HiFi.conf
|
|
create mode 100644 src/conf/ucm/bytcht-cx2072x/Makefile.am
|
|
create mode 100644 src/conf/ucm/bytcht-cx2072x/bytcht-cx2072x.conf
|
|
create mode 100644 src/conf/ucm/codecs/cx2072x/DisableSeq.conf
|
|
create mode 100644 src/conf/ucm/codecs/cx2072x/EnableSeq.conf
|
|
create mode 100644 src/conf/ucm/codecs/cx2072x/HeadPhones.conf
|
|
create mode 100644 src/conf/ucm/codecs/cx2072x/HeadsetMic.conf
|
|
create mode 100644 src/conf/ucm/codecs/cx2072x/InternalMic.conf
|
|
create mode 100644 src/conf/ucm/codecs/cx2072x/Makefile.am
|
|
create mode 100644 src/conf/ucm/codecs/cx2072x/Speaker.conf
|
|
|
|
diff --git a/configure.ac b/configure.ac
|
|
index 0fb34de4fb65..2e955760a6c6 100644
|
|
--- a/configure.ac
|
|
+++ b/configure.ac
|
|
@@ -720,6 +720,7 @@ AC_OUTPUT(Makefile doc/Makefile doc/pictures/Makefile doc/doxygen.cfg \
|
|
src/conf/ucm/ASUSTeKCOMPUTERINC.-T100HAN-1.0-T100HAN/Makefile \
|
|
src/conf/ucm/broadwell-rt286/Makefile \
|
|
src/conf/ucm/broxton-rt298/Makefile \
|
|
+ src/conf/ucm/bytcht-cx2072x/Makefile \
|
|
src/conf/ucm/bytcht-es8316/Makefile \
|
|
src/conf/ucm/bytcht-es8316-mono-spk-in1-mic/Makefile \
|
|
src/conf/ucm/bytcht-es8316-mono-spk-in2-mic/Makefile \
|
|
@@ -765,6 +766,7 @@ AC_OUTPUT(Makefile doc/Makefile doc/pictures/Makefile doc/doxygen.cfg \
|
|
src/conf/ucm/tegraalc5632/Makefile \
|
|
src/conf/ucm/VEYRON-I2S/Makefile \
|
|
src/conf/ucm/codecs/Makefile \
|
|
+ src/conf/ucm/codecs/cx2072x/Makefile \
|
|
src/conf/ucm/codecs/es8316/Makefile \
|
|
src/conf/ucm/codecs/nau8824/Makefile \
|
|
src/conf/ucm/codecs/rt5640/Makefile \
|
|
diff --git a/src/conf/ucm/Makefile.am b/src/conf/ucm/Makefile.am
|
|
index e9f88ed683a2..02257048860f 100644
|
|
--- a/src/conf/ucm/Makefile.am
|
|
+++ b/src/conf/ucm/Makefile.am
|
|
@@ -4,6 +4,7 @@ platforms \
|
|
ASUSTeKCOMPUTERINC.-T100HAN-1.0-T100HAN \
|
|
broadwell-rt286 \
|
|
broxton-rt298 \
|
|
+bytcht-cx2072x \
|
|
bytcht-es8316 \
|
|
bytcht-es8316-mono-spk-in1-mic \
|
|
bytcht-es8316-mono-spk-in2-mic \
|
|
diff --git a/src/conf/ucm/bytcht-cx2072x/HiFi.conf b/src/conf/ucm/bytcht-cx2072x/HiFi.conf
|
|
new file mode 100644
|
|
index 000000000000..e9c1f7573d50
|
|
--- /dev/null
|
|
+++ b/src/conf/ucm/bytcht-cx2072x/HiFi.conf
|
|
@@ -0,0 +1,24 @@
|
|
+SectionVerb {
|
|
+ EnableSequence [
|
|
+ cdev "hw:bytchtcx2072x"
|
|
+ <platforms/bytcr/PlatformEnableSeq.conf>
|
|
+ <codecs/cx2072x/EnableSeq.conf>
|
|
+ ]
|
|
+
|
|
+ DisableSequence [
|
|
+ cdev "hw:bytchtcx2072x"
|
|
+ <codecs/cx2072x/DisableSeq.conf>
|
|
+ <platforms/bytcr/PlatformDisableSeq.conf>
|
|
+ ]
|
|
+
|
|
+ Value {
|
|
+ PlaybackPCM "hw:bytchtcx2072x"
|
|
+ CapturePCM "hw:bytchtcx2072x"
|
|
+ }
|
|
+}
|
|
+
|
|
+<codecs/cx2072x/Speaker.conf>
|
|
+<codecs/cx2072x/HeadPhones.conf>
|
|
+
|
|
+<codecs/cx2072x/InternalMic.conf>
|
|
+<codecs/cx2072x/HeadsetMic.conf>
|
|
diff --git a/src/conf/ucm/bytcht-cx2072x/Makefile.am b/src/conf/ucm/bytcht-cx2072x/Makefile.am
|
|
new file mode 100644
|
|
index 000000000000..373b2a77079a
|
|
--- /dev/null
|
|
+++ b/src/conf/ucm/bytcht-cx2072x/Makefile.am
|
|
@@ -0,0 +1,4 @@
|
|
+alsaconfigdir = @ALSA_CONFIG_DIR@
|
|
+ucmdir = $(alsaconfigdir)/ucm/bytcht-cx2072x
|
|
+ucm_DATA = bytcht-cx2072x.conf HiFi.conf
|
|
+EXTRA_DIST = $(ucm_DATA)
|
|
diff --git a/src/conf/ucm/bytcht-cx2072x/bytcht-cx2072x.conf b/src/conf/ucm/bytcht-cx2072x/bytcht-cx2072x.conf
|
|
new file mode 100644
|
|
index 000000000000..fce04456c678
|
|
--- /dev/null
|
|
+++ b/src/conf/ucm/bytcht-cx2072x/bytcht-cx2072x.conf
|
|
@@ -0,0 +1,8 @@
|
|
+SectionUseCase."HiFi" {
|
|
+ File "HiFi.conf"
|
|
+ Comment "Play HiFi quality Music"
|
|
+}
|
|
+
|
|
+SectionDefaults [
|
|
+ cdev "hw:bytchtcx2072x"
|
|
+]
|
|
diff --git a/src/conf/ucm/codecs/Makefile.am b/src/conf/ucm/codecs/Makefile.am
|
|
index f78fd0817f75..5987b9cf89a4 100644
|
|
--- a/src/conf/ucm/codecs/Makefile.am
|
|
+++ b/src/conf/ucm/codecs/Makefile.am
|
|
@@ -1,4 +1,5 @@
|
|
SUBDIRS=\
|
|
+cx2072x \
|
|
es8316 \
|
|
rt5640 \
|
|
rt5645 \
|
|
diff --git a/src/conf/ucm/codecs/cx2072x/DisableSeq.conf b/src/conf/ucm/codecs/cx2072x/DisableSeq.conf
|
|
new file mode 100644
|
|
index 000000000000..1e3d5489da3f
|
|
--- /dev/null
|
|
+++ b/src/conf/ucm/codecs/cx2072x/DisableSeq.conf
|
|
@@ -0,0 +1,7 @@
|
|
+# Output Configuration
|
|
+cset "name='I2S DAC1L Switch' off"
|
|
+cset "name='I2S DAC1R Switch' off"
|
|
+
|
|
+# Input Configuration
|
|
+cset "name='I2S ADC1L Switch' off"
|
|
+cset "name='I2S ADC1R Switch' off"
|
|
diff --git a/src/conf/ucm/codecs/cx2072x/EnableSeq.conf b/src/conf/ucm/codecs/cx2072x/EnableSeq.conf
|
|
new file mode 100644
|
|
index 000000000000..fb8e3fe23c4d
|
|
--- /dev/null
|
|
+++ b/src/conf/ucm/codecs/cx2072x/EnableSeq.conf
|
|
@@ -0,0 +1,13 @@
|
|
+# Disable all inputs / outputs
|
|
+cset "name='Ext Spk Switch' off"
|
|
+cset "name='Headphone Switch' off"
|
|
+cset "name='Headset Mic Switch' off"
|
|
+cset "name='Int Mic Switch' off"
|
|
+
|
|
+# Output Configuration
|
|
+cset "name='I2S DAC1L Switch' on"
|
|
+cset "name='I2S DAC1R Switch' on"
|
|
+
|
|
+# Input Configuration
|
|
+cset "name='I2S ADC1L Switch' on"
|
|
+cset "name='I2S ADC1R Switch' on"
|
|
diff --git a/src/conf/ucm/codecs/cx2072x/HeadPhones.conf b/src/conf/ucm/codecs/cx2072x/HeadPhones.conf
|
|
new file mode 100644
|
|
index 000000000000..4e3ff950c130
|
|
--- /dev/null
|
|
+++ b/src/conf/ucm/codecs/cx2072x/HeadPhones.conf
|
|
@@ -0,0 +1,24 @@
|
|
+SectionDevice."Headphones" {
|
|
+ Comment "Headphones"
|
|
+
|
|
+ ConflictingDevice [
|
|
+ "Speaker"
|
|
+ ]
|
|
+
|
|
+ EnableSequence [
|
|
+ cdev "hw:bytchtcx2072x"
|
|
+ cset "name='Headphone Switch' on"
|
|
+ cset "name='PortA Out En Switch' on"
|
|
+ ]
|
|
+
|
|
+ DisableSequence [
|
|
+ cdev "hw:bytchtcx2072x"
|
|
+ cset "name='Headphone Switch' off"
|
|
+ cset "name='PortA Out En Switch' off"
|
|
+ ]
|
|
+
|
|
+ Value {
|
|
+ PlaybackChannels "2"
|
|
+ JackControl "Headphone Jack"
|
|
+ }
|
|
+}
|
|
diff --git a/src/conf/ucm/codecs/cx2072x/HeadsetMic.conf b/src/conf/ucm/codecs/cx2072x/HeadsetMic.conf
|
|
new file mode 100644
|
|
index 000000000000..26b8df160385
|
|
--- /dev/null
|
|
+++ b/src/conf/ucm/codecs/cx2072x/HeadsetMic.conf
|
|
@@ -0,0 +1,25 @@
|
|
+SectionDevice."HeadsetMic" {
|
|
+ Comment "Headset Microphone"
|
|
+
|
|
+ ConflictingDevice [
|
|
+ "InternalMic"
|
|
+ ]
|
|
+
|
|
+ EnableSequence [
|
|
+ cdev "hw:bytchtcx2072x"
|
|
+ cset "name='Headset Mic Switch' on"
|
|
+ cset "name='ADC1 Mux' 'PortD Switch'"
|
|
+ cset "name='PortD In En Switch' on"
|
|
+ ]
|
|
+
|
|
+ DisableSequence [
|
|
+ cdev "hw:bytchtcx2072x"
|
|
+ cset "name='Headset Mic Switch' off"
|
|
+ cset "name='PortD In En Switch' off"
|
|
+ ]
|
|
+
|
|
+ Value {
|
|
+ CaptureChannels "2"
|
|
+ JackControl "Headset Mic Jack"
|
|
+ }
|
|
+}
|
|
diff --git a/src/conf/ucm/codecs/cx2072x/InternalMic.conf b/src/conf/ucm/codecs/cx2072x/InternalMic.conf
|
|
new file mode 100644
|
|
index 000000000000..a3e14538fe58
|
|
--- /dev/null
|
|
+++ b/src/conf/ucm/codecs/cx2072x/InternalMic.conf
|
|
@@ -0,0 +1,24 @@
|
|
+SectionDevice."InternalMic" {
|
|
+ Comment "Internal Microphone"
|
|
+
|
|
+ ConflictingDevice [
|
|
+ "HeadsetMic"
|
|
+ ]
|
|
+
|
|
+ EnableSequence [
|
|
+ cdev "hw:bytchtcx2072x"
|
|
+ cset "name='Int Mic Switch' on"
|
|
+ cset "name='ADC1 Mux' 'PortC Switch'"
|
|
+ cset "name='PortC In En Switch' on"
|
|
+ ]
|
|
+
|
|
+ DisableSequence [
|
|
+ cdev "hw:bytchtcx2072x"
|
|
+ cset "name='Int Mic Switch' off"
|
|
+ cset "name='PortC In En Switch' off"
|
|
+ ]
|
|
+
|
|
+ Value {
|
|
+ CaptureChannels "2"
|
|
+ }
|
|
+}
|
|
diff --git a/src/conf/ucm/codecs/cx2072x/Makefile.am b/src/conf/ucm/codecs/cx2072x/Makefile.am
|
|
new file mode 100644
|
|
index 000000000000..2990fd096178
|
|
--- /dev/null
|
|
+++ b/src/conf/ucm/codecs/cx2072x/Makefile.am
|
|
@@ -0,0 +1,6 @@
|
|
+alsaconfigdir = @ALSA_CONFIG_DIR@
|
|
+ucmdir = $(alsaconfigdir)/ucm/codecs/cx2072x
|
|
+ucm_DATA = EnableSeq.conf DisableSeq.conf \
|
|
+ HeadPhones.conf Speaker.conf \
|
|
+ InternalMic.conf HeadsetMic.conf
|
|
+EXTRA_DIST = $(ucm_DATA)
|
|
diff --git a/src/conf/ucm/codecs/cx2072x/Speaker.conf b/src/conf/ucm/codecs/cx2072x/Speaker.conf
|
|
new file mode 100644
|
|
index 000000000000..55e2b2ba33e4
|
|
--- /dev/null
|
|
+++ b/src/conf/ucm/codecs/cx2072x/Speaker.conf
|
|
@@ -0,0 +1,23 @@
|
|
+SectionDevice."Speaker" {
|
|
+ Comment "Speakers"
|
|
+
|
|
+ ConflictingDevice [
|
|
+ "Headphones"
|
|
+ ]
|
|
+
|
|
+ EnableSequence [
|
|
+ cdev "hw:bytchtcx2072x"
|
|
+ cset "name='Ext Spk Switch' on"
|
|
+ cset "name='PortG Out En Switch' on"
|
|
+ ]
|
|
+
|
|
+ DisableSequence [
|
|
+ cdev "hw:bytchtcx2072x"
|
|
+ cset "name='Ext Spk Switch' off"
|
|
+ cset "name='PortG Out En Switch' off"
|
|
+ ]
|
|
+
|
|
+ Value {
|
|
+ PlaybackChannels "2"
|
|
+ }
|
|
+}
|
|
--
|
|
2.16.4
|
|
|