xiaomi-vince: New Device (Xiaomi Redmi Note 5 Plus) (MR 1249)
This commit is contained in:
parent
7433ea0fc7
commit
ce9623de68
15 changed files with 5644 additions and 0 deletions
72
device/testing/device-xiaomi-vince/APKBUILD
Normal file
72
device/testing/device-xiaomi-vince/APKBUILD
Normal file
|
@ -0,0 +1,72 @@
|
||||||
|
# Maintainer: m0rf30 <morf3089@gmail.com>
|
||||||
|
# Reference: <https://postmarketos.org/devicepkg>
|
||||||
|
pkgname=device-xiaomi-vince
|
||||||
|
pkgdesc="Xiaomi Redmi Note 5 Plus"
|
||||||
|
pkgver=1
|
||||||
|
pkgrel=0
|
||||||
|
url="https://postmarketos.org"
|
||||||
|
license="MIT"
|
||||||
|
arch="aarch64"
|
||||||
|
options="!check !archcheck"
|
||||||
|
depends="postmarketos-base linux-xiaomi-vince mkbootimg mesa-dri-swrast msm-fb-refresher"
|
||||||
|
makedepends="devicepkg-dev"
|
||||||
|
subpackages="$pkgname-nonfree-firmware:nonfree_firmware"
|
||||||
|
|
||||||
|
source="deviceinfo
|
||||||
|
fb.modes
|
||||||
|
pointercal
|
||||||
|
misc/100-charging.rules
|
||||||
|
misc/buttons.conf
|
||||||
|
misc/charging.sh
|
||||||
|
misc/discharging.sh
|
||||||
|
misc/vince-audioctl.sh
|
||||||
|
ucm/msm8953-snd-card-mtp/HiFi.conf
|
||||||
|
ucm/msm8953-snd-card-mtp/msm8953-snd-card-mtp.conf
|
||||||
|
"
|
||||||
|
|
||||||
|
build() {
|
||||||
|
devicepkg_build $startdir $pkgname
|
||||||
|
}
|
||||||
|
|
||||||
|
package() {
|
||||||
|
devicepkg_package $startdir $pkgname
|
||||||
|
install -Dm644 "$srcdir"/fb.modes "$pkgdir"/etc/fb.modes
|
||||||
|
install -Dm644 "$srcdir"/pointercal "$pkgdir"/etc/pointercal
|
||||||
|
install -Dm644 "$srcdir"/100-charging.rules \
|
||||||
|
"$pkgdir"/etc/udev/rules.d/100-charging.rules
|
||||||
|
install -Dm755 "$srcdir"/charging.sh "$pkgdir"/usr/lib/device-xiaomi-vince/charging.sh
|
||||||
|
install -Dm755 "$srcdir"/discharging.sh "$pkgdir"/usr/lib/device-xiaomi-vince/discharging.sh
|
||||||
|
install -Dm755 "$srcdir"/vince-audioctl.sh "$pkgdir"/usr/lib/device-xiaomi-vince/vince-audioctl.sh
|
||||||
|
|
||||||
|
# Disable v4l udev rules (video4linux), because without the camera
|
||||||
|
# firmware blobs this makes udev helper hang (#1033)
|
||||||
|
mkdir -p "$pkgdir"/etc/udev/rules.d
|
||||||
|
ln -s /dev/null "$pkgdir"/etc/udev/rules.d/60-persistent-v4l.rules
|
||||||
|
}
|
||||||
|
|
||||||
|
nonfree_firmware() {
|
||||||
|
pkgdesc="Wi-Fi, ADSP Firmware"
|
||||||
|
depends="firmware-xiaomi-vince wcnss-wlan adsp-audio pulseaudio pulseaudio-alsa alsa-plugins-pulse alsa-utils"
|
||||||
|
install="$pkgname-nonfree-firmware.post-install"
|
||||||
|
mkdir "$subpkgdir"
|
||||||
|
|
||||||
|
# Install triggerhappy evdev rules for vince
|
||||||
|
install -Dm755 "$srcdir"/buttons.conf "$pkgdir"/etc/triggerhappy/triggers.d/buttons.conf
|
||||||
|
|
||||||
|
# Install UCM files for vince
|
||||||
|
install -Dm644 "$srcdir"/HiFi.conf \
|
||||||
|
"$subpkgdir"/usr/share/alsa/ucm2/msm8953-snd-card-mtp/HiFi.conf
|
||||||
|
install -Dm644 "$srcdir"/msm8953-snd-card-mtp.conf \
|
||||||
|
"$subpkgdir"/usr/share/alsa/ucm2/msm8953-snd-card-mtp/msm8953-snd-card-mtp.conf
|
||||||
|
}
|
||||||
|
|
||||||
|
sha512sums="2e31117082ced7b1cd20c5a3b253d934795bb6b65fea316e7e67efd36ce98b546d828077daa5781b9a90101b540b687b5c27e87b812b4e42fec0ba77c9cb61d4 deviceinfo
|
||||||
|
9b888f3a4ef3ed3c0b2e9c6a6e8a6c686909c530c3d95be797b47b4eb9deb55d64190b7a3736e44139630bfff5e295625a855052923369fdd37889060a3220ca fb.modes
|
||||||
|
4fa63c184f00033fbae2e4b140c9655061b3b662e337f7bdf5f8e26f7b57d6c66ad01fc93da05ce7d330f0f05bb0d36cc9b356ebfc7eb4200be4d4cc03afc975 pointercal
|
||||||
|
b6951e2f8d2e21aa58f15b600a67289900d645b9dcff9992d0864dea383528539fc8b0140bff6af4eba4bb729db79a3d5d88ba248fcf2b579dd8c3cd0e20ae4e 100-charging.rules
|
||||||
|
922519b787ab8d6886f3b2e0ace84de69d0e185208776aedd471828132d13bc6364393cd5c7f97634de014aaf3fb100c9fa4724c97d6d1220320d2e73e0f1947 buttons.conf
|
||||||
|
89195cfaa131eef1a34c882685ed53eb0e80d1520cf9924e775875bde1de883448f3d182775f8323b261afaf0f6a5e73aa31142f2e72acc3ac584a64de6e72a3 charging.sh
|
||||||
|
947fb09b7dce638d28afb367ce193437092bca956647486d67438a3fbb695c9354bc1174a68a5993644c3c619f9826cb8a84b8b9f49b513a484089a965b665c5 discharging.sh
|
||||||
|
24762c3f4b0d1e9a035495c05e53852a68d46699e1f41915bd6d68af3d2a22dad075c77209533d92a81693aa45c86018ce825a8b7e7a8c163b59d826d9e204d1 vince-audioctl.sh
|
||||||
|
8b0ec10746d98d905041ec18bcc0bfae1961bed574a280ca903a5a5ec71de14df0429c5b49ce25835555c076565d8c35285d7a3b7152e21aa4d1b97659e012eb HiFi.conf
|
||||||
|
f7dfd0c863f4c0d3746533bd3d0885b88ac73fb3b158522da5b57b636a4048d0c68a143f76e6750bb1404893c4803a86928671d4b60e93d253fe4b62d7a2f5f6 msm8953-snd-card-mtp.conf"
|
|
@ -0,0 +1,8 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# We make sure that tsched has not mentioned anywhere in the default PulseAudio config
|
||||||
|
if [ "$(grep -c tsched /etc/pulse/default.pa)" -lt "1" ]; then
|
||||||
|
sed -i 's/load-module module-udev-detect/load-module module-udev-detect tsched=0/g' /etc/pulse/default.pa
|
||||||
|
fi
|
||||||
|
|
||||||
|
exit 0
|
40
device/testing/device-xiaomi-vince/deviceinfo
Normal file
40
device/testing/device-xiaomi-vince/deviceinfo
Normal file
|
@ -0,0 +1,40 @@
|
||||||
|
# Please use double quotes only. You can source this file in shell scripts.
|
||||||
|
|
||||||
|
deviceinfo_format_version="0"
|
||||||
|
deviceinfo_name="Xiaomi Redmi Note 5 Plus"
|
||||||
|
deviceinfo_manufacturer="Xiaomi"
|
||||||
|
deviceinfo_codename="xiaomi-vince"
|
||||||
|
deviceinfo_year="2017"
|
||||||
|
deviceinfo_dtb=""
|
||||||
|
deviceinfo_modules_initfs=""
|
||||||
|
deviceinfo_arch="aarch64"
|
||||||
|
|
||||||
|
# Device related
|
||||||
|
deviceinfo_chassis="handset"
|
||||||
|
deviceinfo_keyboard="false"
|
||||||
|
deviceinfo_external_storage="true"
|
||||||
|
deviceinfo_screen_width="1080"
|
||||||
|
deviceinfo_screen_height="2160"
|
||||||
|
deviceinfo_dev_touchscreen="/dev/input/event2"
|
||||||
|
deviceinfo_dev_touchscreen_calibration="/etc/pointercal"
|
||||||
|
deviceinfo_swap_size_recommended="1024"
|
||||||
|
deviceinfo_getty="ttyMSM0;115200"
|
||||||
|
|
||||||
|
# Bootloader related
|
||||||
|
deviceinfo_flash_method="fastboot"
|
||||||
|
deviceinfo_kernel_cmdline="console=ttyMSM0,115200,n8 androidboot.console=ttyMSM0 androidboot.hardware=qcom msm_rtb.filter=0x237 ehci-hcd.park=3 lpm_levels.sleep_disabled=1 androidboot.bootdevice=7824900.sdhci earlycon=msm_hsl_uart,0x78af000 androidboot.usbconfigfs=true buildvariant=userdebug"
|
||||||
|
deviceinfo_generate_bootimg="true"
|
||||||
|
deviceinfo_bootimg_qcdt="false"
|
||||||
|
deviceinfo_bootimg_dtb_second="false"
|
||||||
|
deviceinfo_flash_offset_base="0x80000000"
|
||||||
|
deviceinfo_flash_offset_kernel="0x00008000"
|
||||||
|
deviceinfo_flash_offset_ramdisk="0x01000000"
|
||||||
|
deviceinfo_flash_offset_second="0x00f00000"
|
||||||
|
deviceinfo_flash_offset_tags="0x00000100"
|
||||||
|
deviceinfo_flash_pagesize="4096"
|
||||||
|
deviceinfo_flash_sparse="true"
|
||||||
|
|
||||||
|
# RNDIS related
|
||||||
|
deviceinfo_usb_rndis_function="rndis_bam.rndis"
|
||||||
|
deviceinfo_usb_idVendor="0x2717" # Xiaomi Communications Co., Ltd.
|
||||||
|
deviceinfo_usb_idProduct="0xff80" # Mi/Redmi series (RNDIS)
|
7
device/testing/device-xiaomi-vince/fb.modes
Normal file
7
device/testing/device-xiaomi-vince/fb.modes
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
mode "1080x2160-60"
|
||||||
|
# D: 166.556 MHz, H: 132.187 kHz, V: 60.003 Hz
|
||||||
|
geometry 1080 2160 1080 2160 16
|
||||||
|
timings 6004 60 108 33 6 12 4
|
||||||
|
accel false
|
||||||
|
rgba 8/0,8/8,8/16,8/16
|
||||||
|
endmode
|
|
@ -0,0 +1,2 @@
|
||||||
|
SUBSYSTEM=="power_supply", ATTR{online}=="1", RUN+="/usr/lib/device-xiaomi-vince/charging.sh"
|
||||||
|
SUBSYSTEM=="power_supply", ATTR{online}=="0", RUN+="/usr/lib/device-xiaomi-vince/discharging.sh"
|
11
device/testing/device-xiaomi-vince/misc/buttons.conf
Normal file
11
device/testing/device-xiaomi-vince/misc/buttons.conf
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
KEY_VOLUMEUP 1 /usr/lib/device-xiaomi-vince/vince-audioctl.sh up
|
||||||
|
KEY_VOLUMEDOWN 1 /usr/lib/device-xiaomi-vince/vince-audioctl.sh down
|
||||||
|
SW_HEADPHONE_INSERT 1 /usr/bin/alsaucm -c msm8953-snd-card-mtp set _verb HiFi set _enadev Headphones
|
||||||
|
SW_JACK_PHYSICAL_INSERT 1 /usr/bin/alsaucm -c msm8953-snd-card-mtp set _verb HiFi set _enadev Headphones
|
||||||
|
SW_MICROPHONE_INSERT 1 /usr/bin/alsaucm -c msm8953-snd-card-mtp set _verb HiFi set _enadev Headphones
|
||||||
|
SW_HEADPHONE_INSERT 0 /usr/bin/alsaucm -c msm8953-snd-card-mtp set _verb HiFi set _enadev Handset
|
||||||
|
SW_MICROPHONE_INSERT 0 /usr/bin/alsaucm -c msm8953-snd-card-mtp set _verb HiFi set _enadev Handset
|
||||||
|
SW_JACK_PHYSICAL_INSERT 0 /usr/bin/alsaucm -c msm8953-snd-card-mtp set _verb HiFi set _enadev Handset
|
||||||
|
BTN_1 1 /usr/lib/device-xiaomi-vince/vince-audioctl.sh up
|
||||||
|
BTN_2 1 /usr/lib/device-xiaomi-vince/vince-audioctl.sh down
|
||||||
|
KEY_MEDIA 1 /usr/lib/device-xiaomi-vince/vince-audioctl.sh mute
|
7
device/testing/device-xiaomi-vince/misc/charging.sh
Normal file
7
device/testing/device-xiaomi-vince/misc/charging.sh
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# We'll vibrate a bit here, then turn the led on.
|
||||||
|
echo 500 > /sys/class/leds/vibrator/duration
|
||||||
|
echo 100 > /sys/class/leds/vibrator/brightness
|
||||||
|
echo 1 > /sys/class/leds/vibrator/activate
|
||||||
|
echo 150 > /sys/class/leds/red/brightness
|
8
device/testing/device-xiaomi-vince/misc/discharging.sh
Normal file
8
device/testing/device-xiaomi-vince/misc/discharging.sh
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
echo 0 > /sys/class/leds/red/brightness
|
||||||
|
|
||||||
|
# We'll vibrate a bit here.
|
||||||
|
echo 500 > /sys/class/leds/vibrator/duration
|
||||||
|
echo 100 > /sys/class/leds/vibrator/brightness
|
||||||
|
echo 1 > /sys/class/leds/vibrator/activate
|
38
device/testing/device-xiaomi-vince/misc/vince-audioctl.sh
Normal file
38
device/testing/device-xiaomi-vince/misc/vince-audioctl.sh
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
#!/bin/sh
|
||||||
|
# This is a temp workaround for ALSA non-root interaction,
|
||||||
|
# Maybe will be fixed when the audio mixer controls for q6dsp
|
||||||
|
# will be defined, avoiding alsactl store errors
|
||||||
|
|
||||||
|
AMIX="sudo -u #10000 $(which amixer)"
|
||||||
|
|
||||||
|
volume_up() {
|
||||||
|
$AMIX set Master 5%+
|
||||||
|
}
|
||||||
|
|
||||||
|
volume_down() {
|
||||||
|
$AMIX set Master 5%-
|
||||||
|
}
|
||||||
|
|
||||||
|
volume_mute() {
|
||||||
|
$AMIX set Master 1+ toggle
|
||||||
|
}
|
||||||
|
|
||||||
|
display_help() {
|
||||||
|
echo "Usage:"
|
||||||
|
echo "$0 [ up | down | mute ]"
|
||||||
|
}
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
up)
|
||||||
|
volume_up
|
||||||
|
;;
|
||||||
|
down)
|
||||||
|
volume_down
|
||||||
|
;;
|
||||||
|
mute)
|
||||||
|
volume_mute
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
display_help
|
||||||
|
;;
|
||||||
|
esac
|
1
device/testing/device-xiaomi-vince/pointercal
Normal file
1
device/testing/device-xiaomi-vince/pointercal
Normal file
|
@ -0,0 +1 @@
|
||||||
|
66503 -338 -779699 -332 65882 -586338 65536 1080 2160 0
|
|
@ -0,0 +1,157 @@
|
||||||
|
SectionVerb {
|
||||||
|
EnableSequence[
|
||||||
|
cdev "hw:msm8953sndcardm"
|
||||||
|
cset "name='PRI_MI2S_RX Audio Mixer MultiMedia1' 1"
|
||||||
|
cset "name='MultiMedia1 Mixer TERT_MI2S_TX' 1"
|
||||||
|
]
|
||||||
|
DisableSequence[
|
||||||
|
cdev "hw:msm8953sndcardm"
|
||||||
|
cset "name='PRI_MI2S_RX Audio Mixer MultiMedia1' 0"
|
||||||
|
cset "name='MultiMedia1 Mixer TERT_MI2S_TX' 0"
|
||||||
|
]
|
||||||
|
Value {
|
||||||
|
TQ "HiFi"
|
||||||
|
PlaybackPCM "hw:msm8953sndcardm,0"
|
||||||
|
CapturePCM "hw:msm8953sndcardm,0"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
SectionDevice."Headphones" {
|
||||||
|
Comment "Headset"
|
||||||
|
ConflictingDevice[]
|
||||||
|
EnableSequence[
|
||||||
|
cdev "hw:msm8953sndcardm"
|
||||||
|
cset "name='MI2S_RX Channels' Two"
|
||||||
|
cset "name='RX1 MIX1 INP1' RX1"
|
||||||
|
cset "name='RX2 MIX1 INP1' RX2"
|
||||||
|
cset "name='RX HPH Mode' HD2"
|
||||||
|
cset "name='RDAC2 MUX' RX2"
|
||||||
|
cset "name='HPHL' Switch"
|
||||||
|
cset "name='HPHR' Switch"
|
||||||
|
# cset "name='Ext Spk Switch' On"
|
||||||
|
cset "name='PRI_MI2S_RX Audio Mixer MultiMedia1' 1"
|
||||||
|
]
|
||||||
|
DisableSequence[
|
||||||
|
cdev "hw:msm8953sndcardm"
|
||||||
|
cset "name='MI2S_RX Channels' One"
|
||||||
|
cset "name='RX1 MIX1 INP1' ZERO"
|
||||||
|
cset "name='RX2 MIX1 INP1' ZERO"
|
||||||
|
cset "name='RX HPH Mode' NORMAL"
|
||||||
|
cset "name='RDAC2 MUX' ZERO"
|
||||||
|
cset "name='HPHL' ZERO"
|
||||||
|
cset "name='HPHR' ZERO"
|
||||||
|
cset "name='PRI_MI2S_RX Audio Mixer MultiMedia1' 0"
|
||||||
|
]
|
||||||
|
Value {
|
||||||
|
PlaybackChannels "2"
|
||||||
|
PlaybackPriority 200
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
SectionDevice."Handset" {
|
||||||
|
Comment "Handset earpiece"
|
||||||
|
ConflictingDevice[
|
||||||
|
"Headphones"
|
||||||
|
]
|
||||||
|
EnableSequence[
|
||||||
|
cdev "hw:msm8953sndcardm"
|
||||||
|
cset "name='RX1 MIX1 INP1' RX1"
|
||||||
|
cset "name='RDAC2 MUX' RX1"
|
||||||
|
cset "name='RX1 Digital Volume' 88"
|
||||||
|
cset "name='EAR PA Gain' POS_6_DB"
|
||||||
|
cset "name='EAR_S' Switch"
|
||||||
|
cset "name='PRI_MI2S_RX Audio Mixer MultiMedia1' 1"
|
||||||
|
]
|
||||||
|
DisableSequence[
|
||||||
|
cdev "hw:msm8953sndcardm"
|
||||||
|
cset "name='RX1 MIX1 INP1' ZERO"
|
||||||
|
cset "name='RDAC2 MUX' ZERO"
|
||||||
|
cset "name='RX1 Digital Volume' 84"
|
||||||
|
cset "name='EAR PA Gain' POS_6_DB"
|
||||||
|
cset "name='EAR_S' ZERO"
|
||||||
|
cset "name='PRI_MI2S_RX Audio Mixer MultiMedia1' 0"
|
||||||
|
]
|
||||||
|
Value {
|
||||||
|
PlaybackChannels "2"
|
||||||
|
PlaybackPriority 100
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
SectionDevice."HandsetMic" {
|
||||||
|
Comment "Handset microphone"
|
||||||
|
ConflictingDevice[
|
||||||
|
"SpeakerMic"
|
||||||
|
"HeadsetMic"
|
||||||
|
]
|
||||||
|
EnableSequence[
|
||||||
|
cdev "hw:msm8953sndcardm"
|
||||||
|
cset "name='ADC1 Volume' 6"
|
||||||
|
cset "name='DEC1 MUX' ADC1"
|
||||||
|
cset "name='ADC1_INP1 Switch' 1"
|
||||||
|
cset "name='IIR1 INP1 MUX' DEC1"
|
||||||
|
cset "name='MultiMedia1 Mixer TERT_MI2S_TX' 1"
|
||||||
|
]
|
||||||
|
DisableSequence[
|
||||||
|
cdev "hw:msm8953sndcardm"
|
||||||
|
cset "name='ADC1 Volume' 4"
|
||||||
|
cset "name='DEC1 MUX' ZERO"
|
||||||
|
cset "name='ADC1_INP1 Switch' 0"
|
||||||
|
cset "name='MultiMedia1 Mixer TERT_MI2S_TX' 0"
|
||||||
|
]
|
||||||
|
Value {
|
||||||
|
CaptureChannels "2"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
SectionDevice."SpeakerMic" {
|
||||||
|
Comment "Handset microphone for speaker-mode"
|
||||||
|
ConflictingDevice[
|
||||||
|
"Handset"
|
||||||
|
"HandsetMic"
|
||||||
|
"HeadsetMic"
|
||||||
|
]
|
||||||
|
EnableSequence[
|
||||||
|
cdev "hw:msm8953sndcardm"
|
||||||
|
cset "name='ADC1 Volume' 6"
|
||||||
|
cset "name='DEC1 MUX' ADC1"
|
||||||
|
cset "name='ADC1_INP1 Switch' 1"
|
||||||
|
cset "name='IIR1 INP1 MUX' DEC1"
|
||||||
|
cset "name='MultiMedia1 Mixer TERT_MI2S_TX' 1"
|
||||||
|
]
|
||||||
|
DisableSequence[
|
||||||
|
cdev "hw:msm8953sndcardm"
|
||||||
|
cset "name='ADC1 Volume' 4"
|
||||||
|
cset "name='DEC1 MUX' ZERO"
|
||||||
|
cset "name='ADC1_INP1 Switch' 0"
|
||||||
|
cset "name='MultiMedia1 Mixer TERT_MI2S_TX' 0"
|
||||||
|
]
|
||||||
|
Value {
|
||||||
|
CaptureChannels "2"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
SectionDevice."HeadsetMic" {
|
||||||
|
Comment "Headset microphone"
|
||||||
|
ConflictingDevice[
|
||||||
|
"HandsetMic"
|
||||||
|
"SpeakerMic"
|
||||||
|
]
|
||||||
|
EnableSequence[
|
||||||
|
cdev "hw:msm8953sndcardm"
|
||||||
|
cset "name='ADC2 Volume' 6"
|
||||||
|
cset "name='DEC1 MUX' ADC2"
|
||||||
|
cset "name='ADC2 MUX' INP2"
|
||||||
|
cset "name='IIR1 INP1 MUX' DEC1"
|
||||||
|
cset "name='MultiMedia1 Mixer TERT_MI2S_TX' 1"
|
||||||
|
]
|
||||||
|
DisableSequence[
|
||||||
|
cdev "hw:msm8953sndcardm"
|
||||||
|
cset "name='ADC2 Volume' 4"
|
||||||
|
cset "name='DEC1 MUX' ZERO"
|
||||||
|
cset "name='ADC2 MUX' ZERO"
|
||||||
|
cset "name='MultiMedia1 Mixer TERT_MI2S_TX' 0"
|
||||||
|
]
|
||||||
|
Value {
|
||||||
|
CaptureChannels "2"
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,147 @@
|
||||||
|
Syntax 2
|
||||||
|
|
||||||
|
SectionUseCase."HiFi" {
|
||||||
|
File "HiFi.conf"
|
||||||
|
}
|
||||||
|
|
||||||
|
SectionDefaults [
|
||||||
|
cdev "hw:msm8953sndcardm"
|
||||||
|
cset "name='TTY Mode' OFF"
|
||||||
|
cset "name='RX HPH Mode' NORMAL"
|
||||||
|
cset "name='COMP0 RX1' 0"
|
||||||
|
cset "name='COMP0 RX2' 0"
|
||||||
|
cset "name='RX1 Digital Volume' 84"
|
||||||
|
cset "name='RX2 Digital Volume' 84"
|
||||||
|
cset "name='RX3 Digital Volume' 78"
|
||||||
|
cset "name='IIR1 INP1 Volume' 53"
|
||||||
|
cset "name='IIR1 INP2 Volume' 84"
|
||||||
|
cset "name='IIR1 INP3 Volume' 84"
|
||||||
|
cset "name='IIR1 INP4 Volume' 84"
|
||||||
|
cset "name='ADC1 Volume' 4"
|
||||||
|
cset "name='ADC2 Volume' 4"
|
||||||
|
cset "name='ADC3 Volume' 4"
|
||||||
|
cset "name='DEC1 Volume' 84"
|
||||||
|
cset "name='DEC2 Volume' 84"
|
||||||
|
cset "name='DEC2 MUX' ZERO"
|
||||||
|
cset "name='DEC1 MUX' ZERO"
|
||||||
|
cset "name='ADC2 MUX' ZERO"
|
||||||
|
cset "name='RDAC2 MUX' ZERO"
|
||||||
|
cset "name='RX2 MIX2 INP1' ZERO"
|
||||||
|
cset "name='RX1 MIX2 INP1' ZERO"
|
||||||
|
cset "name='RX3 MIX1 INP2' ZERO"
|
||||||
|
cset "name='RX3 MIX1 INP1' ZERO"
|
||||||
|
cset "name='RX2 MIX1 INP2' ZERO"
|
||||||
|
cset "name='RX2 MIX1 INP1' ZERO"
|
||||||
|
cset "name='RX1 MIX1 INP2' ZERO"
|
||||||
|
cset "name='RX1 MIX1 INP1' ZERO"
|
||||||
|
cset "name='EAR_S' ZERO"
|
||||||
|
cset "name='HPHL' ZERO"
|
||||||
|
cset "name='HPHR' ZERO"
|
||||||
|
cset "name='SPK' ZERO"
|
||||||
|
cset "name='LINE_OUT' ZERO"
|
||||||
|
cset "name='EAR PA Gain' POS_6_DB"
|
||||||
|
cset "name='EAR PA Gain' POS_1P5_DB"
|
||||||
|
cset "name='EAR PA Boost' ENABLE"
|
||||||
|
cset "name='Speaker Boost' DISABLE"
|
||||||
|
cset "name='MI2S_RX Channels' One"
|
||||||
|
cset "name='MI2S_TX Channels' One"
|
||||||
|
cset "name='PRI_MI2S_RX_DL_HL Switch' 0"
|
||||||
|
cset "name='PRI_MI2S_RX_VI_FB_MUX' ZERO"
|
||||||
|
cset "name='QUIN_MI2S_RX_DL_HL Switch' 0"
|
||||||
|
cset "name='DEC3 MUX' ZERO"
|
||||||
|
cset "name='DEC4 MUX' ZERO"
|
||||||
|
cset "name='ADC1_INP1 Switch' 0"
|
||||||
|
cset "name='PRI_MI2S_RX Audio Mixer MultiMedia1' 0"
|
||||||
|
cset "name='INTERNAL_BT_SCO_RX Audio Mixer MultiMedia1' 0"
|
||||||
|
cset "name='PRI_MI2S_RX Audio Mixer MultiMedia3' 0"
|
||||||
|
cset "name='INTERNAL_BT_SCO_RX Audio Mixer MultiMedia3' 0"
|
||||||
|
cset "name='AFE_PCM_RX Audio Mixer MultiMedia2' 0"
|
||||||
|
cset "name='AFE_PCM_RX Audio Mixer MultiMedia3' 0"
|
||||||
|
cset "name='PRI_MI2S_RX Audio Mixer MultiMedia4' 0"
|
||||||
|
cset "name='INTERNAL_BT_SCO_RX Audio Mixer MultiMedia4' 0"
|
||||||
|
cset "name='AFE_PCM_RX Audio Mixer MultiMedia4' 0"
|
||||||
|
cset "name='INTERNAL_FM_RX Audio Mixer MultiMedia4' 0"
|
||||||
|
cset "name='PRI_MI2S_RX Audio Mixer MultiMedia5' 0"
|
||||||
|
cset "name='INTERNAL_BT_SCO_RX Audio Mixer MultiMedia5' 0"
|
||||||
|
cset "name='MultiMedia1 Mixer TERT_MI2S_TX' 0"
|
||||||
|
cset "name='MultiMedia5 Mixer TERT_MI2S_TX' 0"
|
||||||
|
cset "name='MultiMedia1 Mixer INTERNAL_BT_SCO_TX' 0"
|
||||||
|
cset "name='QUIN_MI2S_RX Audio Mixer MultiMedia1' 0"
|
||||||
|
cset "name='QUIN_MI2S_RX Audio Mixer MultiMedia2' 0"
|
||||||
|
cset "name='QUIN_MI2S_RX Audio Mixer MultiMedia3' 0"
|
||||||
|
cset "name='QUIN_MI2S_RX Audio Mixer MultiMedia4' 0"
|
||||||
|
cset "name='QUIN_MI2S_RX Audio Mixer MultiMedia5' 0"
|
||||||
|
cset "name='QUIN_MI2S_RX Audio Mixer MultiMedia7' 0"
|
||||||
|
cset "name='QUIN_MI2S_RX Audio Mixer MultiMedia10' 0"
|
||||||
|
cset "name='QUIN_MI2S_RX Audio Mixer MultiMedia11' 0"
|
||||||
|
cset "name='QUIN_MI2S_RX Audio Mixer MultiMedia12' 0"
|
||||||
|
cset "name='QUIN_MI2S_RX Audio Mixer MultiMedia13' 0"
|
||||||
|
cset "name='QUIN_MI2S_RX Audio Mixer MultiMedia14' 0"
|
||||||
|
cset "name='Internal BTSCO SampleRate' BTSCO_RATE_8KHZ"
|
||||||
|
cset "name='MultiMedia6 Mixer TERT_MI2S_TX' 0"
|
||||||
|
cset "name='PRI_MI2S_RX_Voice Mixer VoiceMMode1' 0"
|
||||||
|
cset "name='VoiceMMode1_Tx Mixer TERT_MI2S_TX_MMode1' 0"
|
||||||
|
cset "name='INTERNAL_BT_SCO_RX_Voice Mixer VoiceMMode1' 0"
|
||||||
|
cset "name='VoiceMMode1_Tx Mixer INT_BT_SCO_TX_MMode1' 0"
|
||||||
|
cset "name='AFE_PCM_RX_Voice Mixer VoiceMMode1' 0"
|
||||||
|
cset "name='VoiceMMode1_Tx Mixer AFE_PCM_TX_MMode1' 0"
|
||||||
|
cset "name='PRI_MI2S_RX_Voice Mixer VoiceMMode2' 0"
|
||||||
|
cset "name='VoiceMMode2_Tx Mixer TERT_MI2S_TX_MMode2' 0"
|
||||||
|
cset "name='INTERNAL_BT_SCO_RX_Voice Mixer VoiceMMode2' 0"
|
||||||
|
cset "name='VoiceMMode2_Tx Mixer INT_BT_SCO_TX_MMode2' 0"
|
||||||
|
cset "name='AFE_PCM_RX_Voice Mixer VoiceMMode2' 0"
|
||||||
|
cset "name='VoiceMMode2_Tx Mixer AFE_PCM_TX_MMode2' 0"
|
||||||
|
cset "name='PRI_MI2S_RX_Voice Mixer Voip' 0"
|
||||||
|
cset "name='Voip_Tx Mixer TERT_MI2S_TX_Voip' 0"
|
||||||
|
cset "name='Internal BTSCO SampleRate' BTSCO_RATE_8KHZ"
|
||||||
|
cset "name='INTERNAL_BT_SCO_RX_Voice Mixer Voip' 0"
|
||||||
|
cset "name='Voip_Tx Mixer INTERNAL_BT_SCO_TX_Voip' 0"
|
||||||
|
cset "name='Internal FM RX Volume' 0"
|
||||||
|
cset "name='PRI_MI2S_RX Port Mixer INTERNAL_FM_TX' 0"
|
||||||
|
cset "name='QUIN_MI2S_RX Port Mixer INTERNAL_FM_TX' 0"
|
||||||
|
cset "name='MultiMedia1 Mixer INTERNAL_FM_TX' 0"
|
||||||
|
cset "name='MultiMedia2 Mixer INTERNAL_FM_TX' 0"
|
||||||
|
cset "name='INTERNAL_FM_RX Audio Mixer MultiMedia1' 0"
|
||||||
|
cset "name='INTERNAL_FM_RX Audio Mixer MultiMedia5' 0"
|
||||||
|
cset "name='RT_PROXY_1_RX SetCalMode' CAL_MODE_NONE"
|
||||||
|
cset "name='RT_PROXY_1_TX SetCalMode' CAL_MODE_NONE"
|
||||||
|
cset "name='MultiMedia1 Mixer VOC_REC_UL' 0"
|
||||||
|
cset "name='MultiMedia1 Mixer VOC_REC_DL' 0"
|
||||||
|
cset "name='Incall_Music Audio Mixer MultiMedia2' 0"
|
||||||
|
cset "name='Incall_Music_2 Audio Mixer MultiMedia9' 0"
|
||||||
|
cset "name='PRI_MI2S_RX_Voice Mixer QCHAT' 0"
|
||||||
|
cset "name='QCHAT_Tx Mixer TERT_MI2S_TX_QCHAT' 0"
|
||||||
|
cset "name='INTERNAL_BT_SCO_RX_Voice Mixer QCHAT' 0"
|
||||||
|
cset "name='QCHAT_Tx Mixer INTERNAL_BT_SCO_TX_QCHAT' 0"
|
||||||
|
cset "name='AUDIO_REF_EC_UL1 MUX' None"
|
||||||
|
cset "name='IIR1 Band1' 268435456"
|
||||||
|
cset "name='IIR1 Band1' 0"
|
||||||
|
cset "name='IIR1 Band1' ,0"
|
||||||
|
cset "name='IIR1 Band1' ,,0"
|
||||||
|
cset "name='IIR1 Band1' ,,,0"
|
||||||
|
cset "name='IIR1 Band2' 268435456"
|
||||||
|
cset "name='IIR1 Band2' 0"
|
||||||
|
cset "name='IIR1 Band2' ,0"
|
||||||
|
cset "name='IIR1 Band2' ,,0"
|
||||||
|
cset "name='IIR1 Band2' ,,,0"
|
||||||
|
cset "name='IIR1 Band3' 268435456"
|
||||||
|
cset "name='IIR1 Band3' 0"
|
||||||
|
cset "name='IIR1 Band3' ,0"
|
||||||
|
cset "name='IIR1 Band3' ,,0"
|
||||||
|
cset "name='IIR1 Band3' ,,,0"
|
||||||
|
cset "name='IIR1 Band4' 268435456"
|
||||||
|
cset "name='IIR1 Band4' 0"
|
||||||
|
cset "name='IIR1 Band4' ,0"
|
||||||
|
cset "name='IIR1 Band4' ,,0"
|
||||||
|
cset "name='IIR1 Band4' ,,,0"
|
||||||
|
cset "name='IIR1 Band5' 268435456"
|
||||||
|
cset "name='IIR1 Band5' 0"
|
||||||
|
cset "name='IIR1 Band5' ,0"
|
||||||
|
cset "name='IIR1 Band5' ,,0"
|
||||||
|
cset "name='IIR1 Band5' ,,,0"
|
||||||
|
cset "name='IIR1 Enable Band1' 0"
|
||||||
|
cset "name='IIR1 Enable Band2' 0"
|
||||||
|
cset "name='IIR1 Enable Band3' 0"
|
||||||
|
cset "name='IIR1 Enable Band4' 0"
|
||||||
|
cset "name='IIR1 Enable Band5' 0"
|
||||||
|
]
|
49
device/testing/linux-xiaomi-vince/APKBUILD
Normal file
49
device/testing/linux-xiaomi-vince/APKBUILD
Normal file
|
@ -0,0 +1,49 @@
|
||||||
|
# Maintainer: m0rf30 <morf3089@gmail.com>
|
||||||
|
# Reference: <https://postmarketos.org/vendorkernel>
|
||||||
|
# Kernel config based on: arch/arm64/configs/vince_defconfig
|
||||||
|
|
||||||
|
pkgname=linux-xiaomi-vince
|
||||||
|
pkgver=4.9.224
|
||||||
|
pkgrel=0
|
||||||
|
pkgdesc="Xiaomi Redmi Note 5 Plus kernel fork"
|
||||||
|
arch="aarch64"
|
||||||
|
_carch="arm64"
|
||||||
|
_flavor="xiaomi-vince"
|
||||||
|
url="https://kernel.org"
|
||||||
|
license="GPL-2.0-only"
|
||||||
|
options="!strip !check !tracedeps pmb:cross-native"
|
||||||
|
makedepends="sed gcc-arm-none-eabi bash bc bison devicepkg-dev flex openssl-dev perl"
|
||||||
|
|
||||||
|
# Source
|
||||||
|
_repository="M0Rf30/kernel_xiaomi_vince"
|
||||||
|
_commit="a6b68772e108d4928377ea2de3368472a6705f9d"
|
||||||
|
_config="config-$_flavor.$arch"
|
||||||
|
source="$pkgname-$_commit.tar.gz::https://github.com/$_repository/archive/$_commit.tar.gz
|
||||||
|
$_config
|
||||||
|
"
|
||||||
|
builddir="$srcdir/kernel_xiaomi_vince-$_commit"
|
||||||
|
_outdir="out"
|
||||||
|
|
||||||
|
prepare() {
|
||||||
|
default_prepare
|
||||||
|
REPLACE_GCCH=0 \
|
||||||
|
. downstreamkernel_prepare
|
||||||
|
}
|
||||||
|
|
||||||
|
build() {
|
||||||
|
unset LDFLAGS
|
||||||
|
make O="$_outdir" ARCH="$_carch" CC="${CC:-gcc}" \
|
||||||
|
KBUILD_BUILD_VERSION="$((pkgrel + 1))-postmarketOS"
|
||||||
|
}
|
||||||
|
|
||||||
|
package() {
|
||||||
|
downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" "$_outdir"
|
||||||
|
# Modules
|
||||||
|
unset LDFLAGS
|
||||||
|
make O="$_outdir" ARCH="$_carch" CC="${CC:-gcc}" \
|
||||||
|
KBUILD_BUILD_VERSION="$((pkgrel + 1))-postmarketOS" \
|
||||||
|
INSTALL_MOD_PATH="$pkgdir" modules_install
|
||||||
|
}
|
||||||
|
|
||||||
|
sha512sums="5fe935fd38829dc42ea396fa2221c9647881120319b0531d40b547425d5a824565ed8c51f30ba80e32d31db36457a68e2ce4352fc48ef4421bc3e7360a21ecfe linux-xiaomi-vince-a6b68772e108d4928377ea2de3368472a6705f9d.tar.gz
|
||||||
|
be3177af761072b7bfb27a39a81b2995a8ae378ec37f7acda720a7ae36671acf23d1b3ed9780ad9caaae3f461d9afc96b15c5893e6d00dd1453733f346550aa3 config-xiaomi-vince.aarch64"
|
5056
device/testing/linux-xiaomi-vince/config-xiaomi-vince.aarch64
Normal file
5056
device/testing/linux-xiaomi-vince/config-xiaomi-vince.aarch64
Normal file
File diff suppressed because it is too large
Load diff
41
firmware/firmware-xiaomi-vince/APKBUILD
Normal file
41
firmware/firmware-xiaomi-vince/APKBUILD
Normal file
|
@ -0,0 +1,41 @@
|
||||||
|
# Maintainer: m0rf30 <morf3089@gmail.com>
|
||||||
|
pkgname=firmware-xiaomi-vince
|
||||||
|
pkgver=1
|
||||||
|
pkgrel=0
|
||||||
|
_commit="545e0ce388b40d4e63e61add9b3286205df45f03"
|
||||||
|
_commit_vince_fw="432ab3db085d06f17dc866fbe722b11792e58ae1"
|
||||||
|
pkgdesc="Firmware files for Xiaomi Redmi 5 Plus"
|
||||||
|
url="https://postmarketos.org"
|
||||||
|
arch="aarch64"
|
||||||
|
license="proprietary"
|
||||||
|
depends="wcnss-wlan adsp-audio"
|
||||||
|
source="$pkgname-$_commit.tar.gz::https://github.com/Blacksuan19/android_vendor_xiaomi_vince/archive/$_commit.tar.gz
|
||||||
|
vince-fw-$_commit_vince_fw.tar.gz::https://github.com/M0Rf30/postmarketos-vendor-xiaomi-vince/archive/$_commit_vince_fw.tar.gz"
|
||||||
|
options="!strip !check !archcheck !spdx"
|
||||||
|
builddir="$srcdir/postmarketos-vendor-xiaomi-vince-$_commit"
|
||||||
|
|
||||||
|
_files_adreno="a506_zap.b00 a506_zap.b01 a506_zap.b02 a506_zap.mdt a530_pfp.fw a530_pm4.fw"
|
||||||
|
_files_camera="cpp_firmware_v1_10_0.fw cpp_firmware_v1_12_0.fw cpp_firmware_v1_1_1.fw cpp_firmware_v1_1_6.fw cpp_firmware_v1_2_0.fw cpp_firmware_v1_4_0.fw cpp_firmware_v1_5_0.fw cpp_firmware_v1_5_1.fw cpp_firmware_v1_5_2.fw cpp_firmware_v1_6_0.fw cpp_firmware_v1_8_0.fw"
|
||||||
|
_files_finger="goodix_firmware.bin"
|
||||||
|
_files_touch="novatek_ts_fw.bin"
|
||||||
|
_files_audio="tas2557_uCDSP.bin"
|
||||||
|
|
||||||
|
package() {
|
||||||
|
cd $srcdir
|
||||||
|
# /lib/firmware/postmarketos
|
||||||
|
for _i in $_files_adreno \
|
||||||
|
$_files_audio \
|
||||||
|
$_files_camera \
|
||||||
|
$_files_touch \
|
||||||
|
$_files_finger; do
|
||||||
|
install -Dm644 android_vendor_xiaomi_vince-"$_commit"/proprietary/vendor/firmware/"$_i" \
|
||||||
|
"$pkgdir"/lib/firmware/postmarketos/"$_i"
|
||||||
|
done
|
||||||
|
|
||||||
|
cd "$srcdir"
|
||||||
|
cp -r postmarketos-vendor-xiaomi-vince-"$_commit_vince_fw"/* \
|
||||||
|
"$pkgdir"/lib/firmware/postmarketos/
|
||||||
|
}
|
||||||
|
|
||||||
|
sha512sums="fa841014bc0bf3101928d0a44fbddbbc2a112d6d31d134aa8482f5d41bf67a5dcdffe93a83d7ddc96c56865890a197a1d0f92d279090be8f0f797f69e892b43f firmware-xiaomi-vince-545e0ce388b40d4e63e61add9b3286205df45f03.tar.gz
|
||||||
|
fd679b823043d40393555cecd77011973affca596fe5151fad4badc9970444655d552cce864180322203e84b3c5ba415a12c59172cac84b4b683c1714596a676 vince-fw-432ab3db085d06f17dc866fbe722b11792e58ae1.tar.gz"
|
Loading…
Reference in a new issue