asus-tf201: new device (ASUS Transformer Prime) (MR 1883)

[ci:skip-build]: already built successfully in CI
This commit is contained in:
Svyatoslav 2020-12-17 00:32:35 +01:00 committed by Oliver Smith
parent 21f535583a
commit 16e5be302a
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB
8 changed files with 299 additions and 0 deletions

View file

@ -0,0 +1,59 @@
# Maintainer: Svyatoslav Ryhel <clamor95@gmail.com>
# Co-Maintainer: Ion Agorria
pkgname=device-asus-tf201
pkgdesc="Asus Transformer Prime TF201"
pkgver=1
pkgrel=0
url="https://postmarketos.org"
license="MIT"
arch="armv7"
options="!check !archcheck"
depends="postmarketos-base linux-postmarketos-grate mkbootimg mesa-dri-gallium mkbootimg alsa-ucm-conf asus-transformer-blobtools"
makedepends="devicepkg-dev"
subpackages="$pkgname-phosh
$pkgname-nonfree-firmware:nonfree_firmware"
source="deviceinfo
rootston.ini
ucm/tegra-hda.conf
ucm/tegra-hda-HiFi.conf
ucm/TF201_RT5631.conf
ucm/TF201_RT5631-HiFi.conf"
build() {
devicepkg_build $startdir $pkgname
}
package() {
devicepkg_package $startdir $pkgname
# Alsa usecase manager config
install -D -m644 "$srcdir"/TF201_RT5631.conf \
"$pkgdir"/usr/share/alsa/ucm2/TF201_RT5631/TF201_RT5631.conf
install -D -m644 "$srcdir"/TF201_RT5631-HiFi.conf \
"$pkgdir"/usr/share/alsa/ucm2/TF201_RT5631/HiFi.conf
install -D -m644 "$srcdir"/tegra-hda.conf \
"$pkgdir"/usr/share/alsa/ucm2/tegra-hda/tegra-hda.conf
install -D -m644 "$srcdir"/tegra-hda-HiFi.conf \
"$pkgdir"/usr/share/alsa/ucm2/tegra-hda/HiFi.conf
}
phosh() {
install_if="$pkgname postmarketos-ui-phosh"
install -Dm644 "$srcdir"/rootston.ini \
"$subpkgdir"/etc/phosh/rootston.ini
}
nonfree_firmware() {
pkgdesc="Asus Transformer Prime TF201 WiFi & BT firmware"
depends="firmware-asus-tf201 linux-firmware-brcm"
mkdir "$subpkgdir"
}
sha512sums="344e1a878b654c9f50438ad44e68b5cb2c86c01815a29a4eb6c1c791cfd37ff0ea681f5755bdcb2b9035d6608b4ddc87d44c0e3838eb0bdf8e8c8f79e16e84db deviceinfo
6ec993e278d2a73c72fb96f001716ded63543d99183847d22d172cd81ac410791c79370ecf391d0c24822c975d91b84dc1db296e1b28dbf66d5c227bff8d4011 rootston.ini
5dead806f7568fad5f240957158864faab7a4dbbdae18b2a18110f64caa0254a001fbd5711789718cfde055528af57cebca11bbc4d7f55e12c9853f3d9e8534c tegra-hda.conf
1cdaa43350d69a021d2ff0b8b91ab537032b6861003bea506e429948c615934f6ee56cc4603dd94d4923c8be4a52a63cac110761b51167761c096b6880ce6c0c tegra-hda-HiFi.conf
5a692d53097c5791bfa6adf149947ec95e9a8392dc14581a62b20ce086ff40afc1a5988dcaa5083df44cfaea51902a9ec09ee9d623df2e595bf1ef1fb1c1f1e8 TF201_RT5631.conf
9dc4bd7f3b5f24323655ef997d80d310bea00fabfd9bb5f1fbe06682b336ed5ad6ead0b81f84ba83eda0a0202ca279e78b792e6c1bc044315ecbe92fb382d51e TF201_RT5631-HiFi.conf"

View file

@ -0,0 +1,31 @@
# Reference: <https://postmarketos.org/deviceinfo>
# Please use double quotes only. You can source this file in shell scripts.
deviceinfo_format_version="0"
deviceinfo_name="Asus Transformer Prime TF201"
deviceinfo_manufacturer="Asus"
deviceinfo_codename="asus-tf201"
deviceinfo_year="2011"
deviceinfo_dtb="tegra30-asus-tf201"
deviceinfo_append_dtb="true"
deviceinfo_arch="armv7"
# Device related
deviceinfo_chassis="tablet"
deviceinfo_keyboard="true"
deviceinfo_external_storage="true"
deviceinfo_screen_width="1280"
deviceinfo_screen_height="800"
# Bootloader related
deviceinfo_flash_method="fastboot"
deviceinfo_generate_bootimg="true"
deviceinfo_bootimg_qcdt="false"
deviceinfo_bootimg_blobpack="sign"
deviceinfo_flash_offset_base="0x10000000"
deviceinfo_flash_offset_kernel="0x00008000"
deviceinfo_flash_offset_ramdisk="0x01000000"
deviceinfo_flash_offset_second="0x00f00000"
deviceinfo_flash_offset_tags="0x00000100"
deviceinfo_flash_pagesize="2048"
deviceinfo_flash_fastboot_max_size="760"

View file

@ -0,0 +1,8 @@
#[core]
#xwayland=false
[cursor:seat0]
map-to-output:LVDS-1
[output:LVDS-1]
scale = 1

View file

@ -0,0 +1,131 @@
# Use case Configuration for ASUS Transformer Prime TF201
SectionVerb {
EnableSequence [
cset "name='OUTVOL Channel Switch' on"
cset "name='AXO2 Playback Switch' on"
cset "name='AXO2MIX Mixer OUTVOLL Playback Switch' on"
cset "name='PCM Playback Switch' on"
cset "name='PCM Playback Volume' 255"
# Speakers
cset "name='Speaker Playback Switch' off"
cset "name='Speaker Playback Volume' 10"
cset "name='Int Spk Switch' on"
cset "name='SPK Ratio Control' 1.99x"
cset "name='SPKMIXL Mixer DACL Playback Switch' on"
cset "name='Left SPKVOL Mux' SPKMIXL"
cset "name='SPOLMIX Mixer SPKVOLL Playback Switch' on"
cset "name='SPOL Mux' SPOLMIX"
cset "name='SPKMIXR Mixer DACR Playback Switch' on"
cset "name='Right SPKVOL Mux' SPKMIXR"
cset "name='SPORMIX Mixer SPKVOLR Playback Switch' on"
cset "name='SPOR Mux' SPORMIX"
# Headphones
cset "name='HP Playback Switch' off"
cset "name='HP Playback Volume' 20"
cset "name='OUTMIXL Mixer DACL Playback Switch' on"
cset "name='Left HPVOL Mux' OUTMIXL"
cset "name='Left OUTVOL Mux' OUTMIXL"
cset "name='HPL Mux' Left HPVOL"
cset "name='OUTMIXR Mixer DACR Playback Switch' on"
cset "name='Right HPVOL Mux' OUTMIXR"
cset "name='Right OUTVOL Mux' OUTMIXR"
cset "name='HPR Mux' Right HPVOL"
# Mics
cset "name='DMIC Switch' off"
cset "name='DMIC Capture Switch' off"
cset "name='Int Mic Switch' off"
cset "name='MIC1 Mode Control' Differential"
cset "name='MIC2 Mode Control' Single ended"
cset "name='MIC1 Boost Volume' 6"
cset "name='MIC2 Boost Volume' 6"
cset "name='RECMIXL Mixer MIC1_BST1 Capture Switch' on"
#cset "name='Mic Jack Switch' off"
cset "name='MONO Mux' MONOMIX"
cset "name='MONO Playback Switch' off"
cset "name='MONOIN Mode Control' Differential"
cset "name='MONOIN_RX Capture Volume' 25"
cset "name='AXI Capture Volume' 23"
]
}
SectionDevice."Speakers" {
Comment "Speakers"
EnableSequence [
cset "name='Speaker Playback Switch' on"
cset "name='Int Spk Switch' on"
]
DisableSequence [
cset "name='Int Spk Switch' off"
cset "name='Speaker Playback Switch' off"
]
Value {
PlaybackPCM "hw:${CardId}"
PlaybackChannels 2
PlaybackPriority 200
PlaybackVolume "Speaker Playback Volume"
PlaybackSwitch "Speaker Playback Switch"
}
}
SectionDevice."Headphones" {
Comment "Headphones"
EnableSequence [
cset "name='HP Playback Switch' on"
]
DisableSequence [
cset "name='HP Playback Switch' off"
]
Value {
PlaybackPCM "hw:${CardId}"
PlaybackChannels 2
PlaybackPriority 100
PlaybackVolume "HP Playback Volume"
PlaybackSwitch "HP Playback Switch"
JackControl "Headphone Jack"
}
}
SectionDevice."InternalMic" {
Comment "Internal Microphone"
ConflictingDevice [
]
EnableSequence [
cset "name='DMIC Capture Switch' on"
cset "name='DMIC Switch' on"
cset "name='Int Mic Switch' on"
]
DisableSequence [
cset "name='DMIC Capture Switch' off"
cset "name='DMIC Switch' off"
cset "name='Int Mic Switch' off"
]
Value {
CapturePCM "hw:${CardId}"
CaptureChannels 2
}
}

View file

@ -0,0 +1,8 @@
# Use case Configuration for ASUS Transformer Prime TF201
Syntax 2
SectionUseCase."HiFi" {
File "HiFi.conf"
Comment "Play HiFi quality Music"
}

View file

@ -0,0 +1,24 @@
If.hdmi {
Condition {
Type ControlExists
Control "iface=CARD,name='HDMI/DP,pcm=3 Jack'"
}
True {
SectionDevice."HDMI1" {
Comment "HDMI / DisplayPort Output"
EnableSequence [
cset "name='IEC958 Playback Switch' on"
]
DisableSequence [
cset "name='IEC958 Playback Switch' off"
]
Value {
PlaybackPCM "hw:${CardId},3"
JackControl "HDMI/DP,pcm=3 Jack"
}
}
}
}

View file

@ -0,0 +1,8 @@
# UCM for Nvidia Tegra30 HDMI Audio
Syntax 3
SectionUseCase."HiFi" {
File "HiFi.conf"
Comment "Play HiFi quality Music"
}

View file

@ -0,0 +1,30 @@
# Maintainer: Svyatoslav Ryhel <clamor95@gmail.com>
# Co-Maintainer: Ion Agorria
pkgname=firmware-asus-tf201
pkgver=1
pkgrel=0
pkgdesc="Firmware files for Transformer Prime (asus-tf201)"
url="https://github.com/clamor95/linux-firmware"
arch="armv7"
license="proprietary"
options="!check !strip !archcheck"
# source
_commit="91a0663493d9760bfd428f915093ba7635b0341f"
source="BCM4329B1_002.002.023.0797.0879.hcd::https://github.com/clamor95/linux-firmware/raw/$_commit/brcm/BCM4329B1_002.002.023.0797.0879.hcd
brcmfmac4329-sdio.asus,tf201.txt::https://github.com/clamor95/linux-firmware/raw/$_commit/brcm/brcmfmac4329-sdio.asus%2Ctf201.txt
"
package() {
# Bluetooth
install -D -m644 "$srcdir"/BCM4329B1_002.002.023.0797.0879.hcd \
"$pkgdir"/lib/firmware/postmarketos/brcm/BCM4329B1.hcd
# Wi-Fi
install -D -m644 "$srcdir"/brcmfmac4329-sdio.asus,tf201.txt \
"$pkgdir"/lib/firmware/postmarketos/brcm/brcmfmac4329-sdio.asus,tf201.txt
}
sha512sums="26534cbef298d7594ed6d8a58380ed3b1593a195aaa2c9e5108dce82dbaec4da922f49217342397d405131d827873dca1c78ab2e73c4bae0901b2c77ff56f9b2 BCM4329B1_002.002.023.0797.0879.hcd
655f2bda94ca1c9ff26fba4c2eb69121fed461325dfd14342262240d5833d063839311bd0b8e2efffbab9b19a0852c5ab57b267c97e8a0205f810a2259840159 brcmfmac4329-sdio.asus,tf201.txt"