pmaports/device/community/soc-qcom-msm8916/APKBUILD

92 lines
3.3 KiB
Text
Raw Normal View History

# Maintainer: Minecrell <minecrell@minecrell.net>
# Co-Maintainer: Nikita Travkin <nikita@trvn.ru>
pkgname=soc-qcom-msm8916
pkgdesc="Common package for Qualcomm MSM8916 devices"
pkgver=16
pkgrel=0
url="https://postmarketos.org"
license="BSD-3-Clause"
arch="aarch64 armv7"
options="!check !archcheck !tracedeps pmb:cross-native"
depends="mesa-dri-gallium $pkgname-ucm swclock-offset"
community/soc-qcom-msm8916: introduce more flexible rproc selection (MR 2632) Add a replacement for the current "mainline" and "mainline-modem" kernel variants used for the MSM8916 devices. At the moment this is implemented using separate DTBs that are all maintained in the kernel. Unfortunately, this does not seem likely to be accepted upstream in the mainline kernel. They will expect to have only a single DTB that enables all available functionality. The "no-modem" variant is a minor but still very useful use case because it changes the audio routing: It allows audio to work without any firmware, with more control on sample rates, latency etc for advanced audio use cases. However, having a potentially enabled modem requires routing all audio through the modem. There are two separate DTBs needed for these two setups. To avoid burdening mainline with this use case, the idea is to apply the necessary DTB transformations as part of the lk2nd boot process. Mainline only contains the DTB with the full functionality (audio routed through modem). The soc-qcom-msm8916-rproc packages place a magic file at /boot/lk2nd_rproc_mode that is read by lk2nd. When the file contains "no-modem" lk2nd will transform the DTB to disable the modem and change the audio routing to bypass the modem. That way, this feature does not need to be considered in mainline at all but can still be offered as "nice to have" by lk2nd. It also simplifies the device packages because the selection is now common as part of the soc-qcom-msm8916 package. Together with a related pmbootstrap change there is a nice prompt for selecting one of these "rproc" providers: $ pmbootstrap init [...] Available providers for soc-qcom-msm8916-rproc (3): * all: Enable all remote processors (audio goes through modem) (**default**) * no-modem: Disable only modem (audio bypasses modem, ~80 MiB more RAM) * none: Disable all remote processors (no WiFi/BT/modem, ~90 MiB more RAM) Provider [default]: ...
2021-10-24 10:15:55 +00:00
subpackages="
$pkgname-ucm
$pkgname-rproc-none:rproc_none
$pkgname-rproc-no-modem:rproc_no_modem
$pkgname-rproc-all:rproc_all
soc-samsung-msm8916-modem-workaround:samsung_modem_workaround
community/soc-qcom-msm8916: introduce more flexible rproc selection (MR 2632) Add a replacement for the current "mainline" and "mainline-modem" kernel variants used for the MSM8916 devices. At the moment this is implemented using separate DTBs that are all maintained in the kernel. Unfortunately, this does not seem likely to be accepted upstream in the mainline kernel. They will expect to have only a single DTB that enables all available functionality. The "no-modem" variant is a minor but still very useful use case because it changes the audio routing: It allows audio to work without any firmware, with more control on sample rates, latency etc for advanced audio use cases. However, having a potentially enabled modem requires routing all audio through the modem. There are two separate DTBs needed for these two setups. To avoid burdening mainline with this use case, the idea is to apply the necessary DTB transformations as part of the lk2nd boot process. Mainline only contains the DTB with the full functionality (audio routed through modem). The soc-qcom-msm8916-rproc packages place a magic file at /boot/lk2nd_rproc_mode that is read by lk2nd. When the file contains "no-modem" lk2nd will transform the DTB to disable the modem and change the audio routing to bypass the modem. That way, this feature does not need to be considered in mainline at all but can still be offered as "nice to have" by lk2nd. It also simplifies the device packages because the selection is now common as part of the soc-qcom-msm8916 package. Together with a related pmbootstrap change there is a nice prompt for selecting one of these "rproc" providers: $ pmbootstrap init [...] Available providers for soc-qcom-msm8916-rproc (3): * all: Enable all remote processors (audio goes through modem) (**default**) * no-modem: Disable only modem (audio bypasses modem, ~80 MiB more RAM) * none: Disable all remote processors (no WiFi/BT/modem, ~90 MiB more RAM) Provider [default]: ...
2021-10-24 10:15:55 +00:00
"
_ucm_commit="23f9d6d4d12c13821d473d6f86908335d3a72026"
source="$pkgname-$_ucm_commit.tar.gz::https://github.com/msm8916-mainline/alsa-ucm-conf/archive/$_ucm_commit.tar.gz
q6voiced.conf
77-modem-samsung-msm8916.rules
90-feedbackd-pm8916.rules
"
package() {
mkdir -p "$pkgdir"
install -Dm644 "$srcdir"/90-feedbackd-pm8916.rules \
"$pkgdir"/usr/lib/udev/rules.d/90-feedbackd-pm8916.rules
}
# Upstream keeps making breaking changes to UCM in patch releases.
# My last upstreaming efforts failed without ever getting a reply,
# since then UCM was entirely reworked like 3 times already...
# I don't want to fix this up every few months, so let's package a stable
# version for now. Once all the UCM refactoring upstream has settled down a bit
# we can investigate how to integrate it properly for upstreaming.
ucm() {
provides="alsa-ucm-conf"
cd "$srcdir/alsa-ucm-conf-$_ucm_commit"
mkdir -p "$subpkgdir"/usr/share/alsa
cp -r ucm2 "$subpkgdir"/usr/share/alsa
}
community/soc-qcom-msm8916: introduce more flexible rproc selection (MR 2632) Add a replacement for the current "mainline" and "mainline-modem" kernel variants used for the MSM8916 devices. At the moment this is implemented using separate DTBs that are all maintained in the kernel. Unfortunately, this does not seem likely to be accepted upstream in the mainline kernel. They will expect to have only a single DTB that enables all available functionality. The "no-modem" variant is a minor but still very useful use case because it changes the audio routing: It allows audio to work without any firmware, with more control on sample rates, latency etc for advanced audio use cases. However, having a potentially enabled modem requires routing all audio through the modem. There are two separate DTBs needed for these two setups. To avoid burdening mainline with this use case, the idea is to apply the necessary DTB transformations as part of the lk2nd boot process. Mainline only contains the DTB with the full functionality (audio routed through modem). The soc-qcom-msm8916-rproc packages place a magic file at /boot/lk2nd_rproc_mode that is read by lk2nd. When the file contains "no-modem" lk2nd will transform the DTB to disable the modem and change the audio routing to bypass the modem. That way, this feature does not need to be considered in mainline at all but can still be offered as "nice to have" by lk2nd. It also simplifies the device packages because the selection is now common as part of the soc-qcom-msm8916 package. Together with a related pmbootstrap change there is a nice prompt for selecting one of these "rproc" providers: $ pmbootstrap init [...] Available providers for soc-qcom-msm8916-rproc (3): * all: Enable all remote processors (audio goes through modem) (**default**) * no-modem: Disable only modem (audio bypasses modem, ~80 MiB more RAM) * none: Disable all remote processors (no WiFi/BT/modem, ~90 MiB more RAM) Provider [default]: ...
2021-10-24 10:15:55 +00:00
rproc_none() {
pkgdesc="Disable all remote processors (no WiFi/BT/modem, ~90 MiB more RAM)"
provides="soc-qcom-msm8916-rproc=$pkgver-r$pkgrel"
mkdir -p "$subpkgdir"/boot
echo none > "$subpkgdir"/boot/lk2nd_rproc_mode
}
rproc_no_modem() {
pkgdesc="Disable only modem (audio bypasses modem, ~80 MiB more RAM)"
provides="soc-qcom-msm8916-rproc=$pkgver-r$pkgrel"
provider_priority=50
mkdir -p "$subpkgdir"/boot
echo no-modem > "$subpkgdir"/boot/lk2nd_rproc_mode
}
rproc_all() {
pkgdesc="Enable all remote processors (audio goes through modem)"
provides="soc-qcom-msm8916-rproc=$pkgver-r$pkgrel"
provider_priority=100
depends="msm-modem msm-modem-uim-selection q6voiced"
install="$subpkgname.post-install"
community/soc-qcom-msm8916: introduce more flexible rproc selection (MR 2632) Add a replacement for the current "mainline" and "mainline-modem" kernel variants used for the MSM8916 devices. At the moment this is implemented using separate DTBs that are all maintained in the kernel. Unfortunately, this does not seem likely to be accepted upstream in the mainline kernel. They will expect to have only a single DTB that enables all available functionality. The "no-modem" variant is a minor but still very useful use case because it changes the audio routing: It allows audio to work without any firmware, with more control on sample rates, latency etc for advanced audio use cases. However, having a potentially enabled modem requires routing all audio through the modem. There are two separate DTBs needed for these two setups. To avoid burdening mainline with this use case, the idea is to apply the necessary DTB transformations as part of the lk2nd boot process. Mainline only contains the DTB with the full functionality (audio routed through modem). The soc-qcom-msm8916-rproc packages place a magic file at /boot/lk2nd_rproc_mode that is read by lk2nd. When the file contains "no-modem" lk2nd will transform the DTB to disable the modem and change the audio routing to bypass the modem. That way, this feature does not need to be considered in mainline at all but can still be offered as "nice to have" by lk2nd. It also simplifies the device packages because the selection is now common as part of the soc-qcom-msm8916 package. Together with a related pmbootstrap change there is a nice prompt for selecting one of these "rproc" providers: $ pmbootstrap init [...] Available providers for soc-qcom-msm8916-rproc (3): * all: Enable all remote processors (audio goes through modem) (**default**) * no-modem: Disable only modem (audio bypasses modem, ~80 MiB more RAM) * none: Disable all remote processors (no WiFi/BT/modem, ~90 MiB more RAM) Provider [default]: ...
2021-10-24 10:15:55 +00:00
replaces="soc-qcom-msm8916-modem"
community/soc-qcom-msm8916: introduce more flexible rproc selection (MR 2632) Add a replacement for the current "mainline" and "mainline-modem" kernel variants used for the MSM8916 devices. At the moment this is implemented using separate DTBs that are all maintained in the kernel. Unfortunately, this does not seem likely to be accepted upstream in the mainline kernel. They will expect to have only a single DTB that enables all available functionality. The "no-modem" variant is a minor but still very useful use case because it changes the audio routing: It allows audio to work without any firmware, with more control on sample rates, latency etc for advanced audio use cases. However, having a potentially enabled modem requires routing all audio through the modem. There are two separate DTBs needed for these two setups. To avoid burdening mainline with this use case, the idea is to apply the necessary DTB transformations as part of the lk2nd boot process. Mainline only contains the DTB with the full functionality (audio routed through modem). The soc-qcom-msm8916-rproc packages place a magic file at /boot/lk2nd_rproc_mode that is read by lk2nd. When the file contains "no-modem" lk2nd will transform the DTB to disable the modem and change the audio routing to bypass the modem. That way, this feature does not need to be considered in mainline at all but can still be offered as "nice to have" by lk2nd. It also simplifies the device packages because the selection is now common as part of the soc-qcom-msm8916 package. Together with a related pmbootstrap change there is a nice prompt for selecting one of these "rproc" providers: $ pmbootstrap init [...] Available providers for soc-qcom-msm8916-rproc (3): * all: Enable all remote processors (audio goes through modem) (**default**) * no-modem: Disable only modem (audio bypasses modem, ~80 MiB more RAM) * none: Disable all remote processors (no WiFi/BT/modem, ~90 MiB more RAM) Provider [default]: ...
2021-10-24 10:15:55 +00:00
mkdir -p "$subpkgdir"/boot
echo all > "$subpkgdir"/boot/lk2nd_rproc_mode
install -Dm644 q6voiced.conf "$subpkgdir"/etc/conf.d/q6voiced
}
samsung_modem_workaround() {
pkgdesc="Workaround for modem facility lock issue on some Samsung devices"
depends=""
install -Dm644 "$srcdir"/77-modem-samsung-msm8916.rules \
"$subpkgdir"/lib/udev/rules.d/77-modem-samsung-msm8916.rules
}
sha512sums="
807499a7620a0a7d51aa29fea157cf12f46bf4dcb05e5150f6c2355bf18d1805610988ad98d181e8ba69c8c9844e4d9a51f1553438d167ade89a387eabafd8f9 soc-qcom-msm8916-23f9d6d4d12c13821d473d6f86908335d3a72026.tar.gz
3a4a9322839d4b3ef9d79668a37840a9f444954759ae3c512e694051d2f9a2573db42ad6c4c1a5c75eeb861232a27ba1a8cef9b503decd54ead25a96e3dd6f98 q6voiced.conf
bcebc36ec62140f4620d462be2b95858adae380e5d74f6b9c9b956fb76a6541f39749f4dcec6ac3c39b868dbfed6fac7a34ba357510532a3df2d39f7ea818d55 77-modem-samsung-msm8916.rules
90fca4a3291a2c84c0b20e41308c4698374ba896e9365ca80dbfd0c0c4f7dc08317f3dd865a3c7f6707c81b02f5bb24136d1172253d2e4fdd50039bbbf02a178 90-feedbackd-pm8916.rules
"