diff options
author | Alex Barker (KWhat) <alex@1stleg.com> | 2011-12-21 23:42:47 +0000 |
---|---|---|
committer | Alex Barker (KWhat) <alex@1stleg.com> | 2011-12-21 23:42:47 +0000 |
commit | abf2a144d5778c61d4a876221b34c990e006d9fa (patch) | |
tree | 6a9ecf9efbc7e8904c1381678d18cfeec809481e /media-libs | |
parent | dev-python/django-tastypie: Edit to Changelog of tastypie (diff) | |
download | sunrise-abf2a144d5778c61d4a876221b34c990e006d9fa.tar.gz sunrise-abf2a144d5778c61d4a876221b34c990e006d9fa.tar.bz2 sunrise-abf2a144d5778c61d4a876221b34c990e006d9fa.zip |
media-libs/hdj_mod: New Ebuild for bug 272100 Thanks Tommy[D] and Floppym.
svn path=/sunrise/; revision=12597
Diffstat (limited to 'media-libs')
-rw-r--r-- | media-libs/hdj_mod/ChangeLog | 10 | ||||
-rw-r--r-- | media-libs/hdj_mod/Manifest | 8 | ||||
-rw-r--r-- | media-libs/hdj_mod/files/dj_console_mp3_e2.patch | 29 | ||||
-rw-r--r-- | media-libs/hdj_mod/files/kernel_2.6.31_fix.patch | 22 | ||||
-rw-r--r-- | media-libs/hdj_mod/files/kernel_2.6.37_fix.patch | 131 | ||||
-rw-r--r-- | media-libs/hdj_mod/hdj_mod-1.28.ebuild | 41 | ||||
-rw-r--r-- | media-libs/hdj_mod/metadata.xml | 6 |
7 files changed, 247 insertions, 0 deletions
diff --git a/media-libs/hdj_mod/ChangeLog b/media-libs/hdj_mod/ChangeLog new file mode 100644 index 000000000..680ea25f9 --- /dev/null +++ b/media-libs/hdj_mod/ChangeLog @@ -0,0 +1,10 @@ +# ChangeLog for media-libs/hdj_mod +# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 +# $Header: $ + + 21 Dec 2011; Alex Barker (KWhat) <alex@1stleg.com> + +files/dj_console_mp3_e2.patch, +hdj_mod-1.28.ebuild, + +files/kernel_2.6.31_fix.patch, +files/kernel_2.6.37_fix.patch, + +metadata.xml: + New Ebuild for bug 272100 Thanks Tommy[D] and Floppym. + diff --git a/media-libs/hdj_mod/Manifest b/media-libs/hdj_mod/Manifest new file mode 100644 index 000000000..e5549a04b --- /dev/null +++ b/media-libs/hdj_mod/Manifest @@ -0,0 +1,8 @@ +AUX dj_console_mp3_e2.patch 1368 RMD160 a34cf5377c11d5287faf2893d184cb9dedc720bf SHA1 51c625212fc03d1de05549807cd527e24a0379b9 SHA256 104d04b930d5072eac3c05771a1eb7599b3b58447259be3402c85a3e98b6e028 +AUX kernel_2.6.31_fix.patch 860 RMD160 83bdf46bb758abb8e5c143d99d22e574cd09453c SHA1 ff9ea8a58c416af2f0a350e21edc5e18805ad62c SHA256 cc08c589348aae34d6a9b1e52ce4e608d9aa1310da9d1a7f4762b1e7e12fe378 +AUX kernel_2.6.37_fix.patch 4731 RMD160 aa9baf58e44e58a2bdb9c0e6648f490d097499a2 SHA1 e19646e4a0fc667dcd356237daf982833b1c2d21 SHA256 33399dd6d8e50dd8db79d8da85d7f3e4de6add701bca84131525880f8665437b +DIST hdj_mod-1.28.tgz 10060469 RMD160 3aa535592cbe3ae3b031b2c29bf19ffdcd758826 SHA1 523c5763637db5742f79b2c95c4f15a906965e1d SHA256 c3957491c367f642484e7a7f5a15acb8cb50f7c407cb225eabc7fb5d6a07ed28 +DIST hdj_mod-kernel_2.6.35_fix.patch 22170 RMD160 9bd8514fa25ea37d3b3cd673408f397e1b03e1e3 SHA1 6fe59acd69a8094899c8f1512023d59f5db2c1af SHA256 5a244f0b181f906951a6ad5ca8ab5033ff3b3079d0598fd61fd035aad06a78f5 +EBUILD hdj_mod-1.28.ebuild 1105 RMD160 57cdeef15dca9f6b6b0e65d3f3ace5a13346bd13 SHA1 431169b457bcd2dac2f04c12e0bde4cef299cdfc SHA256 c13732ad2cad995b610856dd2376e178c45c0132c795d20324667abe2f27599b +MISC ChangeLog 369 RMD160 430dbdc738607675f971d5d1bcf2f1aa9febdbbd SHA1 73a7d56f9969bd5bd259fd2d559e94d78d7179d7 SHA256 2a5f8d359ee6d93fa1c6e6617b530e27005eb68bdcabd36a31fcf29525f4d308 +MISC metadata.xml 222 RMD160 f19bb5918cafb20c787f3d85a2bfda9da3c7f347 SHA1 a88ad2dab1dec463642a229991eb137a30749d5e SHA256 54b7fca9cfec004e067f757b291a2a0489c61d25199503a22983a4fd697158db diff --git a/media-libs/hdj_mod/files/dj_console_mp3_e2.patch b/media-libs/hdj_mod/files/dj_console_mp3_e2.patch new file mode 100644 index 000000000..dde59e13f --- /dev/null +++ b/media-libs/hdj_mod/files/dj_console_mp3_e2.patch @@ -0,0 +1,29 @@ +--- device.c.orig 2010-12-12 16:34:17.866666668 +0100 ++++ device.c 2011-01-09 12:17:06.000000000 +0100 +@@ -1828,6 +1828,8 @@ static int usbid_to_product_code(u32 usb + return DJCONTROLLER_PRODUCT_CODE;
+ } else if (usbid == USB_ID(USB_HDJ_VENDOR_ID, DJ_CONTROL_MP3W_PID)) {
+ return DJCONTROLLER_PRODUCT_CODE;
++ } else if (usbid == USB_ID(USB_HDJ_VENDOR_ID, DJ_CONTROL_MP3E2_PID)) {
++ return DJCONTROLSTEEL_PRODUCT_CODE;
+ } else {
+ return DJCONSOLE_PRODUCT_UNKNOWN;
+ }
+@@ -1860,6 +1862,7 @@ static int hdj_probe(struct usb_interfac + (le16_to_cpu(usb_dev->descriptor.idProduct)!=DJ_CONSOLE_RMX_PID)&&
+ (le16_to_cpu(usb_dev->descriptor.idProduct)!=DJ_CONTROL_MP3_PID)&&
+ (le16_to_cpu(usb_dev->descriptor.idProduct)!=DJ_CONTROL_MP3W_PID)&&
++ (le16_to_cpu(usb_dev->descriptor.idProduct)!=DJ_CONTROL_MP3E2_PID)&&
+ (le16_to_cpu(usb_dev->descriptor.idProduct)!=DJ_CONSOLE_STEEL_PID))
+ {
+ printk(KERN_INFO"hdj_probe() unsupported device, idVendor%lx, idProduct:%lx\n",
+--- device.h.orig 2009-01-27 15:25:50.000000000 +0100 ++++ device.h 2011-01-09 12:19:22.000000000 +0100 +@@ -38,6 +38,7 @@ extern int netlink_unit; + #define DJ_CONSOLE_RMX_PID 0xb101
+ #define DJ_CONTROL_MP3_PID 0xd000
+ #define DJ_CONTROL_MP3W_PID 0xd001
++#define DJ_CONTROL_MP3E2_PID 0xb105
+ #define DJ_CONSOLE_STEEL_PID 0xb102
+
+ #define DJ_BULK_IFNUM 0
diff --git a/media-libs/hdj_mod/files/kernel_2.6.31_fix.patch b/media-libs/hdj_mod/files/kernel_2.6.31_fix.patch new file mode 100644 index 000000000..0dbc66dd8 --- /dev/null +++ b/media-libs/hdj_mod/files/kernel_2.6.31_fix.patch @@ -0,0 +1,22 @@ +--- device.c.orig 2011-02-17 19:42:06.000000000 -0800 ++++ device.c 2011-02-17 21:16:55.442483443 -0800 +@@ -1660,11 +1660,19 @@ + /* let the kernel option override custom id */
+ strncpy(card_id,id[idx],sizeof(card_id)-1);
+ }
++#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,31) )
++ err = snd_card_create(index[idx], card_id/*id[idx]*/, THIS_MODULE, 0, &card);
++ if (err < 0) {
++ snd_printk(KERN_WARNING "snd_hdj_chip_create(): cannot create card instance %d\n", idx);
++ return err;
++ }
++#else
+ card = snd_card_new(index[idx], card_id/*id[idx]*/, THIS_MODULE, 0);
+ if (card == NULL) {
+ snd_printk(KERN_WARNING "snd_hdj_chip_create(): cannot create card instance %d\n", idx);
+ return -ENOMEM;
+ }
++#endif
+
+ /* save the index, so people who have the card can reference the chip */
+ card->private_data = (void*)(unsigned long)idx;
diff --git a/media-libs/hdj_mod/files/kernel_2.6.37_fix.patch b/media-libs/hdj_mod/files/kernel_2.6.37_fix.patch new file mode 100644 index 000000000..f3a413c22 --- /dev/null +++ b/media-libs/hdj_mod/files/kernel_2.6.37_fix.patch @@ -0,0 +1,131 @@ +--- bulk.c.orig ++++ bulk.c +@@ -34,6 +34,9 @@ + #include <linux/usb.h>
+ #include <linux/delay.h>
+ #include <linux/version.h> /* For LINUX_VERSION_CODE */
++#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37) )
++#include <linux/semaphore.h>
++#endif
+ #if ( LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35) )
+ #include <linux/slab.h>
+ #endif
+@@ -3086,7 +3089,11 @@ int hdj_create_bulk_interface(struct snd_hdj_chip* chip, + goto hdj_create_bulk_interface_error;
+ }
+ /* allocate the buffer for bulk_out_urb */
++#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37) )
++ sema_init(&ubulk->bulk_out_buffer_mutex,1);
++#else
+ init_MUTEX(&ubulk->bulk_out_buffer_mutex);
++#endif
+
+ ubulk->bulk_out_buffer =
+ #if ( LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35) )
+@@ -3633,7 +3640,11 @@ static int init_output_control_state(struct usb_hdjbulk *ubulk) + return -EINVAL;
+ }
+
++#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37) )
++ sema_init(&ubulk->output_control_mutex,1);
++#else
+ init_MUTEX(&ubulk->output_control_mutex);
++#endif
+ init_completion(&ubulk->output_control_completion);
+
+ /* Every product here except the Steel targets HID. Since the steel does not target HID, we don't
+@@ -3907,7 +3918,11 @@ int hdjbulk_init_dj_console(struct usb_hdjbulk *ubulk) + u16 value = 0;
+ struct hdj_console_context *dc = ((struct hdj_console_context *)ubulk->device_context);
+
++#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37) )
++ sema_init(&dc->device_config_mutex,1);
++#else
+ init_MUTEX(&dc->device_config_mutex);
++#endif
+
+ ret = hdjbulk_init_common_context(ubulk,&ubulk->hdj_common);
+ if (ret!=0) {
+@@ -4185,7 +4200,11 @@ int hdjbulk_init_dj_steel(struct usb_hdjbulk *ubulk) +
+ spin_lock_init(&dc->bulk_buffer_lock);
+ init_completion(&dc->bulk_request_completion);
++#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37) )
++ sema_init(&dc->bulk_request_mutex,1);
++#else
+ init_MUTEX(&dc->bulk_request_mutex);
++#endif
+
+ if ((ret = init_continuous_reader(ubulk))!=0) {
+ printk(KERN_WARNING"%s() init_continuous_reader() failed, rc:%d\n",
+--- device.c.orig ++++ device.c +@@ -66,7 +66,11 @@ MODULE_PARM_DESC(index, "Index value for the Hercules DJ Series adapter."); + module_param_array(id, charp, NULL, 0444);
+ MODULE_PARM_DESC(id, "ID string for the Hercules DJ Series adapter.");
+
++#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37) )
++static DEFINE_SEMAPHORE(register_mutex);
++#else
+ static DECLARE_MUTEX(register_mutex);
++#endif
+ static struct snd_hdj_chip *usb_chip[SNDRV_CARDS];
+
+ /* reference count for the socket */
+@@ -1698,7 +1702,11 @@ static int snd_hdj_chip_create(struct usb_device *dev, + chip->card = card;
+ chip->product_code = product_code;
+
++#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37) )
++ sema_init(&chip->vendor_request_mutex,1);
++#else
+ init_MUTEX(&chip->vendor_request_mutex);
++#endif
+
+ /* initialise the atomic variables */
+ atomic_set(&chip->locked_io, 0);
+@@ -1713,7 +1721,11 @@ static int snd_hdj_chip_create(struct usb_device *dev, + INIT_LIST_HEAD(&chip->bulk_list);
+ chip->usb_id = USB_ID(le16_to_cpu(dev->descriptor.idVendor),
+ le16_to_cpu(dev->descriptor.idProduct));
++#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37) )
++ sema_init(&chip->netlink_list_mutex,1);
++#else
+ init_MUTEX(&chip->netlink_list_mutex);
++#endif
+ INIT_LIST_HEAD(&chip->netlink_registered_processes);
+
+ /* fill in DJ capabilities for this device */
+--- midi.c.orig ++++ midi.c +@@ -34,6 +34,9 @@ + #include <linux/module.h>
+ #include <linux/usb.h>
+ #include <linux/kthread.h>
++#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37) )
++#include <linux/semaphore.h>
++#endif
+ #if ( LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35) )
+ #include <linux/slab.h>
+ #endif
+@@ -63,7 +66,7 @@ +
+ unsigned long channel_list_initialized = 0;
+ struct midi_channel_elem channel_list[NUM_MIDI_CHANNELS];
+-spinlock_t channel_list_lock = SPIN_LOCK_UNLOCKED;
++DEFINE_SPINLOCK(channel_list_lock);
+
+ static struct usb_protocol_ops snd_hdjmidi_standard_ops = {
+ .input = snd_hdjmidi_standard_input,
+@@ -732,7 +735,11 @@ static int controller_output_init(struct controller_output_hid *controller_state +
+ /* this buffer and URB below are for general control requests, like changing the
+ * mouse setting or setting LEDs */
++#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37) )
++ sema_init(&controller_state->output_control_ctl_mutex, 1);
++#else
+ init_MUTEX(&controller_state->output_control_ctl_mutex);
++#endif
+ init_completion(&controller_state->output_control_ctl_completion);
+ #if ( LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35) )
+ controller_state->output_control_ctl_req = usb_alloc_coherent(ep->umidi->chip->dev,
diff --git a/media-libs/hdj_mod/hdj_mod-1.28.ebuild b/media-libs/hdj_mod/hdj_mod-1.28.ebuild new file mode 100644 index 000000000..fb7eee55e --- /dev/null +++ b/media-libs/hdj_mod/hdj_mod-1.28.ebuild @@ -0,0 +1,41 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=4 + +inherit eutils linux-info linux-mod rpm + +DESCRIPTION="GPL Linux MIDI drivers for Hercules DJ midi controller devices" +HOMEPAGE="http://ts.hercules.com/eng/index.php?pg=view_files&gid=2&fid=28&pid=215&cid=1" +MY_PN="Hercules_DJSeries_Linux" + +SRC_URI="ftp://ftp.hercules.com/pub/webupdate/DJCSeries/${MY_PN}.tgz -> ${P}.tgz + http://ompldr.org/vOG1vbg/${PN}-kernel_2.6.35_fix.patch" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +BUILD_TARGETS="clean modules" +MODULE_NAMES="hdj_mod()" + +pkg_setup () { + BUILD_PARAMS="KERN_DIR=\"${KV_DIR}\" KERNOUT=\"${KV_OUT_DIR}\"" + CONFIG_CHECK="SND_RAWMIDI SND_VIRMIDI" + linux-mod_pkg_setup +} + +src_unpack () { + unpack ${A} + rpm_unpack "./kernel module/hdjmod-dkms-${PV}-1.noarch.rpm" + mv usr/src/hdjmod-${PV} "${S}" || die +} + +src_prepare() { + epatch "${FILESDIR}"/dj_console_mp3_e2.patch + epatch "${FILESDIR}"/kernel_2.6.31_fix.patch + epatch "${DISTDIR}"/${PN}-kernel_2.6.35_fix.patch + epatch "${FILESDIR}"/kernel_2.6.37_fix.patch +} diff --git a/media-libs/hdj_mod/metadata.xml b/media-libs/hdj_mod/metadata.xml new file mode 100644 index 000000000..cc9a79f98 --- /dev/null +++ b/media-libs/hdj_mod/metadata.xml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer><email>maintainer-wanted@gentoo.org</email></maintainer> + <use></use> +</pkgmetadata> |