diff options
Diffstat (limited to 'hosts/iroha/gentoo/patches/games-util')
3 files changed, 0 insertions, 138 deletions
diff --git a/hosts/iroha/gentoo/patches/games-util/xone/3bc363c48ec38c4a08c4294ca111ed9f75e3e026.diff b/hosts/iroha/gentoo/patches/games-util/xone/3bc363c48ec38c4a08c4294ca111ed9f75e3e026.diff deleted file mode 100644 index f133faf..0000000 --- a/hosts/iroha/gentoo/patches/games-util/xone/3bc363c48ec38c4a08c4294ca111ed9f75e3e026.diff +++ /dev/null @@ -1,26 +0,0 @@ -diff --git a/driver/headset.c b/driver/headset.c -index 5eada22..4c6e73e 100644 ---- a/driver/headset.c -+++ b/driver/headset.c -@@ -6,6 +6,7 @@ - #include <linux/module.h> - #include <linux/hrtimer.h> - #include <linux/vmalloc.h> -+#include <linux/version.h> - #include <sound/core.h> - #include <sound/initval.h> - #include <sound/pcm.h> -@@ -499,8 +500,13 @@ static int gip_headset_probe(struct gip_client *client) - INIT_DELAYED_WORK(&headset->work_power_on, gip_headset_power_on); - INIT_WORK(&headset->work_register, gip_headset_register); - -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,15,0) -+ hrtimer_setup(&headset->timer, gip_headset_send_samples, -+ CLOCK_MONOTONIC, HRTIMER_MODE_REL); -+#else - hrtimer_init(&headset->timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); - headset->timer.function = gip_headset_send_samples; -+#endif - - err = gip_enable_audio(client); - if (err) diff --git a/hosts/iroha/gentoo/patches/games-util/xone/53.diff b/hosts/iroha/gentoo/patches/games-util/xone/53.diff deleted file mode 100644 index 455452a..0000000 --- a/hosts/iroha/gentoo/patches/games-util/xone/53.diff +++ /dev/null @@ -1,75 +0,0 @@ -diff --git a/bus/bus.c b/bus/bus.c -index 4a6c64f..8dc9bbb 100644 ---- a/bus/bus.c -+++ b/bus/bus.c -@@ -56,7 +56,11 @@ static struct device_type gip_client_type = { - .release = gip_client_release, - }; - -+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 11, 0) - static int gip_bus_match(struct device *dev, struct device_driver *driver) -+#else -+static int gip_bus_match(struct device *dev, const struct device_driver *driver) -+#endif - { - struct gip_client *client; - struct gip_driver *drv; -diff --git a/driver/headset.c b/driver/headset.c -index ebee92d..c736351 100644 ---- a/driver/headset.c -+++ b/driver/headset.c -@@ -5,6 +5,7 @@ - - #include <linux/module.h> - #include <linux/hrtimer.h> -+#include <linux/vmalloc.h> - #include <sound/core.h> - #include <sound/initval.h> - #include <sound/pcm.h> -@@ -90,13 +91,34 @@ static int gip_headset_pcm_close(struct snd_pcm_substream *sub) - static int gip_headset_pcm_hw_params(struct snd_pcm_substream *sub, - struct snd_pcm_hw_params *params) - { -- return snd_pcm_lib_alloc_vmalloc_buffer(sub, -- params_buffer_bytes(params)); -+ struct snd_pcm_runtime *runtime = sub->runtime; -+ size_t size = params_buffer_bytes(params); -+ -+ if (runtime->dma_area) { -+ if (runtime->dma_bytes >= size) -+ return 0; /* Already large enough */ -+ vfree(runtime->dma_area); -+ } -+ runtime->dma_area = vzalloc(size); -+ if (!runtime->dma_area) -+ return -ENOMEM; -+ runtime->dma_bytes = size; -+ return 1; - } - - static int gip_headset_pcm_hw_free(struct snd_pcm_substream *sub) - { -- return snd_pcm_lib_free_vmalloc_buffer(sub); -+ struct snd_pcm_runtime *runtime = sub->runtime; -+ -+ vfree(runtime->dma_area); -+ runtime->dma_area = NULL; -+ return 0; -+} -+ -+static struct page *gip_headset_pcm_get_page(struct snd_pcm_substream *sub, -+ unsigned long offset) -+{ -+ return vmalloc_to_page(sub->runtime->dma_area + offset); - } - - static int gip_headset_pcm_prepare(struct snd_pcm_substream *sub) -@@ -157,7 +179,7 @@ static const struct snd_pcm_ops gip_headset_pcm_ops = { - .prepare = gip_headset_pcm_prepare, - .trigger = gip_headset_pcm_trigger, - .pointer = gip_headset_pcm_pointer, -- .page = snd_pcm_lib_get_vmalloc_page, -+ .page = gip_headset_pcm_get_page, - }; - - static bool gip_headset_advance_pointer(struct gip_headset_stream *stream, diff --git a/hosts/iroha/gentoo/patches/games-util/xone/b18d6d5b51c308bca665e6dfe63f31aecb98cce5.diff b/hosts/iroha/gentoo/patches/games-util/xone/b18d6d5b51c308bca665e6dfe63f31aecb98cce5.diff deleted file mode 100644 index 7b23358..0000000 --- a/hosts/iroha/gentoo/patches/games-util/xone/b18d6d5b51c308bca665e6dfe63f31aecb98cce5.diff +++ /dev/null @@ -1,37 +0,0 @@ -diff --git a/driver/gamepad.c b/driver/gamepad.c -index eec2aeaa..d424774b 100644 ---- a/driver/gamepad.c -+++ b/driver/gamepad.c -@@ -6,6 +6,7 @@ - #include <linux/module.h> - #include <linux/uuid.h> - #include <linux/timer.h> -+#include <linux/version.h> - - #include "common.h" - #include "../auth/auth.h" -@@ -207,8 +208,11 @@ static int gip_gamepad_init_input(struct gip_gamepad *gamepad) - return 0; - - err_delete_timer: -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,15,0) -+ timer_delete_sync(&gamepad->rumble.timer); -+#else - del_timer_sync(&gamepad->rumble.timer); -- -+#endif - return err; - } - -@@ -335,7 +339,11 @@ static void gip_gamepad_remove(struct gip_client *client) - { - struct gip_gamepad *gamepad = dev_get_drvdata(&client->dev); - -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,15,0) -+ timer_delete_sync(&gamepad->rumble.timer); -+#else - del_timer_sync(&gamepad->rumble.timer); -+#endif - } - - static struct gip_driver gip_gamepad_driver = { |