diff --git a/recipes-connectivity/bluetooth/bluetooth-mgr_git.bb b/recipes-connectivity/bluetooth/bluetooth-mgr_git.bb index 9f229e89..afbe9611 100644 --- a/recipes-connectivity/bluetooth/bluetooth-mgr_git.bb +++ b/recipes-connectivity/bluetooth/bluetooth-mgr_git.bb @@ -84,6 +84,10 @@ CFLAGS:append =" ${@bb.utils.contains('RDEPENDS:${PN}', 'virtual/${MLPREFIX}medi ENABLE_RDK_LOGGER = "--enable-rdk-logger=${@bb.utils.contains('RDEPENDS:${PN}', '${MLPREFIX}rdk-logger', 'yes', 'no', d)}" EXTRA_OECONF += " ${ENABLE_RDK_LOGGER}" +# Autoconnect feature enabled +ENABLE_AUTO_CONNECT = "--enable-autoconnectfeature=${@bb.utils.contains('DISTRO_FEATURES', 'btr_enable_auto_connect','yes','no',d)}" +EXTRA_OECONF += " ${ENABLE_AUTO_CONNECT} " + EXTRA_OECONF:append = " ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '--enable-systemd-notify', '', d)}" EXTRA_OECONF:append:client = " --enable-sys-diag" diff --git a/recipes-extended/wpe-backend-rdk/files/comcast-manette-gamepad-analog-button.patch b/recipes-extended/wpe-backend-rdk/files/comcast-manette-gamepad-analog-button.patch new file mode 100644 index 00000000..f0d3837c --- /dev/null +++ b/recipes-extended/wpe-backend-rdk/files/comcast-manette-gamepad-analog-button.patch @@ -0,0 +1,96 @@ +Date: Fri, Aug 30 20:30:21 2024 +0000 +From: Manoj Bhatta +Subject: [PATCH] Add support for Analog buton values +Source: COMCAST +Signed-off-by: Ganesh Sahu + +diff --git a/src/manettegamepad/manette_gamepad.cpp b/src/manettegamepad/manette_gamepad.cpp +index 71ee82a..c4f1a04 100644 +--- a/src/manettegamepad/manette_gamepad.cpp ++++ b/src/manettegamepad/manette_gamepad.cpp +@@ -166,17 +166,29 @@ struct GamepadProvider + static void onButtonPressEvent(ManetteDevice* device, ManetteEvent* event, GamepadProvider* provider) + { + uint16_t button; ++ double value = 1.0; + if (!manette_event_get_button(event, &button)) + return; +- provider->buttonPressedOrReleased(device, toStandardGamepadButton(button), true); ++ if (button == BTN_TL2 || button == BTN_TR2) { ++ manette_event_get_button_value(event, &value); ++ provider->analogButtonChanged(device, toStandardGamepadButton(button), value); ++ } ++ else ++ provider->buttonPressedOrReleased(device, toStandardGamepadButton(button), true); + } + + static void onButtonReleaseEvent(ManetteDevice* device, ManetteEvent* event, GamepadProvider* provider) + { + uint16_t button; ++ double value = 0.0; + if (!manette_event_get_button(event, &button)) + return; +- provider->buttonPressedOrReleased(device, toStandardGamepadButton(button), false); ++ if (button == BTN_TL2 || button == BTN_TR2) { ++ manette_event_get_button_value(event, &value); ++ provider->analogButtonChanged(device, toStandardGamepadButton(button), value); ++ } ++ else ++ provider->buttonPressedOrReleased(device, toStandardGamepadButton(button), false); + } + + void listentoManetteDevice(ManetteDevice * device) +@@ -186,6 +198,16 @@ struct GamepadProvider + g_signal_connect(device, "absolute-axis-event", G_CALLBACK(onAbsoluteAxisEvent), this); + g_signal_connect(device, "hat-axis-event", G_CALLBACK(onHatAxisEvent), this); + } ++ ++ void analogButtonChanged(ManetteDevice* device, enum wpe_gamepad_button button, double value) ++ { ++ if (button == WPE_GAMEPAD_BUTTON_COUNT) ++ return; ++ auto it = manetteDevices.find(device); ++ if (it != manetteDevices.end()) { ++ updateGamepadAnalogButton(it->second,button,value); ++ } ++ } + + void buttonPressedOrReleased(ManetteDevice* device, enum wpe_gamepad_button button, bool pressed) + { +@@ -317,6 +339,7 @@ struct GamepadProvider + gamepadsInfo.erase(it); + wpe_gamepad_provider_dispatch_gamepad_disconnected(provider, gamepadId); + } ++ void updateGamepadAnalogButton(uint32_t gamepadId, enum wpe_gamepad_button button, double value); + void updateGamepadButton(uint32_t gamepadId, enum wpe_gamepad_button button, bool pressed); + void updateGamepadAxis(uint32_t gamepadId, enum wpe_gamepad_axis axis, double value); + }; +@@ -354,6 +377,12 @@ struct GamepadProxy + return result ? result: "Unknown"; + } + ++ void dispatchAnalogButtonChanged(enum wpe_gamepad_button button, double value) ++ { ++ if (gamepad) ++ wpe_gamepad_dispatch_analog_button_changed(gamepad, button, value); ++ } ++ + void dispatchButtonChanged(enum wpe_gamepad_button button, bool pressed) + { + if (gamepad) +@@ -378,6 +407,15 @@ GamepadProvider::~GamepadProvider() + kv.second->cleanUp(); + } + ++void GamepadProvider::updateGamepadAnalogButton( uint32_t gamepadId, enum wpe_gamepad_button button, double value ) ++{ ++ auto iter = gamepadProxies.find(gamepadId); ++ if (iter != gamepadProxies.end()) { ++ auto *proxy = iter->second; ++ proxy->dispatchAnalogButtonChanged(button,value); ++ } ++} ++ + void GamepadProvider::updateGamepadButton( uint32_t gamepadId, enum wpe_gamepad_button button, bool pressed ) + { + auto iter = gamepadProxies.find(gamepadId); diff --git a/recipes-extended/wpe-backend-rdk/wpe-backend-rdk_0.5.bb b/recipes-extended/wpe-backend-rdk/wpe-backend-rdk_0.5.bb new file mode 100644 index 00000000..4c797d3b --- /dev/null +++ b/recipes-extended/wpe-backend-rdk/wpe-backend-rdk_0.5.bb @@ -0,0 +1,59 @@ +SUMMARY = "WPE WebKit RDK backend" +HOMEPAGE = "https://github.com/WebPlatformForEmbedded" +SECTION = "wpe" +LICENSE = "BSD-2-Clause & Apache-2.0" +LIC_FILES_CHKSUM = "file://COPYING;md5=ab5b52d145a58f5fcc0e2a531e7a2370" + +DEPENDS += "libwpe glib-2.0" + +PV ?= "0.5.0" +PR ?= "r0" + +PACKAGE_ARCH = "${MIDDLEWARE_ARCH}" +PATCHTOOL = "git" + +# Revision date: March 15, 2024 +SRCREV = "6f53fce68d8e6895fd25a2b18c781bfbccdcf3b0" +BASE_URI ?= "git://github.com/WebPlatformForEmbedded/WPEBackend-rdk.git;protocol=https;branch=master" +SRC_URI = "${BASE_URI}" + +SRC_URI += "file://comcast-Naive-gamepad-support.patch" +SRC_URI += "file://0001-Fix-browser-crash-when-the-compositor-is-not-created.patch" +SRC_URI += "file://0001-Send-SIGHUP-if-compositor-is-terminated.patch" +SRC_URI += "file://comcast-manette-gamepad-support.patch" +SRC_URI += "file://comcast-manette-gamepad-analog-button.patch" + +S = "${WORKDIR}/git" + +inherit cmake pkgconfig + +WPE_BACKEND ?= "essos headless" +RDEPENDS:${PN}-platform-plugin:append = " essos" + +PACKAGECONFIG ?= "${WPE_BACKEND}" +PACKAGECONFIG:append = " ${@bb.utils.contains('DISTRO_FEATURES', 'gamepad-using-libmanette', ' manettegamepad', ' gamepad', d)}" + +PACKAGECONFIG[westeros] = "-DUSE_BACKEND_WESTEROS=ON -DUSE_KEY_INPUT_HANDLING_LINUX_INPUT=OFF,,wayland westeros libxkbcommon" +PACKAGECONFIG[essos] = "-DUSE_BACKEND_ESSOS=ON -DUSE_INPUT_LIBINPUT=OFF,-DUSE_BACKEND_ESSOS=OFF,essos libxkbcommon wayland" +PACKAGECONFIG[gamepad] = "-DUSE_GENERIC_GAMEPAD=ON,-DUSE_GENERIC_GAMEPAD=OFF," +PACKAGECONFIG[headless] = "-DUSE_BACKEND_HEADLESS=ON -DUSE_INPUT_LIBINPUT=OFF,-DUSE_BACKEND_HEADLESS=OFF," +PACKAGECONFIG[manettegamepad] = "-DUSE_LIBMANETTE_GAMEPAD=ON, -DUSE_LIBMANETTE_GAMEPAD=OFF, libmanette" + + +EXTRA_OECMAKE += " \ + -DCMAKE_BUILD_TYPE=Release \ +" + +PROVIDES = "wpe-backend-rdk" +RPROVIDES:${PN} = "wpe-backend-rdk" + +PACKAGES =+ "${PN}-platform-plugin" +FILES:${PN}-platform-plugin += "${libdir}/*.so ${bindir}/*" +INSANE_SKIP:${PN}-platform-plugin = "dev-so" + +FILES_SOLIBSDEV = "" +SOLIBS = ".so" +INSANE_SKIP:${PN} += "dev-so" +FILES:${PN} += "${libdir}/*.so" +#We need the default package, even if empty for SDK +ALLOW_EMPTY:${PN}="1"