All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] conf/ucm: Rearrange Makefile.am
@ 2017-12-05 16:46 Takashi Iwai
  2017-12-05 16:46 ` [PATCH 2/3] conf/ucm: Add dual HD-audio codecs config for Lenovo Takashi Iwai
  2017-12-05 16:46 ` [PATCH 3/3] conf/ucm: Add Gigabyte mobo UCM profile with dual HD-audio codecs Takashi Iwai
  0 siblings, 2 replies; 3+ messages in thread
From: Takashi Iwai @ 2017-12-05 16:46 UTC (permalink / raw)
  To: alsa-devel; +Cc: Hui Wang, Kailang

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 22d65bb84882..83724e07459c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -691,19 +691,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 \
@@ -711,7 +712,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.0

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 2/3] conf/ucm: Add dual HD-audio codecs config for Lenovo
  2017-12-05 16:46 [PATCH 1/3] conf/ucm: Rearrange Makefile.am Takashi Iwai
@ 2017-12-05 16:46 ` Takashi Iwai
  2017-12-05 16:46 ` [PATCH 3/3] conf/ucm: Add Gigabyte mobo UCM profile with dual HD-audio codecs Takashi Iwai
  1 sibling, 0 replies; 3+ messages in thread
From: Takashi Iwai @ 2017-12-05 16:46 UTC (permalink / raw)
  To: alsa-devel; +Cc: Hui Wang, Kailang

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 83724e07459c..286f6bdd74cb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -698,6 +698,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.0

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 3/3] conf/ucm: Add Gigabyte mobo UCM profile with dual HD-audio codecs
  2017-12-05 16:46 [PATCH 1/3] conf/ucm: Rearrange Makefile.am Takashi Iwai
  2017-12-05 16:46 ` [PATCH 2/3] conf/ucm: Add dual HD-audio codecs config for Lenovo Takashi Iwai
@ 2017-12-05 16:46 ` Takashi Iwai
  1 sibling, 0 replies; 3+ messages in thread
From: Takashi Iwai @ 2017-12-05 16:46 UTC (permalink / raw)
  To: alsa-devel; +Cc: Hui Wang, Kailang

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 286f6bdd74cb..1d97946d843f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -698,6 +698,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.0

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-12-05 16:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-05 16:46 [PATCH 1/3] conf/ucm: Rearrange Makefile.am Takashi Iwai
2017-12-05 16:46 ` [PATCH 2/3] conf/ucm: Add dual HD-audio codecs config for Lenovo Takashi Iwai
2017-12-05 16:46 ` [PATCH 3/3] conf/ucm: Add Gigabyte mobo UCM profile with dual HD-audio codecs Takashi Iwai

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.