Skip to content
Snippets Groups Projects
Commit 58ed121d authored by Barnabás Czémán's avatar Barnabás Czémán
Browse files

device-qcom-msm89x7: new device

Replace xiaomi-riva and xiaomi-santoni device package with
this generic package.

[ci:skip-vercheck]
parent 6c2b6c9c
No related branches found
No related tags found
No related merge requests found
Showing
with 79 additions and 5784 deletions
# Maintainer: Barnabas Czeman <trabarni@gmail.com>
# Reference: <https://postmarketos.org/devicepkg>
pkgname=device-xiaomi-riva
pkgdesc="Xiaomi Redmi 5A"
pkgname=device-qcom-msm89x7
pkgdesc="Generic device package for various Qualcomm MSM8917/MSM8937/MSM8940-based devices"
pkgver=1
pkgrel=0
url="https://postmarketos.org"
license="MIT"
arch="aarch64"
options="!check !archcheck"
depends="postmarketos-base linux-xiaomi-riva mkbootimg mdss-fb-init-hack msm-fb-refresher"
depends="
firmware-qcom-adreno-a300
firmware-qcom-adreno-a530
linux-postmarketos-qcom-msm89x7
lk2nd-msm8952
mkbootimg
msm-firmware-loader
postmarketos-base
"
makedepends="devicepkg-dev"
source="
deviceinfo
directfbrc
fb.modes
"
subpackages="$pkgname-nonfree-firmware:nonfree_firmware"
modules-initfs
"
build() {
devicepkg_build $startdir $pkgname
......@@ -23,20 +29,9 @@ build() {
package() {
devicepkg_package $startdir $pkgname
install -Dm644 "$srcdir"/fb.modes "$pkgdir"/etc/fb.modes
install -Dm644 "$srcdir"/directfbrc "$pkgdir"/etc/directfbrc
}
nonfree_firmware() {
pkgdesc="Wifi firmware"
depends="firmware-xiaomi-riva wcnss-wlan"
mkdir "$subpkgdir"
}
sha512sums="
1db2d85434b41671c204383f90fe6d6dd1e3c7e874f1bb8d5ba6c7cfc61f91866f641bfa8a8d537ae20b7c8cfdbe4975fe98f40f512c50dc7c0b6c767c2dec43 deviceinfo
3db3ec596e159be926ea2b5b2496c18e9bc7be24a64a232a56c89a0c9ee710aa2efb2b6fa9fc08efa34759e8242e6c629d08a4ce688ec8aa125830717c191515 directfbrc
2ed1dca5a0799f650dacde4babfb4d9139614bbfbfc46c16b5e0533093928ca0db02756e3afd0554a4a037e1f2860d172e7f03cf7ad7ddeec1406cfb7417e0f4 fb.modes
525fb2e6cc7fc01d6a8bd0d1e865b0d038de7294a6824661cb564afaafb37af0bd1bbf96c48c22e72aa4502c19e9f5167e411653a9eb7989dbf54e07fd49ea7c deviceinfo
8f0e17ddcbbb7421c5ebb78c2342d636b58301a842d488f50c48470399a5d96e6ed7bd0958c2b8a5eb34856209bac210476b1d379a5a6536ea2523dab7f793ff modules-initfs
"
# Reference: <https://postmarketos.org/deviceinfo>
# Please use double quotes only. You can source this file in shell
# scripts.
deviceinfo_format_version="0"
deviceinfo_name="Qualcomm msm8937-based device"
deviceinfo_manufacturer="Qualcomm"
deviceinfo_codename="qcom-msm89x7"
deviceinfo_year="2015"
deviceinfo_arch="aarch64"
# Device related
deviceinfo_gpu_accelerated="true"
deviceinfo_chassis="embedded"
deviceinfo_external_storage="true"
deviceinfo_keyboard="false"
# Bootloader related
deviceinfo_flash_method="fastboot"
deviceinfo_partition_type="msdos"
# extlinux.conf
deviceinfo_dtb="qcom/msm8917-* qcom/msm8937-* qcom/msm8940-*"
deviceinfo_generate_extlinux_config="true"
deviceinfo_boot_filesystem="ext2"
edt_ft5x06
goodix_ts
msm
panel_xiaomi_land_hx8394f_boe
panel_xiaomi_land_ili9881c_tianma
panel_xiaomi_land_nt35521s_ebbg
panel_xiaomi_riva_hx8394f_boe
panel_xiaomi_riva_ili9881c_ebbg
panel_xiaomi_riva_ili9881c_ebbgdjn
panel_xiaomi_riva_ili9881c_tianma
panel_xiaomi_santoni_hx8394f_boe
panel_xiaomi_santoni_ili9881c_ebbg
panel_xiaomi_santoni_ili9881c_ebbgdjn
panel_xiaomi_ugglite_ili9881c_sc
panel_xiaomi_ugglite_otm1901a_hx
panel_xiaomi_ugglite_otm1901a_tm
tps65132_regulator
# Reference: <https://postmarketos.org/deviceinfo>
# Please use double quotes only. You can source this file in shell scripts.
deviceinfo_format_version="0"
deviceinfo_name="Xiaomi Redmi 5A"
deviceinfo_manufacturer="Xiaomi"
deviceinfo_codename="xiaomi-riva"
deviceinfo_year="2017"
deviceinfo_arch="aarch64"
# Device related
deviceinfo_chassis="handset"
deviceinfo_keyboard="false"
deviceinfo_external_storage="true"
deviceinfo_screen_width="720"
deviceinfo_screen_height="1280"
deviceinfo_swap_size_recommended="1024"
# Bootloader related
deviceinfo_flash_method="fastboot"
deviceinfo_kernel_cmdline="androidboot.hardware=qcom msm_rtb.filter=0x237 ehci-hcd.park=3 lpm_levels.sleep_disabled=1 androidboot.usbconfigfs=false androidboot.bootdevice=7824900.sdhci earlycon=msm_hsl_uart,0x78B0000 androidboot.selinux=permissive loop.max_part=7 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="2048"
pixelformat=ARGB
mode "720x1280-60"
# D: 80.418 MHz, H: 78.841 kHz, V: 60.001 Hz
geometry 720 1280 720 1280 16
timings 12435 180 112 21 9 8 4
accel false
rgba 8/16,8/8,8/0,8/24
endmode
# Reference: <https://postmarketos.org/devicepkg>
# Maintainer: Asriel Dreemurr <asriel.danctnix@gmail.com>
# Co-Maintainer: Danct12 <danct12@disroot.org>
pkgname=device-xiaomi-santoni
pkgdesc="Xiaomi Redmi 4X"
pkgver=1
pkgrel=0
url="https://postmarketos.org"
license="MIT"
arch="aarch64"
options="!check !archcheck"
depends="
postmarketos-base
postmarketos-base-downstream-disable-udev-v4l
linux-xiaomi-santoni
mkbootimg
msm-fb-refresher
"
makedepends="devicepkg-dev"
subpackages="$pkgname-nonfree-firmware:nonfree_firmware"
source="
ucm/90-device-xiaomi-santoni-audio.rules
ucm/HiFi
ucm/msm8920-sku7-snd-card.conf
deviceinfo
directfbrc
fb.modes"
build() {
devicepkg_build $startdir $pkgname
}
package() {
devicepkg_package $startdir $pkgname
install -Dm644 "$srcdir"/fb.modes "$pkgdir"/etc/fb.modes
install -Dm644 "$srcdir"/directfbrc "$pkgdir"/etc/directfbrc
}
nonfree_firmware() {
pkgdesc="Wi-Fi, ADSP Firmware"
depends="firmware-xiaomi-santoni wcnss-wlan adsp-audio pulseaudio pulseaudio-alsa alsa-plugins-pulse alsa-utils"
install="$pkgname-nonfree-firmware.post-install"
mkdir "$subpkgdir"
# Install UCM files for santoni
install -Dm644 -t "$subpkgdir"/usr/share/alsa/ucm2/conf.d/msm8920-sku7-snd-card \
"$srcdir"/HiFi \
"$srcdir"/msm8920-sku7-snd-card.conf
install -Dm644 "$srcdir"/90-device-xiaomi-santoni-audio.rules \
"$subpkgdir"/etc/udev/rules.d/90-device-xiaomi-santoni-audio.rules
}
sha512sums="
dc4bf7871307e659f220aebc3c9f7d74b861f46e1f3df1be37d724af984e46d91e553dbd36c2bd4482aa17dbe4d76d28dabe214952638f00830907466b110146 90-device-xiaomi-santoni-audio.rules
3452fe367e7b199d610fb3d8e9113b35e04071afc7585080edb6fe584ecc29591d8f3ab53ed4583c1ccea5882aa51050d6e56a5db7ef88f6c9af648ba1ef88af HiFi
7c702cf159699cea761ce7cb1ca21b79c59ceb3cdf1e410b537c4aa3a5aaa3be171b4c5555a713ac7a0e0f6dc389680cd5368a7783d14025fdc14d5f27fb922b msm8920-sku7-snd-card.conf
c115cb9ff7664369e0b857502534f7f249f97f00cab5b124b5080d3878e5a338529f14e85f19eb5fb6c35de43b6d0fdfba172729ed45f05c04b8abe53d1c4a33 deviceinfo
3db3ec596e159be926ea2b5b2496c18e9bc7be24a64a232a56c89a0c9ee710aa2efb2b6fa9fc08efa34759e8242e6c629d08a4ce688ec8aa125830717c191515 directfbrc
b634d13cac1f10535a31c142c7391986ab402ae9910d8093989920f4c2dbd63722ee8595f11962bffd9d314e2835a1ead955a91355856f044911ddcf1e428427 fb.modes
"
#!/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
# Reference: <https://postmarketos.org/deviceinfo>
# Please use double quotes only. You can source this file in shell scripts.
deviceinfo_format_version="0"
deviceinfo_name="Xiaomi Redmi 4X"
deviceinfo_manufacturer="Xiaomi"
deviceinfo_codename="xiaomi-santoni"
deviceinfo_year="2017"
deviceinfo_arch="aarch64"
# Device related
deviceinfo_chassis="handset"
deviceinfo_keyboard="false"
deviceinfo_external_storage="true"
deviceinfo_screen_width="720"
deviceinfo_screen_height="1280"
deviceinfo_dev_touchscreen="/dev/input/event1"
deviceinfo_swap_size_recommended="1024"
# Xiaomi Communications Co., Ltd.
deviceinfo_usb_idVendor="0x2717"
# Mi/Redmi series (RNDIS)
deviceinfo_usb_idProduct="0xFF80"
# Bootloader related
deviceinfo_flash_method="fastboot"
deviceinfo_kernel_cmdline="androidboot.hardware=qcom msm_rtb.filter=0x237 ehci-hcd.park=3 lpm_levels.sleep_disabled=1 androidboot.bootdevice=7824900.sdhci earlycon=msm_hsl_uart,0x78B0000 androidboot.selinux=permissive buildvariant=userdebug"
deviceinfo_generate_bootimg="true"
deviceinfo_bootimg_qcdt="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"
pixelformat=ARGB
mode "720x1280-60"
# D: 80.457 MHz, H: 78.725 kHz, V: 60.004 Hz
geometry 720 1280 720 1280 16
timings 12429 180 114 21 7 8 4
accel false
rgba 8/0,8/8,8/16,8/24
endmode
# This udev rule is a workaround, udev doesn't care about the headphone jack input events :(
# We need a better workaround, perhaps a daemon for jack detection?
# Init
ATTRS{id}=="msm8920sku7sndc", RUN+="/usr/bin/alsaucm -c msm8920-sku7-snd-card set _verb HiFi set _enadev Speaker"
# Jack detection
SUBSYSTEM=="switch",ATTRS{state}=="[1-4]",RUN+="/usr/bin/alsaucm -c msm8920-sku7-snd-card set _verb HiFi set _enadev Headphones"
SUBSYSTEM=="switch",ATTRS{state}=="0",RUN+="/usr/bin/alsaucm -c msm8920-sku7-snd-card set _verb HiFi set _enadev Speaker"
SectionVerb {
EnableSequence [
cdev "hw:msm8920sku7sndc"
cset "name='PRI_MI2S_RX Audio Mixer MultiMedia1' 1"
cset "name='MultiMedia1 Mixer TERT_MI2S_TX' 1"
]
DisableSequence [
cdev "hw:msm8920sku7sndc"
cset "name='PRI_MI2S_RX Audio Mixer MultiMedia1' 0"
cset "name='MultiMedia1 Mixer TERT_MI2S_TX' 0"
]
Value {
TQ "HiFi"
PlaybackPCM "hw:msm8920sku7sndc,0"
CapturePCM "hw:msm8920sku7sndc,0"
}
}
SectionDevice."Speaker" {
Comment "Internal speaker"
EnableSequence [
cdev "hw:msm8920sku7sndc"
cset "name='MI2S_RX Channels' One"
cset "name='RX2 MIX1 INP1' RX2"
cset "name='RDAC2 MUX' RX2"
cset "name='HPHR' Switch"
cset "name='Lineout_1 amp' ENABLE"
cset "name='PRI_MI2S_RX Audio Mixer MultiMedia1' 1"
]
DisableSequence [
cdev "hw:msm8920sku7sndc"
cset "name='MI2S_RX Channels' One"
cset "name='RX2 MIX1 INP1' ZERO"
cset "name='RDAC2 MUX' ZERO"
cset "name='HPHR' ZERO"
cset "name='Lineout_1 amp' DISABLE"
cset "name='PRI_MI2S_RX Audio Mixer MultiMedia1' 0"
]
Value {
PlaybackChannels "2"
PlaybackPriority 300
}
}
SectionDevice."Headphones" {
Comment "Headset"
EnableSequence [
cdev "hw:msm8920sku7sndc"
cset "name='MI2S_RX Channels' Two"
cset "name='RX1 MIX1 INP1' RX1"
cset "name='RX2 MIX1 INP1' RX2"
cset "name='RDAC2 MUX' RX2"
cset "name='HPHL' Switch"
cset "name='HPHR' Switch"
cset "name='headset amp' ENABLE"
cset "name='PRI_MI2S_RX Audio Mixer MultiMedia1' 1"
]
DisableSequence [
cdev "hw:msm8920sku7sndc"
cset "name='MI2S_RX Channels' One"
cset "name='RX1 MIX1 INP1' ZERO"
cset "name='RX2 MIX1 INP1' ZERO"
cset "name='RDAC2 MUX' ZERO"
cset "name='HPHL' ZERO"
cset "name='HPHR' ZERO"
cset "name='headset amp' DISABLE"
cset "name='PRI_MI2S_RX Audio Mixer MultiMedia1' 0"
]
Value {
PlaybackChannels "2"
PlaybackPriority 100
}
}
SectionDevice."Handset" {
Comment "Earpiece speaker"
EnableSequence [
cdev "hw:msm8920sku7sndc"
cset "name='RX1 MIX1 INP1' RX1"
cset "name='RDAC2 MUX' RX1"
cset "name='RX1 Digital Volume' 86"
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:msm8920sku7sndc"
cset "name='RX1 MIX1 INP1' ZERO"
cset "name='RDAC2 MUX' ZERO"
cset "name='RX1 Digital Volume' 86"
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 200
}
}
SectionDevice."HandsetMic" {
Comment "Internal Microphone"
ConflictingDevice [
"HeadsetMic"
]
EnableSequence [
cdev "hw:msm8920sku7sndc"
cset "name='ADC1 Volume' 6"
cset "name='DEC1 MUX' ADC1"
cset "name='IIR1 INP1 MUX' DEC1"
cset "name='MultiMedia1 Mixer TERT_MI2S_TX' 1"
]
DisableSequence [
cdev "hw:msm8920sku7sndc"
cset "name='ADC1 Volume' 4"
cset "name='DEC1 MUX' ZERO"
cset "name='MultiMedia1 Mixer TERT_MI2S_TX' 0"
]
Value {
CapturePriority 500
CaptureChannels "2"
}
}
SectionDevice."HeadsetMic" {
Comment "Headset Microphone"
ConflictingDevice [
"HandsetMic"
]
EnableSequence [
cdev "hw:msm8920sku7sndc"
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:msm8920sku7sndc"
cset "name='ADC2 Volume' 4"
cset "name='DEC1 MUX' ZERO"
cset "name='ADC2 MUX' ZERO"
cset "name='MultiMedia1 Mixer TERT_MI2S_TX' 0"
]
Value {
CapturePriority 100
CaptureChannels "2"
}
}
Syntax 2
SectionUseCase."HiFi" {
File "HiFi"
}
SectionDefaults [
cdev "hw:msm8920sku7sndc"
cset "name='TTY Mode' Off"
cset "name='RX1 Digital Volume' 86"
cset "name='RX2 Digital Volume' 84"
cset "name='RX3 Digital Volume' 84"
cset "name='IIR1 INP1 Volume' 84"
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='Lineout_1 amp' DISABLE"
cset "name='headset amp' DISABLE"
cset "name='SPK' ZERO"
cset "name='WSA Spk Switch' ZERO"
cset "name='EAR PA Gain' POS_6_DB"
cset "name='EAR PA Boost' ENABLE"
cset "name='EAR PA Gain' POS_1P5_DB"
cset "name='EAR PA Boost' ENABLE"
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='DEC3 MUX' ZERO"
cset "name='DEC4 MUX' ZERO"
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 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='PRI_MI2S_RX_Voice Mixer CSVoice' 0"
cset "name='Voice_Tx Mixer TERT_MI2S_TX_Voice' 0"
cset "name='Internal BTSCO SampleRate' BTSCO_RATE_8KHZ"
cset "name='INTERNAL_BT_SCO_RX_Voice Mixer CSVoice' 0"
cset "name='Voice_Tx Mixer INTERNAL_BT_SCO_TX_Voice' 0"
cset "name='MultiMedia6 Mixer TERT_MI2S_TX' 0"
cset "name='PRI_MI2S_RX_Voice Mixer Voice2' 0"
cset "name='Voice2_Tx Mixer TERT_MI2S_TX_Voice2' 0"
cset "name='INTERNAL_BT_SCO_RX_Voice Mixer Voice2' 0"
cset "name='Voice2_Tx Mixer INTERNAL_BT_SCO_TX_Voice2' 0"
cset "name='AFE_PCM_RX_Voice Mixer Voice2' 0"
cset "name='Voice2_Tx Mixer AFE_PCM_TX_Voice2' 0"
cset "name='PRI_MI2S_RX_Voice Mixer VoLTE' 0"
cset "name='VoLTE_Tx Mixer TERT_MI2S_TX_VoLTE' 0"
cset "name='HDMI_RX_Voice Mixer VoLTE' 0"
cset "name='VoLTE_Tx Mixer SLIM_0_TX_VoLTE' 0"
cset "name='INTERNAL_BT_SCO_RX_Voice Mixer VoLTE' 0"
cset "name='VoLTE_Tx Mixer INTERNAL_BT_SCO_TX_VoLTE' 0"
cset "name='AFE_PCM_RX_Voice Mixer VoLTE' 0"
cset "name='VoLTE_Tx Mixer AFE_PCM_TX_VoLTE' 0"
cset "name='PRI_MI2S_RX_Voice Mixer VoWLAN' 0"
cset "name='VoWLAN_Tx Mixer TERT_MI2S_TX_VoWLAN' 0"
cset "name='HDMI_RX_Voice Mixer VoWLAN' 0"
cset "name='INTERNAL_BT_SCO_RX_Voice Mixer VoWLAN' 0"
cset "name='VoWLAN_Tx Mixer INTERNAL_BT_SCO_TX_VoWLAN' 0"
cset "name='AFE_PCM_RX_Voice Mixer VoWLAN' 0"
cset "name='VoWLAN_Tx Mixer AFE_PCM_TX_VoWLAN' 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='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='Internal FM RX Volume' 0"
cset "name='PRI_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='MultiMedia5 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"
]
# Maintainer: Barnabas Czeman <trabarni@gmail.com>
pkgname=firmware-xiaomi-riva
pkgver=0.1
pkgrel=0
_commit="55441372abe4072f0f174a9614dcbe4b0d4bfcab"
pkgdesc="Firmware files for Xiaomi Redmi 5A"
url="https://postmarketos.org"
arch="aarch64"
license="proprietary"
options="!strip !check !archcheck !spdx pmb:cross-native !tracedeps"
_files="wcnss.b00 wcnss.b01 wcnss.b02 wcnss.b04 wcnss.b06
wcnss.b09 wcnss.b10 wcnss.b11 wcnss.b12 wcnss.mdt"
_files_prima="WCNSS_qcom_cfg.ini WCNSS_qcom_wlan_nv.bin WCNSS_wlan_dictionary.dat"
source="$pkgname-$_commit.tar.gz::https://gitlab.com/ALTracer/vendor_xiaomi_rolex/-/archive/$_commit/vendor_xiaomi_rolex-$_commit.tar.gz"
builddir="$srcdir/vendor_xiaomi_rolex-$_commit"
package() {
# /lib/firmware/postmarketos
for _i in $_files; do
install -D -m644 "$_i" \
"$pkgdir"/lib/firmware/postmarketos/"$_i"
done
# /lib/firmware/postmarketos/wlan/prima
for _i in $_files_prima; do
install -D -m644 wlan/prima/"$_i" \
"$pkgdir"/lib/firmware/postmarketos/wlan/prima/"$_i"
done
}
sha512sums="
91493ed18d462b1aa72df72f06d975a68ef2133b2f6f33971452a77477e5045b8dc9d3842779449407681e49362cdc1a700dcaf3b246f5e5b48450a6edc3cbde firmware-xiaomi-riva-55441372abe4072f0f174a9614dcbe4b0d4bfcab.tar.gz
"
pkgname=firmware-xiaomi-santoni
pkgver=1
pkgrel=4
_commit="926d2ffbcb572ede8ad5942acea69175908afbb7"
pkgdesc="Firmware files for Xiaomi Redmi 4X"
url="https://postmarketos.org"
arch="aarch64"
license="proprietary"
options="!strip !check !archcheck !spdx !tracedeps pmb:cross-native"
# Source
_files="wcnss.b00 wcnss.b01 wcnss.b02 wcnss.b04 wcnss.b06
wcnss.b09 wcnss.b10 wcnss.b11 wcnss.b12 wcnss.mdt
adsp.b00 adsp.b01 adsp.b02 adsp.b03 adsp.b04 adsp.b05
adsp.b06 adsp.b07 adsp.b08 adsp.b09 adsp.b10 adsp.b11
adsp.b12 adsp.b13 adsp.b14 adsp.mdt"
_files_prima="WCNSS_wlan_dictionary.dat WCNSS_qcom_cfg.ini WCNSS_qcom_wlan_nv.bin"
source="$pkgname-$_commit.tar.gz::https://github.com/Danct12/vendor_xiaomi_santoni/archive/$_commit.tar.gz"
builddir="$srcdir/vendor_xiaomi_santoni-$_commit"
package() {
# /lib/firmware/postmarketos
for _i in $_files; do
install -D -m644 "$_i" \
"$pkgdir"/lib/firmware/postmarketos/"$_i"
done
# /lib/firmware/postmarketos/wlan/prima
for _i in $_files_prima; do
install -D -m644 wlan/prima/"$_i" \
"$pkgdir"/lib/firmware/postmarketos/wlan/prima/"$_i"
done
}
sha512sums="389f5915fd9004f0256a8d29702da125c04f483805d0caf432db2d228f19660c00c01458d5df5faf5b83fd2766fbae10c28db5d0a82323d3ee64e367dfcef396 firmware-xiaomi-santoni-926d2ffbcb572ede8ad5942acea69175908afbb7.tar.gz"
diff --git a/drivers/video/fbdev/msm/mdss_fb.c b/drivers/video/fbdev/msm/mdss_fb.c
index 66c3661f7ed9..b72c82c0104a 100644
--- a/drivers/video/fbdev/msm/mdss_fb.c
+++ b/drivers/video/fbdev/msm/mdss_fb.c
@@ -1311,7 +1311,7 @@ static int mdss_fb_probe(struct platform_device *pdev)
mfd->bl_scale = 1024;
mfd->bl_min_lvl = 30;
mfd->ad_bl_level = 0;
- mfd->fb_imgType = MDP_RGBA_8888;
+ mfd->fb_imgType = MDP_BGRA_8888;
mfd->calib_mode_bl = 0;
mfd->unset_bl_level = U32_MAX;
mfd->bl_extn_level = -1;
@@ -2729,7 +2729,25 @@ static int mdss_fb_register(struct msm_fb_data_type *mfd)
var->transp.length = 8;
bpp = 4;
break;
-
+ case MDP_BGRA_8888:
+ fix->type = FB_TYPE_PACKED_PIXELS;
+ fix->xpanstep = 1;
+ fix->ypanstep = 1;
+ var->vmode = FB_VMODE_NONINTERLACED;
+ var->blue.offset = 0;
+ var->green.offset = 8;
+ var->red.offset = 16;
+ var->blue.length = 8;
+ var->green.length = 8;
+ var->red.length = 8;
+ var->blue.msb_right = 0;
+ var->green.msb_right = 0;
+ var->red.msb_right = 0;
+ var->transp.offset = 24;
+ var->transp.length = 8;
+ bpp = 4;
+ break;
+
case MDP_YCRYCB_H2V1:
fix->type = FB_TYPE_INTERLEAVED_PLANES;
fix->xpanstep = 2;
# Maintainer: Barnabas Czeman <trabarni@gmail.com>
# Reference: <https://postmarketos.org/vendorkernel>
# Kernel config based on: arch/arm64/configs/riva_defconfig
pkgname=linux-xiaomi-riva
pkgver=4.9.337
pkgrel=0
pkgdesc="Xiaomi Redmi 5A kernel fork"
arch="aarch64"
_carch="arm64"
_flavor="xiaomi-riva"
url="https://kernel.org"
license="GPL-2.0-only"
options="!strip !check !tracedeps pmb:cross-native"
makedepends="bash bc bison devicepkg-dev flex openssl-dev perl"
# Source
_repository="android_kernel_xiaomi_msm8937"
_commit="1c2aef5588be23134801cfa304b1b30168367811"
_config="config-$_flavor.$arch"
source="
$pkgname-$_commit.tar.gz::https://github.com/LineageOS/$_repository/archive/$_commit.tar.gz
$_config
fix-xorg-mdss-update-fb-info.patch
99_framebuffer.patch
"
builddir="$srcdir/$_repository-$_commit"
_outdir="out"
prepare() {
default_prepare
. 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"
}
sha512sums="
723376e9ce54f1d7745e45658690ea503d716792638716275e0d47bb8bfdf83ce635555c28b1be80a660e1e391f0124ad264aa135ed9b4e08a2d63cb5f9beb78 linux-xiaomi-riva-1c2aef5588be23134801cfa304b1b30168367811.tar.gz
e271cddb8401e8aa1f0d729d83064ad0c6ca3cd46e9105a7b281aedfb39eab867aa72c69c7322b716b897d27b6598ea19b7e2d2fedf1f3a8f7e00a29107e8148 config-xiaomi-riva.aarch64
e11a1ca524a05a5fe8b845937dbc57ee38c52e0a1a979d8e7be0ac53df22f84dfb424205ee7f541acfca3daba3e9f5d49bb4b9e9bb482eb354de14eb28bd0094 fix-xorg-mdss-update-fb-info.patch
741a46c6679172639568df96614b12a543563895ddee79051d88d28742b26d9c725f1d03dc208152c46e87b8b58240a3e206877da9a6a72035095e0f43458a72 99_framebuffer.patch
"
This diff is collapsed.
diff --git a/drivers/video/fbdev/msm/mdss_fb.c b/drivers/video/fbdev/msm/mdss_fb.c
index 66c3661f7ed9..e4f98d88c7d9 100644
--- a/drivers/video/fbdev/msm/mdss_fb.c
+++ b/drivers/video/fbdev/msm/mdss_fb.c
@@ -1881,7 +1881,7 @@ static void mdss_panel_validate_debugfs_info(struct msm_fb_data_type *mfd)
if (is_panel_split(mfd) && pdata->next)
mdss_fb_validate_split(pdata->panel_info.xres,
pdata->next->panel_info.xres, mfd);
- mdss_panelinfo_to_fb_var(panel_info, var);
+ mdss_panelinfo_to_fb_var(mfd);
if (mdss_fb_send_panel_event(mfd, MDSS_EVENT_CHECK_PARAMS,
panel_info))
pr_err("Failed to send panel event CHECK_PARAMS\n");
@@ -2017,7 +2017,7 @@ static int mdss_fb_blank_unblank(struct msm_fb_data_type *mfd)
* programmed in the controller.
* Update this info in the upstream structs.
*/
- mdss_panelinfo_to_fb_var(panel_info, var);
+ mdss_panelinfo_to_fb_var(mfd);
/* Start the work thread to signal idle time */
if (mfd->idle_time)
@@ -2757,7 +2757,7 @@ static int mdss_fb_register(struct msm_fb_data_type *mfd)
return ret;
}
- mdss_panelinfo_to_fb_var(panel_info, var);
+ mdss_panelinfo_to_fb_var(mfd);
fix->type = panel_info->is_3d_panel;
if (mfd->mdp.fb_stride)
@@ -3461,7 +3461,7 @@ static void mdss_fb_update_resolution(struct msm_fb_data_type *mfd,
}
var->xres_virtual = var->xres;
var->yres_virtual = pinfo->yres * mfd->fb_page;
- mdss_panelinfo_to_fb_var(pinfo, var);
+ mdss_panelinfo_to_fb_var(mfd);
}
int mdss_fb_atomic_commit(struct fb_info *info,
@@ -3695,9 +3695,15 @@ static void mdss_fb_var_to_panelinfo(struct fb_var_screeninfo *var,
pinfo->mipi.dsi_pclk_rate = pinfo->clk_rate;
}
-void mdss_panelinfo_to_fb_var(struct mdss_panel_info *pinfo,
- struct fb_var_screeninfo *var)
+void mdss_panelinfo_to_fb_var(struct msm_fb_data_type *mfd)
{
+ if (!mfd)
+ return -EINVAL;
+
+ struct mdss_panel_info *pinfo = mfd->panel_info;
+ struct fb_info *fbi = mfd->fbi;
+ struct fb_var_screeninfo *var = &fbi->var;
+
u32 frame_rate;
var->xres = mdss_fb_get_panel_xres(pinfo);
@@ -3732,10 +3738,17 @@ void mdss_panelinfo_to_fb_var(struct mdss_panel_info *pinfo,
if (pinfo->physical_height)
var->height = pinfo->physical_height;
- pr_debug("ScreenInfo: res=%dx%d [%d, %d] [%d, %d]\n",
- var->xres, var->yres, var->left_margin,
- var->right_margin, var->upper_margin,
- var->lower_margin);
+ //Hack to update current fbi->mode according to fbi->var when var is updated from panel info
+ if (fbi->mode) {
+ printk("Updating mdss fb mode from fb var\n");
+ fb_var_to_videomode(fbi->mode, var);
+ }
+
+ printk("ScreenInfo: res=%dx%d [%d, %d] [%d, %d]\n",
+ var->xres, var->yres, var->left_margin,
+ var->right_margin, var->upper_margin,
+ var->lower_margin);
+
}
/**
diff --git a/drivers/video/fbdev/msm/mdss_fb.h b/drivers/video/fbdev/msm/mdss_fb.h
index 4b39f9edef0c..4a0d13f2f079 100644
--- a/drivers/video/fbdev/msm/mdss_fb.h
+++ b/drivers/video/fbdev/msm/mdss_fb.h
@@ -476,8 +476,7 @@ int mdss_fb_async_position_update(struct fb_info *info,
u32 mdss_fb_get_mode_switch(struct msm_fb_data_type *mfd);
void mdss_fb_report_panel_dead(struct msm_fb_data_type *mfd);
-void mdss_panelinfo_to_fb_var(struct mdss_panel_info *pinfo,
- struct fb_var_screeninfo *var);
+void mdss_panelinfo_to_fb_var(struct msm_fb_data_type *mfd);
void mdss_fb_calc_fps(struct msm_fb_data_type *mfd);
void mdss_fb_idle_pc(struct msm_fb_data_type *mfd);
#endif /* MDSS_FB_H */
diff --git a/drivers/video/fbdev/msm/mdss_mdp_overlay.c b/drivers/video/fbdev/msm/mdss_mdp_overlay.c
index b70db4faac09..951c7c7497d5 100644
--- a/drivers/video/fbdev/msm/mdss_mdp_overlay.c
+++ b/drivers/video/fbdev/msm/mdss_mdp_overlay.c
@@ -3846,7 +3846,7 @@ int mdss_mdp_dfps_update_params(struct msm_fb_data_type *mfd,
* data, so any further call to get the screen
* info has the updated timings.
*/
- mdss_panelinfo_to_fb_var(&pdata->panel_info, var);
+ mdss_panelinfo_to_fb_var(mfd);
MDSS_XLOG(dfps);
mutex_unlock(&mdp5_data->dfps_lock);
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment