mirror of
https://github.com/libretro/Lakka-LibreELEC.git
synced 2026-11-07 09:05:59 -10:00
RPi-Composite: initial commit for 6.1 branch
original PR: #2037 (for devel branch) this brings images suited to work OOB for RPi3/4/5 with CRT TV sets. it comes with preconfigured shaders, core options, readable font, ... see https://www.lakka.tv/articles/2024/05/02/rpi-composite/ - add new RPiX-Composite devices under RPi project - RPi3/4-Composite use own kernel config - RPi5-Composite uses kernel config of RPi5 - remove linux.arm.conf broken symlinks from some devices - move VULKAN enable to device options - add splash screens for 480/576 height - glibc: match kernel version for RPi3/4 (using 5.10.y with "fake" 240p patch) - adjust DEVICE conditions to only match first 4 characters / first 4 characters + wildcard (various places) - add specific assets, configs, shaders in retroarch package - retroarch: adjust default configuration - linux: add 5.10.y kernel (used by RPi3/4-Composite, see above) - linux: add patches for 5.10.y kernel - mkimage: add additional information into cmdline.txt and retroarch-overrides.txt - firstboot.sh: add output (logged in fs-resize.log) - firstboot.sh: prepend processed overrides with hash - firstboot.sh: copy core configurations to storage partition - firstboot.sh: rework wifi autoconfig script - retroarch: add full default config file and apply changes in the package file directly to the config for individual systems (solves some issues with core/game overrides when there is no value in the config and user creates overrides in first run of retroarch, then these overrides are also stored in default config) - e2fsprogs: guard fs-verity code for kernels without fs-verity support - retroarch: remove patch to save to default config file (superseded by existing RetroArch built-in functionality)
This commit is contained in:
1 parent
c36f6d671b
commit
cc3bf85d4e
69 files changed
+18270
-386
No files matched your search
+4
-1
@@ -95,11 +95,14 @@ targets="\
|
||||
RPi|RPi|arm|image \
|
||||
RPi|RPi2|arm|image \
|
||||
RPi|RPi3|aarch64|image \
|
||||
RPi|RPi3-Composite|aarch64|image \
|
||||
RPi|RPi4|aarch64|image \
|
||||
RPi|RPi4-Composite|aarch64|image \
|
||||
RPi|RPi4-GPiCase2|aarch64|image \
|
||||
RPi|RPi4-PiBoyDmg|aarch64|image \
|
||||
RPi|RPi4-RetroDreamer|aarch64|image \
|
||||
RPi|RPi4|aarch64|image \
|
||||
RPi|RPi5|aarch64|image \
|
||||
RPi|RPi5-Composite|aarch64|image \
|
||||
RPi|RPiZero-GPiCase|arm|image \
|
||||
RPi|RPiZero2-GPiCase|arm|image \
|
||||
RPi|RPiZero2-GPiCase2W|aarch64|image \
|
||||
|
||||
@@ -2,20 +2,22 @@
|
||||
|
||||
wifi_cfg=/flash/wifi-config.txt
|
||||
ra_overrides=/flash/retroarch-overrides.txt
|
||||
ra_temp_ov=/flash/retroarch-overrides.tmp
|
||||
ra_defaults=/etc/retroarch.cfg
|
||||
ra_core_def_path=/etc/retroarch/config
|
||||
config_path=/storage/.config
|
||||
auto_script=${config_path}/autostart.sh
|
||||
ra_cfg_path=${config_path}/retroarch
|
||||
ra_cfg_file=${ra_cfg_path}/retroarch.cfg
|
||||
ra_core_cfg_path=${ra_cfg_path}/config
|
||||
|
||||
echo "${0}: Started"
|
||||
|
||||
# prepare empty autostart.sh
|
||||
[ ! -d ${config_path} ] && mkdir ${config_path}
|
||||
touch ${auto_script}
|
||||
chmod +x ${auto_script}
|
||||
tee -a ${auto_script} << END
|
||||
#!/bin/sh
|
||||
|
||||
END
|
||||
echo "#!/bin/sh" >${auto_script}
|
||||
|
||||
# setup network
|
||||
SSID=""
|
||||
@@ -24,48 +26,70 @@ COUNTRY=""
|
||||
|
||||
[ -f ${wifi_cfg} ] && . ${wifi_cfg}
|
||||
|
||||
if [ -n "${SSID}" -a -n ${PSK} ]; then
|
||||
tee -a ${auto_script} << END
|
||||
(
|
||||
echo "enable wifi"
|
||||
echo "scan wifi"
|
||||
) | connmanctl
|
||||
if [ -n "${SSID}" -a -n "${PSK}" ]; then
|
||||
cat << EOF >>${auto_script}
|
||||
|
||||
wifilog=/storage/autostart-wifi-config.log
|
||||
[ -f \${wifilog} ] && rm \${wifilog}
|
||||
|
||||
connmanctl enable wifi 2>&1 >>\${wifilog}
|
||||
connmanctl scan wifi 2>&1 >>\${wifilog}
|
||||
connmanctl services 2>&1 >>\${wifilog}
|
||||
|
||||
sleep 5
|
||||
ID=\$(connmanctl services | grep -e "\s${SSID}\s" | awk '{print \$(NF)}')
|
||||
|
||||
(
|
||||
echo "agent on"
|
||||
echo "connect \$ID"
|
||||
sleep 5
|
||||
echo "${PSK}"
|
||||
) | connmanctl
|
||||
END
|
||||
echo "ID: \${ID}" >>\${wifilog}
|
||||
|
||||
if [ -n "\${ID}" ]; then
|
||||
(
|
||||
echo "agent on"
|
||||
echo "connect \${ID}"
|
||||
sleep 5
|
||||
echo "${PSK}"
|
||||
) | connmanctl 2>&1 >>\${wifilog}
|
||||
fi
|
||||
EOF
|
||||
echo "${0}: Added wifi setup to ${auto_script}"
|
||||
fi
|
||||
|
||||
if [ -n "${COUNTRY}" ]; then
|
||||
iw reg set ${COUNTRY}
|
||||
echo "${0}: Registering country ${COUNTRY} for wifi:"
|
||||
iw reg set ${COUNTRY} 2>&1
|
||||
fi
|
||||
|
||||
# apply RetroArch overrides to default configuration
|
||||
if [ -f ${ra_overrides} ]; then
|
||||
[ -f ${ra_temp_ov} ] && rm ${ra_temp_ov}
|
||||
[ ! -d ${ra_cfg_path} ] && mkdir ${ra_cfg_path}
|
||||
[ ! -f ${ra_cfg_file} ] && cp ${ra_defaults} ${ra_cfg_file}
|
||||
while IFS= read -r line ; do
|
||||
[ -z "${line}" ] && continue
|
||||
[ "${line:0:1}" = "#" ] && continue
|
||||
[ -z "${line}" ] && { echo "${line}" >> ${ra_temp_ov} ; continue ; }
|
||||
[ "${line:0:1}" = "#" ] && { echo "${line}" >> ${ra_temp_ov} ; continue ; }
|
||||
key=$(echo ${line} | awk '{ print $1; }')
|
||||
sed -i "/${key} =/d" ${ra_cfg_file}
|
||||
echo "${line}" >> ${ra_cfg_file}
|
||||
echo "#${line}" >> ${ra_temp_ov}
|
||||
echo "${0}: Processed '${line}' into ${ra_cfg_file}"
|
||||
done < ${ra_overrides}
|
||||
[ -f ${ra_temp_ov} ] && mv ${ra_temp_ov} ${ra_overrides}
|
||||
fi
|
||||
|
||||
# copy included core configuration
|
||||
if [ -d ${ra_core_def_path} ]; then
|
||||
[ ! -d ${ra_core_cfg_path} ] && mkdir -p ${ra_core_cfg_path}
|
||||
echo "${0}: Copying core configurations to ${ra_core_cfg_path}"
|
||||
cp -vr ${ra_core_def_path}/* ${ra_core_cfg_path}
|
||||
fi
|
||||
|
||||
# If you want to put anything else to be executed on the first boot
|
||||
# (and only on the first boot), put it here.
|
||||
# (and only on the first boot), put it below here.
|
||||
# v v v v v v v v v v v v v v v v v v v v
|
||||
|
||||
|
||||
|
||||
# ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^
|
||||
# Do not put anything below here. But you can above here.
|
||||
|
||||
# close autostart.sh - remove self after finished
|
||||
echo "rm ${auto_script}" >> ${auto_script}
|
||||
echo "${0}: Finished"
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 7.7 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 9.0 KiB |
@@ -43,6 +43,10 @@ if [ "${PROJECT}" = "L4T" ]; then
|
||||
PKG_CONFIGURE_OPTS_TARGET+=" --disable-mathvec"
|
||||
elif [ "${PROJECT}" = "Ayn" ]; then
|
||||
PKG_CONFIGURE_OPTS_TARGET="${PKG_CONFIGURE_OPTS_TARGET//--enable-kernel=6.6.0/--enable-kernel=5.19.0/}"
|
||||
elif [ "${PROJECT}" = "RPi" ]; then
|
||||
if [ "${DEVICE}" = "RPi3-Composite" -o "${DEVICE}" = "RPi4-Composite" ]; then
|
||||
PKG_CONFIGURE_OPTS_TARGET="${PKG_CONFIGURE_OPTS_TARGET//--enable-kernel=6.6.0/--enable-kernel=5.10.0/}"
|
||||
fi
|
||||
fi
|
||||
|
||||
if build_with_debug; then
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
PKG_NAME="beetle_saturn"
|
||||
PKG_VERSION="ccba5265f60f8e64a1984c9d14d383606193ea6a"
|
||||
PKG_ARCH="x86_64"
|
||||
if [ "${PROJECT}" = "RPi" ] && [ "${DEVICE}" = "RPi5" ]; then
|
||||
if [ "${PROJECT}" = "RPi" ] && [ "${DEVICE:0:4}" = "RPi5" ]; then
|
||||
PKG_ARCH+=" aarch64"
|
||||
fi
|
||||
PKG_LICENSE="GPLv2"
|
||||
|
||||
@@ -8,7 +8,7 @@ PKG_LONGDESC="DOSBox Pure is a fork of DOSBox, an emulator for DOS games, built
|
||||
PKG_TOOLCHAIN="make"
|
||||
|
||||
pre_make_target() {
|
||||
if [ "${DEVICE}" = "RPi5" ]; then
|
||||
if [ "${DEVICE:0:4}" = "RPi5" ]; then
|
||||
CFLAGS+=" -DPAGESIZE=16384"
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -17,7 +17,13 @@ fi
|
||||
|
||||
if [ "${OPENGLES_SUPPORT}" = "yes" ]; then
|
||||
PKG_DEPENDS_TARGET+=" ${OPENGLES}"
|
||||
PKG_CMAKE_OPTS_TARGET+=" -DUSE_GLES=ON -DUSE_GLES2=OFF"
|
||||
if [ "${DEVICE:0:4}" = "RPi3" -o "${DEVICE:0:4}" = "RPi4" -o "${DEVICE:0:4}" = "RPi5" -o "${DEVICE}" = "RK3288" -o "${DEVICE}" = "RK3399" ]; then
|
||||
# enable GLES3
|
||||
PKG_CMAKE_OPTS_TARGET+=" -DUSE_GLES=ON -DUSE_GLES2=OFF"
|
||||
else
|
||||
# enable GLES2
|
||||
PKG_CMAKE_OPTS_TARGET+=" -DUSE_GLES=OFF -DUSE_GLES2=ON"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "${VULKAN_SUPPORT}" = yes ]; then
|
||||
|
||||
@@ -42,7 +42,7 @@ pre_make_target() {
|
||||
RPi2)
|
||||
PKG_MAKE_OPTS_TARGET+=" platform=rpi2-mesa"
|
||||
;;
|
||||
RPi3)
|
||||
RPi3*)
|
||||
PKG_MAKE_OPTS_TARGET+=" platform=rpi3_64-mesa"
|
||||
;;
|
||||
RPiZero2-GPiCase)
|
||||
@@ -54,7 +54,7 @@ pre_make_target() {
|
||||
RPi4*)
|
||||
PKG_MAKE_OPTS_TARGET+=" platform=rpi4_64-mesa FORCE_GLES3=1"
|
||||
;;
|
||||
RPi5)
|
||||
RPi5*)
|
||||
PKG_MAKE_OPTS_TARGET+=" platform=rpi5_64-mesa FORCE_GLES3=1"
|
||||
;;
|
||||
Exynos)
|
||||
|
||||
@@ -22,7 +22,7 @@ if [ "${OPENGLES_SUPPORT}" = "yes" ]; then
|
||||
PKG_CMAKE_OPTS_TARGET+=" -DENABLE_OPENGLES3=ON"
|
||||
elif listcontains "${GRAPHIC_DRIVERS}" "lima" || listcontains "${MALI_FAMILY}" "(400|450|t720)"; then
|
||||
PKG_CMAKE_OPTS_TARGET+=" -DENABLE_OPENGLES2=ON"
|
||||
elif listcontains "${GRAPHIC_DRIVERS}" "vc4" && [ "${DEVICE:0:4}" = "RPi4" -o "${DEVICE}" = "RPi5" ]; then
|
||||
elif listcontains "${GRAPHIC_DRIVERS}" "vc4" && [ "${DEVICE:0:4}" = "RPi4" -o "${DEVICE:0:4}" = "RPi5" ]; then
|
||||
PKG_CMAKE_OPTS_TARGET+=" -DENABLE_OPENGLES3=ON"
|
||||
elif [ "${DISPLAYSERVER}" = "wl" ]; then
|
||||
PKG_CMAKE_OPTS_TARGET+=" -DENABLE_OPENGLES3=ON"
|
||||
|
||||
@@ -27,7 +27,7 @@ if [ "${ARCH}" = "aarch64" ]; then
|
||||
PKG_MAKE_OPTS_TARGET+=" platform=arm64_cortex_a53_gles3"
|
||||
elif [ "${PROJECT}" = "RPi" -a "${DEVICE:0:4}" = "RPi4" ]; then
|
||||
PKG_MAKE_OPTS_TARGET+=" platform=rpi4"
|
||||
elif [ "${PROJECT}" = "RPi" -a "${DEVICE}" = "RPi5" ]; then
|
||||
elif [ "${PROJECT}" = "RPi" -a "${DEVICE:0:4}" = "RPi5" ]; then
|
||||
PKG_MAKE_OPTS_TARGET+=" platform=rpi5"
|
||||
else
|
||||
PKG_MAKE_OPTS_TARGET+=" platform=arm64"
|
||||
|
||||
@@ -35,7 +35,7 @@ if [ "${PROJECT}" = "RPi" ]; then
|
||||
PKG_DEPENDS_TARGET+=" gpicase_safeshutdown"
|
||||
fi
|
||||
|
||||
if [ "${DEVICE}" = "RPi3" -o "${DEVICE}" = "RPi4" -o "${DEVICE}" = "RPi5" ]; then
|
||||
if [ "${DEVICE:0:4}" = "RPi3" -o "${DEVICE}" = "RPi4" -o "${DEVICE}" = "RPi4-Composite" -o "${DEVICE:0:4}" = "RPi5" ]; then
|
||||
PKG_DEPENDS_TARGET+=" retroflag_picase_safeshutdown"
|
||||
fi
|
||||
fi
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
Binary file not shown.
Binary file not shown.
@@ -0,0 +1 @@
|
||||
#reference "/tmp/shaders/RPi-Composite/rpi3-4.glslp"
|
||||
@@ -0,0 +1 @@
|
||||
#reference "/tmp/shaders/RPi-Composite/rpi3-4.slangp"
|
||||
@@ -0,0 +1 @@
|
||||
#reference "/tmp/shaders/RPi-Composite/rpi5.glslp"
|
||||
@@ -0,0 +1 @@
|
||||
#reference "/tmp/shaders/RPi-Composite/rpi5.slangp"
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
shaders = "1"
|
||||
feedback_pass = "0"
|
||||
shader0 = "shaders/rpi3-4-composite-mmgb-vudiq.glsl"
|
||||
wrap_mode0 = "clamp_to_border"
|
||||
mipmap_input0 = "false"
|
||||
alias0 = ""
|
||||
float_framebuffer0 = "false"
|
||||
srgb_framebuffer0 = "false"
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
shaders = "1"
|
||||
feedback_pass = "0"
|
||||
shader0 = "shaders/rpi3-4-composite-mmgb-vudiq.slang"
|
||||
wrap_mode0 = "clamp_to_border"
|
||||
mipmap_input0 = "false"
|
||||
alias0 = ""
|
||||
float_framebuffer0 = "false"
|
||||
srgb_framebuffer0 = "false"
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
shaders = "1"
|
||||
feedback_pass = "0"
|
||||
shader0 = "shaders/rpi5-composite-mmgb-vudiq.glsl"
|
||||
wrap_mode0 = "clamp_to_border"
|
||||
mipmap_input0 = "false"
|
||||
alias0 = ""
|
||||
float_framebuffer0 = "false"
|
||||
srgb_framebuffer0 = "false"
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
shaders = "1"
|
||||
feedback_pass = "0"
|
||||
shader0 = "shaders/rpi5-composite-mmgb-vudiq.slang"
|
||||
wrap_mode0 = "clamp_to_border"
|
||||
mipmap_input0 = "false"
|
||||
alias0 = ""
|
||||
float_framebuffer0 = "false"
|
||||
srgb_framebuffer0 = "false"
|
||||
+154
@@ -0,0 +1,154 @@
|
||||
// Implementation based on the article "Efficient Gaussian blur with linear sampling"
|
||||
// http://rastergrid.com/blog/2010/09/efficient-gaussian-blur-with-linear-sampling/
|
||||
/* A version for MasterEffect Reborn, a standalone version, and a custom shader version for SweetFX can be
|
||||
found at http://reshade.me/forum/shader-presentation/27-gaussian-blur-bloom-unsharpmask */
|
||||
/*-----------------------------------------------------------.
|
||||
/ Gaussian Blur settings /
|
||||
'-----------------------------------------------------------*/
|
||||
|
||||
// This shader is based on blur-gauss-h.glsl, modified by MegaManGB and Vudiq
|
||||
// for use with Lakka's special version made for the analog video output of Raspberry Pi 3 and 4.
|
||||
|
||||
#define HW 0.28
|
||||
|
||||
#if defined(VERTEX)
|
||||
|
||||
#if __VERSION__ >= 130
|
||||
#define COMPAT_VARYING out
|
||||
#define COMPAT_ATTRIBUTE in
|
||||
#define COMPAT_TEXTURE texture
|
||||
#else
|
||||
#define COMPAT_VARYING varying
|
||||
#define COMPAT_ATTRIBUTE attribute
|
||||
#define COMPAT_TEXTURE texture2D
|
||||
#endif
|
||||
|
||||
#ifdef GL_ES
|
||||
#define COMPAT_PRECISION mediump
|
||||
#else
|
||||
#define COMPAT_PRECISION
|
||||
#endif
|
||||
|
||||
COMPAT_ATTRIBUTE vec4 VertexCoord;
|
||||
COMPAT_ATTRIBUTE vec4 COLOR;
|
||||
COMPAT_ATTRIBUTE vec4 TexCoord;
|
||||
COMPAT_VARYING vec4 COL0;
|
||||
COMPAT_VARYING vec4 TEX0;
|
||||
|
||||
vec4 _oPosition1;
|
||||
uniform mat4 MVPMatrix;
|
||||
uniform COMPAT_PRECISION int FrameDirection;
|
||||
uniform COMPAT_PRECISION int FrameCount;
|
||||
uniform COMPAT_PRECISION vec2 OutputSize;
|
||||
uniform COMPAT_PRECISION vec2 TextureSize;
|
||||
uniform COMPAT_PRECISION vec2 InputSize;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position = MVPMatrix * VertexCoord;
|
||||
COL0 = COLOR;
|
||||
TEX0.xy = TexCoord.xy;
|
||||
}
|
||||
|
||||
#elif defined(FRAGMENT)
|
||||
|
||||
#if __VERSION__ >= 130
|
||||
#define COMPAT_VARYING in
|
||||
#define COMPAT_TEXTURE texture
|
||||
out vec4 FragColor;
|
||||
#else
|
||||
#define COMPAT_VARYING varying
|
||||
#define FragColor gl_FragColor
|
||||
#define COMPAT_TEXTURE texture2D
|
||||
#endif
|
||||
|
||||
#ifdef GL_ES
|
||||
#ifdef GL_FRAGMENT_PRECISION_HIGH
|
||||
precision highp float;
|
||||
#else
|
||||
precision mediump float;
|
||||
#endif
|
||||
#define COMPAT_PRECISION mediump
|
||||
#else
|
||||
#define COMPAT_PRECISION
|
||||
#endif
|
||||
|
||||
uniform COMPAT_PRECISION int FrameDirection;
|
||||
uniform COMPAT_PRECISION int FrameCount;
|
||||
uniform COMPAT_PRECISION vec2 OutputSize;
|
||||
uniform COMPAT_PRECISION vec2 TextureSize;
|
||||
uniform COMPAT_PRECISION vec2 InputSize;
|
||||
uniform sampler2D Texture;
|
||||
COMPAT_VARYING vec4 TEX0;
|
||||
|
||||
// compatibility #defines
|
||||
#define Source Texture
|
||||
#define vTexCoord TEX0.xy
|
||||
|
||||
#define outsize vec4(OutputSize, 0.0 / OutputSize)
|
||||
|
||||
void main()
|
||||
{
|
||||
vec2 texcoord = vTexCoord;
|
||||
|
||||
vec4 SourceSize;
|
||||
if (InputSize.x > 565.0)
|
||||
SourceSize = vec4(TextureSize, 107.0 / TextureSize);
|
||||
else if (InputSize.x > 450.0)
|
||||
SourceSize = vec4(TextureSize, 85.0 / TextureSize);
|
||||
else if (InputSize.x > 300.0)
|
||||
SourceSize = vec4(TextureSize, 54.38 / TextureSize);
|
||||
else if (InputSize.x > 250.0)
|
||||
SourceSize = vec4(TextureSize, 40.0 / TextureSize);
|
||||
else if (InputSize.x > 200.0)
|
||||
SourceSize = vec4(TextureSize, 45.0 / TextureSize);
|
||||
else
|
||||
SourceSize = vec4(TextureSize, 40.0 / TextureSize);
|
||||
|
||||
vec2 PIXEL_SIZE = SourceSize.zw;
|
||||
|
||||
#if __VERSION__ < 130
|
||||
float sampleOffsets1 = 0.01;
|
||||
float sampleOffsets2 = 0.02;
|
||||
float sampleOffsets3 = 0.03;
|
||||
float sampleOffsets4 = 0.04;
|
||||
float sampleOffsets5 = 0.05;
|
||||
|
||||
float sampleWeights1 = 0.09;
|
||||
float sampleWeights2 = 0.0;
|
||||
float sampleWeights3 = 0.0;
|
||||
float sampleWeights4 = 0.0;
|
||||
float sampleWeights5 = 0.0;
|
||||
|
||||
vec4 color = COMPAT_TEXTURE(Source, texcoord) * sampleWeights1;
|
||||
|
||||
// unroll the loop
|
||||
color += COMPAT_TEXTURE(Source, texcoord + vec2(sampleOffsets1* HW * PIXEL_SIZE.x, 0.0)) * sampleWeights1;
|
||||
color += COMPAT_TEXTURE(Source, texcoord - vec2(sampleOffsets1* HW * PIXEL_SIZE.x, 0.0)) * sampleWeights1;
|
||||
|
||||
color += COMPAT_TEXTURE(Source, texcoord + vec2(sampleOffsets2* HW * PIXEL_SIZE.x, 0.0)) * sampleWeights1;
|
||||
color += COMPAT_TEXTURE(Source, texcoord - vec2(sampleOffsets2* HW * PIXEL_SIZE.x, 0.0)) * sampleWeights1;
|
||||
|
||||
color += COMPAT_TEXTURE(Source, texcoord + vec2(sampleOffsets3* HW * PIXEL_SIZE.x, 0.0)) * sampleWeights1;
|
||||
color += COMPAT_TEXTURE(Source, texcoord - vec2(sampleOffsets3* HW * PIXEL_SIZE.x, 0.0)) * sampleWeights1;
|
||||
|
||||
color += COMPAT_TEXTURE(Source, texcoord + vec2(sampleOffsets4* HW * PIXEL_SIZE.x, 0.0)) * sampleWeights1;
|
||||
color += COMPAT_TEXTURE(Source, texcoord - vec2(sampleOffsets4* HW * PIXEL_SIZE.x, 0.0)) * sampleWeights1;
|
||||
|
||||
color += COMPAT_TEXTURE(Source, texcoord + vec2(sampleOffsets5* HW * PIXEL_SIZE.x, 0.0)) * sampleWeights1;
|
||||
color += COMPAT_TEXTURE(Source, texcoord - vec2(sampleOffsets5* HW * PIXEL_SIZE.x, 0.0)) * sampleWeights1;
|
||||
#else
|
||||
|
||||
float sampleOffsets[5] = { 0.01, 0.02, 0.03, 0.04, 0.05 }; // updated values here too
|
||||
float sampleWeights[5] = { 0.09, 0.0, 0.0, 0.0, 0.0 };
|
||||
|
||||
vec4 color = COMPAT_TEXTURE(Source, texcoord) * sampleWeights[0];
|
||||
for(int i = 1; i < 5; ++i) {
|
||||
color += COMPAT_TEXTURE(Source, texcoord + vec2(sampleOffsets[i]*HW * PIXEL_SIZE.x, 0.0)) * sampleWeights[i];
|
||||
color += COMPAT_TEXTURE(Source, texcoord - vec2(sampleOffsets[i]*HW * PIXEL_SIZE.x, 0.0)) * sampleWeights[i];
|
||||
}
|
||||
#endif
|
||||
|
||||
FragColor = vec4(color);
|
||||
}
|
||||
#endif
|
||||
+83
@@ -0,0 +1,83 @@
|
||||
#version 450
|
||||
|
||||
// Implementation based on the article "Efficient Gaussian blur with linear sampling"
|
||||
// http://rastergrid.com/blog/2010/09/efficient-gaussian-blur-with-linear-sampling/
|
||||
/* A version for MasterEffect Reborn, a standalone version, and a custom shader version for SweetFX can
|
||||
found at http://reshade.me/forum/shader-presentation/27-gaussian-blur-bloom-unsharpmask */
|
||||
/*-----------------------------------------------------------.
|
||||
/ Gaussian Blur settings /
|
||||
'-----------------------------------------------------------*/
|
||||
|
||||
// This shader is based on blur-gauss-h.slang, modified by Vudiq and inspired by MegaManGB
|
||||
// for use with Lakka's special version made for the analog video output of the Raspberry Pi 5.
|
||||
|
||||
layout(push_constant) uniform Push
|
||||
{
|
||||
vec4 SourceSize;
|
||||
vec4 OriginalSize;
|
||||
vec4 OutputSize;
|
||||
uint FrameCount;
|
||||
} params;
|
||||
|
||||
#define InputSize params.SourceSize.xy
|
||||
#define TextureSize params.SourceSize.xy
|
||||
|
||||
layout(std140, set = 0, binding = 0) uniform UBO
|
||||
{
|
||||
mat4 MVP;
|
||||
} global;
|
||||
|
||||
#define HW 0.28
|
||||
|
||||
#pragma stage vertex
|
||||
layout(location = 0) in vec4 Position;
|
||||
layout(location = 1) in vec2 TexCoord;
|
||||
layout(location = 0) out vec2 vTexCoord;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position = global.MVP * Position;
|
||||
vTexCoord = TexCoord;
|
||||
}
|
||||
|
||||
#pragma stage fragment
|
||||
layout(location = 0) in vec2 vTexCoord;
|
||||
layout(location = 0) out vec4 FragColor;
|
||||
layout(set = 0, binding = 2) uniform sampler2D Source;
|
||||
|
||||
void main()
|
||||
{
|
||||
vec2 texcoord = vTexCoord;
|
||||
|
||||
vec4 SourceSize;
|
||||
|
||||
if (InputSize.x > 400.0)
|
||||
SourceSize = vec4(TextureSize, 88.0 / TextureSize);
|
||||
else if (InputSize.x > 300.0)
|
||||
SourceSize = vec4(TextureSize, 54.38 / TextureSize);
|
||||
else if (InputSize.x > 250.0)
|
||||
SourceSize = vec4(TextureSize, 40.0 / TextureSize);
|
||||
else if (InputSize.x > 200.0)
|
||||
SourceSize = vec4(TextureSize, 45.0 / TextureSize);
|
||||
else
|
||||
SourceSize = vec4(TextureSize, 40.0 / TextureSize);
|
||||
|
||||
vec2 PIXEL_SIZE = SourceSize.zw;
|
||||
|
||||
float sampleOffsets[5] = {
|
||||
0.01,
|
||||
0.02,
|
||||
0.03,
|
||||
0.04,
|
||||
0.05
|
||||
};
|
||||
|
||||
float sampleWeight = 0.09;
|
||||
|
||||
vec4 color = texture(Source, texcoord) * sampleWeight;
|
||||
for(int i = 0; i < 5; ++i) {
|
||||
color += texture(Source, texcoord + vec2(sampleOffsets[i]*HW * PIXEL_SIZE.x, 0.0)) * sampleWeight;
|
||||
color += texture(Source, texcoord - vec2(sampleOffsets[i]*HW * PIXEL_SIZE.x, 0.0)) * sampleWeight;
|
||||
}
|
||||
FragColor = vec4(color);
|
||||
}
|
||||
+194
@@ -0,0 +1,194 @@
|
||||
// Implementation based on the article "Efficient Gaussian blur with linear sampling"
|
||||
// http://rastergrid.com/blog/2010/09/efficient-gaussian-blur-with-linear-sampling/
|
||||
/* A version for MasterEffect Reborn, a standalone version, and a custom shader version for SweetFX can be
|
||||
found at http://reshade.me/forum/shader-presentation/27-gaussian-blur-bloom-unsharpmask */
|
||||
/*-----------------------------------------------------------.
|
||||
/ Gaussian Blur settings /
|
||||
'-----------------------------------------------------------*/
|
||||
|
||||
// This shader is based on blur-gauss-h.glsl, modified by MegaManGB and Vudiq
|
||||
// for use with Lakka's special version made for the analog video output of the Raspberry Pi 5.
|
||||
|
||||
#define HW 4.4
|
||||
|
||||
#if defined(VERTEX)
|
||||
|
||||
#if __VERSION__ >= 130
|
||||
#define COMPAT_VARYING out
|
||||
#define COMPAT_ATTRIBUTE in
|
||||
#define COMPAT_TEXTURE texture
|
||||
#else
|
||||
#define COMPAT_VARYING varying
|
||||
#define COMPAT_ATTRIBUTE attribute
|
||||
#define COMPAT_TEXTURE texture2D
|
||||
#endif
|
||||
|
||||
#ifdef GL_ES
|
||||
#define COMPAT_PRECISION mediump
|
||||
#else
|
||||
#define COMPAT_PRECISION
|
||||
#endif
|
||||
|
||||
COMPAT_ATTRIBUTE vec4 VertexCoord;
|
||||
COMPAT_ATTRIBUTE vec4 COLOR;
|
||||
COMPAT_ATTRIBUTE vec4 TexCoord;
|
||||
COMPAT_VARYING vec4 COL0;
|
||||
COMPAT_VARYING vec4 TEX0;
|
||||
|
||||
vec4 _oPosition1;
|
||||
uniform mat4 MVPMatrix;
|
||||
uniform COMPAT_PRECISION int FrameDirection;
|
||||
uniform COMPAT_PRECISION int FrameCount;
|
||||
uniform COMPAT_PRECISION vec2 OutputSize;
|
||||
uniform COMPAT_PRECISION vec2 TextureSize;
|
||||
uniform COMPAT_PRECISION vec2 InputSize;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position = MVPMatrix * VertexCoord;
|
||||
COL0 = COLOR;
|
||||
TEX0.xy = TexCoord.xy;
|
||||
}
|
||||
|
||||
#elif defined(FRAGMENT)
|
||||
|
||||
#if __VERSION__ >= 130
|
||||
#define COMPAT_VARYING in
|
||||
#define COMPAT_TEXTURE texture
|
||||
out vec4 FragColor;
|
||||
#else
|
||||
#define COMPAT_VARYING varying
|
||||
#define FragColor gl_FragColor
|
||||
#define COMPAT_TEXTURE texture2D
|
||||
#endif
|
||||
|
||||
#ifdef GL_ES
|
||||
#ifdef GL_FRAGMENT_PRECISION_HIGH
|
||||
precision highp float;
|
||||
#else
|
||||
precision mediump float;
|
||||
#endif
|
||||
#define COMPAT_PRECISION mediump
|
||||
#else
|
||||
#define COMPAT_PRECISION
|
||||
#endif
|
||||
|
||||
uniform COMPAT_PRECISION int FrameDirection;
|
||||
uniform COMPAT_PRECISION int FrameCount;
|
||||
uniform COMPAT_PRECISION vec2 OutputSize;
|
||||
uniform COMPAT_PRECISION vec2 TextureSize;
|
||||
uniform COMPAT_PRECISION vec2 InputSize;
|
||||
uniform sampler2D Texture;
|
||||
COMPAT_VARYING vec4 TEX0;
|
||||
|
||||
// compatibility #defines
|
||||
#define Source Texture
|
||||
#define vTexCoord TEX0.xy
|
||||
|
||||
#define outsize vec4(OutputSize, 0.0 / OutputSize)
|
||||
|
||||
void main()
|
||||
{
|
||||
vec2 texcoord = vTexCoord;
|
||||
|
||||
vec4 SourceSize;
|
||||
if (InputSize.x > 565.0)
|
||||
SourceSize = vec4(TextureSize, 1880.0 / TextureSize);
|
||||
else if (InputSize.x > 450.0)
|
||||
SourceSize = vec4(TextureSize, 900.0 / TextureSize);
|
||||
else if (InputSize.x > 300.0)
|
||||
SourceSize = vec4(TextureSize, 850.0 / TextureSize);
|
||||
else if (InputSize.x > 250.0)
|
||||
SourceSize = vec4(TextureSize, 295.0 / TextureSize);
|
||||
else if (InputSize.x > 200.0)
|
||||
SourceSize = vec4(TextureSize, 400.0 / TextureSize);
|
||||
else
|
||||
SourceSize = vec4(TextureSize, 295.0 / TextureSize);
|
||||
|
||||
vec2 PIXEL_SIZE = SourceSize.zw;
|
||||
|
||||
#if __VERSION__ < 130
|
||||
float sampleOffsets1 = 0.00001;
|
||||
float sampleOffsets2 = 0.00002;
|
||||
float sampleOffsets3 = 0.00003;
|
||||
float sampleOffsets4 = 0.00004;
|
||||
float sampleOffsets5 = 0.00005;
|
||||
float sampleOffsets6 = 0.00006;
|
||||
float sampleOffsets7 = 0.00007;
|
||||
float sampleOffsets8 = 0.00008;
|
||||
float sampleOffsets9 = 0.00009;
|
||||
float sampleOffsets10 = 0.00010;
|
||||
float sampleOffsets11 = 0.00011;
|
||||
float sampleOffsets12 = 0.00012;
|
||||
float sampleOffsets13 = 0.00013;
|
||||
float sampleOffsets14 = 0.00014;
|
||||
float sampleOffsets15 = 0.00015;
|
||||
|
||||
float sampleWeights1 = 0.032;
|
||||
float sampleWeights2 = 0.0;
|
||||
float sampleWeights3 = 0.0;
|
||||
float sampleWeights4 = 0.0;
|
||||
float sampleWeights5 = 0.0;
|
||||
|
||||
vec4 color = COMPAT_TEXTURE(Source, texcoord) * sampleWeights1;
|
||||
|
||||
// unroll the loop
|
||||
color += COMPAT_TEXTURE(Source, texcoord + vec2(sampleOffsets1* HW * PIXEL_SIZE.x, 0.0)) * sampleWeights1;
|
||||
color += COMPAT_TEXTURE(Source, texcoord - vec2(sampleOffsets1* HW * PIXEL_SIZE.x, 0.0)) * sampleWeights1;
|
||||
|
||||
color += COMPAT_TEXTURE(Source, texcoord + vec2(sampleOffsets2* HW * PIXEL_SIZE.x, 0.0)) * sampleWeights1;
|
||||
color += COMPAT_TEXTURE(Source, texcoord - vec2(sampleOffsets2* HW * PIXEL_SIZE.x, 0.0)) * sampleWeights1;
|
||||
|
||||
color += COMPAT_TEXTURE(Source, texcoord + vec2(sampleOffsets3* HW * PIXEL_SIZE.x, 0.0)) * sampleWeights1;
|
||||
color += COMPAT_TEXTURE(Source, texcoord - vec2(sampleOffsets3* HW * PIXEL_SIZE.x, 0.0)) * sampleWeights1;
|
||||
|
||||
color += COMPAT_TEXTURE(Source, texcoord + vec2(sampleOffsets4* HW * PIXEL_SIZE.x, 0.0)) * sampleWeights1;
|
||||
color += COMPAT_TEXTURE(Source, texcoord - vec2(sampleOffsets4* HW * PIXEL_SIZE.x, 0.0)) * sampleWeights1;
|
||||
|
||||
color += COMPAT_TEXTURE(Source, texcoord + vec2(sampleOffsets5* HW * PIXEL_SIZE.x, 0.0)) * sampleWeights1;
|
||||
color += COMPAT_TEXTURE(Source, texcoord - vec2(sampleOffsets5* HW * PIXEL_SIZE.x, 0.0)) * sampleWeights1;
|
||||
|
||||
color += COMPAT_TEXTURE(Source, texcoord + vec2(sampleOffsets6* HW * PIXEL_SIZE.x, 0.0)) * sampleWeights1;
|
||||
color += COMPAT_TEXTURE(Source, texcoord - vec2(sampleOffsets6* HW * PIXEL_SIZE.x, 0.0)) * sampleWeights1;
|
||||
|
||||
color += COMPAT_TEXTURE(Source, texcoord + vec2(sampleOffsets7* HW * PIXEL_SIZE.x, 0.0)) * sampleWeights1;
|
||||
color += COMPAT_TEXTURE(Source, texcoord - vec2(sampleOffsets7* HW * PIXEL_SIZE.x, 0.0)) * sampleWeights1;
|
||||
|
||||
color += COMPAT_TEXTURE(Source, texcoord + vec2(sampleOffsets8* HW * PIXEL_SIZE.x, 0.0)) * sampleWeights1;
|
||||
color += COMPAT_TEXTURE(Source, texcoord - vec2(sampleOffsets8* HW * PIXEL_SIZE.x, 0.0)) * sampleWeights1;
|
||||
|
||||
color += COMPAT_TEXTURE(Source, texcoord + vec2(sampleOffsets9* HW * PIXEL_SIZE.x, 0.0)) * sampleWeights1;
|
||||
color += COMPAT_TEXTURE(Source, texcoord - vec2(sampleOffsets9* HW * PIXEL_SIZE.x, 0.0)) * sampleWeights1;
|
||||
|
||||
color += COMPAT_TEXTURE(Source, texcoord + vec2(sampleOffsets10* HW * PIXEL_SIZE.x, 0.0)) * sampleWeights1;
|
||||
color += COMPAT_TEXTURE(Source, texcoord - vec2(sampleOffsets10* HW * PIXEL_SIZE.x, 0.0)) * sampleWeights1;
|
||||
|
||||
color += COMPAT_TEXTURE(Source, texcoord + vec2(sampleOffsets11* HW * PIXEL_SIZE.x, 0.0)) * sampleWeights1;
|
||||
color += COMPAT_TEXTURE(Source, texcoord - vec2(sampleOffsets11* HW * PIXEL_SIZE.x, 0.0)) * sampleWeights1;
|
||||
|
||||
color += COMPAT_TEXTURE(Source, texcoord + vec2(sampleOffsets12* HW * PIXEL_SIZE.x, 0.0)) * sampleWeights1;
|
||||
color += COMPAT_TEXTURE(Source, texcoord - vec2(sampleOffsets12* HW * PIXEL_SIZE.x, 0.0)) * sampleWeights1;
|
||||
|
||||
color += COMPAT_TEXTURE(Source, texcoord + vec2(sampleOffsets13* HW * PIXEL_SIZE.x, 0.0)) * sampleWeights1;
|
||||
color += COMPAT_TEXTURE(Source, texcoord - vec2(sampleOffsets13* HW * PIXEL_SIZE.x, 0.0)) * sampleWeights1;
|
||||
|
||||
color += COMPAT_TEXTURE(Source, texcoord + vec2(sampleOffsets14* HW * PIXEL_SIZE.x, 0.0)) * sampleWeights1;
|
||||
color += COMPAT_TEXTURE(Source, texcoord - vec2(sampleOffsets14* HW * PIXEL_SIZE.x, 0.0)) * sampleWeights1;
|
||||
|
||||
color += COMPAT_TEXTURE(Source, texcoord + vec2(sampleOffsets15* HW * PIXEL_SIZE.x, 0.0)) * sampleWeights1;
|
||||
color += COMPAT_TEXTURE(Source, texcoord - vec2(sampleOffsets15* HW * PIXEL_SIZE.x, 0.0)) * sampleWeights1;
|
||||
#else
|
||||
|
||||
float sampleOffsets[5] = { 0.01, 0.02, 0.03, 0.04, 0.05 }; // updated values here too
|
||||
float sampleWeights[5] = { 0.09, 0.0, 0.0, 0.0, 0.0 };
|
||||
|
||||
vec4 color = COMPAT_TEXTURE(Source, texcoord) * sampleWeights[0];
|
||||
for(int i = 1; i < 5; ++i) {
|
||||
color += COMPAT_TEXTURE(Source, texcoord + vec2(sampleOffsets[i]*HW * PIXEL_SIZE.x, 0.0)) * sampleWeights[i];
|
||||
color += COMPAT_TEXTURE(Source, texcoord - vec2(sampleOffsets[i]*HW * PIXEL_SIZE.x, 0.0)) * sampleWeights[i];
|
||||
}
|
||||
#endif
|
||||
|
||||
FragColor = vec4(color);
|
||||
}
|
||||
#endif
|
||||
+95
@@ -0,0 +1,95 @@
|
||||
#version 450
|
||||
|
||||
// Implementation based on the article "Efficient Gaussian blur with linear sampling"
|
||||
// http://rastergrid.com/blog/2010/09/efficient-gaussian-blur-with-linear-sampling/
|
||||
/* A version for MasterEffect Reborn, a standalone version, and a custom shader version for SweetFX can be
|
||||
found at http://reshade.me/forum/shader-presentation/27-gaussian-blur-bloom-unsharpmask */
|
||||
/*-----------------------------------------------------------.
|
||||
/ Gaussian Blur settings /
|
||||
'-----------------------------------------------------------*/
|
||||
|
||||
// This shader is based on blur-gauss-h.slang, modified by Vudiq and inspired by MegaManGB
|
||||
// for use with Lakka's special version made for the analog video output of the Raspberry Pi 5.
|
||||
|
||||
layout(push_constant) uniform Push
|
||||
{
|
||||
vec4 SourceSize;
|
||||
vec4 OriginalSize;
|
||||
vec4 OutputSize;
|
||||
uint FrameCount;
|
||||
} params;
|
||||
|
||||
#define InputSize params.SourceSize.xy
|
||||
#define TextureSize params.SourceSize.xy
|
||||
|
||||
layout(std140, set = 0, binding = 0) uniform UBO
|
||||
{
|
||||
mat4 MVP;
|
||||
} global;
|
||||
|
||||
#define HW 4.40
|
||||
|
||||
#pragma stage vertex
|
||||
layout(location = 0) in vec4 Position;
|
||||
layout(location = 1) in vec2 TexCoord;
|
||||
layout(location = 0) out vec2 vTexCoord;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position = global.MVP * Position;
|
||||
vTexCoord = TexCoord;
|
||||
}
|
||||
|
||||
#pragma stage fragment
|
||||
layout(location = 0) in vec2 vTexCoord;
|
||||
layout(location = 0) out vec4 FragColor;
|
||||
layout(set = 0, binding = 2) uniform sampler2D Source;
|
||||
|
||||
void main()
|
||||
{
|
||||
vec2 texcoord = vTexCoord;
|
||||
|
||||
vec4 SourceSize;
|
||||
|
||||
if (InputSize.x > 565.0)
|
||||
SourceSize = vec4(TextureSize, 1880.0 / TextureSize);
|
||||
else if (InputSize.x > 450.0)
|
||||
SourceSize = vec4(TextureSize, 900.0 / TextureSize);
|
||||
else if (InputSize.x > 300.0)
|
||||
SourceSize = vec4(TextureSize, 850.0 / TextureSize);
|
||||
else if (InputSize.x > 250.0)
|
||||
SourceSize = vec4(TextureSize, 295.0 / TextureSize);
|
||||
else if (InputSize.x > 200.0)
|
||||
SourceSize = vec4(TextureSize, 400.0 / TextureSize);
|
||||
else
|
||||
SourceSize = vec4(TextureSize, 295.0 / TextureSize);
|
||||
|
||||
vec2 PIXEL_SIZE = SourceSize.zw;
|
||||
|
||||
float sampleOffsets[15] = {
|
||||
0.00001,
|
||||
0.00002,
|
||||
0.00003,
|
||||
0.00004,
|
||||
0.00005,
|
||||
0.00006,
|
||||
0.00007,
|
||||
0.00008,
|
||||
0.00009,
|
||||
0.00010,
|
||||
0.00011,
|
||||
0.00012,
|
||||
0.00013,
|
||||
0.00014,
|
||||
0.00015
|
||||
};
|
||||
|
||||
float sampleWeight = 0.03200000;
|
||||
|
||||
vec4 color = texture(Source, texcoord) * sampleWeight;
|
||||
for(int i = 0; i < 15; ++i) {
|
||||
color += texture(Source, texcoord + vec2(sampleOffsets[i]*HW * PIXEL_SIZE.x, 0.0)) * sampleWeight;
|
||||
color += texture(Source, texcoord - vec2(sampleOffsets[i]*HW * PIXEL_SIZE.x, 0.0)) * sampleWeight;
|
||||
}
|
||||
FragColor = vec4(color);
|
||||
}
|
||||
@@ -36,7 +36,7 @@ PKG_MAKE_OPTS_TARGET="V=1 \
|
||||
HAVE_FREETYPE=1"
|
||||
|
||||
if [ "${PROJECT}" = "RPi" ]; then
|
||||
if [ "${DEVICE}" = "RPi3" -o "${DEVICE}" = "RPi4" -o "${DEVICE}" = "RPi5" ]; then
|
||||
if [ "${DEVICE}" = "RPi3" -o "${DEVICE}" = "RPi4" -o "${DEVICE}" = "RPi5" -o "${DEVICE: -10}" = "-Composite" ]; then
|
||||
PKG_MAKE_OPTS_TARGET+=" HAVE_RETROFLAG=1"
|
||||
fi
|
||||
fi
|
||||
@@ -176,181 +176,198 @@ makeinstall_target() {
|
||||
touch ${INSTALL}/usr/share/retroarch/system/.placeholder
|
||||
|
||||
# General configuration
|
||||
local ra_config=${INSTALL}/etc/retroarch.cfg
|
||||
mkdir -p ${INSTALL}/etc
|
||||
echo 'libretro_directory = "/tmp/cores"' >> ${INSTALL}/etc/retroarch.cfg
|
||||
echo 'libretro_info_path = "/tmp/cores"' >> ${INSTALL}/etc/retroarch.cfg
|
||||
echo 'rgui_browser_directory = "/storage/roms"' >> ${INSTALL}/etc/retroarch.cfg
|
||||
echo 'content_database_path = "/tmp/database/rdb"' >> ${INSTALL}/etc/retroarch.cfg
|
||||
echo 'playlist_directory = "/storage/playlists"' >> ${INSTALL}/etc/retroarch.cfg
|
||||
echo 'savefile_directory = "/storage/savefiles"' >> ${INSTALL}/etc/retroarch.cfg
|
||||
echo 'savestate_directory = "/storage/savestates"' >> ${INSTALL}/etc/retroarch.cfg
|
||||
echo 'system_directory = "/tmp/system"' >> ${INSTALL}/etc/retroarch.cfg
|
||||
echo 'screenshot_directory = "/storage/screenshots"' >> ${INSTALL}/etc/retroarch.cfg
|
||||
echo 'video_shader_dir = "/tmp/shaders"' >> ${INSTALL}/etc/retroarch.cfg
|
||||
echo 'rgui_show_start_screen = "false"' >> ${INSTALL}/etc/retroarch.cfg
|
||||
echo 'assets_directory = "/tmp/assets"' >> ${INSTALL}/etc/retroarch.cfg
|
||||
echo 'overlay_directory = "/tmp/overlays"' >> ${INSTALL}/etc/retroarch.cfg
|
||||
echo 'cheat_database_path = "/tmp/database/cht"' >> ${INSTALL}/etc/retroarch.cfg
|
||||
echo 'cursor_directory = "/tmp/database/cursors"' >> ${INSTALL}/etc/retroarch.cfg
|
||||
echo 'log_dir = "/storage/logfiles"' >> ${INSTALL}/etc/retroarch.cfg
|
||||
echo 'recording_output_directory = "/storage/recordings"' >> ${INSTALL}/etc/retroarch.cfg
|
||||
echo 'menu_driver = "xmb"' >> ${INSTALL}/etc/retroarch.cfg
|
||||
cp ${PKG_DIR}/config/retroarch.cfg ${ra_config}
|
||||
|
||||
# Power settings
|
||||
# Use ondemand for all RPi devices (for backwards compatibility?)
|
||||
# and any battery powered device (OGA and RPi case)
|
||||
if [ "${PROJECT}" = "RPi" ] || [ "${DEVICE}" = "OdroidGoAdvance" ]; then
|
||||
echo 'cpu_main_gov = "ondemand"' >> ${INSTALL}/etc/retroarch.cfg
|
||||
echo 'cpu_menu_gov = "ondemand"' >> ${INSTALL}/etc/retroarch.cfg
|
||||
echo 'cpu_scaling_mode = "1"' >> ${INSTALL}/etc/retroarch.cfg
|
||||
sed -i ${ra_config} -e 's|^cpu_main_gov = .*|cpu_main_gov = "ondemand"|'
|
||||
sed -i ${ra_config} -e 's|^cpu_menu_gov = .*|cpu_menu_gov = "ondemand"|'
|
||||
sed -i ${ra_config} -e 's|^cpu_scaling_mode = .*|cpu_scaling_mode = "1"|'
|
||||
fi
|
||||
|
||||
# Quick menu
|
||||
echo 'core_assets_directory = "/storage/roms/downloads"' >> ${INSTALL}/etc/retroarch.cfg
|
||||
echo 'quick_menu_show_undo_save_load_state = "false"' >> ${INSTALL}/etc/retroarch.cfg
|
||||
echo 'quick_menu_show_save_core_overrides = "false"' >> ${INSTALL}/etc/retroarch.cfg
|
||||
echo 'quick_menu_show_save_game_overrides = "false"' >> ${INSTALL}/etc/retroarch.cfg
|
||||
echo 'quick_menu_show_cheats = "false"' >> ${INSTALL}/etc/retroarch.cfg
|
||||
echo 'quick_menu_show_overlays = "false"' >> ${INSTALL}/etc/retroarch.cfg
|
||||
echo 'quick_menu_show_rewind = "false"' >> ${INSTALL}/etc/retroarch.cfg
|
||||
echo 'quick_menu_show_latency = "false"' >> ${INSTALL}/etc/retroarch.cfg
|
||||
|
||||
# Video
|
||||
echo 'video_windowed_fullscreen = "false"' >> ${INSTALL}/etc/retroarch.cfg
|
||||
echo 'video_smooth = "false"' >> ${INSTALL}/etc/retroarch.cfg
|
||||
echo 'video_aspect_ratio_auto = "true"' >> ${INSTALL}/etc/retroarch.cfg
|
||||
echo 'video_threaded = "true"' >> ${INSTALL}/etc/retroarch.cfg
|
||||
echo 'video_font_path = "/tmp/assets/xmb/monochrome/font.ttf"' >> ${INSTALL}/etc/retroarch.cfg
|
||||
echo 'video_font_size = "32"' >> ${INSTALL}/etc/retroarch.cfg
|
||||
echo 'video_filter_dir = "/usr/share/video_filters"' >> ${INSTALL}/etc/retroarch.cfg
|
||||
echo 'video_gpu_screenshot = "false"' >> ${INSTALL}/etc/retroarch.cfg
|
||||
echo 'video_fullscreen = "true"' >> ${INSTALL}/etc/retroarch.cfg
|
||||
|
||||
# Audio
|
||||
echo 'audio_driver = "alsathread"' >> ${INSTALL}/etc/retroarch.cfg
|
||||
echo 'audio_filter_dir = "/usr/share/audio_filters"' >> ${INSTALL}/etc/retroarch.cfg
|
||||
|
||||
if [ "${PROJECT}" = "Samsung" -a "${DEVICE}" = "Exynos" ]; then
|
||||
# workaround the 55fps bug
|
||||
echo 'audio_out_rate = "44100"' >> ${INSTALL}/etc/retroarch.cfg
|
||||
sed -i ${ra_config} -e 's|^audio_out_rate = .*|audio_out_rate = "44100"|'
|
||||
fi
|
||||
|
||||
# Saving
|
||||
echo 'savestate_thumbnail_enable = "false"' >> ${INSTALL}/etc/retroarch.cfg
|
||||
|
||||
# Input
|
||||
echo 'input_driver = "udev"' >> ${INSTALL}/etc/retroarch.cfg
|
||||
echo 'input_max_users = "8"' >> ${INSTALL}/etc/retroarch.cfg
|
||||
echo 'input_autodetect_enable = "true"' >> ${INSTALL}/etc/retroarch.cfg
|
||||
echo 'joypad_autoconfig_dir = "/tmp/joypads"' >> ${INSTALL}/etc/retroarch.cfg
|
||||
echo 'input_remapping_directory = "/storage/remappings"' >> ${INSTALL}/etc/retroarch.cfg
|
||||
echo 'input_menu_toggle_gamepad_combo = "2"' >> ${INSTALL}/etc/retroarch.cfg
|
||||
echo 'all_users_control_menu = "true"' >> ${INSTALL}/etc/retroarch.cfg
|
||||
|
||||
# Menu
|
||||
echo 'menu_core_enable = "false"' >> ${INSTALL}/etc/retroarch.cfg
|
||||
echo 'thumbnails_directory = "/storage/thumbnails"' >> ${INSTALL}/etc/retroarch.cfg
|
||||
echo 'menu_show_advanced_settings = "false"' >> ${INSTALL}/etc/retroarch.cfg
|
||||
echo 'menu_wallpaper_opacity = "1.0"' >> ${INSTALL}/etc/retroarch.cfg
|
||||
echo 'content_show_images = "false"' >> ${INSTALL}/etc/retroarch.cfg
|
||||
echo 'content_show_music = "false"' >> ${INSTALL}/etc/retroarch.cfg
|
||||
echo 'content_show_video = "false"' >> ${INSTALL}/etc/retroarch.cfg
|
||||
|
||||
# Playlists
|
||||
echo 'playlist_entry_rename = "false"' >> ${INSTALL}/etc/retroarch.cfg
|
||||
echo 'playlist_entry_remove = "false"' >> ${INSTALL}/etc/retroarch.cfg
|
||||
|
||||
# OdroidGoAdvance
|
||||
if [ "${DEVICE}" = "OdroidGoAdvance" ]; then
|
||||
echo 'xmb_layout = "2"' >> ${INSTALL}/etc/retroarch.cfg
|
||||
echo 'menu_widget_scale_auto = "false"' >> ${INSTALL}/etc/retroarch.cfg
|
||||
echo 'menu_widget_scale_factor = "2.25"' >> ${INSTALL}/etc/retroarch.cfg
|
||||
sed -i ${ra_config} -e 's|^xmb_layout = .*|xmb_layout = "2"|'
|
||||
sed -i ${ra_config} -e 's|^menu_widget_scale_auto = .*|menu_widget_scale_auto = "false"|'
|
||||
sed -i ${ra_config} -e 's|^menu_widget_scale_factor = .*|menu_widget_scale_factor = "2.250000"|'
|
||||
fi
|
||||
|
||||
# RPiZero/RPiZero2 + GPiCase (1st Gen Retroflag GPiCase)
|
||||
if [ "${DEVICE}" = "RPiZero-GPiCase" -o "${DEVICE}" = "RPiZero2-GPiCase" ]; then
|
||||
sed -i -e 's|^input_menu_toggle_gamepad_combo =.*|input_menu_toggle_gamepad_combo = "4"|' ${INSTALL}/etc/retroarch.cfg
|
||||
sed -i -e 's|^menu_driver =.*|menu_driver = "rgui"|' ${INSTALL}/etc/retroarch.cfg
|
||||
echo 'aspect_ratio_index = "21"' >> ${INSTALL}/etc/retroarch.cfg
|
||||
echo 'audio_device = "default:CARD=Headphones"' >> ${INSTALL}/etc/retroarch.cfg
|
||||
echo 'audio_out_rate = "44100"' >> ${INSTALL}/etc/retroarch.cfg
|
||||
echo 'menu_enable_widgets = "false"' >> ${INSTALL}/etc/retroarch.cfg
|
||||
echo 'menu_timedate_enable = "false"' >> ${INSTALL}/etc/retroarch.cfg
|
||||
echo 'video_font_size = "16"' >> ${INSTALL}/etc/retroarch.cfg
|
||||
sed -i ${ra_config} -e 's|^input_menu_toggle_gamepad_combo = .*|input_menu_toggle_gamepad_combo = "4"|'
|
||||
sed -i ${ra_config} -e 's|^menu_driver = .*|menu_driver = "rgui"|'
|
||||
sed -i ${ra_config} -e 's|^aspect_ratio_index = .*|aspect_ratio_index = "21"|'
|
||||
sed -i ${ra_config} -e 's|^audio_device = .*|audio_device = "default:CARD=Headphones"|'
|
||||
sed -i ${ra_config} -e 's|^audio_out_rate = .*|audio_out_rate = "44100"|'
|
||||
sed -i ${ra_config} -e 's|^menu_enable_widgets = .*|menu_enable_widgets = "false"|'
|
||||
sed -i ${ra_config} -e 's|^menu_timedate_enable = .*|menu_timedate_enable = "false"|'
|
||||
sed -i ${ra_config} -e 's|^video_font_size = .*|video_font_size = "16.000000"|'
|
||||
sed -i ${ra_config} -e 's|^menu_widget_scale_auto = .*|menu_widget_scale_auto = "false"|'
|
||||
sed -i ${ra_config} -e 's|^menu_widget_scale_factor = .*|menu_widget_scale_factor = "1.750000"|'
|
||||
|
||||
if [ "${DEVICE}" = "RPiZero-GPiCase" ]; then
|
||||
sed -i -e 's|^video_threaded =.*|video_threaded = "false"|' ${INSTALL}/etc/retroarch.cfg
|
||||
echo 'video_scale_integer = "true"' >> ${INSTALL}/etc/retroarch.cfg
|
||||
sed -i ${ra_config} -e 's|^video_threaded = .*|video_threaded = "false"|'
|
||||
sed -i ${ra_config} -e 's|^video_scale_integer = .*|video_scale_integer = "true"|'
|
||||
fi
|
||||
|
||||
if [ "${DEVICE}" = "RPiZero2-GPiCase" ]; then
|
||||
echo 'input_player1_analog_dpad_mode = "3"' >> ${INSTALL}/etc/retroarch.cfg
|
||||
sed -i ${ra_config} -e 's|^input_player1_analog_dpad_mode = .*|input_player1_analog_dpad_mode = "3"|'
|
||||
fi
|
||||
fi
|
||||
|
||||
# RPi Compute Module 4 + GPiCase2 (2nd Gen Retroflag GPiCase)
|
||||
if [ "${DEVICE}" = "RPi4-GPiCase2" ]; then
|
||||
echo 'audio_device = "default:CARD=Device"' >> ${INSTALL}/etc/retroarch.cfg
|
||||
echo 'audio_out_rate = "44100"' >> ${INSTALL}/etc/retroarch.cfg
|
||||
echo 'xmb_layout = "2"' >> ${INSTALL}/etc/retroarch.cfg
|
||||
sed -i ${ra_config} -e 's|^audio_device = .*|audio_device = "default:CARD=Device"|'
|
||||
sed -i ${ra_config} -e 's|^audio_out_rate = .*|audio_out_rate = "44100"|'
|
||||
sed -i ${ra_config} -e 's|^xmb_layout = .*|xmb_layout = "2"|'
|
||||
sed -i ${ra_config} -e 's|^menu_widget_scale_auto = .*|menu_widget_scale_auto = "false"|'
|
||||
sed -i ${ra_config} -e 's|^menu_widget_scale_factor = .*|menu_widget_scale_factor = "1.750000"|'
|
||||
fi
|
||||
|
||||
# RPiZero2 + GPiCase2W (3rd Gen Retroflag GPiCase)
|
||||
if [ "${DEVICE}" = "RPiZero2-GPiCase2W" ]; then
|
||||
echo 'audio_device = "default:CARD=Headphones"' >> ${INSTALL}/etc/retroarch.cfg
|
||||
echo 'audio_out_rate = "44100"' >> ${INSTALL}/etc/retroarch.cfg
|
||||
echo 'xmb_layout = "2"' >> ${INSTALL}/etc/retroarch.cfg
|
||||
sed -i ${ra_config} -e 's|^audio_device = .*|audio_device = "default:CARD=Headphone"|'
|
||||
sed -i ${ra_config} -e 's|^audio_out_rate = .*|audio_out_rate = "44100"|'
|
||||
sed -i ${ra_config} -e 's|^xmb_layout = .*|xmb_layout = "2"|'
|
||||
sed -i ${ra_config} -e 's|^menu_widget_scale_auto = .*|menu_widget_scale_auto = "false"|'
|
||||
sed -i ${ra_config} -e 's|^menu_widget_scale_factor = .*|menu_widget_scale_factor = "1.750000"|'
|
||||
fi
|
||||
|
||||
# PiBoy DMG / RetroDreamer
|
||||
if [ "${DEVICE}" = "RPi4-PiBoyDmg" -o "${DEVICE}" = "RPi4-RetroDreamer" ]; then
|
||||
echo 'menu_timedate_enable = "false"' >> ${INSTALL}/etc/retroarch.cfg
|
||||
echo 'menu_scale_factor = "1.44"' >> ${INSTALL}/etc/retroarch.cfg
|
||||
sed -i -e 's|^input_menu_toggle_gamepad_combo =.*|input_menu_toggle_gamepad_combo = "4"|' ${INSTALL}/etc/retroarch.cfg
|
||||
sed -i -e 's|^menu_driver =.*|menu_driver = "ozone"|' ${INSTALL}/etc/retroarch.cfg
|
||||
sed -i ${ra_config} -e 's|^menu_timedate_enable = .*|menu_timedate_enable = "false"|'
|
||||
sed -i ${ra_config} -e 's|^menu_scale_factor = .*|menu_scale_factor = "1.440000"|'
|
||||
sed -i ${ra_config} -e 's|^input_menu_toggle_gamepad_combo = .*|input_menu_toggle_gamepad_combo = "4"|'
|
||||
sed -i ${ra_config} -e 's|^menu_driver = .*|menu_driver = "ozone"|'
|
||||
fi
|
||||
|
||||
# RPi-Composite
|
||||
if [ "${PROJECT}" = "RPi" -a "${DEVICE: -10}" = "-Composite" ]; then
|
||||
# copy font
|
||||
mkdir -p ${INSTALL}/usr/share/retroarch/assets
|
||||
cp -rv ${PKG_DIR}/files-composite/assets/* ${INSTALL}/usr/share/retroarch/assets
|
||||
# copy shaders
|
||||
mkdir -p ${INSTALL}/usr/share/retroarch/shaders
|
||||
cp -rv ${PKG_DIR}/files-composite/shaders/* ${INSTALL}/usr/share/retroarch/shaders
|
||||
# keep only relevant shader presets and shaders
|
||||
if [ "${DEVICE:0:4}" = "RPi5" ]; then
|
||||
rm -v ${INSTALL}/usr/share/retroarch/shaders/RPi-Composite/rpi3-4.{glslp,slangp}
|
||||
rm -v ${INSTALL}/usr/share/retroarch/shaders/RPi-Composite/shaders/rpi3-4-composite-mmgb-vudiq.{glsl,slang}
|
||||
else
|
||||
rm -v ${INSTALL}/usr/share/retroarch/shaders/RPi-Composite/rpi5.{glslp,slangp}
|
||||
rm -v ${INSTALL}/usr/share/retroarch/shaders/RPi-Composite/shaders/rpi5-composite-mmgb-vudiq.{glsl,slang}
|
||||
fi
|
||||
# copy global shader presets
|
||||
mkdir -p ${INSTALL}/etc/retroarch/config
|
||||
if [ "${DEVICE:0:4}" = "RPi5" ]; then
|
||||
cp -v ${PKG_DIR}/files-composite/global-rpi5.glslp ${INSTALL}/etc/retroarch/config/global.glslp
|
||||
cp -v ${PKG_DIR}/files-composite/global-rpi5.slangp ${INSTALL}/etc/retroarch/config/global.slangp
|
||||
else
|
||||
cp -v ${PKG_DIR}/files-composite/global-rpi34.glslp ${INSTALL}/etc/retroarch/config/global.glslp
|
||||
cp -v ${PKG_DIR}/files-composite/global-rpi34.slangp ${INSTALL}/etc/retroarch/config/global.slangp
|
||||
fi
|
||||
# extract core configs
|
||||
unzip ${PKG_DIR}/files-composite/config/core_configs.zip -d ${INSTALL}/etc/retroarch/config
|
||||
# set dynamic recompiler on RPi3/4 for Mupen64plus-next
|
||||
if [ "${DEVICE:0:4}" != "RPi5" ]; then
|
||||
sed -i ${INSTALL}/etc/retroarch/config/Mupen64Plus-Next/Mupen64Plus-Next.opt \
|
||||
-e 's|^mupen64plus-cpucore = .*|mupen64plus-cpucore = "dynamic_recompiler"|'
|
||||
fi
|
||||
# use specific font for composite
|
||||
sed -i ${ra_config} -e 's|^xmb_font = .*|xmb_font = "/tmp/assets/xmb/xmb_pixel_mmgb.ttf"|'
|
||||
sed -i ${ra_config} -e 's|^video_font_path = .*|video_font_path = "/tmp/assets/xmb/xmb_pixel_mmgb.ttf"|'
|
||||
# offset the xmb title to be within visible screen area
|
||||
sed -i ${ra_config} -e 's|^menu_xmb_title_margin = .*|menu_xmb_title_margin = "8"|'
|
||||
sed -i ${ra_config} -e 's|^menu_xmb_title_margin_horizontal_offset = .*|menu_xmb_title_margin_horizontal_offset = "3"|'
|
||||
# show advanced settings
|
||||
sed -i ${ra_config} -e 's|^menu_show_advanced_settings = .*|menu_show_advanced_settings = "true"|'
|
||||
# show save core/game overrides menu
|
||||
sed -i ${ra_config} -e 's|^quick_menu_show_save_core_overrides = .*|quick_menu_show_save_core_overrides = "true"|'
|
||||
sed -i ${ra_config} -e 's|^quick_menu_show_save_game_overrides = .*|quick_menu_show_save_game_overrides = "true"|'
|
||||
# hide menu sublabels - they are not legible anyway
|
||||
sed -i ${ra_config} -e 's|^menu_show_sublabels = .*|menu_show_sublabels = "false"|'
|
||||
# enable shaders
|
||||
sed -i ${ra_config} -e 's|^video_shader_enable = .*|video_shader_enable = "true"|'
|
||||
# turn on integer scaling
|
||||
sed -i ${ra_config} -e 's|^video_scale_integer = .*|video_scale_integer = "true"|'
|
||||
# rgui options
|
||||
sed -i ${ra_config} -e 's|^rgui_aspect_ratio_lock = .*|rgui_aspect_ratio_lock = "2"|'
|
||||
sed -i ${ra_config} -e 's|^menu_linear_filter = .*|menu_linear_filter = "true"|'
|
||||
# hide RetroArch version - core name in bottom right corner
|
||||
sed -i ${ra_config} -e 's|^menu_core_enable = .*|menu_core_enable = "false"|'
|
||||
# set widget scale / disable auto scaling
|
||||
sed -i ${ra_config} -e 's|^menu_widget_scale_auto = .*|menu_widget_scale_auto = "false"|'
|
||||
sed -i ${ra_config} -e 's|^menu_widget_scale_factor = .*|menu_widget_scale_factor = "1.150000"|'
|
||||
# turn off some distracting notifications
|
||||
sed -i ${ra_config} -e 's|^notification_show_cheats_applied = .*|notification_show_cheats_applied = "false"|'
|
||||
sed -i ${ra_config} -e 's|^notification_show_config_override_load = .*|notification_show_config_override_load = "false"|'
|
||||
sed -i ${ra_config} -e 's|^notification_show_disk_control = .*|notification_show_disk_control = "false"|'
|
||||
sed -i ${ra_config} -e 's|^notification_show_patch_applied = .*|notification_show_patch_applied = "false"|'
|
||||
sed -i ${ra_config} -e 's|^notification_show_refresh_rate = .*|notification_show_refresh_rate = "false"|'
|
||||
sed -i ${ra_config} -e 's|^notification_show_remap_load = .*|notification_show_remap_load = "false"|'
|
||||
# Set audio to headphone jack for Pi3/4, Pi 5 must use USB soundcard for analog audio out
|
||||
if listcontains "${DEVICE:0:4}" "(RPi3|RPi4)"; then
|
||||
sed -i ${ra_config} -e 's|^audio_device = .*|audio_device = "default:CARD=Headphones"|'
|
||||
fi
|
||||
# Force this resolution for RPi5 to start in the right one
|
||||
if [ "${DEVICE:0:4}" = "RPi5" ]; then
|
||||
sed -i ${ra_config} -e 's|^video_fullscreen_x = .*|video_fullscreen_x = "721"|'
|
||||
sed -i ${ra_config} -e 's|^video_fullscreen_y = .*|video_fullscreen_y = 480""|'
|
||||
fi
|
||||
# disable threaded video on RPi4 and RPi5
|
||||
if [ "${DEVICE:0:4}" = "RPi4" -o "${DEVICE:0:4}" = "RPi5" ]; then
|
||||
sed -i ${ra_config} -e 's|^video_threaded = .*|video_threaded = "false"|'
|
||||
fi
|
||||
# set video driver to glcore on RPi4/5
|
||||
if listcontains "${DEVICE:0:4}" "(RPi4|RPi5)"; then
|
||||
sed -i ${ra_config} -e 's|^video_driver = .*|video_driver = "glcore"|'
|
||||
fi
|
||||
fi
|
||||
|
||||
# iMX6
|
||||
if [ "${PROJECT}" = "NXP" -a "${DEVICE}" = "iMX6" ]; then
|
||||
echo 'audio_device = "default:CARD=DWHDMI"' >> ${INSTALL}/etc/retroarch.cfg
|
||||
echo 'audio_enable_menu = "true"' >> ${INSTALL}/etc/retroarch.cfg
|
||||
echo 'audio_enable_menu_ok = "true"' >> ${INSTALL}/etc/retroarch.cfg
|
||||
echo 'audio_enable_menu_cancel = "true"' >> ${INSTALL}/etc/retroarch.cfg
|
||||
echo 'audio_enable_menu_notice = "true"' >> ${INSTALL}/etc/retroarch.cfg
|
||||
sed -i ${ra_config} -e 's|^audio_device = .*|audio_device = "default:CARD=DWHDMI"|'
|
||||
sed -i ${ra_config} -e 's|^audio_enable_menu = .*|audio_enable_menu = "true"|'
|
||||
sed -i ${ra_config} -e 's|^audio_enable_menu_ok = .*|audio_enable_menu_ok = "true"|'
|
||||
sed -i ${ra_config} -e 's|^audio_enable_menu_cancel = .*|audio_enable_menu_cancel = "true"|'
|
||||
sed -i ${ra_config} -e 's|^audio_enable_menu_notice = .*|audio_enable_menu_notice = "true"|'
|
||||
fi
|
||||
|
||||
# Switch
|
||||
if [ "${PROJECT}" = "L4T" -a "${DEVICE}" = "Switch" ] || [ "${PROJECT}" = "Ayn" -a "${DEVICE}" = "Odin" ]; then
|
||||
echo 'menu_mouse_enable = "false"' >> ${INSTALL}/etc/retroarch.cfg
|
||||
echo 'menu_pointer_enable = "true"'>> ${INSTALL}/etc/retroarch.cfg
|
||||
echo 'video_crop_overscan = "false"' >> ${INSTALL}/etc/retroarch.cfg
|
||||
sed -i ${ra_config} -e 's|^menu_pointer_enable = .*|menu_pointer_enable = "true"|'
|
||||
sed -i ${ra_config} -e 's|^video_crop_overscan = .*|video_crop_overscan = "false"|'
|
||||
|
||||
if [ ! "${PROJECT}" = "Ayn" -a ! "${DEVICE}" = "Odin" ]; then
|
||||
echo 'input_joypad_driver = "udev"' >> ${INSTALL}/etc/retroarch.cfg
|
||||
echo 'video_hard_sync = "true"' >> ${INSTALL}/etc/retroarch.cfg
|
||||
sed -i ${ra_config} -e 's|^video_hard_sync = .*|video_hard_sync = "true"|'
|
||||
fi
|
||||
|
||||
sed -i -e 's|^input_driver =.*|input_driver= "x"|' ${INSTALL}/etc/retroarch.cfg
|
||||
sed -i -e 's|^video_smooth =.*|video_smooth = "true"|' ${INSTALL}/etc/retroarch.cfg
|
||||
sed -i -e 's|^menu_driver =.*|menu_driver = "ozone"|' ${INSTALL}/etc/retroarch.cfg
|
||||
sed -i ${ra_config} -e 's|^input_driver = .*|input_driver = "x"|'
|
||||
sed -i ${ra_config} -e 's|^video_smooth = .*|video_smooth = "true"|'
|
||||
sed -i ${ra_config} -e 's|^menu_driver = .*|menu_driver = "ozone"|'
|
||||
|
||||
if [ ! "${PROJECT}" = "Ayn" -a ! "${DEVICE}" = "Odin" ]; then
|
||||
#Set Joypad as joypad with analog
|
||||
echo 'input_libretro_device_p1 = "5"' >> ${INSTALL}/etc/retroarch.cfg
|
||||
sed -i ${ra_config} -e 's|^input_device_p1 = .*|input_device_p1 = "5"|'
|
||||
else
|
||||
echo 'video_driver = "glcore"' >> ${INSTALL}/etc/retroarch.cfg
|
||||
sed -i -e 's|^audio_driver =.*|audio_driver = "pulse"|' ${INSTALL}/etc/retroarch.cfg
|
||||
echo video_vsync = "false" >> ${INSTALL}/etc/retroarch.cfg
|
||||
sed -i ${ra_config} -e 's|^video_river = .*|video_driver = "glcore"|'
|
||||
sed -i ${ra_config} -e 's|^audio_driver = .*|audio_driver = "pulse"|'
|
||||
sed -i ${ra_config} -e 's|^video_vsync = .*|video_vsync = "false"|'
|
||||
fi
|
||||
|
||||
#HACK: Temporary hack for touchscreen
|
||||
sed -i -e 's|^video_windowed_fullscreen =.*|video_windowed_fullscreen = "true"|' ${INSTALL}/etc/retroarch.cfg
|
||||
sed -i ${ra_config} -e 's|^video_windowed_fullscreen = .*|video_windowed_fullscreen = "true"|'
|
||||
fi
|
||||
|
||||
# sort the options in config file
|
||||
sort ${INSTALL}/etc/retroarch.cfg > ${INSTALL}/etc/retroarch-sorted.cfg
|
||||
mv ${INSTALL}/etc/retroarch-sorted.cfg ${INSTALL}/etc/retroarch.cfg
|
||||
|
||||
# create default environment file
|
||||
echo "HOME=/storage" >> ${INSTALL}/usr/lib/retroarch/retroarch-env.conf
|
||||
if [ "${DISPLAYSERVER}" = "x11" ]; then
|
||||
|
||||
-227
@@ -1,227 +0,0 @@
|
||||
diff --git a/command.c b/command.c
|
||||
index ff962d4d44..199be309b7 100644
|
||||
--- a/command.c
|
||||
+++ b/command.c
|
||||
@@ -43,6 +43,9 @@
|
||||
|
||||
#ifdef HAVE_MENU
|
||||
#include "menu/menu_driver.h"
|
||||
+#ifdef HAVE_LAKKA
|
||||
+#include "file_path_special.h"
|
||||
+#endif
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_NETWORKING
|
||||
@@ -1967,6 +1970,43 @@ void command_event_save_current_config(enum override_type type)
|
||||
}
|
||||
}
|
||||
break;
|
||||
+#ifdef HAVE_LAKKA
|
||||
+ case OVERRIDE_DEFAULT_RARCH_CFG:
|
||||
+ {
|
||||
+ size_t _len;
|
||||
+ char msg[256];
|
||||
+ msg[0] = '\0';
|
||||
+ char conf_path[PATH_MAX_LENGTH];
|
||||
+ char application_data[PATH_MAX_LENGTH] = {0};
|
||||
+
|
||||
+ if(!fill_pathname_application_data(application_data,
|
||||
+ sizeof(application_data)))
|
||||
+ goto error_saving_to_default_config;
|
||||
+
|
||||
+ if(!fill_pathname_join_special(conf_path, application_data,
|
||||
+ FILE_PATH_MAIN_CONFIG, sizeof(conf_path)))
|
||||
+ goto error_saving_to_default_config;
|
||||
+
|
||||
+ path_set(RARCH_PATH_CONFIG, conf_path);
|
||||
+
|
||||
+ if (path_is_empty(RARCH_PATH_CONFIG))
|
||||
+ goto error_saving_to_default_config;
|
||||
+
|
||||
+ if (runloop_st->flags & RUNLOOP_FLAG_OVERRIDES_ACTIVE)
|
||||
+ _len = strlcpy(msg, msg_hash_to_str(MSG_OVERRIDES_ACTIVE_NOT_SAVING), sizeof(msg));
|
||||
+ else
|
||||
+ _len = command_event_save_config(path_get(RARCH_PATH_CONFIG), msg, sizeof(msg));
|
||||
+
|
||||
+ runloop_msg_queue_push(msg, _len, 1, 180, true, NULL,
|
||||
+ MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
+ break;
|
||||
+error_saving_to_default_config:
|
||||
+ _len = strlcpy(msg, "Error saving to default configuration file.", sizeof(msg));
|
||||
+ runloop_msg_queue_push(msg, _len, 1, 180, true, NULL,
|
||||
+ MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_ERROR);
|
||||
+ }
|
||||
+ break;
|
||||
+#endif /* HAVE_LAKKA */
|
||||
case OVERRIDE_GAME:
|
||||
case OVERRIDE_CORE:
|
||||
case OVERRIDE_CONTENT_DIR:
|
||||
diff --git a/command.h b/command.h
|
||||
index d032d55882..98c25afd77 100644
|
||||
--- a/command.h
|
||||
+++ b/command.h
|
||||
@@ -168,6 +168,9 @@ enum event_command
|
||||
CMD_EVENT_MENU_RESET_TO_DEFAULT_CONFIG,
|
||||
CMD_EVENT_MENU_SAVE_CONFIG,
|
||||
CMD_EVENT_MENU_SAVE_CURRENT_CONFIG,
|
||||
+#ifdef HAVE_LAKKA
|
||||
+ CMD_EVENT_MENU_SAVE_DEFAULT_CONFIG,
|
||||
+#endif
|
||||
CMD_EVENT_MENU_SAVE_CURRENT_CONFIG_OVERRIDE_CORE,
|
||||
CMD_EVENT_MENU_SAVE_CURRENT_CONFIG_OVERRIDE_CONTENT_DIR,
|
||||
CMD_EVENT_MENU_SAVE_CURRENT_CONFIG_OVERRIDE_GAME,
|
||||
diff --git a/configuration.h b/configuration.h
|
||||
index fb1bdc51cf..e3c3e3c66b 100644
|
||||
--- a/configuration.h
|
||||
+++ b/configuration.h
|
||||
@@ -85,7 +85,12 @@ enum override_type
|
||||
OVERRIDE_AS,
|
||||
OVERRIDE_CORE,
|
||||
OVERRIDE_CONTENT_DIR,
|
||||
+#ifndef HAVE_LAKKA
|
||||
OVERRIDE_GAME
|
||||
+#else
|
||||
+ OVERRIDE_GAME,
|
||||
+ OVERRIDE_DEFAULT_RARCH_CFG
|
||||
+#endif
|
||||
};
|
||||
|
||||
enum settings_glob_flags
|
||||
diff --git a/intl/msg_hash_lbl.h b/intl/msg_hash_lbl.h
|
||||
index eecdf071e2..b1eea63be0 100644
|
||||
--- a/intl/msg_hash_lbl.h
|
||||
+++ b/intl/msg_hash_lbl.h
|
||||
@@ -3576,6 +3576,12 @@ MSG_HASH(
|
||||
MENU_ENUM_LABEL_SAVE_CURRENT_CONFIG,
|
||||
"save_current_config"
|
||||
)
|
||||
+#ifdef HAVE_LAKKA
|
||||
+MSG_HASH(
|
||||
+ MENU_ENUM_LABEL_SAVE_DEFAULT_CONFIG,
|
||||
+ "save_default_config"
|
||||
+ )
|
||||
+#endif
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_OVERRIDE_FILE_LOAD,
|
||||
"override_file_load"
|
||||
diff --git a/intl/msg_hash_us.h b/intl/msg_hash_us.h
|
||||
index 799d5f467e..7f1a29b80b 100644
|
||||
--- a/intl/msg_hash_us.h
|
||||
+++ b/intl/msg_hash_us.h
|
||||
@@ -1131,6 +1131,16 @@ MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_SAVE_CURRENT_CONFIG,
|
||||
"Overwrite current configuration file."
|
||||
)
|
||||
+#ifdef HAVE_LAKKA
|
||||
+MSG_HASH(
|
||||
+ MENU_ENUM_LABEL_VALUE_SAVE_DEFAULT_CONFIG,
|
||||
+ "Save To Default Configuration File"
|
||||
+ )
|
||||
+MSG_HASH(
|
||||
+ MENU_ENUM_SUBLABEL_SAVE_DEFAULT_CONFIG,
|
||||
+ "Overwrite default configuration file."
|
||||
+ )
|
||||
+#endif
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_SAVE_NEW_CONFIG,
|
||||
"Save New Configuration"
|
||||
diff --git a/menu/cbs/menu_cbs_sublabel.c b/menu/cbs/menu_cbs_sublabel.c
|
||||
index 8fdaa15f37..d7899121be 100644
|
||||
--- a/menu/cbs/menu_cbs_sublabel.c
|
||||
+++ b/menu/cbs/menu_cbs_sublabel.c
|
||||
@@ -235,6 +235,9 @@ DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_accessibility_narrator_speech_speed,
|
||||
|
||||
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_load_config, MENU_ENUM_SUBLABEL_CONFIGURATIONS)
|
||||
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_save_current_config, MENU_ENUM_SUBLABEL_SAVE_CURRENT_CONFIG)
|
||||
+#ifdef HAVE_LAKKA
|
||||
+DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_save_default_config, MENU_ENUM_SUBLABEL_SAVE_DEFAULT_CONFIG)
|
||||
+#endif
|
||||
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_save_new_config, MENU_ENUM_SUBLABEL_SAVE_NEW_CONFIG)
|
||||
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_reset_to_default_config, MENU_ENUM_SUBLABEL_RESET_TO_DEFAULT_CONFIG)
|
||||
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_quick_menu_override_options, MENU_ENUM_SUBLABEL_QUICK_MENU_OVERRIDE_OPTIONS)
|
||||
@@ -3391,6 +3394,11 @@ int menu_cbs_init_bind_sublabel(menu_file_list_cbs_t *cbs,
|
||||
case MENU_ENUM_LABEL_SAVE_CURRENT_CONFIG:
|
||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_save_current_config);
|
||||
break;
|
||||
+#ifdef HAVE_LAKKA
|
||||
+ case MENU_ENUM_LABEL_SAVE_DEFAULT_CONFIG:
|
||||
+ BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_save_default_config);
|
||||
+ break;
|
||||
+#endif
|
||||
case MENU_ENUM_LABEL_SAVE_NEW_CONFIG:
|
||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_save_new_config);
|
||||
break;
|
||||
diff --git a/menu/menu_displaylist.c b/menu/menu_displaylist.c
|
||||
index 64bd115a84..d4678604a7 100644
|
||||
--- a/menu/menu_displaylist.c
|
||||
+++ b/menu/menu_displaylist.c
|
||||
@@ -10757,6 +10757,14 @@ unsigned menu_displaylist_build_list(
|
||||
MENU_ENUM_LABEL_SAVE_CURRENT_CONFIG,
|
||||
MENU_SETTING_ACTION, 0, 0, NULL))
|
||||
count++;
|
||||
+#ifdef HAVE_LAKKA
|
||||
+ if (menu_entries_append(list,
|
||||
+ msg_hash_to_str(MENU_ENUM_LABEL_VALUE_SAVE_DEFAULT_CONFIG),
|
||||
+ msg_hash_to_str(MENU_ENUM_LABEL_SAVE_DEFAULT_CONFIG),
|
||||
+ MENU_ENUM_LABEL_SAVE_DEFAULT_CONFIG,
|
||||
+ MENU_SETTING_ACTION, 0, 0, NULL))
|
||||
+ count++;
|
||||
+#endif
|
||||
if (menu_entries_append(list,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_SAVE_NEW_CONFIG),
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_SAVE_NEW_CONFIG),
|
||||
diff --git a/menu/menu_setting.c b/menu/menu_setting.c
|
||||
index ed08912c25..ed7d463a2c 100644
|
||||
--- a/menu/menu_setting.c
|
||||
+++ b/menu/menu_setting.c
|
||||
@@ -10424,6 +10424,18 @@ static bool setting_append_list(
|
||||
MENU_SETTINGS_LIST_CURRENT_ADD_CMD(list, list_info, CMD_EVENT_MENU_SAVE_CURRENT_CONFIG);
|
||||
SETTINGS_DATA_LIST_CURRENT_ADD_FLAGS(list, list_info, SD_FLAG_LAKKA_ADVANCED);
|
||||
|
||||
+#ifdef HAVE_LAKKA
|
||||
+ CONFIG_ACTION(
|
||||
+ list, list_info,
|
||||
+ MENU_ENUM_LABEL_SAVE_DEFAULT_CONFIG,
|
||||
+ MENU_ENUM_LABEL_VALUE_SAVE_DEFAULT_CONFIG,
|
||||
+ &group_info,
|
||||
+ &subgroup_info,
|
||||
+ parent_group);
|
||||
+ MENU_SETTINGS_LIST_CURRENT_ADD_CMD(list, list_info, CMD_EVENT_MENU_SAVE_DEFAULT_CONFIG);
|
||||
+ SETTINGS_DATA_LIST_CURRENT_ADD_FLAGS(list, list_info, SD_FLAG_LAKKA_ADVANCED);
|
||||
+#endif
|
||||
+
|
||||
CONFIG_ACTION(
|
||||
list, list_info,
|
||||
MENU_ENUM_LABEL_SAVE_NEW_CONFIG,
|
||||
diff --git a/msg_hash.h b/msg_hash.h
|
||||
index fb76dfc69a..70b734e19e 100644
|
||||
--- a/msg_hash.h
|
||||
+++ b/msg_hash.h
|
||||
@@ -3697,6 +3697,9 @@ enum msg_hash_enums
|
||||
|
||||
MENU_LABEL(RESET_TO_DEFAULT_CONFIG),
|
||||
MENU_LABEL(SAVE_CURRENT_CONFIG),
|
||||
+#ifdef HAVE_LAKKA
|
||||
+ MENU_LABEL(SAVE_DEFAULT_CONFIG),
|
||||
+#endif
|
||||
MENU_LABEL(SAVE_CURRENT_CONFIG_OVERRIDE_CORE),
|
||||
MENU_LABEL(SAVE_CURRENT_CONFIG_OVERRIDE_CONTENT_DIR),
|
||||
MENU_LABEL(SAVE_CURRENT_CONFIG_OVERRIDE_GAME),
|
||||
diff --git a/retroarch.c b/retroarch.c
|
||||
index 504df5e3f3..bde109bd79 100644
|
||||
--- a/retroarch.c
|
||||
+++ b/retroarch.c
|
||||
@@ -4526,6 +4526,13 @@ bool command_event(enum event_command cmd, void *data)
|
||||
command_event_save_current_config(OVERRIDE_NONE);
|
||||
#endif
|
||||
break;
|
||||
+#ifdef HAVE_LAKKA
|
||||
+ case CMD_EVENT_MENU_SAVE_DEFAULT_CONFIG:
|
||||
+#ifdef HAVE_CONFIGFILE
|
||||
+ command_event_save_current_config(OVERRIDE_DEFAULT_RARCH_CFG);
|
||||
+#endif
|
||||
+ break;
|
||||
+#endif
|
||||
case CMD_EVENT_MENU_SAVE_CURRENT_CONFIG_OVERRIDE_CORE:
|
||||
#ifdef HAVE_CONFIGFILE
|
||||
command_event_save_current_config(OVERRIDE_CORE);
|
||||
@@ -29,6 +29,12 @@ case "${LINUX}" in
|
||||
PKG_SOURCE_NAME="linux-${LINUX}-${PKG_VERSION}.tar.gz"
|
||||
PKG_PATCH_DIRS="raspberrypi rtlwifi/6.13 rtlwifi/6.14 rtlwifi/6.15 rtlwifi/6.18"
|
||||
;;
|
||||
raspberrypi-5.10.y)
|
||||
PKG_VERSION="8e1110a580887f4b82303b9354c25d7e2ff5860e" # 5.10.110
|
||||
PKG_SHA256="e3244061e44426eafe97541633b87a71b8be1828d1bc48a18ec4c83fddb2f4c5"
|
||||
PKG_URL="https://github.com/raspberrypi/linux/archive/${PKG_VERSION}.tar.gz"
|
||||
PKG_SOURCE_NAME="linux-${LINUX}-${PKG_VERSION}.tar.gz"
|
||||
;;
|
||||
L4T)
|
||||
if [ -z "${L4T_KERNEL_VERSION}" ]; then
|
||||
echo -n "${DEVICE:-${PROJECT}}: ${KERNEL} - you must set L4T_KERNEL_VERSION in projects/${PROJECT}/"
|
||||
|
||||
@@ -0,0 +1,317 @@
|
||||
From 234cfe71ba316c9666ecd501b7df1a4b5bdb7c03 Mon Sep 17 00:00:00 2001
|
||||
From: Mateusz Kwiatkowski <[email protected]>
|
||||
Date: Mon, 11 Oct 2021 23:34:25 +0200
|
||||
Subject: [PATCH 1/2] drm/vc4: Add vertically scaled progressive modes for VEC
|
||||
|
||||
The Raspberry Pi firmware, when configured to output progressive
|
||||
composite video, scales 720x480/720x576 framebuffer into a
|
||||
720x240/720x288 physical video mode.
|
||||
|
||||
This commit adds support for replicating such behavior, as this provides
|
||||
square-ish virtual pixels, and some userland software rely on this.
|
||||
|
||||
Signed-off-by: Mateusz Kwiatkowski <[email protected]>
|
||||
---
|
||||
drivers/gpu/drm/vc4/vc4_plane.c | 40 +++++++++++++++++++++
|
||||
drivers/gpu/drm/vc4/vc4_vec.c | 63 ++++++++++++++++++++++++++++++---
|
||||
2 files changed, 98 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/vc4/vc4_plane.c b/drivers/gpu/drm/vc4/vc4_plane.c
|
||||
index 7947cf47b6e13..96b60fb245982 100644
|
||||
--- a/drivers/gpu/drm/vc4/vc4_plane.c
|
||||
+++ b/drivers/gpu/drm/vc4/vc4_plane.c
|
||||
@@ -334,6 +334,42 @@ static int vc4_plane_margins_adj(struct drm_plane_state *pstate)
|
||||
return 0;
|
||||
}
|
||||
|
||||
+static int vc4_plane_scaling_adj(struct drm_plane_state *pstate)
|
||||
+{
|
||||
+ struct vc4_plane_state *vc4_pstate = to_vc4_plane_state(pstate);
|
||||
+ struct drm_crtc_state *crtc_state;
|
||||
+
|
||||
+ crtc_state = drm_atomic_get_new_crtc_state(pstate->state,
|
||||
+ pstate->crtc);
|
||||
+
|
||||
+ if (crtc_state->mode.hdisplay != crtc_state->adjusted_mode.hdisplay) {
|
||||
+ vc4_pstate->crtc_x =
|
||||
+ DIV_ROUND_CLOSEST(vc4_pstate->crtc_x *
|
||||
+ crtc_state->adjusted_mode.hdisplay,
|
||||
+ crtc_state->mode.hdisplay);
|
||||
+ vc4_pstate->crtc_w =
|
||||
+ DIV_ROUND_CLOSEST(vc4_pstate->crtc_w *
|
||||
+ crtc_state->adjusted_mode.hdisplay,
|
||||
+ crtc_state->mode.hdisplay);
|
||||
+ }
|
||||
+
|
||||
+ if (crtc_state->mode.vdisplay != crtc_state->adjusted_mode.vdisplay) {
|
||||
+ vc4_pstate->crtc_y =
|
||||
+ DIV_ROUND_CLOSEST(vc4_pstate->crtc_y *
|
||||
+ crtc_state->adjusted_mode.vdisplay,
|
||||
+ crtc_state->mode.vdisplay);
|
||||
+ vc4_pstate->crtc_h =
|
||||
+ DIV_ROUND_CLOSEST(vc4_pstate->crtc_h *
|
||||
+ crtc_state->adjusted_mode.vdisplay,
|
||||
+ crtc_state->mode.vdisplay);
|
||||
+ }
|
||||
+
|
||||
+ if (!vc4_pstate->crtc_w || !vc4_pstate->crtc_h)
|
||||
+ return -EINVAL;
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
static int vc4_plane_setup_clipping_and_scaling(struct drm_plane_state *state)
|
||||
{
|
||||
struct vc4_plane_state *vc4_state = to_vc4_plane_state(state);
|
||||
@@ -378,6 +414,10 @@ static int vc4_plane_setup_clipping_and_scaling(struct drm_plane_state *state)
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
+ ret = vc4_plane_scaling_adj(state);
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+
|
||||
vc4_state->x_scaling[0] = vc4_get_scaling_mode(vc4_state->src_w[0],
|
||||
vc4_state->crtc_w);
|
||||
vc4_state->y_scaling[0] = vc4_get_scaling_mode(vc4_state->src_h[0],
|
||||
diff --git a/drivers/gpu/drm/vc4/vc4_vec.c b/drivers/gpu/drm/vc4/vc4_vec.c
|
||||
index 255e5c6c48e04..14eb28c859eb4 100644
|
||||
--- a/drivers/gpu/drm/vc4/vc4_vec.c
|
||||
+++ b/drivers/gpu/drm/vc4/vc4_vec.c
|
||||
@@ -253,6 +253,7 @@ enum vc4_vec_tv_mode_id {
|
||||
struct vc4_vec_tv_mode {
|
||||
const struct drm_display_mode *interlaced_mode;
|
||||
const struct drm_display_mode *progressive_mode;
|
||||
+ const struct drm_display_mode *scaled_progressive_mode;
|
||||
u32 config0;
|
||||
u32 config1;
|
||||
u32 custom_freq;
|
||||
@@ -298,6 +299,12 @@ static const struct drm_display_mode drm_mode_240p = {
|
||||
240, 240 + 3, 240 + 3 + 3, 262, 0, 0)
|
||||
};
|
||||
|
||||
+static const struct drm_display_mode drm_mode_scaled_480p = {
|
||||
+ DRM_MODE("720x480 (scaled)", DRM_MODE_TYPE_DRIVER, 2 * 13500,
|
||||
+ 720, 720 + 14, 720 + 14 + 64, 720 + 14 + 64 + 60, 0,
|
||||
+ 2 * 240, 2 * (240 + 3), 2 * (240 + 3 + 3), 2 * 262, 0, 0)
|
||||
+};
|
||||
+
|
||||
static const struct drm_display_mode drm_mode_576i = {
|
||||
DRM_MODE("720x576i", DRM_MODE_TYPE_DRIVER, 13500,
|
||||
720, 720 + 20, 720 + 20 + 64, 720 + 20 + 64 + 60, 0,
|
||||
@@ -311,16 +318,24 @@ static const struct drm_display_mode drm_mode_288p = {
|
||||
288, 288 + 2, 288 + 2 + 3, 312, 0, 0)
|
||||
};
|
||||
|
||||
+static const struct drm_display_mode drm_mode_scaled_576p = {
|
||||
+ DRM_MODE("720x576 (scaled)", DRM_MODE_TYPE_DRIVER, 2 * 13500,
|
||||
+ 720, 720 + 20, 720 + 20 + 64, 720 + 20 + 64 + 60, 0,
|
||||
+ 2 * 288, 2 * (288 + 2), 2 * (288 + 2 + 3), 2 * 312, 0, 0)
|
||||
+};
|
||||
+
|
||||
static const struct vc4_vec_tv_mode vc4_vec_tv_modes[] = {
|
||||
[VC4_VEC_TV_MODE_NTSC] = {
|
||||
.interlaced_mode = &drm_mode_480i,
|
||||
.progressive_mode = &drm_mode_240p,
|
||||
+ .scaled_progressive_mode = &drm_mode_scaled_480p,
|
||||
.config0 = VEC_CONFIG0_NTSC_STD | VEC_CONFIG0_PDEN,
|
||||
.config1 = VEC_CONFIG1_C_CVBS_CVBS,
|
||||
},
|
||||
[VC4_VEC_TV_MODE_NTSC_J] = {
|
||||
.interlaced_mode = &drm_mode_480i,
|
||||
.progressive_mode = &drm_mode_240p,
|
||||
+ .scaled_progressive_mode = &drm_mode_scaled_480p,
|
||||
.config0 = VEC_CONFIG0_NTSC_STD,
|
||||
.config1 = VEC_CONFIG1_C_CVBS_CVBS,
|
||||
},
|
||||
@@ -328,6 +343,7 @@ static const struct vc4_vec_tv_mode vc4_vec_tv_modes[] = {
|
||||
/* NTSC with PAL chroma frequency */
|
||||
.interlaced_mode = &drm_mode_480i,
|
||||
.progressive_mode = &drm_mode_240p,
|
||||
+ .scaled_progressive_mode = &drm_mode_scaled_480p,
|
||||
.config0 = VEC_CONFIG0_NTSC_STD,
|
||||
.config1 = VEC_CONFIG1_C_CVBS_CVBS | VEC_CONFIG1_CUSTOM_FREQ,
|
||||
.custom_freq = 0x2a098acb,
|
||||
@@ -335,18 +351,21 @@ static const struct vc4_vec_tv_mode vc4_vec_tv_modes[] = {
|
||||
[VC4_VEC_TV_MODE_PAL] = {
|
||||
.interlaced_mode = &drm_mode_576i,
|
||||
.progressive_mode = &drm_mode_288p,
|
||||
+ .scaled_progressive_mode = &drm_mode_scaled_576p,
|
||||
.config0 = VEC_CONFIG0_PAL_BDGHI_STD,
|
||||
.config1 = VEC_CONFIG1_C_CVBS_CVBS,
|
||||
},
|
||||
[VC4_VEC_TV_MODE_PAL_M] = {
|
||||
.interlaced_mode = &drm_mode_480i,
|
||||
.progressive_mode = &drm_mode_240p,
|
||||
+ .scaled_progressive_mode = &drm_mode_scaled_480p,
|
||||
.config0 = VEC_CONFIG0_PAL_M_STD,
|
||||
.config1 = VEC_CONFIG1_C_CVBS_CVBS,
|
||||
},
|
||||
[VC4_VEC_TV_MODE_PAL_N] = {
|
||||
.interlaced_mode = &drm_mode_576i,
|
||||
.progressive_mode = &drm_mode_288p,
|
||||
+ .scaled_progressive_mode = &drm_mode_scaled_576p,
|
||||
.config0 = VEC_CONFIG0_PAL_N_STD,
|
||||
.config1 = VEC_CONFIG1_C_CVBS_CVBS,
|
||||
},
|
||||
@@ -354,6 +373,7 @@ static const struct vc4_vec_tv_mode vc4_vec_tv_modes[] = {
|
||||
/* PAL-M with chroma frequency of regular PAL */
|
||||
.interlaced_mode = &drm_mode_480i,
|
||||
.progressive_mode = &drm_mode_240p,
|
||||
+ .scaled_progressive_mode = &drm_mode_scaled_480p,
|
||||
.config0 = VEC_CONFIG0_PAL_M_STD,
|
||||
.config1 = VEC_CONFIG1_C_CVBS_CVBS | VEC_CONFIG1_CUSTOM_FREQ,
|
||||
.custom_freq = 0x2a098acb,
|
||||
@@ -361,6 +381,7 @@ static const struct vc4_vec_tv_mode vc4_vec_tv_modes[] = {
|
||||
[VC4_VEC_TV_MODE_SECAM] = {
|
||||
.interlaced_mode = &drm_mode_576i,
|
||||
.progressive_mode = &drm_mode_288p,
|
||||
+ .scaled_progressive_mode = &drm_mode_scaled_576p,
|
||||
.config0 = VEC_CONFIG0_SECAM_STD,
|
||||
.config1 = VEC_CONFIG1_C_CVBS_CVBS,
|
||||
.custom_freq = 0x29c71c72,
|
||||
@@ -420,7 +441,9 @@ static void vc4_vec_connector_destroy(struct drm_connector *connector)
|
||||
static int vc4_vec_connector_get_modes(struct drm_connector *connector)
|
||||
{
|
||||
struct drm_connector_state *state = connector->state;
|
||||
- struct drm_display_mode *interlaced_mode, *progressive_mode;
|
||||
+ struct drm_display_mode *interlaced_mode;
|
||||
+ struct drm_display_mode *progressive_mode;
|
||||
+ struct drm_display_mode *scaled_progressive_mode;
|
||||
|
||||
interlaced_mode =
|
||||
drm_mode_duplicate(connector->dev,
|
||||
@@ -428,24 +451,33 @@ static int vc4_vec_connector_get_modes(struct drm_connector *connector)
|
||||
progressive_mode =
|
||||
drm_mode_duplicate(connector->dev,
|
||||
vc4_vec_tv_modes[state->tv.mode].progressive_mode);
|
||||
- if (!interlaced_mode || !progressive_mode) {
|
||||
+ scaled_progressive_mode =
|
||||
+ drm_mode_duplicate(connector->dev,
|
||||
+ vc4_vec_tv_modes[state->tv.mode].scaled_progressive_mode);
|
||||
+ if (!interlaced_mode || !progressive_mode || !scaled_progressive_mode) {
|
||||
DRM_ERROR("Failed to create a new display mode\n");
|
||||
drm_mode_destroy(connector->dev, interlaced_mode);
|
||||
drm_mode_destroy(connector->dev, progressive_mode);
|
||||
+ drm_mode_destroy(connector->dev, scaled_progressive_mode);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
if (connector->cmdline_mode.specified &&
|
||||
connector->cmdline_mode.refresh_specified &&
|
||||
- !connector->cmdline_mode.interlace)
|
||||
+ !connector->cmdline_mode.interlace) {
|
||||
/* progressive mode set at boot, let's make it preferred */
|
||||
- progressive_mode->type |= DRM_MODE_TYPE_PREFERRED;
|
||||
- else
|
||||
+ if (connector->cmdline_mode.yres > 300)
|
||||
+ scaled_progressive_mode->type |= DRM_MODE_TYPE_PREFERRED;
|
||||
+ else
|
||||
+ progressive_mode->type |= DRM_MODE_TYPE_PREFERRED;
|
||||
+ } else {
|
||||
/* otherwise, interlaced mode is preferred */
|
||||
interlaced_mode->type |= DRM_MODE_TYPE_PREFERRED;
|
||||
+ }
|
||||
|
||||
drm_mode_probed_add(connector, interlaced_mode);
|
||||
drm_mode_probed_add(connector, progressive_mode);
|
||||
+ drm_mode_probed_add(connector, scaled_progressive_mode);
|
||||
|
||||
return 1;
|
||||
}
|
||||
@@ -628,6 +660,27 @@ static int vc4_vec_encoder_atomic_check(struct drm_encoder *encoder,
|
||||
const struct drm_display_mode *reference_mode =
|
||||
vc4_vec_tv_modes[conn_state->tv.mode].interlaced_mode;
|
||||
|
||||
+ if (!(crtc_state->adjusted_mode.flags & DRM_MODE_FLAG_INTERLACE) &&
|
||||
+ crtc_state->adjusted_mode.vtotal > 312) {
|
||||
+ /* vertically scaled progressive mode */
|
||||
+ if (crtc_state->adjusted_mode.crtc_vdisplay % 2 != 0 ||
|
||||
+ crtc_state->adjusted_mode.crtc_vsync_start % 2 != 0 ||
|
||||
+ crtc_state->adjusted_mode.crtc_vsync_end % 2 != 0 ||
|
||||
+ crtc_state->adjusted_mode.crtc_vtotal % 2 != 0)
|
||||
+ return -EINVAL;
|
||||
+
|
||||
+ crtc_state->adjusted_mode.clock /= 2;
|
||||
+ crtc_state->adjusted_mode.crtc_clock /= 2;
|
||||
+ crtc_state->adjusted_mode.vdisplay /= 2;
|
||||
+ crtc_state->adjusted_mode.crtc_vdisplay /= 2;
|
||||
+ crtc_state->adjusted_mode.vsync_start /= 2;
|
||||
+ crtc_state->adjusted_mode.crtc_vsync_start /= 2;
|
||||
+ crtc_state->adjusted_mode.vsync_end /= 2;
|
||||
+ crtc_state->adjusted_mode.crtc_vsync_end /= 2;
|
||||
+ crtc_state->adjusted_mode.vtotal /= 2;
|
||||
+ crtc_state->adjusted_mode.crtc_vtotal /= 2;
|
||||
+ }
|
||||
+
|
||||
if (crtc_state->adjusted_mode.crtc_clock != reference_mode->clock ||
|
||||
crtc_state->adjusted_mode.crtc_htotal != reference_mode->htotal ||
|
||||
crtc_state->adjusted_mode.crtc_hdisplay % 4 != 0 ||
|
||||
|
||||
From 3c08549f11d5fb031661d8b1d1b2325ea6153656 Mon Sep 17 00:00:00 2001
|
||||
From: Mateusz Kwiatkowski <[email protected]>
|
||||
Date: Tue, 12 Oct 2021 00:30:02 +0200
|
||||
Subject: [PATCH 2/2] drm/vc4: Add support for horizontally caled VEC modes
|
||||
|
||||
Composite output uses non-square pixels. By allowing horizontally scaled
|
||||
modes, we can simulate a different pixel clock and thus make it possible
|
||||
to simulate square pixels at either 4:3 or 16:9 target aspect ratio.
|
||||
|
||||
Signed-off-by: Mateusz Kwiatkowski <[email protected]>
|
||||
---
|
||||
drivers/gpu/drm/vc4/vc4_vec.c | 40 ++++++++++++++++++++++++++++++-----
|
||||
1 file changed, 35 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/vc4/vc4_vec.c b/drivers/gpu/drm/vc4/vc4_vec.c
|
||||
index 14eb28c859eb4..e60a5c1e01472 100644
|
||||
--- a/drivers/gpu/drm/vc4/vc4_vec.c
|
||||
+++ b/drivers/gpu/drm/vc4/vc4_vec.c
|
||||
@@ -681,13 +681,43 @@ static int vc4_vec_encoder_atomic_check(struct drm_encoder *encoder,
|
||||
crtc_state->adjusted_mode.crtc_vtotal /= 2;
|
||||
}
|
||||
|
||||
- if (crtc_state->adjusted_mode.crtc_clock != reference_mode->clock ||
|
||||
- crtc_state->adjusted_mode.crtc_htotal != reference_mode->htotal ||
|
||||
- crtc_state->adjusted_mode.crtc_hdisplay % 4 != 0 ||
|
||||
- crtc_state->adjusted_mode.crtc_hsync_end -
|
||||
- crtc_state->adjusted_mode.crtc_hsync_start < 1)
|
||||
+ if (crtc_state->adjusted_mode.hdisplay % 4 != 0 ||
|
||||
+ crtc_state->adjusted_mode.hsync_end -
|
||||
+ crtc_state->adjusted_mode.hsync_start < 1)
|
||||
return -EINVAL;
|
||||
|
||||
+ crtc_state->adjusted_mode.hdisplay =
|
||||
+ DIV_ROUND_CLOSEST(crtc_state->adjusted_mode.hdisplay *
|
||||
+ reference_mode->clock,
|
||||
+ crtc_state->adjusted_mode.clock);
|
||||
+ crtc_state->adjusted_mode.hsync_start =
|
||||
+ DIV_ROUND_CLOSEST(crtc_state->adjusted_mode.hsync_start *
|
||||
+ reference_mode->clock,
|
||||
+ crtc_state->adjusted_mode.clock);
|
||||
+ crtc_state->adjusted_mode.hsync_end =
|
||||
+ DIV_ROUND_CLOSEST(crtc_state->adjusted_mode.hsync_end *
|
||||
+ reference_mode->clock,
|
||||
+ crtc_state->adjusted_mode.clock);
|
||||
+ crtc_state->adjusted_mode.htotal =
|
||||
+ DIV_ROUND_CLOSEST(crtc_state->adjusted_mode.htotal *
|
||||
+ reference_mode->clock,
|
||||
+ crtc_state->adjusted_mode.clock);
|
||||
+ crtc_state->adjusted_mode.clock = reference_mode->clock;
|
||||
+
|
||||
+ if (crtc_state->adjusted_mode.htotal != reference_mode->htotal)
|
||||
+ return -EINVAL;
|
||||
+
|
||||
+ if (crtc_state->adjusted_mode.hsync_end -
|
||||
+ crtc_state->adjusted_mode.hsync_start < 1)
|
||||
+ crtc_state->adjusted_mode.hsync_end =
|
||||
+ crtc_state->adjusted_mode.hsync_start + 1;
|
||||
+
|
||||
+ crtc_state->adjusted_mode.crtc_clock = crtc_state->adjusted_mode.clock;
|
||||
+ crtc_state->adjusted_mode.crtc_hdisplay = crtc_state->adjusted_mode.hdisplay;
|
||||
+ crtc_state->adjusted_mode.crtc_hsync_start = crtc_state->adjusted_mode.hsync_start;
|
||||
+ crtc_state->adjusted_mode.crtc_hsync_end = crtc_state->adjusted_mode.hsync_end;
|
||||
+ crtc_state->adjusted_mode.crtc_htotal = crtc_state->adjusted_mode.htotal;
|
||||
+
|
||||
switch (reference_mode->vtotal) {
|
||||
case 525:
|
||||
if (crtc_state->adjusted_mode.crtc_vdisplay < 1 ||
|
||||
+142
@@ -0,0 +1,142 @@
|
||||
From 98d2c3e1731007acf03addf83c863df6694beb95 Mon Sep 17 00:00:00 2001
|
||||
From: Bastien Nocera <[email protected]>
|
||||
Date: Tue, 8 Dec 2020 18:29:12 +0100
|
||||
Subject: Bluetooth: L2CAP: Try harder to accept device not knowing options
|
||||
|
||||
The current implementation of L2CAP options negotiation will continue
|
||||
the negotiation when a device responds with L2CAP_CONF_UNACCEPT ("unaccepted
|
||||
options"), but not when the device replies with L2CAP_CONF_UNKNOWN ("unknown
|
||||
options").
|
||||
|
||||
Trying to continue the negotiation without ERTM support will allow
|
||||
Bluetooth-capable XBox One controllers (notably models 1708 and 1797)
|
||||
to connect.
|
||||
|
||||
btmon before patch:
|
||||
> ACL Data RX: Handle 256 flags 0x02 dlen 16 #64 [hci0] 59.182702
|
||||
L2CAP: Connection Response (0x03) ident 2 len 8
|
||||
Destination CID: 64
|
||||
Source CID: 64
|
||||
Result: Connection successful (0x0000)
|
||||
Status: No further information available (0x0000)
|
||||
< ACL Data TX: Handle 256 flags 0x00 dlen 23 #65 [hci0] 59.182744
|
||||
L2CAP: Configure Request (0x04) ident 3 len 15
|
||||
Destination CID: 64
|
||||
Flags: 0x0000
|
||||
Option: Retransmission and Flow Control (0x04) [mandatory]
|
||||
Mode: Basic (0x00)
|
||||
TX window size: 0
|
||||
Max transmit: 0
|
||||
Retransmission timeout: 0
|
||||
Monitor timeout: 0
|
||||
Maximum PDU size: 0
|
||||
> ACL Data RX: Handle 256 flags 0x02 dlen 16 #66 [hci0] 59.183948
|
||||
L2CAP: Configure Request (0x04) ident 1 len 8
|
||||
Destination CID: 64
|
||||
Flags: 0x0000
|
||||
Option: Maximum Transmission Unit (0x01) [mandatory]
|
||||
MTU: 1480
|
||||
< ACL Data TX: Handle 256 flags 0x00 dlen 18 #67 [hci0] 59.183994
|
||||
L2CAP: Configure Response (0x05) ident 1 len 10
|
||||
Source CID: 64
|
||||
Flags: 0x0000
|
||||
Result: Success (0x0000)
|
||||
Option: Maximum Transmission Unit (0x01) [mandatory]
|
||||
MTU: 1480
|
||||
> ACL Data RX: Handle 256 flags 0x02 dlen 15 #69 [hci0] 59.187676
|
||||
L2CAP: Configure Response (0x05) ident 3 len 7
|
||||
Source CID: 64
|
||||
Flags: 0x0000
|
||||
Result: Failure - unknown options (0x0003)
|
||||
04 .
|
||||
< ACL Data TX: Handle 256 flags 0x00 dlen 12 #70 [hci0] 59.187722
|
||||
L2CAP: Disconnection Request (0x06) ident 4 len 4
|
||||
Destination CID: 64
|
||||
Source CID: 64
|
||||
> ACL Data RX: Handle 256 flags 0x02 dlen 12 #73 [hci0] 59.192714
|
||||
L2CAP: Disconnection Response (0x07) ident 4 len 4
|
||||
Destination CID: 64
|
||||
Source CID: 64
|
||||
|
||||
btmon after patch:
|
||||
> ACL Data RX: Handle 256 flags 0x02 dlen 16 #248 [hci0] 103.502970
|
||||
L2CAP: Connection Response (0x03) ident 5 len 8
|
||||
Destination CID: 65
|
||||
Source CID: 65
|
||||
Result: Connection pending (0x0001)
|
||||
Status: No further information available (0x0000)
|
||||
> ACL Data RX: Handle 256 flags 0x02 dlen 16 #249 [hci0] 103.504184
|
||||
L2CAP: Connection Response (0x03) ident 5 len 8
|
||||
Destination CID: 65
|
||||
Source CID: 65
|
||||
Result: Connection successful (0x0000)
|
||||
Status: No further information available (0x0000)
|
||||
< ACL Data TX: Handle 256 flags 0x00 dlen 23 #250 [hci0] 103.504398
|
||||
L2CAP: Configure Request (0x04) ident 6 len 15
|
||||
Destination CID: 65
|
||||
Flags: 0x0000
|
||||
Option: Retransmission and Flow Control (0x04) [mandatory]
|
||||
Mode: Basic (0x00)
|
||||
TX window size: 0
|
||||
Max transmit: 0
|
||||
Retransmission timeout: 0
|
||||
Monitor timeout: 0
|
||||
Maximum PDU size: 0
|
||||
> ACL Data RX: Handle 256 flags 0x02 dlen 16 #251 [hci0] 103.505472
|
||||
L2CAP: Configure Request (0x04) ident 3 len 8
|
||||
Destination CID: 65
|
||||
Flags: 0x0000
|
||||
Option: Maximum Transmission Unit (0x01) [mandatory]
|
||||
MTU: 1480
|
||||
< ACL Data TX: Handle 256 flags 0x00 dlen 18 #252 [hci0] 103.505689
|
||||
L2CAP: Configure Response (0x05) ident 3 len 10
|
||||
Source CID: 65
|
||||
Flags: 0x0000
|
||||
Result: Success (0x0000)
|
||||
Option: Maximum Transmission Unit (0x01) [mandatory]
|
||||
MTU: 1480
|
||||
> ACL Data RX: Handle 256 flags 0x02 dlen 15 #254 [hci0] 103.509165
|
||||
L2CAP: Configure Response (0x05) ident 6 len 7
|
||||
Source CID: 65
|
||||
Flags: 0x0000
|
||||
Result: Failure - unknown options (0x0003)
|
||||
04 .
|
||||
< ACL Data TX: Handle 256 flags 0x00 dlen 12 #255 [hci0] 103.509426
|
||||
L2CAP: Configure Request (0x04) ident 7 len 4
|
||||
Destination CID: 65
|
||||
Flags: 0x0000
|
||||
< ACL Data TX: Handle 256 flags 0x00 dlen 12 #257 [hci0] 103.511870
|
||||
L2CAP: Connection Request (0x02) ident 8 len 4
|
||||
PSM: 1 (0x0001)
|
||||
Source CID: 66
|
||||
> ACL Data RX: Handle 256 flags 0x02 dlen 14 #259 [hci0] 103.514121
|
||||
L2CAP: Configure Response (0x05) ident 7 len 6
|
||||
Source CID: 65
|
||||
Flags: 0x0000
|
||||
Result: Success (0x0000)
|
||||
|
||||
Signed-off-by: Florian Dollinger <[email protected]>
|
||||
Co-developed-by: Florian Dollinger <[email protected]>
|
||||
Reviewed-by: Luiz Augusto Von Dentz <[email protected]>
|
||||
Signed-off-by: Marcel Holtmann <[email protected]>
|
||||
---
|
||||
net/bluetooth/l2cap_core.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
(limited to 'net/bluetooth/l2cap_core.c')
|
||||
|
||||
diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
|
||||
index a24183734bd9d..72c2f5226d673 100644
|
||||
--- a/net/bluetooth/l2cap_core.c
|
||||
+++ b/net/bluetooth/l2cap_core.c
|
||||
@@ -4519,6 +4519,7 @@ static inline int l2cap_config_rsp(struct l2cap_conn *conn,
|
||||
}
|
||||
goto done;
|
||||
|
||||
+ case L2CAP_CONF_UNKNOWN:
|
||||
case L2CAP_CONF_UNACCEPT:
|
||||
if (chan->num_conf_rsp <= L2CAP_CONF_MAX_CONF_RSP) {
|
||||
char req[64];
|
||||
--
|
||||
cgit
|
||||
|
||||
+91
@@ -0,0 +1,91 @@
|
||||
From a2769637a9b98c6809d4d25a3a20447a3ff7b23a Mon Sep 17 00:00:00 2001
|
||||
From: Matthias Reichl <[email protected]>
|
||||
Date: Fri, 19 Mar 2021 12:14:17 +0100
|
||||
Subject: [PATCH] ALSA: pcm: fix ELD constraints for some compressed audio
|
||||
formats
|
||||
|
||||
The SADs of compressed formats like AC3 and DTS contain the channel
|
||||
and sample rate info of the audio data inside the compressed stream,
|
||||
but when building constraints we must use the rates and formats used
|
||||
to pass through the stream. eg 2ch 48kHz for AC3.
|
||||
|
||||
Signed-off-by: Matthias Reichl <[email protected]>
|
||||
---
|
||||
sound/core/pcm_drm_eld.c | 38 +++++++++++++++++++++++++++++++++++---
|
||||
1 file changed, 35 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/sound/core/pcm_drm_eld.c b/sound/core/pcm_drm_eld.c
|
||||
index 4b5faae5d16e5..e7ec7a8b9d420 100644
|
||||
--- a/sound/core/pcm_drm_eld.c
|
||||
+++ b/sound/core/pcm_drm_eld.c
|
||||
@@ -6,6 +6,7 @@
|
||||
#include <drm/drm_edid.h>
|
||||
#include <sound/pcm.h>
|
||||
#include <sound/pcm_drm_eld.h>
|
||||
+#include <linux/hdmi.h>
|
||||
|
||||
static const unsigned int eld_rates[] = {
|
||||
32000,
|
||||
@@ -17,9 +18,40 @@ static const unsigned int eld_rates[] = {
|
||||
192000,
|
||||
};
|
||||
|
||||
+static unsigned int sad_format(const u8 *sad)
|
||||
+{
|
||||
+ return (sad[0] & 0x78) >> 3;
|
||||
+}
|
||||
+
|
||||
static unsigned int sad_max_channels(const u8 *sad)
|
||||
{
|
||||
- return 1 + (sad[0] & 7);
|
||||
+ switch (sad_format(sad)) {
|
||||
+ case HDMI_AUDIO_CODING_TYPE_AC3:
|
||||
+ case HDMI_AUDIO_CODING_TYPE_DTS:
|
||||
+ case HDMI_AUDIO_CODING_TYPE_EAC3:
|
||||
+ return 2;
|
||||
+ case HDMI_AUDIO_CODING_TYPE_DTS_HD:
|
||||
+ case HDMI_AUDIO_CODING_TYPE_MLP:
|
||||
+ return 8;
|
||||
+ default:
|
||||
+ return 1 + (sad[0] & 7);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+static unsigned int sad_rate_mask(const u8 *sad)
|
||||
+{
|
||||
+ switch (sad_format(sad)) {
|
||||
+ case HDMI_AUDIO_CODING_TYPE_AC3:
|
||||
+ case HDMI_AUDIO_CODING_TYPE_DTS:
|
||||
+ return 0x07; // 32-48kHz
|
||||
+ case HDMI_AUDIO_CODING_TYPE_EAC3:
|
||||
+ return 0x7f; // 32-192kHz
|
||||
+ case HDMI_AUDIO_CODING_TYPE_DTS_HD:
|
||||
+ case HDMI_AUDIO_CODING_TYPE_MLP:
|
||||
+ return 0x60; // 176.4, 192kHz
|
||||
+ default:
|
||||
+ return sad[1] & 0x7f;
|
||||
+ }
|
||||
}
|
||||
|
||||
static int eld_limit_rates(struct snd_pcm_hw_params *params,
|
||||
@@ -42,7 +74,7 @@ static int eld_limit_rates(struct snd_pcm_hw_params *params,
|
||||
* requested number of channels.
|
||||
*/
|
||||
if (c->min <= max_channels)
|
||||
- rate_mask |= sad[1];
|
||||
+ rate_mask |= sad_rate_mask(sad);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -70,7 +102,7 @@ static int eld_limit_channels(struct snd_pcm_hw_params *params,
|
||||
rate_mask |= BIT(i);
|
||||
|
||||
for (i = drm_eld_sad_count(eld); i > 0; i--, sad += 3)
|
||||
- if (rate_mask & sad[1])
|
||||
+ if (rate_mask & sad_rate_mask(sad))
|
||||
t.max = max(t.max, sad_max_channels(sad));
|
||||
}
|
||||
|
||||
--
|
||||
2.20.1
|
||||
|
||||
@@ -0,0 +1,206 @@
|
||||
commit 5a596921a4636e62843a59b7eab7b87b70a6d296
|
||||
Author: Lukas Rusak <[email protected]>
|
||||
Date: Sun May 6 22:03:11 2018 -0700
|
||||
|
||||
HID: add ouya HID driver
|
||||
|
||||
This driver is a simple implementation to get the controller working and mapped properly.
|
||||
This driver does not include functionality for the touchpad (yet). The original driver
|
||||
was taken from from the ouya linux tree and has been simplified. It seems there may have
|
||||
been other versions of the controller present that had a broken report descriptor. I have
|
||||
removed that for now.
|
||||
|
||||
diff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig
|
||||
index 60252fd796f6..6be2c454e72e 100644
|
||||
--- a/drivers/hid/Kconfig
|
||||
+++ b/drivers/hid/Kconfig
|
||||
@@ -659,6 +659,12 @@ config HID_ORTEK
|
||||
- Ortek WKB-2000
|
||||
- Skycable wireless presenter
|
||||
|
||||
+config HID_OUYA
|
||||
+ tristate "OUYA Game Controller"
|
||||
+ depends on USB_HID
|
||||
+ help
|
||||
+ Support for OUYA Game Controller.
|
||||
+
|
||||
config HID_PANTHERLORD
|
||||
tristate "Pantherlord/GreenAsia game controller"
|
||||
depends on HID
|
||||
diff --git a/drivers/hid/Makefile b/drivers/hid/Makefile
|
||||
index 17a8bd97da9d..4425890934e4 100644
|
||||
--- a/drivers/hid/Makefile
|
||||
+++ b/drivers/hid/Makefile
|
||||
@@ -71,6 +71,7 @@ obj-$(CONFIG_HID_MULTITOUCH) += hid-multitouch.o
|
||||
obj-$(CONFIG_HID_NTI) += hid-nti.o
|
||||
obj-$(CONFIG_HID_NTRIG) += hid-ntrig.o
|
||||
obj-$(CONFIG_HID_ORTEK) += hid-ortek.o
|
||||
+obj-$(CONFIG_HID_OUYA) += hid-ouya.o
|
||||
obj-$(CONFIG_HID_PRODIKEYS) += hid-prodikeys.o
|
||||
obj-$(CONFIG_HID_PANTHERLORD) += hid-pl.o
|
||||
obj-$(CONFIG_HID_PENMOUNT) += hid-penmount.o
|
||||
diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
|
||||
index 0b5cc910f62e..0528efb825fa 100644
|
||||
--- a/drivers/hid/hid-ids.h
|
||||
+++ b/drivers/hid/hid-ids.h
|
||||
@@ -859,6 +859,9 @@
|
||||
#define USB_DEVICE_ID_ORTEK_WKB2000 0x2000
|
||||
#define USB_DEVICE_ID_ORTEK_IHOME_IMAC_A210S 0x8003
|
||||
|
||||
+#define USB_VENDOR_ID_OUYA 0x2836
|
||||
+#define USB_DEVICE_ID_OUYA_CONTROLLER 0x0001
|
||||
+
|
||||
#define USB_VENDOR_ID_PLANTRONICS 0x047f
|
||||
|
||||
#define USB_VENDOR_ID_PANASONIC 0x04da
|
||||
diff --git a/drivers/hid/hid-ouya.c b/drivers/hid/hid-ouya.c
|
||||
new file mode 100644
|
||||
index 000000000000..4344a47b40af
|
||||
--- /dev/null
|
||||
+++ b/drivers/hid/hid-ouya.c
|
||||
@@ -0,0 +1,131 @@
|
||||
+/*
|
||||
+ * HID driver for OUYA Game Controller(s)
|
||||
+ *
|
||||
+ * Copyright (c) 2013 OUYA
|
||||
+ * Copyright (c) 2013 Gregorios Leach <[email protected]>
|
||||
+ * Copyright (c) 2018 Lukas Rusak <[email protected]>
|
||||
+ */
|
||||
+
|
||||
+#include <linux/device.h>
|
||||
+#include <linux/hid.h>
|
||||
+#include <linux/input.h>
|
||||
+#include <linux/module.h>
|
||||
+
|
||||
+#include "hid-ids.h"
|
||||
+
|
||||
+static const unsigned int ouya_absmap[] = {
|
||||
+ [0x30] = ABS_X, /* left stick X */
|
||||
+ [0x31] = ABS_Y, /* left stick Y */
|
||||
+ [0x32] = ABS_Z, /* L2 */
|
||||
+ [0x33] = ABS_RX, /* right stick X */
|
||||
+ [0x34] = ABS_RY, /* right stick Y */
|
||||
+ [0x35] = ABS_RZ, /* R2 */
|
||||
+};
|
||||
+
|
||||
+static const unsigned int ouya_keymap[] = {
|
||||
+ [0x1] = BTN_SOUTH, /* O */
|
||||
+ [0x2] = BTN_WEST, /* U */
|
||||
+ [0x3] = BTN_NORTH, /* Y */
|
||||
+ [0x4] = BTN_EAST, /* A */
|
||||
+ [0x5] = BTN_TL, /* L1 */
|
||||
+ [0x6] = BTN_TR, /* R1 */
|
||||
+ [0x7] = BTN_THUMBL, /* L3 */
|
||||
+ [0x8] = BTN_THUMBR, /* R3 */
|
||||
+ [0x9] = BTN_DPAD_UP, /* Up */
|
||||
+ [0xa] = BTN_DPAD_DOWN, /* Down */
|
||||
+ [0xb] = BTN_DPAD_LEFT, /* Left */
|
||||
+ [0xc] = BTN_DPAD_RIGHT, /* Right */
|
||||
+ [0xd] = BTN_TL2, /* L2 */
|
||||
+ [0xe] = BTN_TR2, /* R2 */
|
||||
+ [0xf] = BTN_MODE, /* Power */
|
||||
+};
|
||||
+
|
||||
+static int ouya_input_mapping(struct hid_device *hdev, struct hid_input *hi,
|
||||
+ struct hid_field *field, struct hid_usage *usage,
|
||||
+ unsigned long **bit, int *max)
|
||||
+{
|
||||
+ if ((usage->hid & HID_USAGE_PAGE) == HID_UP_BUTTON) {
|
||||
+ unsigned int key = usage->hid & HID_USAGE;
|
||||
+
|
||||
+ if (key >= ARRAY_SIZE(ouya_keymap))
|
||||
+ return -1;
|
||||
+
|
||||
+ key = ouya_keymap[key];
|
||||
+ hid_map_usage_clear(hi, usage, bit, max, EV_KEY, key);
|
||||
+
|
||||
+ return 1;
|
||||
+
|
||||
+ } else if ((usage->hid & HID_USAGE_PAGE) == HID_UP_GENDESK) {
|
||||
+ unsigned int abs = usage->hid & HID_USAGE;
|
||||
+
|
||||
+ if (abs >= ARRAY_SIZE(ouya_absmap))
|
||||
+ return -1;
|
||||
+
|
||||
+ abs = ouya_absmap[abs];
|
||||
+ hid_map_usage_clear(hi, usage, bit, max, EV_ABS, abs);
|
||||
+
|
||||
+ return 1;
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int ouya_probe(struct hid_device *hdev, const struct hid_device_id *id)
|
||||
+{
|
||||
+ int ret;
|
||||
+
|
||||
+ ret = hid_parse(hdev);
|
||||
+ if (ret) {
|
||||
+ hid_err(hdev, "parse failed\n");
|
||||
+ goto err_free;
|
||||
+ }
|
||||
+
|
||||
+ ret = hid_hw_start(hdev, HID_CONNECT_DEFAULT | HID_CONNECT_HIDDEV_FORCE);
|
||||
+ if (ret) {
|
||||
+ hid_err(hdev, "hw start failed\n");
|
||||
+ goto err_free;
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+
|
||||
+err_free:
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
+static void ouya_remove(struct hid_device *hdev)
|
||||
+{
|
||||
+ hid_hw_stop(hdev);
|
||||
+ kfree(hid_get_drvdata(hdev));
|
||||
+}
|
||||
+
|
||||
+static const struct hid_device_id ouya_devices[] = {
|
||||
+ { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_OUYA, USB_DEVICE_ID_OUYA_CONTROLLER) },
|
||||
+ { }
|
||||
+};
|
||||
+MODULE_DEVICE_TABLE(hid, ouya_devices);
|
||||
+
|
||||
+static struct hid_driver ouya_driver = {
|
||||
+ .name = "ouya",
|
||||
+ .id_table = ouya_devices,
|
||||
+ .input_mapping = ouya_input_mapping,
|
||||
+ .probe = ouya_probe,
|
||||
+ .remove = ouya_remove,
|
||||
+};
|
||||
+
|
||||
+static int __init ouya_init(void)
|
||||
+{
|
||||
+ return hid_register_driver(&ouya_driver);
|
||||
+}
|
||||
+
|
||||
+static void __exit ouya_exit(void)
|
||||
+{
|
||||
+ hid_unregister_driver(&ouya_driver);
|
||||
+}
|
||||
+
|
||||
+module_init(ouya_init);
|
||||
+module_exit(ouya_exit);
|
||||
+
|
||||
+MODULE_LICENSE("GPL");
|
||||
+MODULE_AUTHOR("Lukas Rusak <[email protected]>");
|
||||
+MODULE_AUTHOR("Gregorios Leach <[email protected]>");
|
||||
+MODULE_DESCRIPTION("Ouya Controller Driver");
|
||||
diff --git a/drivers/hid/hid-quirks.c b/drivers/hid/hid-quirks.c
|
||||
index 587e2681a53f..b5adc13e0df1 100644
|
||||
--- a/drivers/hid/hid-quirks.c
|
||||
+++ b/drivers/hid/hid-quirks.c
|
||||
@@ -538,6 +538,9 @@ static const struct hid_device_id hid_have_special_driver[] = {
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_ORTEK, USB_DEVICE_ID_ORTEK_IHOME_IMAC_A210S) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_SKYCABLE, USB_DEVICE_ID_SKYCABLE_WIRELESS_PRESENTER) },
|
||||
#endif
|
||||
+#if IS_ENABLED(CONFIG_HID_OUYA)
|
||||
+ { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_OUYA, USB_DEVICE_ID_OUYA_CONTROLLER) },
|
||||
+#endif
|
||||
#if IS_ENABLED(CONFIG_HID_PANTHERLORD)
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_GAMERON, USB_DEVICE_ID_GAMERON_DUAL_PSX_ADAPTOR) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_GAMERON, USB_DEVICE_ID_GAMERON_DUAL_PCS_ADAPTOR) },
|
||||
+72
@@ -0,0 +1,72 @@
|
||||
From 7051422474e4c4e302ede3d07ffd8ef2682e07a2 Mon Sep 17 00:00:00 2001
|
||||
From: Stefan Saraev <[email protected]>
|
||||
Date: Tue, 22 Apr 2014 16:05:14 +0300
|
||||
Subject: [PATCH] [RFC] hid/sony: add autorepeat for PS3 remotes
|
||||
|
||||
adapted to 4.6
|
||||
|
||||
Betreff: [RFC] hid/sony: add autorepeat for PS3 remotes
|
||||
Von: David Dillow <[email protected]>
|
||||
Datum: 28.06.2013 04:28
|
||||
An: [email protected]
|
||||
Kopie (CC): Stephan Raue <[email protected]>
|
||||
|
||||
Some applications using the PS3 remote would like to have autorepeat
|
||||
from the device. Use the input subsystem's software emulation to provide
|
||||
this capability, and enable those that don't need it to turn it off.
|
||||
---
|
||||
I'm not sure this is the correct approach, or if it is even appropriate
|
||||
for a remote to do autorepeat. However, the media/rc subsystem does do
|
||||
it by default, and it's been requested by users, so there is at least
|
||||
some demand.
|
||||
|
||||
This compiled against the hid-sony driver with the PS3 remote changes
|
||||
merged, but I have done no testing of it. If the approach seems
|
||||
reasonable, I'll try to test it when the MythTV is idle.
|
||||
|
||||
Signed-off-by: Matt DeVillier <[email protected]>
|
||||
---
|
||||
drivers/hid/hid-sony.c | 21 +++++++++++++++++++++
|
||||
1 file changed, 21 insertions(+)
|
||||
|
||||
diff --git a/drivers/hid/hid-sony.c b/drivers/hid/hid-sony.c
|
||||
index 310436a..84f7f41 100644
|
||||
--- a/drivers/hid/hid-sony.c
|
||||
+++ b/drivers/hid/hid-sony.c
|
||||
@@ -1120,6 +1120,25 @@ static int ps3remote_mapping(struct hid_device *hdev, struct hid_input *hi,
|
||||
return 1;
|
||||
}
|
||||
|
||||
+static int ps3remote_setup_repeat(struct hid_device *hdev)
|
||||
+{
|
||||
+ struct hid_input *hidinput = list_first_entry(&hdev->inputs,
|
||||
+ struct hid_input, list);
|
||||
+ struct input_dev *input = hidinput->input;
|
||||
+
|
||||
+ /*
|
||||
+ * Set up autorepeat defaults per the remote control subsystem;
|
||||
+ * this must be done after hid_hw_start(), as having these non-zero
|
||||
+ * at the time of input_register_device() tells the input system that
|
||||
+ * the hardware does the autorepeat, and the PS3 remote does not.
|
||||
+ */
|
||||
+ set_bit(EV_REP, input->evbit);
|
||||
+ input->rep[REP_DELAY] = 500;
|
||||
+ input->rep[REP_PERIOD] = 125;
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
static u8 *sony_report_fixup(struct hid_device *hdev, u8 *rdesc,
|
||||
unsigned int *rsize)
|
||||
{
|
||||
@@ -2372,6 +2391,8 @@ static int sony_probe(struct hid_device *hdev, const struct hid_device_id *id)
|
||||
sony_init_output_report(sc, dualshock4_send_output_report);
|
||||
} else if (sc->quirks & MOTION_CONTROLLER) {
|
||||
sony_init_output_report(sc, motion_send_output_report);
|
||||
+ } else if (sc->quirks & PS3REMOTE) {
|
||||
+ ret = ps3remote_setup_repeat(hdev);
|
||||
} else {
|
||||
ret = 0;
|
||||
}
|
||||
--
|
||||
2.5.0
|
||||
@@ -0,0 +1,21 @@
|
||||
diff -Naur linux-3.16.1/drivers/media/rc/imon.c linux-3.16.1.patch/drivers/media/rc/imon.c
|
||||
--- linux-3.16.1/drivers/media/rc/imon.c 2014-08-14 04:36:35.000000000 +0200
|
||||
+++ linux-3.16.1.patch/drivers/media/rc/imon.c 2014-08-15 13:57:16.587620642 +0200
|
||||
@@ -1344,6 +1344,17 @@
|
||||
}
|
||||
} else {
|
||||
/*
|
||||
+ * For users without stabilized, just ignore any value getting
|
||||
+ * to close to the diagonal.
|
||||
+ */
|
||||
+ if ((abs(rel_y) < 2 && abs(rel_x) < 2) ||
|
||||
+ abs(abs(rel_y) - abs(rel_x)) < 2 ) {
|
||||
+ spin_lock_irqsave(&ictx->kc_lock, flags);
|
||||
+ ictx->kc = KEY_UNKNOWN;
|
||||
+ spin_unlock_irqrestore(&ictx->kc_lock, flags);
|
||||
+ return;
|
||||
+ }
|
||||
+ /*
|
||||
* Hack alert: instead of using keycodes, we have
|
||||
* to use hard-coded scancodes here...
|
||||
*/
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
From c314d9af9d774c052bea324e1a140ccdba0ca070 Mon Sep 17 00:00:00 2001
|
||||
From: Stefan Saraev <[email protected]>
|
||||
Date: Tue, 8 Apr 2014 14:02:53 +0300
|
||||
Subject: [PATCH] pm: disable async suspend/resume by default
|
||||
|
||||
---
|
||||
kernel/power/main.c | 2 +-
|
||||
1 files changed, 1 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/kernel/power/main.c b/kernel/power/main.c
|
||||
index 1d1bf63..361db93 100644
|
||||
--- a/kernel/power/main.c
|
||||
+++ b/kernel/power/main.c
|
||||
@@ -46,7 +46,7 @@ int pm_notifier_call_chain(unsigned long val)
|
||||
}
|
||||
|
||||
/* If set, devices may be suspended and resumed asynchronously. */
|
||||
-int pm_async_enabled = 1;
|
||||
+int pm_async_enabled = 0;
|
||||
|
||||
static ssize_t pm_async_show(struct kobject *kobj, struct kobj_attribute *attr,
|
||||
char *buf)
|
||||
--
|
||||
1.7.2.5
|
||||
|
||||
@@ -60,7 +60,7 @@ if [ "${V4L2_SUPPORT}" = "yes" -a ! "${DEVICE}" = "Switch" ]; then
|
||||
PKG_NEED_UNPACK+=" $(get_pkg_directory libdrm)"
|
||||
PKG_FFMPEG_V4L2="--enable-v4l2_m2m --enable-libdrm"
|
||||
|
||||
if [ "${PROJECT}" = "Allwinner" -o "${PROJECT}" = "Rockchip" -o "${DEVICE}" = "iMX8" -o "${DEVICE:0:4}" = "RPi4" -o "${DEVICE}" = "RPi5" ]; then
|
||||
if [ "${PROJECT}" = "Allwinner" -o "${PROJECT}" = "Rockchip" -o "${DEVICE}" = "iMX8" -o "${DEVICE:0:4}" = "RPi4" -o "${DEVICE:0:4}" = "RPi5" ]; then
|
||||
PKG_V4L2_REQUEST="yes"
|
||||
else
|
||||
PKG_V4L2_REQUEST="no"
|
||||
|
||||
+45
@@ -0,0 +1,45 @@
|
||||
diff --git a/misc/create_inode.c b/misc/create_inode.c
|
||||
index 624efc0..ec673dc 100644
|
||||
--- a/misc/create_inode.c
|
||||
+++ b/misc/create_inode.c
|
||||
@@ -575,6 +575,8 @@ static inline off_t round_up(off_t n, off_t blksz, off_t bias)
|
||||
return ((n - bias + (blksz - 1)) & ~(blksz - 1)) + bias;
|
||||
}
|
||||
|
||||
+#if defined(FS_IOC_READ_VERITY_METADATA) && \
|
||||
+ defined(FS_VERITY_METADATA_TYPE_MERKLE_TREE)
|
||||
static errcode_t copy_fs_verity_data(ext2_file_t e2_file, ext2_off_t e2_offset,
|
||||
int fd, uint64_t metadata_type,
|
||||
__u32 *written)
|
||||
@@ -643,7 +645,17 @@ static errcode_t copy_fs_verity_data(ext2_file_t e2_file, ext2_off_t e2_offset,
|
||||
|
||||
return 0;
|
||||
}
|
||||
+#else /* no usable fs-verity support */
|
||||
+static errcode_t copy_fs_verity_data(ext2_file_t e2_file, ext2_off_t e2_offset,
|
||||
+ int fd, uint64_t metadata_type,
|
||||
+ __u32 *written)
|
||||
+{
|
||||
+ return 0;
|
||||
+}
|
||||
+#endif /* fs-verity feature test */
|
||||
|
||||
+#if defined(FS_IOC_READ_VERITY_METADATA) && \
|
||||
+ defined(FS_VERITY_METADATA_TYPE_MERKLE_TREE)
|
||||
static errcode_t copy_fs_verity(ext2_filsys fs, int fd,
|
||||
ext2_file_t e2_file, off_t st_size)
|
||||
{
|
||||
@@ -703,6 +715,13 @@ static errcode_t copy_fs_verity(ext2_filsys fs, int fd,
|
||||
inode->i_flags |= EXT4_VERITY_FL;
|
||||
return ext2fs_write_inode(fs, ino, inode);
|
||||
}
|
||||
+#else /* no usable fs-verity support */
|
||||
+static errcode_t copy_fs_verity(ext2_filsys fs, int fd,
|
||||
+ ext2_file_t e2_file, off_t st_size)
|
||||
+{
|
||||
+ return 0;
|
||||
+}
|
||||
+#endif /* fs-verity feature test */
|
||||
#endif
|
||||
|
||||
static errcode_t copy_file(ext2_filsys fs, int fd, struct stat *statbuf,
|
||||
@@ -21,7 +21,7 @@ makeinstall_target() {
|
||||
cp -PRv fixup4x.dat ${INSTALL}/usr/share/bootloader/fixup.dat
|
||||
cp -PRv start4x.elf ${INSTALL}/usr/share/bootloader/start.elf
|
||||
;;
|
||||
RPi5)
|
||||
RPi5*)
|
||||
;;
|
||||
*)
|
||||
cp -PRv bootcode.bin ${INSTALL}/usr/share/bootloader
|
||||
|
||||
@@ -12,8 +12,8 @@ PKG_LONGDESC="rpi-eeprom: firmware, config and scripts to update RPi4 SPI bootlo
|
||||
PKG_TOOLCHAIN="manual"
|
||||
|
||||
makeinstall_target() {
|
||||
|
||||
if [ "${DEVICE}" = "RPi4" ]; then
|
||||
|
||||
if [ "${DEVICE:0:4}" = "RPi4" ]; then
|
||||
_variant="2711"
|
||||
else
|
||||
_variant="2712"
|
||||
@@ -37,7 +37,7 @@ makeinstall_target() {
|
||||
PKG_FW_FILE="$(ls -1 /${_dir}/pieeprom-* 2>/dev/null | tail -1)"
|
||||
[ -n "${PKG_FW_FILE}" ] && cp -PRv "${PKG_FW_FILE}" ${DESTDIR}/${_basedir}
|
||||
|
||||
if [ "${DEVICE}" = "RPi4" ]; then
|
||||
if [ "${DEVICE:0:4}" = "RPi4" ]; then
|
||||
# VIA USB3
|
||||
PKG_FW_FILE="$(ls -1 ${_dir}/vl805-*.bin 2>/dev/null | tail -1)"
|
||||
[ -n "${PKG_FW_FILE}" ] && cp -PRv "${PKG_FW_FILE}" ${DESTDIR}/${_basedir}
|
||||
|
||||
+4
-1
@@ -53,11 +53,14 @@ targets="\
|
||||
RPi|RPi|arm| \
|
||||
RPi|RPi2|arm| \
|
||||
RPi|RPi3|aarch64| \
|
||||
RPi|RPi3-Composite|aarch64| \
|
||||
RPi|RPi4|aarch64| \
|
||||
RPi|RPi4-Composite|aarch64| \
|
||||
RPi|RPi4-GPiCase2|aarch64| \
|
||||
RPi|RPi4-PiBoyDmg|aarch64| \
|
||||
RPi|RPi4-RetroDreamer|aarch64| \
|
||||
RPi|RPi4|aarch64| \
|
||||
RPi|RPi5|aarch64| \
|
||||
RPi|RPi5-Composite|aarch64| \
|
||||
RPi|RPiZero-GPiCase|arm| \
|
||||
RPi|RPiZero2-GPiCase|arm| \
|
||||
RPi|RPiZero2-GPiCase2W|aarch64| \
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)
|
||||
|
||||
# WARNING: DO NOT EDIT THIS FILE - IT WILL BE OVERWRITTEN WHEN UPGRADING!
|
||||
arm_64bit=1
|
||||
kernel=kernel.img
|
||||
dtoverlay=vc4-kms-v3d,composite=1
|
||||
disable_overscan=1
|
||||
dtoverlay=piaudio
|
||||
dtparam=audio=on
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,29 @@
|
||||
################################################################################
|
||||
# Device defaults
|
||||
################################################################################
|
||||
|
||||
# The TARGET_CPU variable controls which processor should be targeted for
|
||||
# generated code.
|
||||
case $TARGET_ARCH in
|
||||
aarch64)
|
||||
TARGET_CPU="cortex-a53"
|
||||
TARGET_CPU_FLAGS="+crc"
|
||||
TARGET_FPU="neon-fp-armv8"
|
||||
TARGET_FLOAT="hard"
|
||||
KERNEL_TARGET="Image"
|
||||
ADDITIONAL_PACKAGES+=" rpi_userland"
|
||||
;;
|
||||
esac
|
||||
|
||||
# NOOBS supported hex versions (legacy)
|
||||
NOOBS_HEX="1040,1041,2082"
|
||||
|
||||
# NOOBS supported model versions
|
||||
NOOBS_SUPPORTED_MODELS='"Pi 3"'
|
||||
|
||||
# Enable composite
|
||||
EXTRA_CMDLINE="video=Composite-1:720x480@60e vc4.tv_norm=NTSC-J"
|
||||
|
||||
# Kernel to use. values can be:
|
||||
# default: default mainline kernel
|
||||
LINUX="raspberrypi-5.10.y"
|
||||
+64
@@ -0,0 +1,64 @@
|
||||
diff --git a/gfx/widgets/gfx_widget_achievement_popup.c b/gfx/widgets/gfx_widget_achievement_popup.c
|
||||
index ba583a8..c9ef547 100644
|
||||
--- a/gfx/widgets/gfx_widget_achievement_popup.c
|
||||
+++ b/gfx/widgets/gfx_widget_achievement_popup.c
|
||||
@@ -320,13 +320,13 @@ static void gfx_widget_achievement_popup_frame(void* data, void* userdata)
|
||||
|
||||
/* Title */
|
||||
gfx_widgets_draw_text(
|
||||
- &p_dispwidget->gfx_widget_fonts.regular,
|
||||
+ &p_dispwidget->gfx_widget_fonts.msg_queue,
|
||||
state->queue[state->queue_read_index].title,
|
||||
screen_pos_x + state->height - text_unfold_offset
|
||||
+ p_dispwidget->simple_widget_padding,
|
||||
screen_pos_y
|
||||
- + p_dispwidget->gfx_widget_fonts.regular.line_height
|
||||
- + p_dispwidget->gfx_widget_fonts.regular.line_ascender,
|
||||
+ + p_dispwidget->gfx_widget_fonts.msg_queue.line_height
|
||||
+ + p_dispwidget->gfx_widget_fonts.msg_queue.line_ascender,
|
||||
video_width,
|
||||
video_height,
|
||||
TEXT_COLOR_FAINT,
|
||||
@@ -337,13 +337,13 @@ static void gfx_widget_achievement_popup_frame(void* data, void* userdata)
|
||||
|
||||
/* TODO: is a ticker necessary ? */
|
||||
gfx_widgets_draw_text(
|
||||
- &p_dispwidget->gfx_widget_fonts.regular,
|
||||
+ &p_dispwidget->gfx_widget_fonts.msg_queue,
|
||||
state->queue[state->queue_read_index].subtitle,
|
||||
screen_pos_x + state->height - text_unfold_offset
|
||||
+ p_dispwidget->simple_widget_padding,
|
||||
screen_pos_y + state->height
|
||||
- - p_dispwidget->gfx_widget_fonts.regular.line_height
|
||||
- - p_dispwidget->gfx_widget_fonts.regular.line_descender,
|
||||
+ - p_dispwidget->gfx_widget_fonts.msg_queue.line_height
|
||||
+ - p_dispwidget->gfx_widget_fonts.msg_queue.line_descender,
|
||||
video_width,
|
||||
video_height,
|
||||
TEXT_COLOR_INFO,
|
||||
@@ -353,7 +353,7 @@ static void gfx_widget_achievement_popup_frame(void* data, void* userdata)
|
||||
if (is_folding)
|
||||
{
|
||||
gfx_widgets_flush_text(video_width, video_height,
|
||||
- &p_dispwidget->gfx_widget_fonts.regular);
|
||||
+ &p_dispwidget->gfx_widget_fonts.msg_queue);
|
||||
|
||||
if (dispctx && dispctx->scissor_end)
|
||||
dispctx->scissor_end(video_info->userdata,
|
||||
@@ -551,13 +551,13 @@ static void gfx_widget_achievement_popup_start(
|
||||
const dispgfx_widget_t* p_dispwidget = (const dispgfx_widget_t*)
|
||||
state->dispwidget_ptr;
|
||||
|
||||
- state->height = p_dispwidget->gfx_widget_fonts.regular.line_height * 4.0f;
|
||||
+ state->height = p_dispwidget->gfx_widget_fonts.msg_queue.line_height * 4.0f;
|
||||
state->width = MAX(
|
||||
font_driver_get_message_width(
|
||||
- p_dispwidget->gfx_widget_fonts.regular.font,
|
||||
+ p_dispwidget->gfx_widget_fonts.msg_queue.font,
|
||||
state->queue[state->queue_read_index].title, 0, 1.0f),
|
||||
font_driver_get_message_width(
|
||||
- p_dispwidget->gfx_widget_fonts.regular.font,
|
||||
+ p_dispwidget->gfx_widget_fonts.msg_queue.font,
|
||||
state->queue[state->queue_read_index].subtitle, 0, 1.0f)
|
||||
);
|
||||
state->width += p_dispwidget->simple_widget_padding * 2;
|
||||
@@ -0,0 +1,15 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)
|
||||
|
||||
# WARNING: DO NOT EDIT THIS FILE - IT WILL BE OVERWRITTEN WHEN UPGRADING!
|
||||
arm_boost=1
|
||||
arm_64bit=1
|
||||
kernel=kernel.img
|
||||
display_auto_detect=1
|
||||
enable_tvout=1
|
||||
dtoverlay=vc4-kms-v3d,cma-512,composite=1
|
||||
dtoverlay=
|
||||
disable_overscan=1
|
||||
disable_fw_kms_setup=1
|
||||
dtoverlay=piaudio
|
||||
dtparam=audio=on
|
||||
@@ -0,0 +1 @@
|
||||
../../RPi4/kodi/appliance.xml
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,43 @@
|
||||
################################################################################
|
||||
# Device defaults
|
||||
################################################################################
|
||||
|
||||
# NOOBS supported hex versions (legacy) is not relevant for RPi4
|
||||
unset NOOBS_HEX
|
||||
|
||||
# NOOBS supported model versions
|
||||
NOOBS_SUPPORTED_MODELS='"Pi 4"'
|
||||
|
||||
# additional Firmware to use (dvb-firmware, misc-firmware, wlan-firmware)
|
||||
FIRMWARE="${FIRMWARE} rpi-eeprom"
|
||||
|
||||
# set the addon project
|
||||
ADDON_PROJECT="ARMv8"
|
||||
|
||||
# The TARGET_CPU variable controls which processor should be targeted for
|
||||
# generated code.
|
||||
case $TARGET_ARCH in
|
||||
aarch64)
|
||||
TARGET_CPU="cortex-a72"
|
||||
TARGET_CPU_FLAGS="+crc"
|
||||
;;
|
||||
arm)
|
||||
TARGET_KERNEL_ARCH="arm64"
|
||||
TARGET_KERNEL_PATCH_ARCH="aarch64"
|
||||
TARGET_FLOAT="hard"
|
||||
# cortex-a72 caused issues in the past, so use a53
|
||||
TARGET_CPU="cortex-a53"
|
||||
TARGET_CPU_FLAGS="+crc"
|
||||
TARGET_FPU="neon-fp-armv8"
|
||||
;;
|
||||
esac
|
||||
|
||||
# Kernel target
|
||||
KERNEL_TARGET="Image"
|
||||
|
||||
# Enable composite
|
||||
EXTRA_CMDLINE="video=Composite-1:720x480@60e vc4.tv_norm=NTSC-J"
|
||||
|
||||
# Kernel to use. values can be:
|
||||
# default: default mainline kernel
|
||||
LINUX="raspberrypi-5.10.y"
|
||||
+1
@@ -0,0 +1 @@
|
||||
../../../RPi3-Composite/patches/retroarch/retroarch-use_notification_font_for_cheevos.patch
|
||||
@@ -34,3 +34,8 @@
|
||||
|
||||
# Kernel target
|
||||
KERNEL_TARGET="Image"
|
||||
|
||||
# enable vulkan for Lakka
|
||||
if [ "${DISTRO}" = "Lakka" ]; then
|
||||
VULKAN="vulkan-loader"
|
||||
fi
|
||||
@@ -34,3 +34,8 @@
|
||||
|
||||
# Kernel target
|
||||
KERNEL_TARGET="Image"
|
||||
|
||||
# enable vulkan for Lakka
|
||||
if [ "${DISTRO}" = "Lakka" ]; then
|
||||
VULKAN="vulkan-loader"
|
||||
fi
|
||||
@@ -34,3 +34,8 @@
|
||||
|
||||
# Kernel target
|
||||
KERNEL_TARGET="Image"
|
||||
|
||||
# enable vulkan for Lakka
|
||||
if [ "${DISTRO}" = "Lakka" ]; then
|
||||
VULKAN="vulkan-loader"
|
||||
fi
|
||||
@@ -34,3 +34,8 @@
|
||||
|
||||
# Kernel target
|
||||
KERNEL_TARGET="Image"
|
||||
|
||||
# enable vulkan for Lakka
|
||||
if [ "${DISTRO}" = "Lakka" ]; then
|
||||
VULKAN="vulkan-loader"
|
||||
fi
|
||||
@@ -0,0 +1,22 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
# Copyright (C) 2009-2014 Stephan Raue ([email protected])
|
||||
# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)
|
||||
################################################################################
|
||||
# Bootloader configuration
|
||||
# config.txt version v1 (do not remove or change this line!)
|
||||
################################################################################
|
||||
# For more options and information see
|
||||
# http://rpf.io/configtxt
|
||||
################################################################################
|
||||
|
||||
# Don't send initial active source message.
|
||||
# Avoids bringing CEC (enabled TV) out of standby and channel switch when
|
||||
# rebooting.
|
||||
hdmi_ignore_cec_init=1
|
||||
|
||||
[all]
|
||||
include distroconfig.txt
|
||||
|
||||
# uncomment to enable infrared remote receiver connected to GPIO 18
|
||||
#dtoverlay=gpio-ir,gpio_pin=18
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)
|
||||
|
||||
# WARNING: DO NOT EDIT THIS FILE - IT WILL BE OVERWRITTEN WHEN UPGRADING!
|
||||
arm_boost=1
|
||||
arm_64bit=1
|
||||
kernel=kernel.img
|
||||
display_auto_detect=1
|
||||
enable_tvout=1
|
||||
dtoverlay=vc4-kms-v3d,cma-512,composite=1
|
||||
dtoverlay=
|
||||
disable_overscan=1
|
||||
disable_fw_kms_setup=1
|
||||
max_framebuffers=0
|
||||
dtoverlay=piaudio
|
||||
dtparam=audio=on
|
||||
@@ -0,0 +1 @@
|
||||
../../RPi5/kodi/appliance.xml
|
||||
@@ -0,0 +1 @@
|
||||
../../RPi5/linux/linux.aarch64.conf
|
||||
@@ -0,0 +1,42 @@
|
||||
################################################################################
|
||||
# Device defaults
|
||||
################################################################################
|
||||
|
||||
# NOOBS supported hex versions (legacy) is not relevant for RPi4
|
||||
unset NOOBS_HEX
|
||||
|
||||
# NOOBS supported model versions
|
||||
NOOBS_SUPPORTED_MODELS='"Pi 5"'
|
||||
|
||||
# additional Firmware to use (dvb-firmware, misc-firmware, wlan-firmware)
|
||||
FIRMWARE="${FIRMWARE} rpi-eeprom flashrom"
|
||||
|
||||
# set the addon project
|
||||
ADDON_PROJECT="ARMv8"
|
||||
|
||||
# The TARGET_CPU variable controls which processor should be targeted for
|
||||
# generated code.
|
||||
case $TARGET_ARCH in
|
||||
aarch64)
|
||||
TARGET_CPU="cortex-a76"
|
||||
TARGET_CPU_FLAGS="+crc+crypto"
|
||||
;;
|
||||
arm)
|
||||
TARGET_KERNEL_ARCH="arm64"
|
||||
TARGET_KERNEL_PATCH_ARCH="aarch64"
|
||||
TARGET_FLOAT="hard"
|
||||
# cortex-a72 caused issues in the past, so use a53
|
||||
TARGET_CPU="cortex-a53"
|
||||
TARGET_CPU_FLAGS="+crc+crypto"
|
||||
TARGET_FPU="neon-fp-armv8"
|
||||
;;
|
||||
esac
|
||||
|
||||
# Kernel target
|
||||
KERNEL_TARGET="Image"
|
||||
|
||||
# debug tty path
|
||||
DEBUG_TTY="/dev/ttyAMA10"
|
||||
|
||||
# serial console
|
||||
EXTRA_CMDLINE="console=ttyAMA10,115200 console=tty0 video=Composite-1:720x480,tv_mode=NTSC-J drm_rp1_vec.cmode=27000:721/16/64/58,480/6/6/34"
|
||||
@@ -0,0 +1 @@
|
||||
../../../RPi5/patches/flycast/0001-define-pagesize.patch
|
||||
+1
@@ -0,0 +1 @@
|
||||
../../../RPi5/patches/flycast/0002-remove-to-set-PAGE_SIZE-when-building-for-RPi5.patch
|
||||
Symlink
+1
@@ -0,0 +1 @@
|
||||
../../../RPi5/patches/mupen64plus_next/mupen64plus_next-fix_alignment.patch
|
||||
+1
@@ -0,0 +1 @@
|
||||
../../../RPi5/patches/parallel_n64/parallel-n64_prioritize_cached_interpreter_for_RPi5.patch
|
||||
+1
@@ -0,0 +1 @@
|
||||
../../../RPi5/patches/retroarch/retroarch-retroflag_picase_safeshutdown_enable_disable.patch
|
||||
+1
@@ -0,0 +1 @@
|
||||
../../../RPi3-Composite/patches/retroarch/retroarch-use_notification_font_for_cheevos.patch
|
||||
@@ -41,3 +41,7 @@
|
||||
# serial console
|
||||
EXTRA_CMDLINE="console=ttyAMA10,115200 console=tty0"
|
||||
|
||||
# enable vulkan for Lakka
|
||||
if [ "${DISTRO}" = "Lakka" ]; then
|
||||
VULKAN="vulkan-loader"
|
||||
fi
|
||||
@@ -91,7 +91,4 @@
|
||||
FIRMWARE="${FIRMWARE//dvb-firmware/}"
|
||||
DRIVER_ADDONS_SUPPORT="no"
|
||||
DRIVER_ADDONS=""
|
||||
if [ "${DEVICE:0:4}" = "RPi4" -o "${DEVICE}" = "RPi5" ]; then
|
||||
VULKAN="vulkan-loader"
|
||||
fi
|
||||
fi
|
||||
@@ -274,6 +274,26 @@ elif [ "${BOOTLOADER}" = "bcm2835-bootloader" ]; then
|
||||
boot=UUID=${UUID_SYSTEM} disk=UUID=${UUID_STORAGE} quiet ${EXTRA_CMDLINE}
|
||||
EOF
|
||||
|
||||
if [ "${PROJECT}" = "RPi" -a "${DEVICE: -10}" = "-Composite" ]; then
|
||||
if [ "${DEVICE:0:4}" = "RPi3" -o "${DEVICE:0:4}" = "RPi4" ]; then
|
||||
cat << EOF >> "${LE_TMP}/cmdline.txt"
|
||||
# NTSC:
|
||||
# video=Composite-1:720x480@60e vc4.tv_norm=NTSC-J
|
||||
#
|
||||
# PAL:
|
||||
# video=Composite-1:720x576@50e
|
||||
EOF
|
||||
elif [ "${DEVICE:0:4}" = "RPi5" ]; then
|
||||
cat << EOF >> "${LE_TMP}/cmdline.txt"
|
||||
# NTSC:
|
||||
# video=Composite-1:720x480,tv_mode=NTSC-J drm_rp1_vec.cmode=27000:721/16/64/58,480/6/6/34
|
||||
#
|
||||
# PAL:
|
||||
# video=Composite-1:720x576,tv_mode=PAL drm_rp1_vec.cmode=27000,721/12/64/68,576/4/6/38
|
||||
EOF
|
||||
fi
|
||||
fi
|
||||
|
||||
mcopy "${LE_TMP}/cmdline.txt" :: >"${SAVE_ERROR}" 2>&1 || show_error
|
||||
|
||||
# copy files
|
||||
@@ -386,6 +406,32 @@ EOF
|
||||
# !!! only during the very first boot after flashing !!!
|
||||
# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
EOF
|
||||
|
||||
if [ "${PROJECT}" = "RPi" -a "${DEVICE: -10}" = "-Composite" ]; then
|
||||
cat << EOF >> "${LE_TMP}/retroarch-overrides.txt"
|
||||
#
|
||||
# Overrides for RPiX-Composite build:
|
||||
#
|
||||
# AUDIO: internal 3.5mm jack - uncomment following line
|
||||
#audio_device="default:CARD=Headphones"
|
||||
#
|
||||
# AUDIO: USB audio - uncomment following line
|
||||
#audio_device="default:CARD=Device
|
||||
#
|
||||
# PAL Users: uncomment following line(s):
|
||||
EOF
|
||||
if [ "${DEVICE:0:4}" = "RPi3" -o "${DEVICE:0:4}" = "RPi4" ]; then
|
||||
cat << EOF >> "${LE_TMP}/retroarch-overrides.txt"
|
||||
#video_autoswitch_refresh_rate = "3"
|
||||
#video_refresh_rate = "50.08"
|
||||
EOF
|
||||
elif [ "${DEVICE:0:4}" = "RPi5" ]; then
|
||||
cat << EOF >> "${LE_TMP}/retroarch-overrides.txt"
|
||||
#video_fullscreen_y = "576"
|
||||
EOF
|
||||
fi
|
||||
fi
|
||||
|
||||
mcopy "${LE_TMP}/retroarch-overrides.txt" ::/retroarch-overrides.txt >"${SAVE_ERROR}" 2>&1 || show_error
|
||||
fi
|
||||
|
||||
|
||||
Reference in new issue
Block a user