Samsung Galaxy Tab E 7.0 (SM-T116) (samsung-goyave3g)

== Contributors ==
* JoseskVolpe
== Users owning this device ==
== How to enter flash mode ==
* Download mode: + + 
* Recovery mode: + + 
== Installation ==
$ pmbootstrap flasher flash_rootfs # to install system
$ pmbootstrap flasher flash_kernel # to install kernel
== Boot ==
Boot screen is broken after Spreadtrum video patches are applied, but system boots normally.
== Display ==
* Needs this and this patch for Xorg to work properly.
* After applying sprdfb-fix-swapped-colors.patch the boot screen breaks. Xorg works after system is booted. (plymouth)
* Using msm-fb-refresher
* Adjusting screen brightness works.
== Touchscreen ==
Touchscreen goes to opposite locations, see pmaports #1883.
== Wi-Fi and Bluetooth ==
Needs proprietary firmware (BCM43438).
Current status: Firmware loads, wlan0 shows up and networks are identified, but module crashes while attempting to connect to any network.
nmcli throws:
Error: Connection activation failed: The device could not be readied for configuration.
=== Findings ===
* The kernel doesn't requires modules, but requires 4 files to be extracted: bcmdhd_sta.bin, nvram_net.txt, nvram_mfg_DCXO.txt, nvram_net_DCXO.txt.
* Needs to change CONFIG_BCMDHD_FW_PATH and CONFIG_BCMDHD_NVRAM_PATH on config files to PostmarketOS' relative path.
* Kernel's files in arch/arm/boot/dts/ needs to be patched to use PostmarketOS' relative paths for nv_path and nv_mfg_path
* There are 2 proprietary binary files relative to BCM4343 in Android stock ROM at /system/vendor/firmware, but they don't seem to be needed: BCM43430A1_001.002.009.0013.0017_ORC_Goya_VE_37_4MHz.hcd and goyave3gREV02/BCM43430A1_001.002.009.0013.0015_ORC_Goya_VE.hcd
* Building driver as module and loading on boot gives this error: 
dhd_module_init in 
[ 11.043701] [c3] no wifi platform data, skip 
[ 11.043731] [c3] DHD wifi platform data is required for Android build 
== Camera ==
Needs proprietary firmware.
== Audio ==
* Needs soc-sprd-audio-sc8830
* Back speaker works
* Headphone works
* Frontal speaker not tested
* Microphone works (both handset and headset), but is really low.
* Sometimes audio won't work, specially after booting the device. Connecting headphone and disconnecting fixes that
=== PulseAudio ===
Edit default ALSA card and device in /usr/share/alsa/alsa.conf, then reboot
defaults.ctl.card sprdphone
defaults.pcm.card sprdphone
defaults.pcm.device sprdphone
Alternatively, you may also add these lines at /etc/asound.conf instead:
defaults.ctl.card 1
defaults.pcm.card 1
defaults.pcm.device 1
After that, PulseAudio successfully connects to Spreadtrum audio card. However, playing sounds freezes the audio buffer, playing a continuous buzz. Microphone doesn't works either.
To fix that, find the following line in /etc/pulse/default.pa and disable timer-based schedulling:
load-module module-udev-detect tsched=0
== 3D Acceleration ==
Needs proprietary Mali driver, or attempt to setup open-source Lima driver on this good old manufacturer kernel.
== Additional notes ==
* Contributor is currently unable to upstream due to issues about GitLab requesting sensitive information.
* Firewall doesn't works: Downstream kernel doesn't supports nftables
== See also ==
* TWRP Recovery (Versions>2.8.7 fail to boot)
* Kernel package
* Device package
* Kernel source-code
* deviceinfohw.ru page for SM-T116BU
* Similar device: Samsung Galaxy Tab 3 Lite (samsung-goyavewifi) (SM-T113)