public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/proj/guru:dev commit in: media-libs/alsa-ucm-pinephone/files/
@ 2021-07-01  8:57 Marco Scardovi
  0 siblings, 0 replies; only message in thread
From: Marco Scardovi @ 2021-07-01  8:57 UTC (permalink / raw
  To: gentoo-commits

commit:     d2e0eb643dc5cadcb0b130c82f61d3ba1e31dfbc
Author:     Marco Scardovi <marco <AT> scardovi <DOT> com>
AuthorDate: Thu Jul  1 08:52:12 2021 +0000
Commit:     Marco Scardovi <marco <AT> scardovi <DOT> com>
CommitDate: Thu Jul  1 08:52:34 2021 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=d2e0eb64

media-libs/alsa-ucm-pinephone: added missing .conf files

Package-Manager: Portage-3.0.20, Repoman-3.0.3
Signed-off-by: Marco Scardovi <marco <AT> scardovi.com>

 media-libs/alsa-ucm-pinephone/files/HiFi.conf      | 146 ++++++++++++++++++++
 media-libs/alsa-ucm-pinephone/files/PinePhone.conf |  11 ++
 media-libs/alsa-ucm-pinephone/files/VoiceCall.conf | 151 +++++++++++++++++++++
 3 files changed, 308 insertions(+)

diff --git a/media-libs/alsa-ucm-pinephone/files/HiFi.conf b/media-libs/alsa-ucm-pinephone/files/HiFi.conf
new file mode 100644
index 000000000..5996e4a26
--- /dev/null
+++ b/media-libs/alsa-ucm-pinephone/files/HiFi.conf
@@ -0,0 +1,146 @@
+SectionVerb {
+	EnableSequence [
+		cset "name='Headphone Playback Switch' off"
+		cset "name='Headphone Source Playback Route' DAC"
+		cset "name='Line In Playback Switch' off"
+		cset "name='Line Out Playback Switch' off"
+		cset "name='Line Out Source Playback Route' Mono Differential"
+		cset "name='Mic1 Playback Switch' off"
+		cset "name='Mic2 Playback Switch' off"
+		cset "name='AIF1 DA0 Playback Volume' 160"
+		cset "name='AIF3 ADC Source Capture Route' None"
+		cset "name='AIF2 DAC Source Playback Route' None"
+		cset "name='DAC Playback Switch' on"
+		cset "name='DAC Playback Volume' 160"
+		cset "name='ADC Digital DAC Playback Switch' off"
+		cset "name='AIF1 Slot 0 Digital DAC Playback Switch' on"
+		cset "name='AIF2 Digital DAC Playback Switch' off"
+		cset "name='DAC Reversed Playback Switch' off"
+		cset "name='Earpiece Playback Switch' off"
+		cset "name='Earpiece Source Playback Route' DACL"
+
+		cset "name='Line In Capture Switch' off"
+		cset "name='Mic1 Capture Switch' off"
+		cset "name='Mic1 Boost Volume' 7"
+		cset "name='Mic2 Capture Switch' off"
+		cset "name='Mic2 Boost Volume' 7"
+		cset "name='Mixer Capture Switch' off"
+		cset "name='Mixer Reversed Capture Switch' off"
+		cset "name='ADC Capture Volume' 160"
+		cset "name='ADC Gain Capture Volume' 7"
+		cset "name='AIF1 AD0 Capture Volume' 160"
+		cset "name='AIF1 Data Digital ADC Capture Switch' on"
+		cset "name='AIF2 ADC Mixer ADC Capture Switch' off"
+		cset "name='AIF2 ADC Mixer AIF1 DA0 Capture Switch' off"
+		cset "name='AIF2 ADC Mixer AIF2 DAC Rev Capture Switch' off"
+		cset "name='AIF2 ADC Mixer AIF1 DA0 Capture Switch' off"
+		cset "name='AIF2 ADC Mixer AIF1 DA0 Capture Switch' off"
+	]
+
+        DisableSequence [
+        ]
+
+	Value {
+	}
+}
+
+SectionDevice."Speaker" {
+	Comment "Internal speaker"
+	EnableSequence [
+		cset "name='AIF1 DA0 Stereo Playback Route' Mix Mono"
+		cset "name='Line Out Playback Switch' on"
+		cset "name='Line Out Playback Volume' 100%"
+	]
+
+	DisableSequence [
+		cset "name='Line Out Playback Switch' off"
+	]
+
+	Value {
+		PlaybackVolume "Line Out Playback Volume"
+		PlaybackSwitch "Line Out Playback Switch"
+		PlaybackChannels 2
+		PlaybackPriority 300
+		PlaybackPCM "hw:${CardId},0"
+	}
+}
+SectionDevice."Earpiece" {
+	Comment "Internal Earpiece"
+	EnableSequence [
+		cset "name='AIF1 DA0 Stereo Playback Route' Mix Mono"
+		cset "name='Earpiece Playback Switch' on"
+		cset "name='Earpiece Playback Volume' 100%"
+	]
+
+	DisableSequence [
+		cset "name='Earpiece Playback Switch' off"
+	]
+
+	Value {
+		PlaybackVolume "Earpiece Playback Volume"
+		PlaybackSwitch "Earpiece Playback Switch"
+		PlaybackChannels 2
+		PlaybackPriority 200
+		PlaybackPCM "hw:${CardId},0"
+	}
+}
+SectionDevice."Mic" {
+	Comment "Internal Microphone"
+	ConflictingDevice [
+		"Headset"
+	]
+	EnableSequence [
+		cset "name='Mic1 Capture Switch' on"
+	]
+	DisableSequence [
+		cset "name='Mic1 Capture Switch' off"
+	]
+	Value {
+		CapturePriority 100
+		CapturePCM "hw:${CardId},0"
+		CaptureChannels 2
+		CaptureVolume "ADC Capture Volume"
+		CaptureSwitch "Mic1 Capture Switch"
+	}
+}
+SectionDevice."Headset" {
+	Comment "Headset Microphone"
+	ConflictingDevice [
+		"Mic"
+	]
+	EnableSequence [
+		cset "name='Mic2 Capture Switch' on"
+	]
+	DisableSequence [
+		cset "name='Mic2 Capture Switch' off"
+	]
+	Value {
+		CapturePriority 500
+		CapturePCM "hw:${CardId},0"
+		CaptureChannels 2
+		CaptureVolume "ADC Capture Volume"
+		CaptureSwitch "Mic2 Capture Switch"
+		JackControl "Headset Microphone Jack"
+	}
+}
+SectionDevice."Headphones" {
+	Comment "Headphones"
+	EnableSequence [
+		cset "name='AIF1 DA0 Stereo Playback Route' Stereo"
+		cset "name='Headphone Playback Switch' on"
+		cset "name='Headphone Playback Volume' 70%"
+	]
+
+	DisableSequence [
+		cset "name='Headphone Playback Switch' off"
+	]
+
+	Value {
+		PlaybackVolume "Headphone Playback Volume"
+		PlaybackSwitch "Headphone Playback Switch"
+		PlaybackChannels 2
+		PlaybackPriority 500
+		PlaybackPCM "hw:${CardId},0"
+		JackControl "Headphone Jack"
+	}
+}

diff --git a/media-libs/alsa-ucm-pinephone/files/PinePhone.conf b/media-libs/alsa-ucm-pinephone/files/PinePhone.conf
new file mode 100644
index 000000000..9a8ea12b2
--- /dev/null
+++ b/media-libs/alsa-ucm-pinephone/files/PinePhone.conf
@@ -0,0 +1,11 @@
+Syntax 2
+
+SectionUseCase."HiFi" {
+	File "HiFi.conf"
+	Comment "Play HiFi quality music"
+}
+
+SectionUseCase."Voice Call" {
+	File "VoiceCall.conf"
+	Comment "Make a phone call"
+}

diff --git a/media-libs/alsa-ucm-pinephone/files/VoiceCall.conf b/media-libs/alsa-ucm-pinephone/files/VoiceCall.conf
new file mode 100644
index 000000000..163055986
--- /dev/null
+++ b/media-libs/alsa-ucm-pinephone/files/VoiceCall.conf
@@ -0,0 +1,151 @@
+SectionVerb {
+	EnableSequence [
+		cset "name='Headphone Playback Switch' off"
+		cset "name='Headphone Source Playback Route' DAC"
+		cset "name='Line In Playback Switch' off"
+		cset "name='Line Out Playback Switch' off"
+		cset "name='Line Out Source Playback Route' Mono Differential"
+		cset "name='Mic1 Playback Switch' off"
+		cset "name='Mic2 Playback Switch' off"
+		cset "name='AIF1 DA0 Playback Volume' 160"
+		cset "name='AIF2 DAC Playback Volume' 160"
+		cset "name='AIF3 ADC Source Capture Route' None"
+		cset "name='AIF2 DAC Source Playback Route' None"
+		cset "name='DAC Playback Switch' on"
+		cset "name='DAC Playback Volume' 160"
+		cset "name='ADC Digital DAC Playback Switch' off"
+		cset "name='AIF1 Slot 0 Digital DAC Playback Switch' on"
+		cset "name='AIF2 Digital DAC Playback Switch' on"
+		cset "name='DAC Reversed Playback Switch' off"
+		cset "name='Earpiece Playback Switch' off"
+		cset "name='Earpiece Source Playback Route' DACL"
+
+		cset "name='Line In Capture Switch' off"
+		cset "name='Mic1 Capture Switch' off"
+		cset "name='Mic1 Boost Volume' 0"
+		cset "name='Mic1 Playback Volume' 7"
+		cset "name='Mic2 Capture Switch' off"
+		cset "name='Mic2 Boost Volume' 0"
+		cset "name='Mic2 Playback Volume' 7"
+		cset "name='Mixer Capture Switch' off"
+		cset "name='Mixer Reversed Capture Switch' off"
+		cset "name='ADC Capture Volume' 160"
+		cset "name='ADC Gain Capture Volume' 7"
+		cset "name='AIF1 AD0 Capture Volume' 160"
+		cset "name='AIF1 Data Digital ADC Capture Switch' on"
+		cset "name='AIF2 ADC Capture Volume' 160"
+		cset "name='AIF2 ADC Mixer ADC Capture Switch' on"
+		cset "name='AIF2 ADC Mixer AIF1 DA0 Capture Switch' off"
+		cset "name='AIF2 ADC Mixer AIF2 DAC Rev Capture Switch' off"
+		cset "name='AIF2 ADC Mixer AIF1 DA0 Capture Switch' off"
+		cset "name='AIF2 ADC Mixer AIF1 DA0 Capture Switch' off"
+	]
+
+        DisableSequence [
+        ]
+
+	Value {
+		PlaybackRate 8000
+	}
+}
+
+SectionDevice."Speaker" {
+	Comment "Internal speaker"
+	EnableSequence [
+		cset "name='AIF1 DA0 Stereo Playback Route' Mix Mono"
+		cset "name='Line Out Playback Switch' on"
+		cset "name='Line Out Playback Volume' 100%"
+	]
+
+	DisableSequence [
+		cset "name='Line Out Playback Switch' off"
+	]
+
+	Value {
+		PlaybackVolume "Line Out Playback Volume"
+		PlaybackSwitch "Line Out Playback Switch"
+		PlaybackChannels 2
+		PlaybackPriority 300
+		PlaybackPCM "hw:${CardId},0"
+	}
+}
+SectionDevice."Earpiece" {
+	Comment "Internal Earpiece"
+	EnableSequence [
+		cset "name='AIF1 DA0 Stereo Playback Route' Mix Mono"
+		cset "name='Earpiece Playback Switch' on"
+		cset "name='Earpiece Playback Volume' 100%"
+	]
+
+	DisableSequence [
+		cset "name='Earpiece Playback Switch' off"
+	]
+
+	Value {
+		PlaybackVolume "Earpiece Playback Volume"
+		PlaybackSwitch "Earpiece Playback Switch"
+		PlaybackChannels 2
+		PlaybackPriority 500
+		PlaybackPCM "hw:${CardId},0"
+	}
+}
+SectionDevice."Mic" {
+	Comment "Internal Microphone"
+	ConflictingDevice [
+		"Headset"
+	]
+	EnableSequence [
+		cset "name='Mic1 Capture Switch' on"
+	]
+	DisableSequence [
+		cset "name='Mic1 Capture Switch' off"
+	]
+	Value {
+		CapturePriority 200
+		CapturePCM "hw:${CardId},0"
+		CaptureVolume "ADC Capture Volume"
+		CaptureSwitch "Mic1 Capture Switch"
+		CaptureChannels 2
+	}
+}
+SectionDevice."Headset" {
+	Comment "Headset Microphone"
+	ConflictingDevice [
+		"Mic"
+	]
+	EnableSequence [
+		cset "name='Mic2 Capture Switch' on"
+	]
+	DisableSequence [
+		cset "name='Mic2 Capture Switch' off"
+	]
+	Value {
+		CapturePriority 500
+		CapturePCM "hw:${CardId},0"
+		CaptureChannels 2
+		CaptureVolume "ADC Capture Volume"
+		CaptureSwitch "Mic2 Capture Switch"
+		JackControl "Headset Microphone Jack"
+	}
+}
+SectionDevice."Headphones" {
+	Comment "Headphones"
+	EnableSequence [
+		cset "name='AIF1 DA0 Stereo Playback Route' Stereo"
+		cset "name='Headphone Playback Switch' on"
+		cset "name='Headphone Playback Volume' 100%"
+	]
+
+	DisableSequence [
+		cset "name='Headphone Playback Switch' off"
+	]
+
+	Value {
+		PlaybackVolume "Headphone Playback Volume"
+		PlaybackSwitch "Headphone Playback Switch"
+		PlaybackChannels 2
+		PlaybackPriority 500
+		PlaybackPCM "hw:${CardId},0"
+		JackControl "Headphone Jack"
+	}
+}


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-07-01  8:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-07-01  8:57 [gentoo-commits] repo/proj/guru:dev commit in: media-libs/alsa-ucm-pinephone/files/ Marco Scardovi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox