* Switch: Minor kernel config update
* fat32-boot: Attempt to fix umounting flash partition to prevent possible corruption on reboot
* Switch: Bootloader: Fix mistake in boot.txt that wasnt properly setting up dvfsb stuff
* Switch: Add user for retroarch to run as
* Busybox: Fix writing flash partition when using fat32-boot option to give all users write access
* Audio: Pulseaudio-configs: Minor updates for use when running apps as non root user
* Switch: Finalize changes so for running as non root user.
* Retroarch: Revert broken WAR in retroarch-config script
* Switch: Fix default retroarch config, to work out of box with new user
* Fix retroarch controller configs for switch, and add line to fix it to the update.sh file
* Add back missing lite gamepad config, which got lost in a rebase somewhere
* Retroarch: Start Reworking Switch Clocks
* Switch: Bump switch specific package versions, and add changes needed to make built in lakka clock speed menu work properly. Also hide gamemode.
* Retroarch: add patch to remove game mode from menu to all builds
* Switch: dont enable overclock by default
* sort
* Sort me.
* Switch: Drop old flycast from switch build in favor of newer core.
This has some issues with some games showing artifact bars using vulkan renderer,
but also fixes a lot of issues. As a work around to this issue, users can set opengl renderer, and the bars will not be there.
* More to sort
* Fix CEC stuff
* Fix dock audio switching with new user config
* WIP: GPU Clocks
* sort
* fix quotes
* Add working single joycon configs
* Update Switch Joycond to latest
* Switch: Retroarch: add bluetooth ertm disable, and add patch to fix l2cap kernel hang
* Switch: Update image stuff, so kernel reflects Lakka/Libreelec kernel makes in uimage header, and re-arange some things to make them global
* Switch: Linux: Enable Xpad Driver for wired xbox controllers
* Switch: More xpadneo stuff
This should at a minimum fix issues with Xbox One S controllers
8bitdo and GuliKit KingKong Controller families will probably need more
hid-core patching to redirect them to this driver for support.
Also, when 0.10 version of Xpadneo is released, It will stop building due to kernel not having this patch:
f07b3c1da9
When the time comes, this will need to be looked into.
* xpadneo: update package
* Switch: Update U-Boot to Switchroot 2023-NX03 version
* Switch: Update kernel to Switchroot 5.1.0
* Switch: Create Singular switch-bsp Package
This package consolodates the switch specific configs into one package,
as this feels cleaner, and easier to deal with later, if/when needed.
This package combines the switch-alsa-ucm and switch-bluetooth-dock stuff
into one package.
---------
Co-authored-by: Tomáš Kelemen (vudiq) <vudiq@vudiq.sk>
219 lines
8.5 KiB
Diff
219 lines
8.5 KiB
Diff
From dda90500a8492dec866cb0a8a4f2b37aad3aa3fc Mon Sep 17 00:00:00 2001
|
|
From: Ronald Brown <rbrown4014@yahoo.com>
|
|
Date: Sat, 4 Feb 2023 22:36:45 -0800
|
|
Subject: [PATCH 6/7] Lakka-Switch: Add CEC Toggle
|
|
|
|
---
|
|
config.def.h | 1 +
|
|
configuration.c | 8 ++++++++
|
|
configuration.h | 1 +
|
|
intl/msg_hash_lbl.h | 4 ++++
|
|
intl/msg_hash_us.h | 8 ++++++++
|
|
lakka-switch.h | 11 +++++++++++
|
|
menu/cbs/menu_cbs_sublabel.c | 4 ++++
|
|
menu/menu_displaylist.c | 1 +
|
|
menu/menu_setting.c | 28 ++++++++++++++++++++++++++++
|
|
msg_hash.h | 1 +
|
|
10 files changed, 67 insertions(+)
|
|
|
|
diff --git a/config.def.h b/config.def.h
|
|
index fcb16ef070..24aacf2943 100644
|
|
--- a/config.def.h
|
|
+++ b/config.def.h
|
|
@@ -178,6 +178,7 @@
|
|
#define DEFAULT_GAMEMODE_ENABLE true
|
|
#ifdef HAVE_LAKKA_SWITCH
|
|
#define DEFAULT_SWITCH_OC false
|
|
+#define DEFAULT_SWITCH_CEC true
|
|
#endif
|
|
#if (defined(_WIN32) && !defined(_XBOX)) || (defined(__linux) && !defined(ANDROID) && !defined(HAVE_LAKKA)) || (defined(__MACH__) && !defined(IOS)) || defined(EMSCRIPTEN)
|
|
#define DEFAULT_MOUSE_ENABLE true
|
|
diff --git a/configuration.c b/configuration.c
|
|
index 202de4ff24..7130d0432d 100644
|
|
--- a/configuration.c
|
|
+++ b/configuration.c
|
|
@@ -2078,6 +2078,7 @@ static struct config_bool_setting *populate_settings_bool(
|
|
#endif
|
|
#ifdef HAVE_LAKKA_SWITCH
|
|
SETTING_BOOL("switch_oc", &settings->bools.switch_oc, true, DEFAULT_SWITCH_OC, false);
|
|
+ SETTING_BOOL("switch_cec", &settings->bools.switch_cec, true, DEFAULT_SWITCH_CEC, false);
|
|
#endif
|
|
#ifdef ANDROID
|
|
SETTING_BOOL("android_input_disconnect_workaround", &settings->bools.android_input_disconnect_workaround, true, false, false);
|
|
@@ -3901,6 +3902,13 @@ static bool config_load_file(global_t *global,
|
|
fprintf(f, "0\n");
|
|
}
|
|
fclose(f);
|
|
+ if (settings->bools.switch_cec == true) {
|
|
+ FILE* f = fopen(SWITCH_CEC_TOGGLE_PATH, "w");
|
|
+ fprintf(f, "\n");
|
|
+ fclose(f);
|
|
+ } else {
|
|
+ filestream_delete(SWITCH_CEC_TOGGLE_PATH);
|
|
+ }
|
|
#endif
|
|
frontend_driver_set_sustained_performance_mode(settings->bools.sustained_performance_mode);
|
|
recording_driver_update_streaming_url();
|
|
diff --git a/configuration.h b/configuration.h
|
|
index 69984fed87..882af40a04 100644
|
|
--- a/configuration.h
|
|
+++ b/configuration.h
|
|
@@ -933,6 +933,7 @@ typedef struct settings
|
|
bool ssh_enable;
|
|
#ifdef HAVE_LAKKA_SWITCH
|
|
bool switch_oc;
|
|
+ bool switch_cec;
|
|
#endif
|
|
bool samba_enable;
|
|
bool bluetooth_enable;
|
|
diff --git a/intl/msg_hash_lbl.h b/intl/msg_hash_lbl.h
|
|
index fbe296a792..1a026f1d51 100644
|
|
--- a/intl/msg_hash_lbl.h
|
|
+++ b/intl/msg_hash_lbl.h
|
|
@@ -3495,6 +3495,10 @@ MSG_HASH(
|
|
MENU_ENUM_LABEL_SWITCH_OC_ENABLE,
|
|
"Switch_OC_enable"
|
|
)
|
|
+MSG_HASH(
|
|
+ MENU_ENUM_LABEL_SWITCH_CEC_ENABLE,
|
|
+ "Switch_CEC_enable"
|
|
+ )
|
|
#endif
|
|
MSG_HASH(
|
|
MENU_ENUM_LABEL_START_CORE,
|
|
diff --git a/intl/msg_hash_us.h b/intl/msg_hash_us.h
|
|
index 062b454d0a..a655217a80 100644
|
|
--- a/intl/msg_hash_us.h
|
|
+++ b/intl/msg_hash_us.h
|
|
@@ -14988,6 +14988,14 @@ MSG_HASH(
|
|
MENU_ENUM_SUBLABEL_SWITCH_OC_ENABLE,
|
|
"Enable CPU Overclock frequencies"
|
|
)
|
|
+MSG_HASH(
|
|
+ MENU_ENUM_LABEL_VALUE_SWITCH_CEC_ENABLE,
|
|
+ "CEC Support"
|
|
+ )
|
|
+MSG_HASH(
|
|
+ MENU_ENUM_SUBLABEL_SWITCH_CEC_ENABLE,
|
|
+ "Enable CEC Handshaking with TV when docking"
|
|
+ )
|
|
#endif
|
|
MSG_HASH(
|
|
MSG_LOCALAP_SWITCHING_OFF,
|
|
diff --git a/lakka-switch.h b/lakka-switch.h
|
|
index 7525b22286..fe037a0da1 100644
|
|
--- a/lakka-switch.h
|
|
+++ b/lakka-switch.h
|
|
@@ -17,5 +17,16 @@
|
|
#define __RARCH_LAKKA_SWITCH_H
|
|
|
|
#define SWITCH_OC_TOGGLE_PATH "/sys/kernel/tegra_cpufreq/overclock"
|
|
+#define SWITCH_CEC_TOGGLE_PATH "/tmp/.CEC"
|
|
+#define SWITCH_GPU_PROFILE_FILE_MAX_PATH "/sys/devices/57000000.gpu/devfreq/57000000.gpu/max_freq"
|
|
+#define SWITCH_GPU_PROFILE_FILE_MIN_PATH "/sys/devices/57000000.gpu/devfreq/57000000.gpu/min_freq"
|
|
+#define SWITCH_GPU_PROFILE_FILE_GOVERNOR_PATH "/sys/devices/57000000.gpu/devfreq/57000000.gpu/governor"
|
|
+#define SWITCH_GPU_PROFILE_FILE_AVAILABLE_GOVERNORS_PATH "/sys/devices/57000000.gpu/devfreq/57000000.gpu/available_governors"
|
|
+#define SWITCH_GPU_PROFILE_FILE_AVAILABLE_FREQ_PATH "/sys/devices/57000000.gpu/devfreq/57000000.gpu/available_governors"
|
|
|
|
+#define SWITCH_R2P_ENABLED_PATH "/sys/module/pmc_r2p/parameters/enabled"
|
|
+#define SWITCH_R2P_ACTION_PATH /sys/module/pmc_r2p/parameters/action
|
|
+#define SWITCH_R2P_ENTRY_ID_PATH /sys/module/pmc_r2p/parameters/entry_id
|
|
+#define SWITCH_R2P_PARAM1_PATH /sys/module/pmc_r2p/parameters/param1
|
|
+#define SWITCH_R2P_PARAM2_PATH /sys/module/pmc_r2p/parameters/param2
|
|
#endif
|
|
diff --git a/menu/cbs/menu_cbs_sublabel.c b/menu/cbs/menu_cbs_sublabel.c
|
|
index d3e5a46d74..f3a39dd519 100644
|
|
--- a/menu/cbs/menu_cbs_sublabel.c
|
|
+++ b/menu/cbs/menu_cbs_sublabel.c
|
|
@@ -369,6 +369,7 @@ DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_timezone, MENU_
|
|
#ifdef HAVE_LAKKA_SWITCH
|
|
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_switch_options, MENU_ENUM_SUBLABEL_LAKKA_SWITCH_OPTIONS)
|
|
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_switch_oc_enable, MENU_ENUM_SUBLABEL_SWITCH_OC_ENABLE)
|
|
+DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_switch_cec_enable, MENU_ENUM_SUBLABEL_SWITCH_CEC_ENABLE)
|
|
#endif
|
|
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_user_language, MENU_ENUM_SUBLABEL_USER_LANGUAGE)
|
|
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_max_swapchain_images, MENU_ENUM_SUBLABEL_VIDEO_MAX_SWAPCHAIN_IMAGES)
|
|
@@ -4868,6 +4869,9 @@ int menu_cbs_init_bind_sublabel(menu_file_list_cbs_t *cbs,
|
|
case MENU_ENUM_LABEL_SWITCH_OC_ENABLE:
|
|
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_switch_oc_enable);
|
|
break;
|
|
+ case MENU_ENUM_LABEL_SWITCH_CEC_ENABLE:
|
|
+ BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_switch_cec_enable);
|
|
+ break;
|
|
#endif
|
|
case MENU_ENUM_LABEL_USER_LANGUAGE:
|
|
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_user_language);
|
|
diff --git a/menu/menu_displaylist.c b/menu/menu_displaylist.c
|
|
index 8544609b38..c23808d904 100644
|
|
--- a/menu/menu_displaylist.c
|
|
+++ b/menu/menu_displaylist.c
|
|
@@ -9105,6 +9105,7 @@ unsigned menu_displaylist_build_list(
|
|
{
|
|
menu_displaylist_build_info_t build_list[] = {
|
|
{MENU_ENUM_LABEL_SWITCH_OC_ENABLE, PARSE_ONLY_BOOL},
|
|
+ {MENU_ENUM_LABEL_SWITCH_CEC_ENABLE, PARSE_ONLY_BOOL},
|
|
};
|
|
|
|
for (i = 0; i < ARRAY_SIZE(build_list); i++)
|
|
diff --git a/menu/menu_setting.c b/menu/menu_setting.c
|
|
index 91bc6f70f3..5a444aef90 100644
|
|
--- a/menu/menu_setting.c
|
|
+++ b/menu/menu_setting.c
|
|
@@ -9083,6 +9083,18 @@ static void switch_oc_enable_toggle_change_handler(rarch_setting_t *setting)
|
|
}
|
|
fclose(f);
|
|
}
|
|
+
|
|
+static void switch_cec_enable_toggle_change_handler(rarch_setting_t *setting)
|
|
+{
|
|
+ if (*setting->value.target.boolean == true) {
|
|
+ FILE* f = fopen(SWITCH_CEC_TOGGLE_PATH, "w");
|
|
+ fprintf(f, "\n");
|
|
+ fclose(f);
|
|
+ } else {
|
|
+ filestream_delete(SWITCH_CEC_TOGGLE_PATH);
|
|
+ }
|
|
+
|
|
+}
|
|
#endif
|
|
|
|
static void ssh_enable_toggle_change_handler(rarch_setting_t *setting)
|
|
@@ -21419,6 +21431,22 @@ static bool setting_append_list(
|
|
general_read_handler,
|
|
SD_FLAG_NONE);
|
|
(*list)[list_info->index - 1].change_handler = switch_oc_enable_toggle_change_handler;
|
|
+
|
|
+ CONFIG_BOOL(
|
|
+ list, list_info,
|
|
+ &settings->bools.switch_cec,
|
|
+ MENU_ENUM_LABEL_SWITCH_CEC_ENABLE,
|
|
+ MENU_ENUM_LABEL_VALUE_SWITCH_CEC_ENABLE,
|
|
+ DEFAULT_SWITCH_CEC,
|
|
+ MENU_ENUM_LABEL_VALUE_OFF,
|
|
+ MENU_ENUM_LABEL_VALUE_ON,
|
|
+ &group_info,
|
|
+ &subgroup_info,
|
|
+ parent_group,
|
|
+ general_write_handler,
|
|
+ general_read_handler,
|
|
+ SD_FLAG_NONE);
|
|
+ (*list)[list_info->index - 1].change_handler = switch_cec_enable_toggle_change_handler;
|
|
|
|
END_SUB_GROUP(list, list_info, parent_group);
|
|
END_GROUP(list, list_info, parent_group);
|
|
diff --git a/msg_hash.h b/msg_hash.h
|
|
index 861881024b..990a0564fa 100644
|
|
--- a/msg_hash.h
|
|
+++ b/msg_hash.h
|
|
@@ -2251,6 +2251,7 @@ enum msg_hash_enums
|
|
#endif
|
|
#ifdef HAVE_LAKKA_SWITCH
|
|
MENU_LABEL(SWITCH_OC_ENABLE),
|
|
+ MENU_LABEL(SWITCH_CEC_ENABLE),
|
|
#endif
|
|
MENU_LABEL(NETPLAY_DELAY_FRAMES), /* deprecated */
|
|
MENU_LABEL(NETPLAY_PUBLIC_ANNOUNCE),
|
|
--
|
|
2.25.1
|
|
|