device-pine64-pinephone: add alsa ucm config (!772)
This provides alsa usecase profiles for the audio routing in the pinephone, pulseaudio also picks up this config. [ci:skip-build]: already built successfully in CI
This commit is contained in:
parent
4429132ac5
commit
727e21b20f
3 changed files with 131 additions and 2 deletions
|
@ -2,7 +2,7 @@
|
|||
pkgname="device-pine64-pinephone"
|
||||
pkgdesc="PINE64 PinePhone"
|
||||
pkgver=0.1
|
||||
pkgrel=12
|
||||
pkgrel=13
|
||||
url="https://postmarketos.org"
|
||||
license="MIT"
|
||||
arch="aarch64"
|
||||
|
@ -21,6 +21,8 @@ source="
|
|||
weston.ini
|
||||
xorg.conf
|
||||
hwtest.ini
|
||||
ucm/sun50i-a64-audio.conf
|
||||
ucm/HiFi
|
||||
"
|
||||
|
||||
build() {
|
||||
|
@ -34,6 +36,12 @@ package() {
|
|||
"$pkgdir"/boot/boot.scr
|
||||
install -D -m644 "$srcdir"/hwtest.ini \
|
||||
"$pkgdir"/usr/share/hwtest.ini
|
||||
|
||||
# Alsa usecase manager config
|
||||
install -D -m644 "$srcdir"/sun50i-a64-audio.conf \
|
||||
"$pkgdir"/usr/share/alsa/ucm2/sun50i-a64-audio/sun50i-a64-audio.conf
|
||||
install -D -m644 "$srcdir"/HiFi \
|
||||
"$pkgdir"/usr/share/alsa/ucm2/sun50i-a64-audio/HiFi
|
||||
}
|
||||
|
||||
x11() {
|
||||
|
@ -63,4 +71,6 @@ sha512sums="5695150bcd2d2593bb912d5e714a48f5e0e97eb27829c6b5620a6d7fc6baaa2dc32b
|
|||
f7271c2b231e3417bd8729a25f19ef4ce149c7afd7d64b2b16a4f131e281e3f43687055210179ae14993a0df766feb11ee4091b33185b00a21608a31e615d712 uboot-script.cmd
|
||||
c4c57d1627dd451213e1ef20d89de9266cd4edcc2d33a69aa9a1f13e16d9f9742036b69dc149fd910d7213f7525c41eb79576d4457bc85cc96eba0d986382d27 weston.ini
|
||||
f86ef35730b89bcc8160c08db7a7fcd0970adf60c0b77af68bac397de49c0d1783e6b8db1762380c9bf874aff2d030c6f44ecb75c803d69e79ede11376409369 xorg.conf
|
||||
3dd6d612c381cb0002049d1974d8fb5aa5a53a1eb4d6bcbf62eb2ad52cfdc45f0f6ad24a699716d3513b0371aa1316f25dc72afc10d7176cc3b99d0965c3f030 hwtest.ini"
|
||||
3dd6d612c381cb0002049d1974d8fb5aa5a53a1eb4d6bcbf62eb2ad52cfdc45f0f6ad24a699716d3513b0371aa1316f25dc72afc10d7176cc3b99d0965c3f030 hwtest.ini
|
||||
775b7f7612102fc8ff12b2ffc8a7d479bfcf0ab054e331e4bd7873264cc63cbcbf5073d8dc2a80ef0f36226ad5c8b435396801c7d712161ff80ef036ecdc29b6 sun50i-a64-audio.conf
|
||||
8018532bd68b4682455690922560933ddb0dd1dae6a3b2f8611ae89ad09e37ea3c5a17cb9fd39ac165e4e598e0eb9ebbd1395f5908020108ee8a301aae516c3c HiFi"
|
||||
|
|
112
device/device-pine64-pinephone/ucm/HiFi
Normal file
112
device/device-pine64-pinephone/ucm/HiFi
Normal file
|
@ -0,0 +1,112 @@
|
|||
SectionVerb {
|
||||
EnableSequence [
|
||||
cset "name='AIF1 Slot 0 Digital DAC Playback Switch' on"
|
||||
cset "name='Headphone Source Playback Route' DAC"
|
||||
cset "name='DAC Playback Switch' on"
|
||||
cset "name='DAC Reversed Playback Switch' off"
|
||||
cset "name='Earpiece Source Playback Route' DACL"
|
||||
cset "name='Line Out Playback Switch' off"
|
||||
cset "name='Earpiece Playback Switch' off"
|
||||
cset "name='Headphone Playback Switch' off"
|
||||
]
|
||||
DisableSequence [
|
||||
]
|
||||
Value {
|
||||
PlaybackPCM "hw:${CardId},0"
|
||||
CapturePCM "hw:${CardId},0"
|
||||
}
|
||||
}
|
||||
|
||||
SectionDevice."Speaker" {
|
||||
Comment "Internal speaker"
|
||||
EnableSequence [
|
||||
cset "name='Line Out Playback Switch' on"
|
||||
]
|
||||
|
||||
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='Earpiece Playback Switch' on"
|
||||
]
|
||||
|
||||
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."DigitalMic" {
|
||||
Comment "Internal Microphone"
|
||||
ConflictingDevice [
|
||||
"HeadsetMic"
|
||||
]
|
||||
EnableSequence [
|
||||
cset "name='AIF1 Data Digital ADC Capture Switch' on"
|
||||
cset "name='Line In Capture Switch' on"
|
||||
]
|
||||
DisableSequence [
|
||||
cset "name='AIF1 Data Digital ADC Capture Switch' off"
|
||||
cset "name='Line In Capture Switch' off"
|
||||
]
|
||||
Value {
|
||||
CapturePriority 100
|
||||
CapturePCM "hw:${CardId},0"
|
||||
CaptureChannels "2"
|
||||
}
|
||||
}
|
||||
SectionDevice."HeadsetMic" {
|
||||
Comment "Headset Microphone"
|
||||
ConflictingDevice [
|
||||
"DigitalMic"
|
||||
]
|
||||
EnableSequence [
|
||||
cset "name='AIF1 Data Digital ADC Capture Switch' on"
|
||||
cset "name='Mic2 Capture Switch' on"
|
||||
]
|
||||
DisableSequence [
|
||||
cset "name='AIF1 Data Digital ADC Capture Switch' off"
|
||||
cset "name='Mic2 Capture Switch' off"
|
||||
]
|
||||
Value {
|
||||
CapturePriority 100
|
||||
CapturePCM "hw:${CardId},0"
|
||||
CaptureChannels "2"
|
||||
}
|
||||
}
|
||||
SectionDevice."Headphone" {
|
||||
Comment "Headset"
|
||||
EnableSequence [
|
||||
cset "name='Headphone Playback Switch' on"
|
||||
]
|
||||
|
||||
DisableSequence [
|
||||
cset "name='Headphone Playback Switch' off"
|
||||
]
|
||||
|
||||
Value {
|
||||
PlaybackVolume "Headphone Playback Volume"
|
||||
PlaybackSwitch "Headphone Playback Switch"
|
||||
PlaybackChannels "2"
|
||||
PlaybackPriority 500
|
||||
PlaybackPCM "hw:${CardId},0"
|
||||
}
|
||||
}
|
||||
|
7
device/device-pine64-pinephone/ucm/sun50i-a64-audio.conf
Normal file
7
device/device-pine64-pinephone/ucm/sun50i-a64-audio.conf
Normal file
|
@ -0,0 +1,7 @@
|
|||
Syntax 2
|
||||
|
||||
SectionUseCase."HiFi" {
|
||||
File "HiFi"
|
||||
Comment "All inputs and outputs"
|
||||
}
|
||||
|
Loading…
Reference in a new issue