Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • alistair23/pmaports
  • exkc/pmaports
  • fossdd/pmaports
  • JustSoup321/pmaports
  • Eisenbahnfan/pmaports
  • raihan2000/pmaports
  • sleirsgoevy/pmaports
  • Adrian/pmaports
  • adamthiede/pmaports
  • jianhua/pmaports
  • knuxify/pmaports
  • Arnavion/pmaports
  • barni2000/pmaports
  • longnoserob/pmaports
  • smankusors/pmaports
  • Aren/pmaports
  • langfingaz/pmaports
  • sicelo/pmaports
  • kouta-kun/pmaports
  • craftyguy/pmaports
  • rdacayan/pmaports
  • rmader/pmaports
  • Haui111/pmaports
  • jakko/pmaports
  • dujem/pmaports
  • methanal/pmaports
  • WeirdTreeThing/pmaports
  • MightyM17/pmaports
  • sertonix/pmaports
  • amessier/pmaports
  • akemnade/pmaports
  • setotau/pmaports
  • kevinwidjaja21/pmaports
  • NekoCWD/pmaports
  • ollieparanoid/pmaports
  • manoedinata/pmaports
  • Drakulix/pmaports
  • grimler/pmaports
  • benpicco/pmaports
  • Frieder.Hannenheim/pmaports
  • andrisas/pmaports
  • EspiDev/pmaports
  • maze42/pmaports
  • anjandev/pmaports
  • danct12/pmaports
  • ijiki16/pmaports
  • jja2000/pmaports
  • fancsali/pmaports
  • bolilingmeng89006/pmaports
  • Minecrell/pmaports
  • chipiguay/pmaports
  • cherrypicker/pmaports
  • fortuna-mainline/pmaports
  • pevik/pmaports
  • Patriot-06/pmaports
  • JoseskVolpe/pmaports
  • verdre/pmaports
  • proycon/pmaports
  • AutumnSpark1226/pmaports
  • PsychoGame/pmaports
  • fraolt/pmaports
  • VaporGame/pmaports
  • pugzarecute/pmaports
  • CalcProgrammer1/pmaports
  • hexaheximal/pmaports
  • dabao1955/pmaports
  • HenriDellal/pmaports
  • semfault/pmaports
  • strobo5/pmaports
  • andrewgigena/pmaports
  • Athozus/pmaports
  • 1peter10/pmaports
  • vixalien/pmaports
  • Tooniis/pmaports
  • adomerle/pmaports
  • bjorn3/pmaports
  • StacyHarper/pmaports
  • Jack_Kekzoz/pmaports
  • Ceddicedced/pmaports
  • Justin_Zobel/pmaports
  • airtower-luna/pmaports
  • f-izzo/pmaports
  • cosmo/pmaports
  • 9lore/pmaports
  • postmarketOS/pmaports
  • Johnnynator/pmaports
  • iAboothahir/pmaports
  • N1kroks/pmaports
  • neuschaefer/pmaports
  • DylanVanAssche/pmaports
  • yehiashamaa987/pmaports
  • Operachi/pmaports
  • faveoled/pmaports
  • ilpianista/pmaports
  • johkra/pmaports
  • HDDTHR/pmaports
  • zsoltiv/pmaports
  • Justin/pmaports
  • Kaloyan501/pmaports_huawei_p8_lite_2015_fix
  • joelselvaraj/pmaports
  • rontti/pmaports
  • dsankouski/pmaports
  • StandaSK/pmaports
  • paricbat/pmaports
  • asdfugil/pmaports
  • komaru-yml/pmaports
  • MasterPlexus/pmaports
  • Felix/pmaports
  • ayakael/pmaports
  • feisuzhu/pmaports
  • AJ-RR/pmaports
  • SzczurekYT/pmaports
  • mediaberry/pmaports
  • justsomeguy/pmaports
  • Augis154/pmaports
  • hrdl/pmaports
  • sib0ndt/pmaports
  • 19atlas/pmaports
  • vipaoL/pmaports
  • wannjanjic/pmaports
  • dh/pmaports
  • LogicalErzor/pmaports
  • halamix2/pmaports
  • Shamilkv34/pmaports
  • Cogitri/pmaports
  • fallenritemonk/pmaports
  • user0-07161/pmaports
  • rock3tsprocket/pmaports
  • ellyq/pmaports
  • rodent/pmaports
  • mkorpershoek/pmaports
  • candrew/pmaports
  • fallaciousreasoning/pmaports
  • chalkin/pmaports
  • ungeskriptet/pmaports
  • r00t/pmaports
  • panpanpanpan/pmaports
  • celiffe/pmaports
  • davidfurey/pmaports
  • kidd/pmaports
  • tpikonen/pmaports
  • camelCaseNick/pmaports
  • ermine/pmaports
  • lgh/pmaports
  • sajattack/pmaports
  • StephanieBread/pmaports
  • M0Rf30/pmaports
  • notfound405/pmaports
  • samueldr/pmaports
  • r10nw7fd3/pmaports
  • treid998/pmaports-merge
  • denysvitali/pmaports
  • rodriguezst/pmaports
  • puppiestdoggo1/pmaports
  • donihalim/pmaports
  • EDKPiepaint/pmaports-apple-tonga-test
156 results
Show changes
Commits on Source (27)
Showing
with 294 additions and 111 deletions
......@@ -8,7 +8,7 @@ fi
pkgname=busybox-static-aarch64
pkgver=1.35.0
pkgrel=17
pkgrel=18
_arch="aarch64"
_mirror="http://dl-4.alpinelinux.org/alpine/"
......@@ -32,5 +32,5 @@ package() {
}
sha512sums="
ed918daaf09553ebe1279e8a28c9e98fe790fd30150cc61d19581ae9e4e09deea437b9388f20d16038ab00295f6d947a68f7a81703a8701e5e8ab36ae4073b63 busybox-static-1.35.0-r17-aarch64-edge.apk
2dd9617a1e0938a692acdb5c0ed943197f100a87274df96bc3ed7f77e0a5713d4e8c9642a666bb0391c5ceebc50960cf4ef9a467c813d6f5a149c6bd89b2dc3a busybox-static-1.35.0-r18-aarch64-edge.apk
"
......@@ -8,7 +8,7 @@ fi
pkgname=busybox-static-armhf
pkgver=1.35.0
pkgrel=17
pkgrel=18
_arch="armhf"
_mirror="http://dl-4.alpinelinux.org/alpine/"
......@@ -32,5 +32,5 @@ package() {
}
sha512sums="
2eddc54559d9971d98c3954fec4db9deb8215147f385d5cdd488ec9c0b82102eee024f7336b84134d16947b279820658a464d01976b36ab41d40db138bf3d5e0 busybox-static-1.35.0-r17-armhf-edge.apk
35461f4429030b5841c6cb071aac692f42f4935c5b94f80b848c8a9ce217b25370f9bb0df167f6d597535708d3c1d25b8e12d6d9b57588c4291facbc7681dd03 busybox-static-1.35.0-r18-armhf-edge.apk
"
......@@ -8,7 +8,7 @@ fi
pkgname=busybox-static-armv7
pkgver=1.35.0
pkgrel=17
pkgrel=18
_arch="armv7"
_mirror="http://dl-4.alpinelinux.org/alpine/"
......@@ -32,5 +32,5 @@ package() {
}
sha512sums="
0366794141a1c8169426107884658469fedb50efbba2d1d178cad90d7de96c63524849ed548d8adfc296f13a3d3e181c47735edafd14841405a0e23c5036f635 busybox-static-1.35.0-r17-armv7-edge.apk
e91b9f5bd8e21525c471aeaf83a4fdc86098e8245b2d4119a3e6717d3402e9e134cf8cae6df8b076f0020eaf8a4eda68cfa417d4319ba5be4b32daf480133dd4 busybox-static-1.35.0-r18-armv7-edge.apk
"
......@@ -8,7 +8,7 @@ fi
pkgname=musl-aarch64
pkgver=1.2.3
pkgrel=0
pkgrel=1
arch="x86_64"
subpackages="musl-dev-aarch64:package_dev"
......@@ -57,6 +57,6 @@ package_dev() {
}
sha512sums="
a21d0c879f36c42da82c384403bb31a9562521a7a68b965d3fab6fcf133734ee93fccc6dc5131b99c54c7eb6fbe4329829b915bb801e6ac602d4091617ac03ed musl-1.2.3-r0-aarch64-edge.apk
a5742520f5a8aaf3fea931697126b777fed7a58d08be64e30e5ea2dfde571d7b317e40f4fea31979325d9c1d407c18a46cb354483aa906dae08301e563db5f4f musl-dev-1.2.3-r0-aarch64-edge.apk
5e64669b00a77b19bb5e2a6a801950fff73a0c394734590ed2c3840905ac45faa9af9a21f186380d848ce713a000e93ef516f47fb5da54704e9313c9b62ed06d musl-1.2.3-r1-aarch64-edge.apk
51a515fab0e244373b62b572c67460f31e20d4b22db125dabc17b24e9bfbd1c87901f8d44a55d36d208a9a8650ebbb59995f8715e2c8ca90b531e0d74852ff8b musl-dev-1.2.3-r1-aarch64-edge.apk
"
......@@ -8,7 +8,7 @@ fi
pkgname=musl-armhf
pkgver=1.2.3
pkgrel=0
pkgrel=1
arch="x86_64"
subpackages="musl-dev-armhf:package_dev"
......@@ -57,6 +57,6 @@ package_dev() {
}
sha512sums="
20724b1bad5b986e5644799b2b9c0ae2699c25506be72fc28a68fbe9215054b752a9972a556a0f93356452ab12cece77e89b4cfa63310d08cb2f749b35e1acfc musl-1.2.3-r0-armhf-edge.apk
fb05d24e7c90b41c04bbdb6499d35e376931b4e13491031631bade0c1b3b596f678c813e872438fda33ff7300c40bc1235f0145bff1b5a32ee2aba0f8c575925 musl-dev-1.2.3-r0-armhf-edge.apk
ca5c7fc6c32375066b2be07474fafc06b6e975e8f9ecef9945ae32e5560a19e10be52643536a769db001c357d890d50888a3ec58336d659f5a328e35ef46e15d musl-1.2.3-r1-armhf-edge.apk
ae04dd543ff95e90915c9bb857b30a4f6ec9472fcbd679b047aeab6f62a10d79b8ae0bf6bd640d1ce5ebfe56dea5256889fcf6ae8727820358490120e1abddb5 musl-dev-1.2.3-r1-armhf-edge.apk
"
......@@ -8,7 +8,7 @@ fi
pkgname=musl-armv7
pkgver=1.2.3
pkgrel=0
pkgrel=1
arch="x86_64"
subpackages="musl-dev-armv7:package_dev"
......@@ -57,6 +57,6 @@ package_dev() {
}
sha512sums="
88b034bc37d800e0f279437a1a1a5973e994873ab0e44d372ac6cd49c999d6c1f834266d646fb17777d9a018a9bfd0cc9346d7525d1726ffe96cc56096d70281 musl-1.2.3-r0-armv7-edge.apk
c865bde907a17accf33a4cd7b8caad496c510b3227d8cf5e12a597613df7a629778eb08a32692e67bfead3422a2add2833e4e49df1e970d2067c2f65a372dc46 musl-dev-1.2.3-r0-armv7-edge.apk
040d2317fbd50d5285d6bcff405f0bc628c4f2420c4d6c593deedc4aea9154bdb031bff50c2cae29af3bb557bff927970ab111efd51b420b599bdde52bb94241 musl-1.2.3-r1-armv7-edge.apk
69dff18d36e35ce245c672bd7212d881eaed457f70a6424f1637315181b7d6b832b140a6f469018c947a9bcee1b2e632305ac8ec0facf595dfdf7009790c6646 musl-dev-1.2.3-r1-armv7-edge.apk
"
# Reference: <https://postmarketos.org/devicepkg>
# Maintainer: Jonathan Albrieux <jonathan.albrieux@gmail.com>
# Co-Maintainer: Minecrell <minecrell@minecrell.net>
# Maintainer: Minecrell <minecrell@minecrell.net>
pkgname=device-bq-paella
pkgdesc="BQ Aquaris X5"
pkgver=6
pkgrel=2
pkgrel=3
url="https://postmarketos.org"
license="MIT"
arch="aarch64"
......
SUBSYSTEMS=="usb", ENV{.LOCAL_ifNum}="$attr{bInterfaceNumber}"
SUBSYSTEMS=="usb", KERNEL=="ttyUSB[0-9]*", ATTRS{idVendor}=="2c7c", ATTRS{idProduct}=="0125", ENV{.LOCAL_ifNum}=="01", SYMLINK+="EG25.NMEA", MODE="0660"
SUBSYSTEMS=="usb", KERNEL=="ttyUSB[0-9]*", ATTRS{idVendor}=="2c7c", ATTRS{idProduct}=="0125", ENV{.LOCAL_ifNum}=="02", SYMLINK+="EG25.AT", MODE="0660"
SUBSYSTEMS=="usb", KERNEL=="ttyUSB[0-9]*", ATTRS{idVendor}=="2c7c", ATTRS{idProduct}=="0125", ENV{.LOCAL_ifNum}=="03", SYMLINK+="EG25.MODEM", MODE="0660"
ACTION=="add", SUBSYSTEM=="tty", ATTRS{idVendor}=="2c7c", ATTRS{idProduct}=="0125", ENV{.LOCAL_ifNum}=="02", RUN+="/usr/bin/pinephone_setup-modem '%E{DEVNAME}'"
ACTION=="add", SUBSYSTEM=="usb", DRIVERS=="usb", ENV{DEVTYPE}=="usb_device", ATTRS{idVendor}=="2c7c", ATTRS{idProduct}=="0125", ATTRS{serial}=="0123456789ABCDEF", ATTR{power/persist}="1", ATTR{power/control}="on"
ACTION=="add", SUBSYSTEM=="usb", DRIVERS=="usb", ENV{DEVTYPE}=="usb_device", ATTRS{idVendor}=="2c7c", ATTRS{idProduct}=="0125", ATTRS{serial}=="community_fw", ATTR{power/persist}="1", ATTR{power/control}="on"
......@@ -2,7 +2,7 @@
# Maintainer: Martijn Braam <martijn@brixit.nl>
pkgname=device-pine64-pinephonepro
pkgdesc="PINE64 PinePhone Pro"
pkgver=2.1
pkgver=3.0
pkgrel=2
url="https://postmarketos.org"
license="MIT"
......@@ -12,7 +12,6 @@ options="!check !archcheck pmb:strict"
depends="
alsa-ucm-conf>=1.2.6.2
eg25-manager>=0.4.2
iw
linux-pine64-pinephonepro
mesa-dri-gallium
postmarketos-base
......@@ -31,13 +30,15 @@ install="
$pkgname.post-upgrade
"
source="
90-modem-eg25.rules
deviceinfo
grub.cfg
grub_early.cfg
ucm/HiFi.conf
ucm/PinePhonePro.conf
ucm/PINE64-PinePhonePro-.conf
ucm/VoiceCall.conf
ppkb.sh
setup-modem.sh
"
build() {
......@@ -74,15 +75,26 @@ build() {
package() {
devicepkg_package $startdir $pkgname
# Grub / bootloader
install -Dm644 -t "$pkgdir"/boot/grub \
"$srcdir"/grub.cfg
install -Dm644 -t "$pkgdir"/boot/EFI/Boot \
"$srcdir"/bootaa64.efi
install -Dm644 -t "$pkgdir"/usr/share/alsa/ucm2/conf.d/simple-card \
"$srcdir"/PinePhonePro.conf \
# Alsa usecase manager config
install -Dm644 -t "$pkgdir"/usr/share/alsa/ucm2/PinePhonePro \
"$srcdir"/HiFi.conf \
"$srcdir"/PINE64-PinePhonePro-.conf \
"$srcdir"/VoiceCall.conf
mkdir -p "$pkgdir"/usr/share/alsa/ucm2/conf.d/simple-card
ln -s /usr/share/alsa/ucm2/PinePhonePro/PINE64-PinePhonePro-.conf \
"$pkgdir"/usr/share/alsa/ucm2/conf.d/simple-card/PINE64-PinePhonePro-.conf
# Modem
install -Dm755 "$srcdir"/setup-modem.sh \
"$pkgdir"/usr/bin/pinephone_setup-modem
install -Dm644 "$srcdir"/90-modem-eg25.rules -t \
"$pkgdir"/usr/lib/udev/rules.d/
# Keyboard config
install -Dm755 "$srcdir"/ppkb.sh "$pkgdir"/etc/profile.d/ppkb.sh
......@@ -92,20 +104,20 @@ nonfree_firmware() {
pkgdesc="Wifi, Bluetooth and video-out firmware"
depends="
firmware-pine64-pinebookpro
linux-firmware-rtlwifi
linux-firmware-rtl_bt
firmware-pine64-rtl8723bt
firmware-pine64-ov5640
linux-firmware-brcm
linux-firmware-rockchip
"
mkdir "$subpkgdir"
}
sha512sums="
fdfa807c0de33aee3deb09ee25c37a58fa970ce71483e52f21793717cb89adeb74f251ff1a2c2086361e3e58877f8b2e5643f24186b1a537acf9c16e3419313c 90-modem-eg25.rules
195ea87f346e09b781d7925bcb7752a25d27f4396e1512ae15582526c062261516f918703c633730f56becb9f5c94020cc46ef6dc9d960b4a29208f03e3b70b8 deviceinfo
e69752fc7f2b8552ba2e1e6da5b6bec0e284c7f14bc09576c862faeb5154a44522535a919ae5aca33a22fd14557e802595a7c96c59b9362c5ac5b991a8eac5fc grub.cfg
0f9357d4eea089628fbceb1e3e96d21a3f4329aeb6743158a6f877f967ef274506404eba949d5f01b7e1adea149f9a3aef992a5e8cd4181f93ab00909b1c5ecd grub_early.cfg
ac22c856af81d00aa6a349b68cf9e8645bf38277d9aafd07f1f46f5f932f48d37b9dfdcc8772fff4027f914c9b4c3b4a11c51bd9f2aa1abbc53abd3f54adb818 HiFi.conf
c57dae885c9a5f366f18b38a3ce3e21627baaf014724537eced9e8d6ac3ca61ade42b9fcf84db350b1e64742760e8cf4fe10639d41052387927238e85c3c4769 PinePhonePro.conf
e978876bda8874e30df75c80554ccbbc0dd202c852ecae0b5c1a0d845402a630962afc2691c6f7d5f478fb0e4be045af4ef62ad0b1ce77f62fe2f155dc0a9cff VoiceCall.conf
1684514a6b814a83473e9da8855fd776cf3f31a2be1f8834c370f710428b4ee305559e275be52894d167ccd1e32f8f1c8586f8a072f19e44b46caec9f504d453 HiFi.conf
9c6edbe7ea387baf9bfa6c4a46b28c4fe274ab0994e0a1640012048407e6679c437de43cc50e6778c9a852132eaa680de3fd4e0256d36455d1dd57aa729ac8be PINE64-PinePhonePro-.conf
deb360baf914e1c917403d5e26291b9e9d27426876232ab753e4ebfe367423206f1fc01b85d195aa69fb4b51bcaed023423d0fcc0d73fa1bedd5fbe7b17f0fb5 VoiceCall.conf
43f67e94491791685cdbb4874bb3034b1d297bdf3d23e7405c45ba8c58de72b4fb6a9943b79f46ef7b8f4dbc4d9db254ebec8eb3453d720a5a8fad277c6a9d88 ppkb.sh
420ee1d7522d4d56c2909580fd6ba7580483ca5455b13eb6d22e700063ce0c1a5c6d2f5b161dfce0d777636fe9a712aa82f38a0585f2feabea3785b02bae7515 setup-modem.sh
"
#!/bin/sh
log() {
echo "$@" | logger -t "postmarketOS:modem-setup"
}
QMBNCFG_CONFIG="1"
if [ -z "$1" ]
then
DEV="/dev/EG25.AT"
else
DEV="$1"
fi
# Read current config
QMBNCFG_ACTUAL_CONFIG=$(echo 'AT+QMBNCFG="AutoSel"' | atinout - $DEV -)
if echo $QMBNCFG_ACTUAL_CONFIG | grep -q $QMBNCFG_CONFIG
then
log "Modem already configured"
exit 0
fi
# Configure VoLTE auto selecting profile
RET=$(echo "AT+QMBNCFG=\"AutoSel\",$QMBNCFG_CONFIG" | atinout - $DEV -)
if ! echo $RET | grep -q OK
then
log "Failed to enable VoLTE profile auto selecting: $RET"
exit 1
fi
SectionVerb {
EnableSequence [
### Default rt5640 configuration, copied from /codecs/rt5640/EnableSeq.conf ###
# First of all, disable the internal speaker amplifier
cset "name='Internal Speaker Switch' off"
### Based on /codecs/rt5640/EnableSeq.conf ###
# RT5640 default output routing
cset "name='DAC MIXL INF1 Switch' on"
cset "name='DAC MIXR INF1 Switch' on"
cset "name='DAC MIXL Stereo ADC Switch' off"
cset "name='DAC MIXR Stereo ADC Switch' off"
cset "name='Stereo DAC MIXL DAC L1 Switch' on"
cset "name='Stereo DAC MIXR DAC R1 Switch' on"
cset "name='Stereo DAC MIXL DAC L2 Switch' on"
......@@ -34,23 +39,29 @@ SectionVerb {
cset "name='Mono ADC R2 Mux' DMIC R1"
cset "name='Mono ADC Capture Switch' on"
# Set capture volume to 0dB so modem audio doesn't overdrive the ADC
cset "name='ADC Capture Volume' 47"
cset "name='Mono ADC Capture Volume' 47"
# The second 'Mono ADC' path does not have a 'Boost Gain',
# set this to 0dB so that the volume of the AIF1 and AIF2 paths is equal.
cset "name='ADC Boost Gain' 0"
# Set IN1/IN3 internal mic boost to 8 (max)
# Set IN1 internal mic boost to 8 (max)
# Set IN2 headset-mic boost to 1, headset mics are quite loud
# Set IN3 (modem audio) boost to 0 as it's already loud enough
cset "name='IN1 Boost' 8"
cset "name='IN2 Boost' 1"
# cset "name='IN3 Boost' 8"
cset "name='IN3 Boost' 0"
# Start with all controls which are used by the individual
# input/output Enable/DisableSequences off
cset "name='RECMIXL BST1 Switch' off"
cset "name='RECMIXR BST1 Switch' off"
cset "name='RECMIXL BST2 Switch' off"
cset "name='RECMIXR BST2 Switch' off"
# IN2 is headset mic, make sure its route is enabled
cset "name='RECMIXL BST2 Switch' on"
cset "name='RECMIXR BST2 Switch' on"
cset "name='RECMIXL BST3 Switch' off"
cset "name='RECMIXR BST3 Switch' off"
......@@ -63,6 +74,9 @@ SectionVerb {
cset "name='Mono ADC MIXL ADC2 Switch' off"
cset "name='Mono ADC MIXR ADC2 Switch' off"
# Limit amplification factor of earpiece amplifier so sound stays clear
cset "name='Class D SPK Ratio Control' 1.66x"
# Turn off playback switches by default, otherwise both Speaker
# and headphones are playing audio initially until headphones are
# re-inserted.
......@@ -71,26 +85,27 @@ SectionVerb {
cset "name='Speaker L Playback Switch' off"
cset "name='Speaker R Playback Switch' off"
### PinePhonePro specific configuration ###
# Set capture volume to 0dB so modem audio doesn't overdrive the ADC
cset "name='ADC Capture Volume' 47"
cset "name='Mono ADC Capture Volume' 47"
# Modem audio is line level, no need to boost this signal
cset "name='IN3 Boost' 0"
# MONO output is used as IN3 here, so make sure it's disabled
cset "name='Mono Playback Switch' off"
# Set playback volumes to 0dB
cset "name='HP Playback Volume' 31"
cset "name='Speaker Playback Volume' 31"
# Limit amplification factor of earpiece amplifier so sound stays clear
cset "name='Class D SPK Ratio Control' 1.66x"
]
DisableSequence [
# Turn off all output channels
cset "name='HP L Playback Switch' off"
cset "name='HP R Playback Switch' off"
cset "name='HP Channel Switch' off"
cset "name='HPO MIX HPVOL Switch' off"
cset "name='Speaker L Playback Switch' off"
cset "name='Speaker R Playback Switch' off"
cset "name='Speaker Channel Switch' off"
cset "name='SPOL MIX SPKVOL L Switch' off"
cset "name='SPOL MIX SPKVOL R Switch' off"
# Reset output routing
cset "name='DAC MIXL INF1 Switch' off"
cset "name='DAC MIXR INF1 Switch' off"
......@@ -109,6 +124,7 @@ SectionDevice."Earpiece" {
Comment "Internal Earpiece"
ConflictingDevice [
"Headphones"
"Speaker"
]
......@@ -142,6 +158,39 @@ SectionDevice."Speaker" {
ConflictingDevice [
"Earpiece"
"Headphones"
]
EnableSequence [
cset "name='HPO MIX HPVOL Switch' on"
cset "name='HP Channel Switch' on"
cset "name='HP L Playback Switch' on"
cset "name='HP R Playback Switch' on"
cset "name='Internal Speaker Switch' on"
]
DisableSequence [
cset "name='Internal Speaker Switch' off"
cset "name='HP Channel Switch' off"
cset "name='HP L Playback Switch' off"
cset "name='HP R Playback Switch' off"
]
Value {
PlaybackPriority 200
PlaybackPCM "hw:${CardId}"
PlaybackMixerElem "HP"
PlaybackVolume "HP Playback Volume"
PlaybackMasterElem "DAC1"
}
}
SectionDevice."Headphones" {
Comment "Headphones"
ConflictingDevice [
"Earpiece"
"Speaker"
]
EnableSequence [
......@@ -160,16 +209,20 @@ SectionDevice."Speaker" {
Value {
PlaybackPriority 300
PlaybackPCM "hw:${CardId}"
JackControl "Headphone Jack"
JackControl "Headphones Jack"
PlaybackMixerElem "HP"
PlaybackVolume "HP Playback Volume"
PlaybackMasterElem "DAC1"
}
}
SectionDevice."DigitalMic" {
SectionDevice."Mic" {
Comment "Internal Microphone"
ConflictingDevice [
"Headset"
]
EnableSequence [
cset "name='Mono ADC MIXL ADC2 Switch' on"
cset "name='Mono ADC MIXR ADC2 Switch' on"
......@@ -184,9 +237,40 @@ SectionDevice."DigitalMic" {
cset "name='Stereo ADC MIXR ADC2 Switch' off"
]
Value {
CapturePriority 100
CapturePCM "hw:${CardId}"
CaptureMixerElem "ADC"
CaptureVolume "ADC Capture Volume"
CaptureSwitch "ADC Capture Switch"
}
}
SectionDevice."Headset" {
Comment "Headset Microphone"
ConflictingDevice [
"Mic"
]
EnableSequence [
cset "name='Mono ADC MIXL ADC1 Switch' on"
cset "name='Mono ADC MIXR ADC1 Switch' on"
cset "name='Stereo ADC MIXL ADC1 Switch' on"
cset "name='Stereo ADC MIXR ADC1 Switch' on"
]
DisableSequence [
cset "name='Mono ADC MIXL ADC1 Switch' off"
cset "name='Mono ADC MIXR ADC1 Switch' off"
cset "name='Stereo ADC MIXL ADC1 Switch' off"
cset "name='Stereo ADC MIXR ADC1 Switch' off"
]
Value {
CapturePriority 200
CapturePCM "hw:${CardId}"
JackControl "Headphones Jack"
CaptureMixerElem "ADC"
CaptureVolume "ADC Capture Volume"
CaptureSwitch "ADC Capture Switch"
......
......@@ -2,12 +2,12 @@ Syntax 4
Comment "PinePhone Pro"
SectionUseCase."HiFi" {
File "HiFi.conf"
File "/PinePhonePro/HiFi.conf"
Comment "Default"
}
SectionUseCase."VoiceCall" {
File "VoiceCall.conf"
SectionUseCase."Voice Call" {
File "/PinePhonePro/VoiceCall.conf"
Comment "Phone call"
}
......
SectionVerb {
EnableSequence [
### Default rt5640 configuration, copied from /codecs/rt5640/EnableSeq.conf ###
# First of all, disable the internal speaker amplifier
cset "name='Internal Speaker Switch' off"
# RT5640 default output routing
# cset "name='DAC MIXL INF1 Switch' on"
# cset "name='DAC MIXR INF1 Switch' on"
### Based on /codecs/rt5640/EnableSeq.conf ###
# Get audio only from the microphones, not the system
cset "name='DAC MIXL INF1 Switch' off"
cset "name='DAC MIXR INF1 Switch' off"
cset "name='DAC MIXL Stereo ADC Switch' on"
cset "name='DAC MIXR Stereo ADC Switch' on"
cset "name='Stereo DAC MIXL DAC L1 Switch' on"
cset "name='Stereo DAC MIXR DAC R1 Switch' on"
cset "name='Stereo DAC MIXL DAC L2 Switch' on"
cset "name='Stereo DAC MIXR DAC R2 Switch' on"
# cset "name='OUT MIXL DAC L1 Switch' on"
# cset "name='OUT MIXR DAC R1 Switch' on"
# cset "name='SPK MIXL DAC L1 Switch' on"
# cset "name='SPK MIXR DAC R1 Switch' on"
cset "name='OUT MIXL DAC L1 Switch' off"
cset "name='OUT MIXR DAC R1 Switch' off"
cset "name='SPK MIXL DAC L1 Switch' off"
cset "name='SPK MIXR DAC R1 Switch' off"
# uncomment to enable swap between AIF1 and AIF2
# warning: can only work with SSP0 firmware enabled
......@@ -34,25 +39,32 @@ SectionVerb {
cset "name='Mono ADC R2 Mux' DMIC R1"
cset "name='Mono ADC Capture Switch' on"
# Set capture volume to 0dB so modem audio doesn't overdrive the ADC
cset "name='ADC Capture Volume' 47"
cset "name='Mono ADC Capture Volume' 47"
# The second 'Mono ADC' path does not have a 'Boost Gain',
# set this to 0dB so that the volume of the AIF1 and AIF2 paths is equal.
cset "name='ADC Boost Gain' 0"
# Set IN1/IN3 internal mic boost to 8 (max)
# Set IN1 internal mic boost to 8 (max)
# Set IN2 headset-mic boost to 1, headset mics are quite loud
# Set IN3 (modem audio) boost to 0 as it's already loud enough
cset "name='IN1 Boost' 8"
cset "name='IN2 Boost' 1"
# cset "name='IN3 Boost' 8"
cset "name='IN3 Boost' 0"
# Start with all controls which are used by the individual
# input/output Enable/DisableSequences off
cset "name='RECMIXL BST1 Switch' off"
cset "name='RECMIXR BST1 Switch' off"
# cset "name='RECMIXL BST2 Switch' off"
# IN2 is headset mic, make sure its routed to the left channel
cset "name='RECMIXL BST2 Switch' on"
cset "name='RECMIXR BST2 Switch' off"
# IN3 is modem audio, route it to the right channel
cset "name='RECMIXL BST3 Switch' off"
# cset "name='RECMIXR BST3 Switch' off"
cset "name='RECMIXR BST3 Switch' on"
cset "name='Stereo ADC MIXL ADC1 Switch' off"
cset "name='Stereo ADC MIXR ADC1 Switch' off"
......@@ -63,40 +75,6 @@ SectionVerb {
cset "name='Mono ADC MIXL ADC2 Switch' off"
cset "name='Mono ADC MIXR ADC2 Switch' off"
# Turn off playback switches by default, otherwise both Speaker
# and headphones are playing audio initially until headphones are
# re-inserted.
cset "name='HP L Playback Switch' off"
cset "name='HP R Playback Switch' off"
cset "name='Speaker L Playback Switch' off"
cset "name='Speaker R Playback Switch' off"
### PinePhonePro specific configuration ###
# Get audio only from the microphones, not the system
cset "name='DAC MIXL INF1 Switch' off"
cset "name='DAC MIXR INF1 Switch' off"
cset "name='DAC MIXL Stereo ADC Switch' on"
cset "name='DAC MIXR Stereo ADC Switch' on"
# Route headset mic to the left channel and modem audio
# to the right channel
cset "name='RECMIXL BST2 Switch' on"
cset "name='RECMIXR BST3 Switch' on"
# Set capture volume to 0dB so modem audio doesn't overdrive the ADC
cset "name='ADC Capture Volume' 47"
cset "name='Mono ADC Capture Volume' 47"
# Modem audio is line level, no need to boost this signal
cset "name='IN3 Boost' 0"
# MONO output is used as IN3 here, so make sure it's disabled
cset "name='Mono Playback Switch' off"
# Set playback volumes to 0dB
cset "name='HP Playback Volume' 31"
cset "name='Speaker Playback Volume' 31"
# Limit amplification factor of earpiece amplifier so sound stays clear
cset "name='Class D SPK Ratio Control' 1.66x"
......@@ -112,13 +90,35 @@ SectionVerb {
cset "name='LOUT MIX OUTVOL L Switch' off"
cset "name='LOUT MIX OUTVOL R Switch' off"
# Disable left channel for SPK (earpiece) and HP (speaker/headphones)
# outputs as we're only routing modem audio to the right channel
cset "name='SPOL MIX SPKVOL L Switch' off"
# Disable left channel for HP (speaker/headphones) output
# as we're only routing modem audio to the right channel
cset "name='HP L Playback Switch' off"
# Turn off playback switches by default, otherwise both Speaker
# and headphones are playing audio initially until headphones are
# re-inserted.
cset "name='HP L Playback Switch' off"
cset "name='HP R Playback Switch' off"
cset "name='Speaker L Playback Switch' off"
cset "name='Speaker R Playback Switch' off"
# MONO output is used as IN3 here, so make sure it's disabled
cset "name='Mono Playback Switch' off"
# Set playback volumes to 0dB
cset "name='HP Playback Volume' 31"
cset "name='Speaker Playback Volume' 31"
]
DisableSequence [
# Turn off all output channels
cset "name='HP L Playback Switch' off"
cset "name='HP R Playback Switch' off"
cset "name='HP Channel Switch' off"
cset "name='Speaker L Playback Switch' off"
cset "name='Speaker R Playback Switch' off"
cset "name='Speaker Channel Switch' off"
# Reset output routing
cset "name='DAC MIXL Stereo ADC Switch' off"
cset "name='DAC MIXR Stereo ADC Switch' off"
......@@ -140,10 +140,12 @@ SectionDevice."Earpiece" {
Comment "Internal Earpiece"
ConflictingDevice [
"Headphones"
"Speaker"
]
EnableSequence [
cset "name='SPOL MIX SPKVOL L Switch' on"
# Send right channel to left as it's mono only
cset "name='SPOL MIX SPKVOL R Switch' on"
cset "name='Speaker Channel Switch' on"
......@@ -156,7 +158,7 @@ SectionDevice."Earpiece" {
]
Value {
PlaybackPriority 300
PlaybackPriority 200
PlaybackPCM "hw:${CardId}"
PlaybackMixerElem "Speaker"
PlaybackVolume "Speaker Playback Volume"
......@@ -169,15 +171,18 @@ SectionDevice."Speaker" {
ConflictingDevice [
"Earpiece"
"Headphones"
]
EnableSequence [
cset "name='HPO MIX HPVOL Switch' on"
cset "name='HPO MIX HPVOL Switch' on"
cset "name='HP Channel Switch' on"
cset "name='HP R Playback Switch' on"
cset "name='Internal Speaker Switch' on"
]
DisableSequence [
cset "name='Internal Speaker Switch' off"
cset "name='HP Channel Switch' off"
cset "name='HP R Playback Switch' off"
]
......@@ -185,16 +190,48 @@ SectionDevice."Speaker" {
Value {
PlaybackPriority 100
PlaybackPCM "hw:${CardId}"
JackControl "Headphone Jack"
PlaybackMixerElem "HP"
PlaybackVolume "HP Playback Volume"
PlaybackMasterElem "DAC1"
}
}
SectionDevice."DigitalMic" {
SectionDevice."Headphones" {
Comment "Headphones"
ConflictingDevice [
"Earpiece"
"Speaker"
]
EnableSequence [
cset "name='HPO MIX HPVOL Switch' on"
cset "name='HP Channel Switch' on"
cset "name='HP R Playback Switch' on"
]
DisableSequence [
cset "name='HP Channel Switch' off"
cset "name='HP R Playback Switch' off"
]
Value {
PlaybackPriority 300
PlaybackPCM "hw:${CardId}"
JackControl "Headphones Jack"
PlaybackMixerElem "HP"
PlaybackVolume "HP Playback Volume"
PlaybackMasterElem "DAC1"
}
}
SectionDevice."Mic" {
Comment "Internal Microphone"
ConflictingDevice [
"Headset"
]
EnableSequence [
cset "name='Stereo ADC MIXL ADC2 Switch' on"
]
......@@ -204,7 +241,7 @@ SectionDevice."DigitalMic" {
]
Value {
CapturePriority 200
CapturePriority 100
CapturePCM "hw:${CardId}"
CaptureMixerElem "ADC"
CaptureVolume "ADC Capture Volume"
......@@ -212,9 +249,13 @@ SectionDevice."DigitalMic" {
}
}
SectionDevice."HeadsetMic" {
SectionDevice."Headset" {
Comment "Headset Microphone"
ConflictingDevice [
"Mic"
]
EnableSequence [
cset "name='Stereo ADC MIXL ADC1 Switch' on"
]
......@@ -224,8 +265,9 @@ SectionDevice."HeadsetMic" {
]
Value {
CapturePriority 100
CapturePriority 200
CapturePCM "hw:${CardId}"
JackControl "Headphones Jack"
CaptureMixerElem "ADC"
CaptureVolume "ADC Capture Volume"
CaptureSwitch "ADC Capture Switch"
......
......@@ -4,7 +4,7 @@
pkgname=device-pine64-pinetab
pkgdesc="PINE64 PineTab"
pkgver=0.13
pkgrel=1
pkgrel=2
url="https://postmarketos.org"
license="MIT"
arch="aarch64"
......@@ -120,10 +120,12 @@ package() {
devicepkg_package $startdir $pkgname
# Alsa usecase manager config
install -Dm644 -t "$pkgdir"/usr/share/alsa/ucm2/conf.d/simple-card \
"$srcdir"/PineTab.conf
install -Dm644 -t "$pkgdir"/usr/share/alsa/ucm2/PineTab \
"$srcdir"/HiFi.conf
"$srcdir"/HiFi.conf \
"$srcdir"/PineTab.conf
mkdir -p "$pkgdir"/usr/share/alsa/ucm2/conf.d/simple-card
ln -s /usr/share/alsa/ucm2/PineTab/PineTab.conf \
"$pkgdir"/usr/share/alsa/ucm2/conf.d/simple-card/PineTab.conf
# Pulseaudio config
install -Dm644 "$srcdir"/pulse-pinetab.conf \
......