Accepting request 558222 from home:tiwai:branches:multimedia:libs
- Backport fix patches from upstream: 0001-pcm-route-Fix-use_getput-flag-computation-for-3-byte.patch 0002-conf-ucm-Rearrange-Makefile.am.patch 0003-conf-ucm-Add-dual-HD-audio-codecs-config-for-Lenovo.patch 0004-conf-ucm-Add-Gigabyte-mobo-UCM-profile-with-dual-HD-.patch - Add missing UCM profile for chtcx2072x (bsc#1068546) OBS-URL: https://build.opensuse.org/request/show/558222 OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/alsa?expand=0&rev=223
This commit is contained in:
parent
f84af2321e
commit
fb2f7d70b7
@ -0,0 +1,38 @@
|
||||
From 6f52b3d643fc68bf1b6a2839696385f0b2b3f327 Mon Sep 17 00:00:00 2001
|
||||
From: "Maciej S. Szmigiero" <mail@maciej.szmigiero.name>
|
||||
Date: Mon, 20 Nov 2017 13:12:32 +0100
|
||||
Subject: [PATCH] pcm: route: Fix use_getput flag computation for 3 byte
|
||||
formats
|
||||
|
||||
Commit de63b942acf520 ("pcm: route: Use get/put labels for all 3 byte formats")
|
||||
wanted to make the route plugin use get / put labels not only for 24-bit
|
||||
physical width formats but also for 18 and 20-bit ones.
|
||||
There was, however, a typo in that commit so a check for these widths
|
||||
didn't really work.
|
||||
|
||||
Let's fix it now.
|
||||
|
||||
Signed-off-by: Maciej S. Szmigiero <mail@maciej.szmigiero.name>
|
||||
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
||||
---
|
||||
src/pcm/pcm_route.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/pcm/pcm_route.c b/src/pcm/pcm_route.c
|
||||
index 999a2eed3a25..1f485a8e79f9 100644
|
||||
--- a/src/pcm/pcm_route.c
|
||||
+++ b/src/pcm/pcm_route.c
|
||||
@@ -567,8 +567,8 @@ static int snd_pcm_route_hw_params(snd_pcm_t *pcm, snd_pcm_hw_params_t * params)
|
||||
return err;
|
||||
/* 3 bytes formats? */
|
||||
route->params.use_getput =
|
||||
- (snd_pcm_format_physical_width(src_format) + 7) / 3 == 3 ||
|
||||
- (snd_pcm_format_physical_width(dst_format) + 7) / 3 == 3;
|
||||
+ (snd_pcm_format_physical_width(src_format) + 7) / 8 == 3 ||
|
||||
+ (snd_pcm_format_physical_width(dst_format) + 7) / 8 == 3;
|
||||
route->params.get_idx = snd_pcm_linear_get_index(src_format, SND_PCM_FORMAT_S32);
|
||||
route->params.put_idx = snd_pcm_linear_put_index(SND_PCM_FORMAT_S32, dst_format);
|
||||
route->params.conv_idx = snd_pcm_linear_convert_index(src_format, dst_format);
|
||||
--
|
||||
2.15.1
|
||||
|
78
0002-conf-ucm-Rearrange-Makefile.am.patch
Normal file
78
0002-conf-ucm-Rearrange-Makefile.am.patch
Normal file
@ -0,0 +1,78 @@
|
||||
From 91896be6bc326b5b9c1b5ef52b9dbac243fefa27 Mon Sep 17 00:00:00 2001
|
||||
From: Takashi Iwai <tiwai@suse.de>
|
||||
Date: Tue, 5 Dec 2017 14:58:30 +0100
|
||||
Subject: [PATCH] conf/ucm: Rearrange Makefile.am
|
||||
|
||||
Just rearrange and split to multiple lines to make future patches
|
||||
cleaner. No actual code change.
|
||||
|
||||
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
||||
---
|
||||
configure.ac | 16 ++++++++--------
|
||||
src/conf/ucm/Makefile.am | 16 +++++++++++++++-
|
||||
2 files changed, 23 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index afe4306d2062..c232236dc193 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -709,19 +709,20 @@ AC_OUTPUT(Makefile doc/Makefile doc/pictures/Makefile doc/doxygen.cfg \
|
||||
src/conf/cards/Makefile \
|
||||
src/conf/pcm/Makefile \
|
||||
src/conf/ucm/Makefile \
|
||||
+ src/conf/ucm/broadwell-rt286/Makefile \
|
||||
+ src/conf/ucm/broxton-rt298/Makefile \
|
||||
+ src/conf/ucm/bytcr-rt5651/Makefile \
|
||||
+ src/conf/ucm/chtrt5645/Makefile \
|
||||
src/conf/ucm/DAISY-I2S/Makefile \
|
||||
+ src/conf/ucm/DB410c/Makefile \
|
||||
+ src/conf/ucm/GoogleNyan/Makefile \
|
||||
src/conf/ucm/PandaBoard/Makefile \
|
||||
src/conf/ucm/PandaBoardES/Makefile \
|
||||
- src/conf/ucm/SDP4430/Makefile \
|
||||
- src/conf/ucm/tegraalc5632/Makefile \
|
||||
src/conf/ucm/PAZ00/Makefile \
|
||||
- src/conf/ucm/GoogleNyan/Makefile \
|
||||
- src/conf/ucm/broadwell-rt286/Makefile \
|
||||
+ src/conf/ucm/SDP4430/Makefile \
|
||||
src/conf/ucm/skylake-rt286/Makefile \
|
||||
+ src/conf/ucm/tegraalc5632/Makefile \
|
||||
src/conf/ucm/VEYRON-I2S/Makefile \
|
||||
- src/conf/ucm/chtrt5645/Makefile \
|
||||
- src/conf/ucm/DB410c/Makefile \
|
||||
- src/conf/ucm/bytcr-rt5651/Makefile \
|
||||
src/conf/topology/Makefile \
|
||||
src/conf/topology/broadwell/Makefile \
|
||||
modules/Makefile modules/mixer/Makefile modules/mixer/simple/Makefile \
|
||||
@@ -729,7 +730,6 @@ AC_OUTPUT(Makefile doc/Makefile doc/pictures/Makefile doc/doxygen.cfg \
|
||||
src/conf/topology/bxtrt298/Makefile \
|
||||
alsalisp/Makefile aserver/Makefile \
|
||||
test/Makefile test/lsb/Makefile \
|
||||
- src/conf/ucm/broxton-rt298/Makefile \
|
||||
utils/Makefile utils/alsa-lib.spec utils/alsa.pc)
|
||||
|
||||
dnl Create asoundlib.h dynamically according to configure options
|
||||
diff --git a/src/conf/ucm/Makefile.am b/src/conf/ucm/Makefile.am
|
||||
index 2bd4ebe761ae..060d025f1bb5 100644
|
||||
--- a/src/conf/ucm/Makefile.am
|
||||
+++ b/src/conf/ucm/Makefile.am
|
||||
@@ -1 +1,15 @@
|
||||
-SUBDIRS=DAISY-I2S PandaBoard PandaBoardES SDP4430 tegraalc5632 PAZ00 GoogleNyan broadwell-rt286 skylake-rt286 VEYRON-I2S chtrt5645 DB410c broxton-rt298 bytcr-rt5651
|
||||
+SUBDIRS=\
|
||||
+broadwell-rt286 \
|
||||
+broxton-rt298 \
|
||||
+bytcr-rt5651 \
|
||||
+chtrt5645 \
|
||||
+DAISY-I2S \
|
||||
+DB410c \
|
||||
+GoogleNyan \
|
||||
+PandaBoard \
|
||||
+PandaBoardES \
|
||||
+PAZ00 \
|
||||
+SDP4430 \
|
||||
+skylake-rt286 \
|
||||
+tegraalc5632 \
|
||||
+VEYRON-I2S
|
||||
--
|
||||
2.15.1
|
||||
|
225
0003-conf-ucm-Add-dual-HD-audio-codecs-config-for-Lenovo.patch
Normal file
225
0003-conf-ucm-Add-dual-HD-audio-codecs-config-for-Lenovo.patch
Normal file
@ -0,0 +1,225 @@
|
||||
From b7e56af82a600262b7f641c5920a914b3303fd56 Mon Sep 17 00:00:00 2001
|
||||
From: Takashi Iwai <tiwai@suse.de>
|
||||
Date: Tue, 5 Dec 2017 14:53:11 +0100
|
||||
Subject: [PATCH] conf/ucm: Add dual HD-audio codecs config for Lenovo
|
||||
|
||||
Some recent Lenovo laptops have dual codecs and we need to switch them
|
||||
accordingly. The kernel side already contains a fix and gives the
|
||||
unique longname string for identifying the board, and here we hook up
|
||||
the corresponding UCM profile.
|
||||
|
||||
The profile was corrected and tested by Hui Wang on Lenovo p520.
|
||||
|
||||
Tested-by: Kailang <kailang@realtek.com>
|
||||
Tested-by: Hui Wang <hui.wang@canonical.com>
|
||||
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
||||
---
|
||||
configure.ac | 1 +
|
||||
.../HDAudio-Lenovo-DualCodecs.conf | 5 +
|
||||
src/conf/ucm/HDAudio-Lenovo-DualCodecs/HiFi.conf | 145 +++++++++++++++++++++
|
||||
src/conf/ucm/HDAudio-Lenovo-DualCodecs/Makefile.am | 4 +
|
||||
src/conf/ucm/Makefile.am | 1 +
|
||||
5 files changed, 156 insertions(+)
|
||||
create mode 100644 src/conf/ucm/HDAudio-Lenovo-DualCodecs/HDAudio-Lenovo-DualCodecs.conf
|
||||
create mode 100644 src/conf/ucm/HDAudio-Lenovo-DualCodecs/HiFi.conf
|
||||
create mode 100644 src/conf/ucm/HDAudio-Lenovo-DualCodecs/Makefile.am
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index c232236dc193..8d95a8b17f0c 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -716,6 +716,7 @@ AC_OUTPUT(Makefile doc/Makefile doc/pictures/Makefile doc/doxygen.cfg \
|
||||
src/conf/ucm/DAISY-I2S/Makefile \
|
||||
src/conf/ucm/DB410c/Makefile \
|
||||
src/conf/ucm/GoogleNyan/Makefile \
|
||||
+ src/conf/ucm/HDAudio-Lenovo-DualCodecs/Makefile \
|
||||
src/conf/ucm/PandaBoard/Makefile \
|
||||
src/conf/ucm/PandaBoardES/Makefile \
|
||||
src/conf/ucm/PAZ00/Makefile \
|
||||
diff --git a/src/conf/ucm/HDAudio-Lenovo-DualCodecs/HDAudio-Lenovo-DualCodecs.conf b/src/conf/ucm/HDAudio-Lenovo-DualCodecs/HDAudio-Lenovo-DualCodecs.conf
|
||||
new file mode 100644
|
||||
index 000000000000..98fdd8cceb7b
|
||||
--- /dev/null
|
||||
+++ b/src/conf/ucm/HDAudio-Lenovo-DualCodecs/HDAudio-Lenovo-DualCodecs.conf
|
||||
@@ -0,0 +1,5 @@
|
||||
+Comment "Lenovo laptop with dual HD-audio codecs"
|
||||
+SectionUseCase."HiFi" {
|
||||
+ File "HiFi.conf"
|
||||
+ Comment "Default"
|
||||
+}
|
||||
diff --git a/src/conf/ucm/HDAudio-Lenovo-DualCodecs/HiFi.conf b/src/conf/ucm/HDAudio-Lenovo-DualCodecs/HiFi.conf
|
||||
new file mode 100644
|
||||
index 000000000000..509678964f3f
|
||||
--- /dev/null
|
||||
+++ b/src/conf/ucm/HDAudio-Lenovo-DualCodecs/HiFi.conf
|
||||
@@ -0,0 +1,145 @@
|
||||
+SectionVerb {
|
||||
+ Value {
|
||||
+ TQ "HiFi"
|
||||
+ }
|
||||
+
|
||||
+ EnableSequence [
|
||||
+ cdev "hw:PCH"
|
||||
+ cset "name='Front Playback Volume' 100%"
|
||||
+ cset "name='Front Playback Switch' on"
|
||||
+ cset "name='Rear-Panel Capture Volume' 100%"
|
||||
+ cset "name='Rear-Panel Capture Switch' on"
|
||||
+ ]
|
||||
+
|
||||
+ DisableSequence [
|
||||
+ cdev "hw:PCH"
|
||||
+ cset "name='Front Playback Volume' 0"
|
||||
+ cset "name='Front Playback Switch' off"
|
||||
+ cset "name='Rear-Panel Capture Volume' 0"
|
||||
+ cset "name='Rear-Panel Capture Switch' off"
|
||||
+ ]
|
||||
+}
|
||||
+
|
||||
+SectionDevice."Speaker" {
|
||||
+ Comment "Speaker"
|
||||
+
|
||||
+ Value {
|
||||
+ PlaybackChannels "2"
|
||||
+ PlaybackPCM "hw:PCH,4"
|
||||
+ }
|
||||
+
|
||||
+ ConflictingDevice [
|
||||
+ "Headphone"
|
||||
+ ]
|
||||
+
|
||||
+ EnableSequence [
|
||||
+ cdev "hw:PCH"
|
||||
+ cset "name='Speaker Playback Switch' on"
|
||||
+ cset "name='Speaker Playback Volume' 100%"
|
||||
+ ]
|
||||
+
|
||||
+ DisableSequence [
|
||||
+ cdev "hw:PCH"
|
||||
+ cset "name='Speaker Playback Volume' 0"
|
||||
+ cset "name='Speaker Playback Switch' off"
|
||||
+ ]
|
||||
+}
|
||||
+
|
||||
+SectionDevice."LineOut" {
|
||||
+ Comment "Line Out"
|
||||
+
|
||||
+ Value {
|
||||
+ PlaybackChannels "2"
|
||||
+ PlaybackPCM "hw:PCH,0"
|
||||
+ JackControl "Line Out Jack"
|
||||
+ JackHWMute "Speaker"
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+SectionDevice."Headphone" {
|
||||
+ Comment "Headphone"
|
||||
+
|
||||
+ Value {
|
||||
+ PlaybackChannels "2"
|
||||
+ PlaybackPCM "hw:PCH,4"
|
||||
+ JackControl "Front Headphone Jack"
|
||||
+ JackHWMute "Speaker"
|
||||
+ }
|
||||
+
|
||||
+ ConflictingDevice [
|
||||
+ "Speaker"
|
||||
+ ]
|
||||
+
|
||||
+ EnableSequence [
|
||||
+ cdev "hw:PCH"
|
||||
+ cset "name='Headphone Playback Switch' on"
|
||||
+ cset "name='Headphone Playback Volume' 100%"
|
||||
+ ]
|
||||
+
|
||||
+ DisableSequence [
|
||||
+ cdev "hw:PCH"
|
||||
+ cset "name='Headphone Playback Volume' 0"
|
||||
+ cset "name='Headphone Playback Switch' off"
|
||||
+ ]
|
||||
+}
|
||||
+
|
||||
+SectionDevice."LineIn" {
|
||||
+ Comment "Rear Line In"
|
||||
+
|
||||
+ Value {
|
||||
+ CaptureChannels "2"
|
||||
+ CapturePCM "hw:PCH,0"
|
||||
+ JackControl "Line Jack"
|
||||
+ }
|
||||
+
|
||||
+ ConflictingDevice [
|
||||
+ "RearMic"
|
||||
+ ]
|
||||
+
|
||||
+ EnableSequence [
|
||||
+ cdev "hw:PCH"
|
||||
+ cset "name='Input Source' Line"
|
||||
+ ]
|
||||
+}
|
||||
+
|
||||
+SectionDevice."RearMic" {
|
||||
+ Comment "Rear Microphone"
|
||||
+
|
||||
+ Value {
|
||||
+ CaptureChannels "2"
|
||||
+ CapturePCM "hw:PCH,0"
|
||||
+ # CapturePriority "150"
|
||||
+ JackHWMute "LineIn"
|
||||
+ }
|
||||
+
|
||||
+ ConflictingDevice [
|
||||
+ "LineIn"
|
||||
+ ]
|
||||
+
|
||||
+ EnableSequence [
|
||||
+ cdev "hw:PCH"
|
||||
+ cset "name='Input Source' Rear Mic"
|
||||
+ ]
|
||||
+}
|
||||
+
|
||||
+SectionDevice."FrontMic" {
|
||||
+ Comment "Front Microphone"
|
||||
+
|
||||
+ Value {
|
||||
+ CaptureChannels "2"
|
||||
+ CapturePCM "hw:PCH,4"
|
||||
+ JackControl "Front Mic Jack"
|
||||
+ }
|
||||
+
|
||||
+ EnableSequence [
|
||||
+ cdev "hw:PCH"
|
||||
+ cset "name='Front-Panel Capture Volume' 100%"
|
||||
+ cset "name='Front-Panel Capture Switch' on"
|
||||
+ ]
|
||||
+
|
||||
+ DisableSequence [
|
||||
+ cdev "hw:PCH"
|
||||
+ cset "name='Front-Panel Capture Volume' 0"
|
||||
+ cset "name='Front-Panel Capture Switch' off"
|
||||
+ ]
|
||||
+}
|
||||
diff --git a/src/conf/ucm/HDAudio-Lenovo-DualCodecs/Makefile.am b/src/conf/ucm/HDAudio-Lenovo-DualCodecs/Makefile.am
|
||||
new file mode 100644
|
||||
index 000000000000..da285415c145
|
||||
--- /dev/null
|
||||
+++ b/src/conf/ucm/HDAudio-Lenovo-DualCodecs/Makefile.am
|
||||
@@ -0,0 +1,4 @@
|
||||
+alsaconfigdir = @ALSA_CONFIG_DIR@
|
||||
+ucmdir = $(alsaconfigdir)/ucm/HDAudio-Lenovo-DualCodecs
|
||||
+ucm_DATA = HDAudio-Lenovo-DualCodecs.conf HiFi.conf
|
||||
+EXTRA_DIST = $(ucm_DATA)
|
||||
diff --git a/src/conf/ucm/Makefile.am b/src/conf/ucm/Makefile.am
|
||||
index 060d025f1bb5..1d81beeb4ddf 100644
|
||||
--- a/src/conf/ucm/Makefile.am
|
||||
+++ b/src/conf/ucm/Makefile.am
|
||||
@@ -6,6 +6,7 @@ chtrt5645 \
|
||||
DAISY-I2S \
|
||||
DB410c \
|
||||
GoogleNyan \
|
||||
+HDAudio-Lenovo-DualCodecs \
|
||||
PandaBoard \
|
||||
PandaBoardES \
|
||||
PAZ00 \
|
||||
--
|
||||
2.15.1
|
||||
|
221
0004-conf-ucm-Add-Gigabyte-mobo-UCM-profile-with-dual-HD-.patch
Normal file
221
0004-conf-ucm-Add-Gigabyte-mobo-UCM-profile-with-dual-HD-.patch
Normal file
@ -0,0 +1,221 @@
|
||||
From d1e08d2db3517e8430ffa570f23b53987ba78cc3 Mon Sep 17 00:00:00 2001
|
||||
From: Takashi Iwai <tiwai@suse.de>
|
||||
Date: Tue, 5 Dec 2017 15:08:01 +0100
|
||||
Subject: [PATCH] conf/ucm: Add Gigabyte mobo UCM profile with dual HD-audio
|
||||
codecs
|
||||
|
||||
Like the previous Lenovo laptops, some Gigabyte mobos have dual
|
||||
HD-audio codecs and need to switch dynamically via UCM profile.
|
||||
Reuse the same profile as Lenovo dual codecs, so far.
|
||||
|
||||
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
||||
---
|
||||
configure.ac | 1 +
|
||||
.../HDAudio-Gigabyte-ALC1220DualCodecs.conf | 5 +
|
||||
.../HDAudio-Gigabyte-ALC1220DualCodecs/HiFi.conf | 145 +++++++++++++++++++++
|
||||
.../HDAudio-Gigabyte-ALC1220DualCodecs/Makefile.am | 4 +
|
||||
src/conf/ucm/Makefile.am | 1 +
|
||||
5 files changed, 156 insertions(+)
|
||||
create mode 100644 src/conf/ucm/HDAudio-Gigabyte-ALC1220DualCodecs/HDAudio-Gigabyte-ALC1220DualCodecs.conf
|
||||
create mode 100644 src/conf/ucm/HDAudio-Gigabyte-ALC1220DualCodecs/HiFi.conf
|
||||
create mode 100644 src/conf/ucm/HDAudio-Gigabyte-ALC1220DualCodecs/Makefile.am
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 8d95a8b17f0c..47c50fcf89b4 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -716,6 +716,7 @@ AC_OUTPUT(Makefile doc/Makefile doc/pictures/Makefile doc/doxygen.cfg \
|
||||
src/conf/ucm/DAISY-I2S/Makefile \
|
||||
src/conf/ucm/DB410c/Makefile \
|
||||
src/conf/ucm/GoogleNyan/Makefile \
|
||||
+ src/conf/ucm/HDAudio-Gigabyte-ALC1220DualCodecs/Makefile \
|
||||
src/conf/ucm/HDAudio-Lenovo-DualCodecs/Makefile \
|
||||
src/conf/ucm/PandaBoard/Makefile \
|
||||
src/conf/ucm/PandaBoardES/Makefile \
|
||||
diff --git a/src/conf/ucm/HDAudio-Gigabyte-ALC1220DualCodecs/HDAudio-Gigabyte-ALC1220DualCodecs.conf b/src/conf/ucm/HDAudio-Gigabyte-ALC1220DualCodecs/HDAudio-Gigabyte-ALC1220DualCodecs.conf
|
||||
new file mode 100644
|
||||
index 000000000000..492eebf01aa9
|
||||
--- /dev/null
|
||||
+++ b/src/conf/ucm/HDAudio-Gigabyte-ALC1220DualCodecs/HDAudio-Gigabyte-ALC1220DualCodecs.conf
|
||||
@@ -0,0 +1,5 @@
|
||||
+Comment "Gigabyte mobo with dual HD-audio codecs"
|
||||
+SectionUseCase."HiFi" {
|
||||
+ File "HiFi.conf"
|
||||
+ Comment "Default"
|
||||
+}
|
||||
diff --git a/src/conf/ucm/HDAudio-Gigabyte-ALC1220DualCodecs/HiFi.conf b/src/conf/ucm/HDAudio-Gigabyte-ALC1220DualCodecs/HiFi.conf
|
||||
new file mode 100644
|
||||
index 000000000000..509678964f3f
|
||||
--- /dev/null
|
||||
+++ b/src/conf/ucm/HDAudio-Gigabyte-ALC1220DualCodecs/HiFi.conf
|
||||
@@ -0,0 +1,145 @@
|
||||
+SectionVerb {
|
||||
+ Value {
|
||||
+ TQ "HiFi"
|
||||
+ }
|
||||
+
|
||||
+ EnableSequence [
|
||||
+ cdev "hw:PCH"
|
||||
+ cset "name='Front Playback Volume' 100%"
|
||||
+ cset "name='Front Playback Switch' on"
|
||||
+ cset "name='Rear-Panel Capture Volume' 100%"
|
||||
+ cset "name='Rear-Panel Capture Switch' on"
|
||||
+ ]
|
||||
+
|
||||
+ DisableSequence [
|
||||
+ cdev "hw:PCH"
|
||||
+ cset "name='Front Playback Volume' 0"
|
||||
+ cset "name='Front Playback Switch' off"
|
||||
+ cset "name='Rear-Panel Capture Volume' 0"
|
||||
+ cset "name='Rear-Panel Capture Switch' off"
|
||||
+ ]
|
||||
+}
|
||||
+
|
||||
+SectionDevice."Speaker" {
|
||||
+ Comment "Speaker"
|
||||
+
|
||||
+ Value {
|
||||
+ PlaybackChannels "2"
|
||||
+ PlaybackPCM "hw:PCH,4"
|
||||
+ }
|
||||
+
|
||||
+ ConflictingDevice [
|
||||
+ "Headphone"
|
||||
+ ]
|
||||
+
|
||||
+ EnableSequence [
|
||||
+ cdev "hw:PCH"
|
||||
+ cset "name='Speaker Playback Switch' on"
|
||||
+ cset "name='Speaker Playback Volume' 100%"
|
||||
+ ]
|
||||
+
|
||||
+ DisableSequence [
|
||||
+ cdev "hw:PCH"
|
||||
+ cset "name='Speaker Playback Volume' 0"
|
||||
+ cset "name='Speaker Playback Switch' off"
|
||||
+ ]
|
||||
+}
|
||||
+
|
||||
+SectionDevice."LineOut" {
|
||||
+ Comment "Line Out"
|
||||
+
|
||||
+ Value {
|
||||
+ PlaybackChannels "2"
|
||||
+ PlaybackPCM "hw:PCH,0"
|
||||
+ JackControl "Line Out Jack"
|
||||
+ JackHWMute "Speaker"
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+SectionDevice."Headphone" {
|
||||
+ Comment "Headphone"
|
||||
+
|
||||
+ Value {
|
||||
+ PlaybackChannels "2"
|
||||
+ PlaybackPCM "hw:PCH,4"
|
||||
+ JackControl "Front Headphone Jack"
|
||||
+ JackHWMute "Speaker"
|
||||
+ }
|
||||
+
|
||||
+ ConflictingDevice [
|
||||
+ "Speaker"
|
||||
+ ]
|
||||
+
|
||||
+ EnableSequence [
|
||||
+ cdev "hw:PCH"
|
||||
+ cset "name='Headphone Playback Switch' on"
|
||||
+ cset "name='Headphone Playback Volume' 100%"
|
||||
+ ]
|
||||
+
|
||||
+ DisableSequence [
|
||||
+ cdev "hw:PCH"
|
||||
+ cset "name='Headphone Playback Volume' 0"
|
||||
+ cset "name='Headphone Playback Switch' off"
|
||||
+ ]
|
||||
+}
|
||||
+
|
||||
+SectionDevice."LineIn" {
|
||||
+ Comment "Rear Line In"
|
||||
+
|
||||
+ Value {
|
||||
+ CaptureChannels "2"
|
||||
+ CapturePCM "hw:PCH,0"
|
||||
+ JackControl "Line Jack"
|
||||
+ }
|
||||
+
|
||||
+ ConflictingDevice [
|
||||
+ "RearMic"
|
||||
+ ]
|
||||
+
|
||||
+ EnableSequence [
|
||||
+ cdev "hw:PCH"
|
||||
+ cset "name='Input Source' Line"
|
||||
+ ]
|
||||
+}
|
||||
+
|
||||
+SectionDevice."RearMic" {
|
||||
+ Comment "Rear Microphone"
|
||||
+
|
||||
+ Value {
|
||||
+ CaptureChannels "2"
|
||||
+ CapturePCM "hw:PCH,0"
|
||||
+ # CapturePriority "150"
|
||||
+ JackHWMute "LineIn"
|
||||
+ }
|
||||
+
|
||||
+ ConflictingDevice [
|
||||
+ "LineIn"
|
||||
+ ]
|
||||
+
|
||||
+ EnableSequence [
|
||||
+ cdev "hw:PCH"
|
||||
+ cset "name='Input Source' Rear Mic"
|
||||
+ ]
|
||||
+}
|
||||
+
|
||||
+SectionDevice."FrontMic" {
|
||||
+ Comment "Front Microphone"
|
||||
+
|
||||
+ Value {
|
||||
+ CaptureChannels "2"
|
||||
+ CapturePCM "hw:PCH,4"
|
||||
+ JackControl "Front Mic Jack"
|
||||
+ }
|
||||
+
|
||||
+ EnableSequence [
|
||||
+ cdev "hw:PCH"
|
||||
+ cset "name='Front-Panel Capture Volume' 100%"
|
||||
+ cset "name='Front-Panel Capture Switch' on"
|
||||
+ ]
|
||||
+
|
||||
+ DisableSequence [
|
||||
+ cdev "hw:PCH"
|
||||
+ cset "name='Front-Panel Capture Volume' 0"
|
||||
+ cset "name='Front-Panel Capture Switch' off"
|
||||
+ ]
|
||||
+}
|
||||
diff --git a/src/conf/ucm/HDAudio-Gigabyte-ALC1220DualCodecs/Makefile.am b/src/conf/ucm/HDAudio-Gigabyte-ALC1220DualCodecs/Makefile.am
|
||||
new file mode 100644
|
||||
index 000000000000..728fd19b9251
|
||||
--- /dev/null
|
||||
+++ b/src/conf/ucm/HDAudio-Gigabyte-ALC1220DualCodecs/Makefile.am
|
||||
@@ -0,0 +1,4 @@
|
||||
+alsaconfigdir = @ALSA_CONFIG_DIR@
|
||||
+ucmdir = $(alsaconfigdir)/ucm/HDAudio-Gigabyte-ALC1220DualCodecs
|
||||
+ucm_DATA = HDAudio-Gigabyte-ALC1220DualCodecs.conf HiFi.conf
|
||||
+EXTRA_DIST = $(ucm_DATA)
|
||||
diff --git a/src/conf/ucm/Makefile.am b/src/conf/ucm/Makefile.am
|
||||
index 1d81beeb4ddf..954e32b8f0c8 100644
|
||||
--- a/src/conf/ucm/Makefile.am
|
||||
+++ b/src/conf/ucm/Makefile.am
|
||||
@@ -6,6 +6,7 @@ chtrt5645 \
|
||||
DAISY-I2S \
|
||||
DB410c \
|
||||
GoogleNyan \
|
||||
+HDAudio-Gigabyte-ALC1220DualCodecs \
|
||||
HDAudio-Lenovo-DualCodecs \
|
||||
PandaBoard \
|
||||
PandaBoardES \
|
||||
--
|
||||
2.15.1
|
||||
|
10
alsa.changes
10
alsa.changes
@ -1,3 +1,13 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Dec 18 15:59:05 CET 2017 - tiwai@suse.de
|
||||
|
||||
- Backport fix patches from upstream:
|
||||
0001-pcm-route-Fix-use_getput-flag-computation-for-3-byte.patch
|
||||
0002-conf-ucm-Rearrange-Makefile.am.patch
|
||||
0003-conf-ucm-Add-dual-HD-audio-codecs-config-for-Lenovo.patch
|
||||
0004-conf-ucm-Add-Gigabyte-mobo-UCM-profile-with-dual-HD-.patch
|
||||
- Add missing UCM profile for chtcx2072x (bsc#1068546)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Nov 23 13:42:45 UTC 2017 - rbrown@suse.com
|
||||
|
||||
|
20
alsa.spec
20
alsa.spec
@ -50,7 +50,13 @@ Source34: alsa-init.sh
|
||||
Source40: 50-alsa.conf
|
||||
Source41: install-snd-module
|
||||
# upstream fixes
|
||||
# rest suse patches
|
||||
Patch1: 0001-pcm-route-Fix-use_getput-flag-computation-for-3-byte.patch
|
||||
Patch2: 0002-conf-ucm-Rearrange-Makefile.am.patch
|
||||
Patch3: 0003-conf-ucm-Add-dual-HD-audio-codecs-config-for-Lenovo.patch
|
||||
Patch4: 0004-conf-ucm-Add-Gigabyte-mobo-UCM-profile-with-dual-HD-.patch
|
||||
# rest suse fixes
|
||||
Source101: chtcx2072x.conf
|
||||
Source102: chtcx2072x-HiFi.conf
|
||||
BuildRequires: doxygen
|
||||
BuildRequires: libtool
|
||||
BuildRequires: pkgconfig
|
||||
@ -113,6 +119,10 @@ Architecture.
|
||||
|
||||
%prep
|
||||
%setup -q -n alsa-lib-%{package_version}
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
%patch4 -p1
|
||||
|
||||
%build
|
||||
export AUTOMAKE_JOBS="%{?_smp_mflags}"
|
||||
@ -131,6 +141,10 @@ make -C doc doc %{?_smp_mflags}
|
||||
%install
|
||||
# install shared library
|
||||
%make_install
|
||||
# additional UCM profiles
|
||||
mkdir -p %{buildroot}%{_datadir}/alsa/ucm/chtcx2072x
|
||||
install -c -m 0644 %{S:101} %{buildroot}%{_datadir}/alsa/ucm/chtcx2072x/chtcx2072x.conf
|
||||
install -c -m 0644 %{S:102} %{buildroot}%{_datadir}/alsa/ucm/chtcx2072x/HiFi.conf
|
||||
# clean up unneeded files
|
||||
rm -f %{buildroot}%{_libdir}/*.*a
|
||||
# rm -f %{buildroot}%{_libdir}/alsa-lib/smixer/*.*a
|
||||
@ -169,13 +183,15 @@ rm -f %{buildroot}%{_sbindir}/rcjoystick
|
||||
ln -s ../..%{_initddir}/joystick %{buildroot}%{_sbindir}/rcjoystick
|
||||
%endif
|
||||
#
|
||||
# udev rules (only for non-systemd)
|
||||
# udev rules
|
||||
#
|
||||
mkdir -p %{buildroot}%{_udevrulesdir}
|
||||
%if 0%{?suse_version} < 1140
|
||||
install -c -m 0644 %{SOURCE8} %{buildroot}%{_udevrulesdir}
|
||||
%endif
|
||||
%if 0%{?suse_version} < 1330
|
||||
install -c -m 0644 %{SOURCE9} %{buildroot}%{_udevrulesdir}
|
||||
%endif
|
||||
#
|
||||
# modprobe config and the module install script for loading OSS-emulation
|
||||
# and sequencer modules automatically
|
||||
|
185
chtcx2072x-HiFi.conf
Normal file
185
chtcx2072x-HiFi.conf
Normal file
@ -0,0 +1,185 @@
|
||||
SectionVerb {
|
||||
# ALSA PCM
|
||||
Value {
|
||||
TQ "HiFi"
|
||||
|
||||
# ALSA PCM device for HiFi
|
||||
PlaybackPCM "hw:chtcx2072x,0"
|
||||
CapturePCM "hw:chtcx2072x,0"
|
||||
}
|
||||
|
||||
EnableSequence [
|
||||
cdev "hw:chtcx2072x"
|
||||
|
||||
# Enable audio output path
|
||||
cset "name='codec_out0 mix 0 pcm0_in Switch' on"
|
||||
cset "name='media0_out mix 0 media1_in Switch' on"
|
||||
|
||||
cset "name='media1_in Gain 0 Ramp Delay' 50"
|
||||
cset "name='media1_in Gain 0 Switch' on"
|
||||
cset "name='media1_in Gain 0 Volume' 0dB"
|
||||
|
||||
cset "name='pcm0_in Gain 0 Ramp Delay' 50"
|
||||
cset "name='pcm0_in Gain 0 Switch' on"
|
||||
cset "name='pcm0_in Gain 0 Volume' 0dB"
|
||||
|
||||
cset "name='codec_out0 Gain 0 Ramp Delay' 50"
|
||||
cset "name='codec_out0 Gain 0 Switch' on"
|
||||
cset "name='codec_out0 Gain 0 Volume' 0dB"
|
||||
|
||||
# Enable audio input path
|
||||
cset "name='pcm1_out mix 0 media_loop2_in Switch' on"
|
||||
cset "name='media_loop2_out mix 0 codec_in0 Switch' on"
|
||||
|
||||
cset "name='codec_in0 Gain 0 Ramp Delay' 50"
|
||||
cset "name='codec_in0 Gain 0 Switch' on"
|
||||
cset "name='codec_in0 Gain 0 Volume' 0dB"
|
||||
|
||||
cset "name='media_loop2_out Gain 0 Ramp Delay' 50"
|
||||
cset "name='media_loop2_out Gain 0 Switch' on"
|
||||
cset "name='media_loop2_out Gain 0 Volume' 0dB"
|
||||
|
||||
cset "name='pcm1_out Gain 0 Ramp Delay' 50"
|
||||
cset "name='pcm1_out Gain 0 Switch' on"
|
||||
cset "name='pcm1_out Gain 0 Volume' 0dB"
|
||||
|
||||
# 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"
|
||||
]
|
||||
|
||||
DisableSequence [
|
||||
cdev "hw:chtcx2072x"
|
||||
|
||||
# Disable audio output path
|
||||
cset "name='codec_out0 mix 0 pcm0_in Switch' off"
|
||||
cset "name='media0_out mix 0 media1_in Switch' off"
|
||||
|
||||
cset "name='media1_in Gain 0 Switch' off"
|
||||
cset "name='pcm0_in Gain 0 Switch' off"
|
||||
cset "name='codec_out0 Gain 0 Switch' off"
|
||||
|
||||
# Disable audio input path
|
||||
cset "name='pcm1_out mix 0 media_loop2_in Switch' off"
|
||||
cset "name='media_loop2_out mix 0 codec_in0 Switch' off"
|
||||
|
||||
cset "name='media_loop2_out Gain 0 Switch' off"
|
||||
cset "name='pcm1_out Gain 0 Switch' off"
|
||||
cset "name='codec_in0 Gain 0 Switch' off"
|
||||
|
||||
# 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"
|
||||
]
|
||||
}
|
||||
|
||||
SectionDevice."Speaker" {
|
||||
Comment "Speaker"
|
||||
|
||||
Value {
|
||||
PlaybackChannels "2"
|
||||
}
|
||||
|
||||
ConflictingDevice [
|
||||
"Headphone"
|
||||
]
|
||||
|
||||
EnableSequence [
|
||||
cdev "hw:chtcx2072x"
|
||||
|
||||
cset "name='Ext Spk Switch' on"
|
||||
cset "name='PortG Out En Switch' on"
|
||||
]
|
||||
|
||||
DisableSequence [
|
||||
cdev "hw:chtcx2072x"
|
||||
|
||||
cset "name='Ext Spk Switch' off"
|
||||
cset "name='PortG Out En Switch' off"
|
||||
]
|
||||
}
|
||||
|
||||
SectionDevice."Headphone".0 {
|
||||
Comment "Headphones"
|
||||
|
||||
Value {
|
||||
PlaybackChannels "2"
|
||||
JackControl "Headphone Jack"
|
||||
JackHWMute "Speaker"
|
||||
}
|
||||
|
||||
ConflictingDevice [
|
||||
"Speaker"
|
||||
]
|
||||
|
||||
EnableSequence [
|
||||
cdev "hw:chtcx2072x"
|
||||
|
||||
cset "name='Headphone Switch' on"
|
||||
cset "name='PortA Out En Switch' on"
|
||||
]
|
||||
|
||||
DisableSequence [
|
||||
cdev "hw:chtcx2072x"
|
||||
|
||||
cset "name='Headphone Switch' off"
|
||||
cset "name='PortA Out En Switch' off"
|
||||
]
|
||||
}
|
||||
|
||||
SectionDevice."Mic".0 {
|
||||
Comment "Internal Microphone"
|
||||
|
||||
Value {
|
||||
CaptureChannels "2"
|
||||
CapturePriority "150"
|
||||
}
|
||||
|
||||
EnableSequence [
|
||||
cdev "hw:chtcx2072x"
|
||||
|
||||
cset "name='Int Mic Switch' on"
|
||||
cset "name='ADC1 Mux' 'PortC Switch'"
|
||||
cset "name='PortC In En Switch' on"
|
||||
]
|
||||
|
||||
DisableSequence [
|
||||
cdev "hw:chtcx2072x"
|
||||
|
||||
cset "name='Int Mic Switch' off"
|
||||
cset "name='PortC In En Switch' off"
|
||||
]
|
||||
}
|
||||
|
||||
SectionDevice."HSMic".0 {
|
||||
Comment "Headset Microphone"
|
||||
|
||||
Value {
|
||||
CaptureChannels "2"
|
||||
JackControl "Headset Mic Jack"
|
||||
JackHWMute "Mic"
|
||||
}
|
||||
|
||||
EnableSequence [
|
||||
cdev "hw:chtcx2072x"
|
||||
|
||||
cset "name='Headset Mic Switch' on"
|
||||
cset "name='ADC1 Mux' 'PortD Switch'"
|
||||
cset "name='PortD In En Switch' on"
|
||||
]
|
||||
|
||||
DisableSequence [
|
||||
cdev "hw:chtcx2072x"
|
||||
|
||||
cset "name='Headset Mic Switch' off"
|
||||
cset "name='PortD In En Switch' off"
|
||||
]
|
||||
}
|
5
chtcx2072x.conf
Normal file
5
chtcx2072x.conf
Normal file
@ -0,0 +1,5 @@
|
||||
Comment "Intel SoC Audio Device"
|
||||
SectionUseCase."HiFi" {
|
||||
File "HiFi.conf"
|
||||
Comment "Default"
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user