diff --git a/device/testing/device-asus-tf300t/APKBUILD b/device/testing/device-asus-tf300t/APKBUILD new file mode 100644 index 000000000..c71eaa739 --- /dev/null +++ b/device/testing/device-asus-tf300t/APKBUILD @@ -0,0 +1,57 @@ +# Reference: +pkgname=device-asus-tf300t +pkgdesc="Asus Transformer Pad TF300T" +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 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/TF300T_WM8903.conf + ucm/TF300T_WM8903-HiFi.conf" + +build() { + devicepkg_build $startdir $pkgname +} + +package() { + devicepkg_package $startdir $pkgname + + # Alsa usecase manager config + install -D -m644 "$srcdir"/TF300T_WM8903.conf \ + "$pkgdir"/usr/share/alsa/ucm2/TF300T_WM8903/TF300T_WM8903.conf + install -D -m644 "$srcdir"/TF300T_WM8903-HiFi.conf \ + "$pkgdir"/usr/share/alsa/ucm2/TF300T_WM8903/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 Transformers WiFi & BT firmware" + depends="firmware-asus-transformer linux-firmware-brcm linux-firmware-cypress" + mkdir "$subpkgdir" +} + + +sha512sums="906ef41d8181223381ea5b9ce6868e85e092c6a9141fb2b7bb60f0efa956a945f3a9db44d52d77512b7471744decb9dbcc7ba957cf82e565f8bfb69dabff39ec deviceinfo +6ec993e278d2a73c72fb96f001716ded63543d99183847d22d172cd81ac410791c79370ecf391d0c24822c975d91b84dc1db296e1b28dbf66d5c227bff8d4011 rootston.ini +5dead806f7568fad5f240957158864faab7a4dbbdae18b2a18110f64caa0254a001fbd5711789718cfde055528af57cebca11bbc4d7f55e12c9853f3d9e8534c tegra-hda.conf +1cdaa43350d69a021d2ff0b8b91ab537032b6861003bea506e429948c615934f6ee56cc4603dd94d4923c8be4a52a63cac110761b51167761c096b6880ce6c0c tegra-hda-HiFi.conf +44914a6a10adc95c9bee99d7f8b36e58da6aa1c71ba0b4f360ff5a8480e8f25b978a64d234f797badd4cda43531b73346831d9d47b3488e613994698a5db21e9 TF300T_WM8903.conf +3202c7e16e8a48290333456379d4289b1491ff6c5ff4eb7bf50aa36946da6f5315b77db2a0598ed94a8f93e6b503eedfb84739c0d4c5fcb89bddb81d66b3f92d TF300T_WM8903-HiFi.conf" diff --git a/device/testing/device-asus-tf300t/deviceinfo b/device/testing/device-asus-tf300t/deviceinfo new file mode 100644 index 000000000..07b978735 --- /dev/null +++ b/device/testing/device-asus-tf300t/deviceinfo @@ -0,0 +1,31 @@ +# Reference: +# Please use double quotes only. You can source this file in shell scripts. + +deviceinfo_format_version="0" +deviceinfo_name="Asus Transformer Pad TF300T" +deviceinfo_manufacturer="Asus" +deviceinfo_codename="asus-tf300t" +deviceinfo_year="2012" +deviceinfo_dtb="tegra30-asus-tf300t" +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" diff --git a/device/testing/device-asus-tf300t/rootston.ini b/device/testing/device-asus-tf300t/rootston.ini new file mode 100644 index 000000000..4371cade4 --- /dev/null +++ b/device/testing/device-asus-tf300t/rootston.ini @@ -0,0 +1,8 @@ +#[core] +#xwayland=false + +[cursor:seat0] +map-to-output:LVDS-1 + +[output:LVDS-1] +scale = 1 diff --git a/device/testing/device-asus-tf300t/ucm/TF300T_WM8903-HiFi.conf b/device/testing/device-asus-tf300t/ucm/TF300T_WM8903-HiFi.conf new file mode 100644 index 000000000..496f764ff --- /dev/null +++ b/device/testing/device-asus-tf300t/ucm/TF300T_WM8903-HiFi.conf @@ -0,0 +1,142 @@ +# Use case Configuration for ASUS Transformer Pad TF300T +# Written by Svyatoslav Ryhel + +SectionVerb { + EnableSequence [ + cset "name='HPF Switch' on" + cset "name='HPF Mode' Voice 1" + + cset "name='DRC Switch' on" + cset "name='Digital Capture Volume' 127" + + cset "name='Headphone Switch' off" + cset "name='Headphone ZC Switch' off" + cset "name='Headphone Volume' 45" + + cset "name='Line Out Switch' on" + cset "name='Line Out ZC Switch' off" + cset "name='Line Out Volume' 57" + + cset "name='Speaker Switch' off" + cset "name='Speaker ZC Switch' off" + cset "name='Speaker Volume' 60" + + cset "name='Int Spk Switch' on" + cset "name='Int Mic Switch' off" + + cset "name='ADC Input' DMIC" + + cset "name='Left Speaker Mixer DACL Switch' on" + cset "name='Right Speaker Mixer DACR Switch' on" + ] +} + +SectionDevice."Speakers" { + Comment "Speakers" + + ConflictingDevice [ + "Headphones" + ] + + EnableSequence [ + cset "name='Speaker Switch' on" + cset "name='Int Spk Switch' on" + ] + + DisableSequence [ + cset "name='Int Spk Switch' off" + cset "name='Speaker Switch' off" + ] + + Value { + PlaybackPCM "hw:${CardId}" + PlaybackChannels 2 + PlaybackPriority 200 + PlaybackVolume "Speaker Volume" + PlaybackSwitch "Speaker Switch" + } +} + +SectionDevice."Headphones" { + Comment "Headphones" + + ConflictingDevice [ + "Speakers" + ] + + EnableSequence [ + cset "name='Headphone Switch' on" + ] + + DisableSequence [ + cset "name='Headphone Switch' off" + ] + + Value { + PlaybackPCM "hw:${CardId}" + PlaybackChannels 2 + PlaybackPriority 100 + PlaybackVolume "Headphone Volume" + PlaybackSwitch "Headphone Switch" + + JackControl "Headphone Jack" + } +} + +SectionDevice."InternalMic" { + Comment "Internal Microphone" + + ConflictingDevice [ + "HeadsetMic" + ] + + EnableSequence [ + cset "name='ADC Input' DMIC" + cset "name='Digital Capture Volume' 127" + cset "name='Int Mic Switch' on" + cset "name='Left Input Mux' IN2L" + cset "name='Left Input Inverting Mux' IN1L" + cset "name='Left Input PGA Switch' off" + cset "name='Left Input PGA Common Mode Switch' on" + cset "name='Right Capture Mux' Right" + cset "name='Right Input PGA Switch' off" + ] + + DisableSequence [ + cset "name='Int Mic Switch' off" + ] + + Value { + CapturePCM "hw:${CardId}" + CaptureChannels 2 + } +} + +SectionDevice."HeadsetMic" { + Comment "Headset Microphone" + + ConflictingDevice [ + "InternalMic" + ] + + EnableSequence [ + cset "name='ADC Input' ADC" + cset "name='Digital Capture Volume' 116" + cset "name='Int Mic Switch' off" + cset "name='Left Input Mux' IN1L" + cset "name='Left Input Inverting Mux' IN2L" + cset "name='Left Input PGA Switch' on" + cset "name='Left Input PGA Common Mode Switch' off" + cset "name='Right Capture Mux' Left" + cset "name='Right Input PGA Switch' on" + ] + + DisableSequence [ + cset "name='Int Mic Switch' on" + ] + + Value { + CapturePCM "hw:${CardId}" + JackControl "Mic Jack" + } +} diff --git a/device/testing/device-asus-tf300t/ucm/TF300T_WM8903.conf b/device/testing/device-asus-tf300t/ucm/TF300T_WM8903.conf new file mode 100644 index 000000000..716bde311 --- /dev/null +++ b/device/testing/device-asus-tf300t/ucm/TF300T_WM8903.conf @@ -0,0 +1,8 @@ +# Use case Configuration for ASUS Transformer Pad TF300T + +Syntax 2 + +SectionUseCase."HiFi" { + File "HiFi.conf" + Comment "Play HiFi quality Music" +} diff --git a/device/testing/device-asus-tf300t/ucm/tegra-hda-HiFi.conf b/device/testing/device-asus-tf300t/ucm/tegra-hda-HiFi.conf new file mode 100644 index 000000000..0e74a7f08 --- /dev/null +++ b/device/testing/device-asus-tf300t/ucm/tegra-hda-HiFi.conf @@ -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" + } + } + } +} diff --git a/device/testing/device-asus-tf300t/ucm/tegra-hda.conf b/device/testing/device-asus-tf300t/ucm/tegra-hda.conf new file mode 100644 index 000000000..83517fa0f --- /dev/null +++ b/device/testing/device-asus-tf300t/ucm/tegra-hda.conf @@ -0,0 +1,8 @@ +# UCM for Nvidia Tegra30 HDMI Audio + +Syntax 3 + +SectionUseCase."HiFi" { + File "HiFi.conf" + Comment "Play HiFi quality Music" +}