mirror of
https://github.com/void-linux/void-packages.git
synced 2025-09-04 11:03:06 +02:00
xone: change source to dlundqvist fork and update to 0.4.1
The template currently uses the original `medusalix/xone` repo which is not maintained anymore. `dlundqvist/xone` is maintained and latest versions are compatible with kernel >=6.15.
This commit is contained in:
parent
ed4ecd21cc
commit
c6466cd5b2
5 changed files with 6 additions and 164 deletions
|
@ -1,26 +0,0 @@
|
|||
From 28df566c38e0ee500fd5f74643fc35f21a4ff696 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Torleif=20Sk=C3=A5r?=
|
||||
<16509259+tskaar@users.noreply.github.com>
|
||||
Date: Tue, 30 Jul 2024 22:35:25 +0200
|
||||
Subject: [PATCH] fix: build on kernel v6.11
|
||||
|
||||
---
|
||||
bus/bus.c | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
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;
|
|
@ -1,74 +0,0 @@
|
|||
From d88ea1e8b430d4b96134e43ca1892ac48334578e Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Torleif=20Sk=C3=A5r?=
|
||||
<16509259+tskaar@users.noreply.github.com>
|
||||
Date: Mon, 30 Sep 2024 21:07:13 +0200
|
||||
Subject: [PATCH] fix: build on kernel v6.12
|
||||
|
||||
Upstream "Drop of obsoloted vmalloc PCM buffer helper API";
|
||||
https://lore.kernel.org/all/20240807152725.18948-3-tiwai@suse.de/
|
||||
|
||||
Code taken from the driver;
|
||||
https://lore.kernel.org/all/20240807152725.18948-2-tiwai@suse.de/
|
||||
---
|
||||
driver/headset.c | 30 ++++++++++++++++++++++++++----
|
||||
1 file changed, 26 insertions(+), 4 deletions(-)
|
||||
|
||||
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,
|
|
@ -1,25 +0,0 @@
|
|||
From bbf0dcc484c3f5611f4e375da43e0e0ef08f3d18 Mon Sep 17 00:00:00 2001
|
||||
From: Vicki Pfau <vi@endrift.com>
|
||||
Date: Tue, 16 May 2023 15:06:07 -0700
|
||||
Subject: [PATCH] Fix build on kernel 6.3
|
||||
|
||||
---
|
||||
bus/bus.c | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/bus/bus.c b/bus/bus.c
|
||||
index 7fde922..b129d6f 100644
|
||||
--- a/bus/bus.c
|
||||
+++ b/bus/bus.c
|
||||
@@ -67,7 +67,11 @@ static void gip_client_state_changed(struct work_struct *work)
|
||||
}
|
||||
}
|
||||
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 3, 0)
|
||||
static int gip_client_uevent(struct device *dev, struct kobj_uevent_env *env)
|
||||
+#else
|
||||
+static int gip_client_uevent(const struct device *dev, struct kobj_uevent_env *env)
|
||||
+#endif
|
||||
{
|
||||
struct gip_client *client = to_gip_client(dev);
|
||||
struct gip_classes *classes = client->classes;
|
|
@ -1,33 +0,0 @@
|
|||
From 1b4344ab8d9d7891f843dc993b0c5447f46c9889 Mon Sep 17 00:00:00 2001
|
||||
From: medusalix <ss7@live.de>
|
||||
Date: Sun, 21 Jan 2024 21:18:17 +0100
|
||||
Subject: [PATCH] Fix build on kernel 6.8
|
||||
|
||||
---
|
||||
transport/dongle.c | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/transport/dongle.c b/transport/dongle.c
|
||||
index 1a30922..71aed1c 100644
|
||||
--- a/transport/dongle.c
|
||||
+++ b/transport/dongle.c
|
||||
@@ -6,6 +6,7 @@
|
||||
#include <linux/module.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/bitfield.h>
|
||||
+#include <linux/version.h>
|
||||
#include <linux/usb.h>
|
||||
#include <linux/ieee80211.h>
|
||||
#include <net/cfg80211.h>
|
||||
@@ -1024,7 +1025,11 @@ static struct usb_driver xone_dongle_driver = {
|
||||
.suspend = xone_dongle_suspend,
|
||||
.resume = xone_dongle_resume,
|
||||
.id_table = xone_dongle_id_table,
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 8, 0)
|
||||
.drvwrap.driver.shutdown = xone_dongle_shutdown,
|
||||
+#else
|
||||
+ .driver.shutdown = xone_dongle_shutdown,
|
||||
+#endif
|
||||
.supports_autosuspend = true,
|
||||
.disable_hub_initiated_lpm = true,
|
||||
.soft_unbind = true,
|
|
@ -1,14 +1,14 @@
|
|||
# Template file for 'xone'
|
||||
pkgname=xone
|
||||
version=0.3
|
||||
revision=3
|
||||
version=0.4.1
|
||||
revision=1
|
||||
depends="curl cabextract dkms"
|
||||
short_desc="Modern Linux driver for Xbox One and Xbox Series X|S controllers"
|
||||
maintainer="Orphaned <orphan@voidlinux.org>"
|
||||
license="GPL-2.0-only"
|
||||
homepage="https://github.com/medusalix/xone"
|
||||
distfiles="https://github.com/medusalix/xone/archive/refs/tags/v${version}.tar.gz"
|
||||
checksum=993f6b2b07c3236ce283d5de4da47dbfc16a86e056af504a4958d87f718ece20
|
||||
homepage="https://github.com/dlundqvist/xone"
|
||||
distfiles="https://github.com/dlundqvist/xone/archive/refs/tags/v${version}.tar.gz"
|
||||
checksum="81062412307ead3553b10364039ea76d4fa038b5b1dcc62e1acc2e5a2587deba"
|
||||
|
||||
dkms_modules="${pkgname} ${version}"
|
||||
|
||||
|
@ -18,7 +18,7 @@ do_install() {
|
|||
vdoc "${FILESDIR}/README.voidlinux"
|
||||
find . -type f \( -name dkms.conf -o -name '*.c' \) -exec sed -i "s/#VERSION#/$version/" {} +
|
||||
vmkdir /usr/src/${pkgname}-${version}
|
||||
for file in bus driver transport Kbuild dkms.conf; do
|
||||
for file in auth bus driver transport Kbuild dkms.conf; do
|
||||
vcopy $file /usr/src/${pkgname}-${version}/
|
||||
done
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue