device-fairphone-fp4: add ALSA UCM & firmware for speaker support
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7866>
This commit is contained in:
parent
7d762d61c1
commit
7d6e37fe6a
4 changed files with 66 additions and 2 deletions
15
device/community/device-fairphone-fp4/52-fairphone-fp4.conf
Normal file
15
device/community/device-fairphone-fp4/52-fairphone-fp4.conf
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
monitor.alsa.rules = [
|
||||
{
|
||||
matches = [
|
||||
{
|
||||
# Matches all sinks
|
||||
node.name = "~alsa_output.*"
|
||||
}
|
||||
]
|
||||
actions = {
|
||||
update-props = {
|
||||
audio.format = "S32LE"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
|
|
@ -2,8 +2,8 @@
|
|||
maintainer="Luca Weiss <luca@lucaweiss.eu>"
|
||||
pkgname=device-fairphone-fp4
|
||||
pkgdesc="Fairphone 4"
|
||||
pkgver=7
|
||||
pkgrel=1
|
||||
pkgver=8
|
||||
pkgrel=0
|
||||
url="https://postmarketos.org"
|
||||
license="MIT"
|
||||
arch="aarch64"
|
||||
|
|
@ -11,6 +11,7 @@ options="!check !archcheck"
|
|||
depends="
|
||||
firmware-fairphone-fp4-adreno
|
||||
firmware-fairphone-fp4-adsp
|
||||
firmware-fairphone-fp4-audio
|
||||
firmware-fairphone-fp4-bluetooth
|
||||
firmware-fairphone-fp4-cdsp
|
||||
firmware-fairphone-fp4-hexagonfs
|
||||
|
|
@ -32,9 +33,12 @@ makedepends="devicepkg-dev"
|
|||
install="$pkgname-openrc.post-install $pkgname-openrc.post-upgrade"
|
||||
subpackages="$pkgname-openrc"
|
||||
source="
|
||||
52-fairphone-fp4.conf
|
||||
81-libssc-fairphone-fp4.rules
|
||||
deviceinfo
|
||||
modules-initfs
|
||||
ucm/HiFi.conf
|
||||
ucm/fp4.conf
|
||||
"
|
||||
|
||||
build() {
|
||||
|
|
@ -46,6 +50,17 @@ package() {
|
|||
|
||||
install -Dm644 "$srcdir"/81-libssc-fairphone-fp4.rules \
|
||||
"$pkgdir"/usr/lib/udev/rules.d/81-libssc-fairphone-fp4.rules
|
||||
|
||||
install -Dm644 "$srcdir"/52-fairphone-fp4.conf \
|
||||
-t "$pkgdir"/usr/share/wireplumber/wireplumber.conf.d
|
||||
|
||||
# Alsa usecase manager config
|
||||
install -Dm644 -t "$pkgdir"/usr/share/alsa/ucm2/Fairphone/fp4 \
|
||||
"$srcdir"/HiFi.conf \
|
||||
"$srcdir"/fp4.conf
|
||||
mkdir -p "$pkgdir"/usr/share/alsa/ucm2/conf.d/sm7225
|
||||
ln -s /usr/share/alsa/ucm2/Fairphone/fp4/fp4.conf \
|
||||
"$pkgdir"/usr/share/alsa/ucm2/conf.d/sm7225/Fairphone\ 4.conf
|
||||
}
|
||||
|
||||
openrc() {
|
||||
|
|
@ -56,7 +71,10 @@ openrc() {
|
|||
}
|
||||
|
||||
sha512sums="
|
||||
f6fb26e0e75b15cf727e8a20f34e4132cf357025fff1427cf63729776aedce6e647f9f81f1ec13d0a895e381c119980d8bca575e431d241d9affb4f0ee44f4b4 52-fairphone-fp4.conf
|
||||
2c16ba75e0077b2b1eaefa4c73b287475505a1aeb291ec29316d41cc094277320f9d2aaabfd91eb1dc0f488ab2d61a94faef16e7afe0f1e226779113761b9a37 81-libssc-fairphone-fp4.rules
|
||||
06cdf6ba36f29553484dcde46431500550608dfb757836c180886e3dbc2a1ce5e90927690c63aea468e90ce0b1371d15efe62912eb43749c0e0bee27ce5215b3 deviceinfo
|
||||
52bb7ed829caa4dcff9728bd6e3cdf118b3c7ee7dfe90df0d4e6422dd67bf3258ae2a4d2dc7599da4182fbd8eb47a0e1d20c58198dc17f2bf178b8f01a8887f7 modules-initfs
|
||||
d0af0266cb888b06a6fc88f575c6c1941798b3162afcfc9f45e9c345781c46ce17a90ec99f4b0564ff5b5c01c7ac48e6649ea4a0a7c01aed2768a6a4c8fef07f HiFi.conf
|
||||
7e463e14f25097dac94b10b0c2595503414a4cefca31f4795d91a68a435dd080fdbe07d349a51a4874a389247fafd3461ab4ec732794a1705e6eed08ecb72f08 fp4.conf
|
||||
"
|
||||
|
|
|
|||
22
device/community/device-fairphone-fp4/ucm/HiFi.conf
Normal file
22
device/community/device-fairphone-fp4/ucm/HiFi.conf
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
# Use case configuration for Fairphone 4
|
||||
# Author: Luca Weiss <luca.weiss@fairphone.com>
|
||||
|
||||
SectionVerb {
|
||||
EnableSequence [
|
||||
cset "name='QUIN_MI2S_RX Audio Mixer MultiMedia1' 1"
|
||||
]
|
||||
|
||||
DisableSequence [
|
||||
cset "name='QUIN_MI2S_RX Audio Mixer MultiMedia1' 0"
|
||||
]
|
||||
|
||||
Value.TQ "HiFi"
|
||||
}
|
||||
|
||||
SectionDevice."Speaker" {
|
||||
Comment "Speaker playback"
|
||||
|
||||
Value {
|
||||
PlaybackPCM "hw:${CardId},0"
|
||||
}
|
||||
}
|
||||
9
device/community/device-fairphone-fp4/ucm/fp4.conf
Normal file
9
device/community/device-fairphone-fp4/ucm/fp4.conf
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
# Use case configuration for Fairphone 4
|
||||
# Author: Luca Weiss <luca.weiss@fairphone.com>
|
||||
|
||||
Syntax 3
|
||||
|
||||
SectionUseCase."HiFi" {
|
||||
File "/Fairphone/fp4/HiFi.conf"
|
||||
Comment "HiFi quality Music."
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue