--- /dev/null
+SectionVerb {
+ EnableSequence [
+ cset "name='AIF2 Digital DAC Playback Switch' off"
+ cset "name='AIF2 ADC Mixer ADC Capture Switch' off"
+ ]
+}
+
+SectionDevice."Speaker" {
+ Comment "Internal speaker"
+ EnableSequence [
+ cset "name='Line Out Playback Switch' on"
+ ]
+
+ DisableSequence [
+ cset "name='Line Out Playback Switch' off"
+ ]
+
+ Value {
+ PlaybackMixerElem "Line Out"
+ PlaybackPriority 300
+ PlaybackPCM "hw:${CardId},0"
+ }
+}
+
+SectionDevice."Earpiece" {
+ Comment "Internal Earpiece"
+
+ EnableSequence [
+ cset "name='Earpiece Playback Switch' on"
+ ]
+
+ DisableSequence [
+ cset "name='Earpiece Playback Switch' off"
+ ]
+
+ Value {
+ PlaybackMixerElem "Earpiece"
+ 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"
+ 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"
+ CaptureVolume "ADC Capture Volume"
+ CaptureSwitch "Mic2 Capture Switch"
+ JackControl "Headset Microphone Jack"
+ }
+}
+
+SectionDevice."Headphones" {
+ Comment "Headphones"
+
+ EnableSequence [
+ cset "name='Headphone Playback Switch' on"
+ ]
+
+ DisableSequence [
+ cset "name='Headphone Playback Switch' off"
+ ]
+
+ Value {
+ PlaybackMixerElem "Headphone"
+ PlaybackPriority 500
+ PlaybackPCM "hw:${CardId},0"
+ JackControl "Headphone Jack"
+ }
+}
--- /dev/null
+Syntax 2
+
+# https://wiki.pine64.org/index.php/PinePhone
+# https://files.pine64.org/doc/PinePhone/PinePhone%20v1.2%20Released%20Schematic.pdf
+# https://xnux.eu/devices/feature/audio-pp.html
+
+SectionUseCase."HiFi" {
+ File "/Allwinner/A64/PinePhone/HiFi.conf"
+ Comment "Play HiFi quality music"
+}
+
+SectionUseCase."Voice Call" {
+ File "/Allwinner/A64/PinePhone/VoiceCall.conf"
+ Comment "Make a phone call"
+}
+
+FixedBootSequence [
+ # Routing.
+ cset "name='ADC Digital DAC Playback Switch' off"
+ cset "name='AIF1 DA0 Stereo Playback Route' Stereo"
+ cset "name='AIF1 Data Digital ADC Capture Switch' on"
+ cset "name='AIF1 Slot 0 Digital DAC Playback Switch' on"
+ cset "name='AIF2 DAC Source Playback Route' AIF2"
+ # AIF2 (Modem) is mono.
+ cset "name='AIF2 DAC Stereo Playback Route' Mix Mono"
+ cset "name='AIF3 ADC Source Capture Route' None"
+ cset "name='DAC Playback Switch' on"
+ # Routes DACR->MIXL and DACL->MIXR => MIXL are MIXR are identical mono-mix of the DAC.
+ cset "name='DAC Reversed Playback Switch' on"
+ cset "name='Earpiece Source Playback Route' Left Mixer"
+ cset "name='Headphone Source Playback Route' DAC"
+ # The Pinephone speaker is mono.
+ cset "name='Line Out Source Playback Route' Mono Differential"
+]
+
+BootSequence [
+ # Playback volumes.
+ cset "name='AIF1 DA0 Playback Volume' 160"
+ cset "name='AIF2 DAC Playback Volume' 160"
+ cset "name='DAC Playback Volume' 160"
+ cset "name='Earpiece Playback Volume' 100%"
+ cset "name='Headphone Playback Volume' 70%"
+ cset "name='Line Out Playback Volume' 100%"
+ cset "name='Mic2 Boost Volume' 1"
+
+ # Capture volumes.
+ cset "name='ADC Capture Volume' 160"
+ cset "name='AIF1 AD0 Capture Volume' 160"
+ cset "name='AIF2 ADC Capture Volume' 160"
+]
+
+SectionDefaults [
+ # Switch playback off.
+ cset "name='Earpiece Playback Switch' off"
+ cset "name='Headphone Playback Switch' off"
+ cset "name='Line In Playback Switch' off"
+ cset "name='Line Out Playback Switch' off"
+ cset "name='Mic1 Playback Switch' off"
+ cset "name='Mic2 Playback Switch' off"
+
+ # Switch capture off.
+ cset "name='Line In Capture Switch' off"
+ cset "name='Mic1 Capture Switch' off"
+ cset "name='Mic2 Capture Switch' off"
+ cset "name='Mixer Capture Switch' off"
+ cset "name='Mixer Reversed Capture Switch' off"
+]
\ No newline at end of file
--- /dev/null
+SectionVerb {
+ EnableSequence [
+ cset "name='AIF2 Digital DAC Playback Switch' on"
+ cset "name='AIF2 ADC Mixer ADC Capture Switch' on"
+ ]
+
+ Value {
+ PlaybackRate 8000
+ }
+}
+
+SectionDevice."Speaker" {
+ Comment "Internal speaker"
+
+ EnableSequence [
+ cset "name='Line Out Playback Switch' on"
+ ]
+
+ DisableSequence [
+ cset "name='Line Out Playback Switch' off"
+ ]
+
+ Value {
+ PlaybackMixerElem "Line Out"
+ PlaybackPriority 300
+ PlaybackPCM "hw:${CardId},0"
+ }
+}
+
+SectionDevice."Earpiece" {
+ Comment "Internal Earpiece"
+
+ EnableSequence [
+ cset "name='Earpiece Playback Switch' on"
+ ]
+
+ DisableSequence [
+ cset "name='Earpiece Playback Switch' off"
+ ]
+
+ Value {
+ PlaybackMixerElem "Earpiece"
+ 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"
+ }
+}
+
+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"
+ CaptureVolume "ADC Capture Volume"
+ CaptureSwitch "Mic2 Capture Switch"
+ JackControl "Headset Microphone Jack"
+ }
+}
+
+SectionDevice."Headphones" {
+ Comment "Headphones"
+
+ EnableSequence [
+ cset "name='Headphone Playback Switch' on"
+ ]
+
+ DisableSequence [
+ cset "name='Headphone Playback Switch' off"
+ ]
+
+ Value {
+ PlaybackMixerElem "Headphone"
+ PlaybackPriority 500
+ PlaybackPCM "hw:${CardId},0"
+ JackControl "Headphone Jack"
+ }
+}
--- /dev/null
+../../Allwinner/A64/PinePhone/PinePhone.conf
\ No newline at end of file