device-pine64-pinetab: add ucm files (MR 1191)

Signed-off-by: Danct12 <danct12@disroot.org>
This commit is contained in:
Danct12 2020-04-26 22:22:23 +07:00 committed by Bart Ribbers
parent ce9623de68
commit 0ac7142c2e
No known key found for this signature in database
GPG key ID: 699D16185DAFAE61
3 changed files with 115 additions and 2 deletions

View file

@ -2,7 +2,7 @@
pkgname=device-pine64-pinetab
pkgdesc="PINE64 PineTab"
pkgver=0.1
pkgrel=18
pkgrel=19
url="https://postmarketos.org"
license="MIT"
arch="aarch64"
@ -17,6 +17,8 @@ subpackages="
"
install="$pkgname.post-install"
source="
ucm/HiFi.conf
ucm/sun50i-a64-audio.conf
deviceinfo
uboot-script.cmd
sysrq.conf
@ -71,6 +73,12 @@ package() {
install -D -m644 "$srcdir"/sysrq.conf \
"$pkgdir"/etc/sysctl.d/sysrq.conf
# 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.conf \
"$pkgdir"/usr/share/alsa/ucm2/sun50i-a64-audio/HiFi.conf
# Fix for the meta key on v1 keyboard dock, probably not needed on newer revisions
install -Dm644 "$srcdir"/99-pinetab-keyboard.hwdb \
"$pkgdir"/etc/udev/hwdb.d/99-pinetab-keyboard.hwdb
@ -82,7 +90,9 @@ nonfree_firmware() {
mkdir "$subpkgdir"
}
sha512sums="0f5efb1ab4b23f086e41ee8851872201778c0a149d7cac4feeb5c9a2ef50b48499500da296b581f69c6aa675720298df301a464b3ae3e7499a36a7bc0d101e75 deviceinfo
sha512sums="61bbb5467b51c3cee041f5c8eccf704a5b7861a2a3efff06cf91eb3291034636f78d9fd9d5ad9826c6a781092065f5a5eb72068e692712aed30f41e4f661b902 HiFi.conf
3bdf9d4c41058680d488d9b4a2ac5fd693ceddc5f319a577480546f8af7d9d64c9d3196e73cb0c00e793697eef4ad075c88c3d274702a5387c15945bc749d844 sun50i-a64-audio.conf
0f5efb1ab4b23f086e41ee8851872201778c0a149d7cac4feeb5c9a2ef50b48499500da296b581f69c6aa675720298df301a464b3ae3e7499a36a7bc0d101e75 deviceinfo
1f3108007bd443f86ed8af2b2d84705c52ffcf73809a90ef5e4a1f618b73ab39baf8f8139d578c88e66f589464f8c47d53f72bf46f14b8fa78d962ae10d7d6d2 uboot-script.cmd
f4b5509fd6a8b23f3667f5e7262b3a19c607a37cb9eaf7d0e93eb826d45c26ec12df4810879bacb8e4042bb83cc80b2b436224c8d47b6d67361369a724bbf7ee sysrq.conf
9e71c61bfa72b60e749c4dc04f17eb59d25de822765e81e65c937d6be5236d3951a652b69a1ab973abe6add9f34705be5dbaa98bbfa25daf7504dd50b28524c2 sway.conf

View file

@ -0,0 +1,97 @@
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='AIF1 DA0 Playback Volume' 160"
cset "name='AIF1 Loopback Switch' off"
cset "name='AIF2 Loopback Switch' off"
cset "name='AIF3 Loopback Switch' off"
cset "name='AIF3 ADC Capture Route' None"
cset "name='AIF3 DAC Playback Route' None"
cset "name='DAC Playback Switch' on"
cset "name='DAC Playback Volume' 160"
cset "name='DAC Mixer ADC Playback Switch' off"
cset "name='DAC Mixer AIF1 DA0 Playback Switch' on"
cset "name='DAC Mixer AIF2 DAC Playback Switch' off"
cset "name='DAC Reversed Playback Switch' off"
cset "name='Line In Capture Switch' off"
cset "name='Mic1 Capture Switch' off"
cset "name='Mic1 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 AD0 Mixer 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"
]
Value {
PlaybackPCM "hw:${CardId},0"
CapturePCM "hw:${CardId},0"
}
}
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."Mic" {
Comment "Internal Microphone"
EnableSequence [
cset "name='Mic1 Capture Switch' on"
]
DisableSequence [
cset "name='Mic1 Capture Switch' off"
]
Value {
CapturePriority 500
CapturePCM "hw:${CardId},0"
CaptureChannels 2
}
}
SectionDevice."Headphones" {
Comment "Headset"
EnableSequence [
cset "name='AIF1 DA0 Stereo Playback Route' Stereo"
cset "name='Headphone Playback Switch' on"
cset "name='Headphone Playback Volume' 40%"
]
DisableSequence [
cset "name='Headphone Playback Switch' off"
]
Value {
PlaybackVolume "Headphone Playback Volume"
PlaybackSwitch "Headphone Playback Switch"
PlaybackChannels 2
PlaybackPriority 100
PlaybackPCM "hw:${CardId},0"
}
}

View file

@ -0,0 +1,6 @@
Syntax 2
SectionUseCase."HiFi" {
File "HiFi.conf"
Comment "Play HiFi quality music"
}