Actually, I just realized Arnaud's patch already fixed that problem
and some other things for Real Time kernel compatibility...
Better to use his... I've attached it here (same instructions w/
different patch name) should apply.
diff -rupNB hdjmod-1.28/bulk.c hdjmod-1.28_MODIF/bulk.c
--- hdjmod-1.28/bulk.c 2009-08-24 01:14:03.000000000 +0200
+++ hdjmod-1.28_MODIF/bulk.c 2009-08-24 22:56:07.000000000 +0200
@@ -3062,7 +3062,7 @@ int hdj_create_bulk_interface(struct snd
goto hdj_create_bulk_interface_error;
}
/* allocate the buffer for bulk_out_urb */
- init_MUTEX(&ubulk->bulk_out_buffer_mutex);
+ semaphore_init(&ubulk->bulk_out_buffer_mutex);
ubulk->bulk_out_buffer =
usb_buffer_alloc(ubulk->chip->dev, ubulk->bulk_out_size,
@@ -3601,7 +3601,7 @@ static int init_output_control_state(str
return -EINVAL;
}
- init_MUTEX(&ubulk->output_control_mutex);
+ semaphore_init(&ubulk->output_control_mutex);
init_completion(&ubulk->output_control_completion);
/* Every product here except the Steel targets HID. Since the steel does not target HID, we don't
@@ -3855,7 +3855,7 @@ int hdjbulk_init_dj_console(struct usb_h
u16 value = 0;
struct hdj_console_context *dc = ((struct hdj_console_context *)ubulk->device_context);
- init_MUTEX(&dc->device_config_mutex);
+ semaphore_init(&dc->device_config_mutex);
ret = hdjbulk_init_common_context(ubulk,&ubulk->hdj_common);
if (ret!=0) {
@@ -4133,7 +4133,7 @@ int hdjbulk_init_dj_steel(struct usb_hdj
spin_lock_init(&dc->bulk_buffer_lock);
init_completion(&dc->bulk_request_completion);
- init_MUTEX(&dc->bulk_request_mutex);
+ semaphore_init(&dc->bulk_request_mutex);
if ((ret = init_continuous_reader(ubulk))!=0) {
printk(KERN_WARNING"%s() init_continuous_reader() failed, rc:%d\n",
diff -rupNB hdjmod-1.28/device.c hdjmod-1.28_MODIF/device.c
--- hdjmod-1.28/device.c 2009-08-24 01:14:03.000000000 +0200
+++ hdjmod-1.28_MODIF/device.c 2009-08-24 22:52:13.000000000 +0200
@@ -66,7 +66,7 @@ MODULE_PARM_DESC(index, "Index value for
module_param_array(id, charp, NULL, 0444);
MODULE_PARM_DESC(id, "ID string for the Hercules DJ Series adapter.");
-static DECLARE_MUTEX(register_mutex);
+static DEFINE_SEMAPHORE(register_mutex);
static struct snd_hdj_chip *usb_chip[SNDRV_CARDS];
/* reference count for the socket */
@@ -1660,11 +1660,12 @@ static int snd_hdj_chip_create(struct us
/* let the kernel option override custom id */
strncpy(card_id,id[idx],sizeof(card_id)-1);
}
- 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;
- }
+
+ 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;
+ }
/* save the index, so people who have the card can reference the chip */
card->private_data = (void*)(unsigned long)idx;
@@ -1682,7 +1683,7 @@ static int snd_hdj_chip_create(struct us
chip->card = card;
chip->product_code = product_code;
- init_MUTEX(&chip->vendor_request_mutex);
+ semaphore_init(&chip->vendor_request_mutex);
/* initialise the atomic variables */
atomic_set(&chip->locked_io, 0);
@@ -1697,7 +1698,7 @@ static int snd_hdj_chip_create(struct us
INIT_LIST_HEAD(&chip->bulk_list);
chip->usb_id = USB_ID(le16_to_cpu(dev->descriptor.idVendor),
le16_to_cpu(dev->descriptor.idProduct));
- init_MUTEX(&chip->netlink_list_mutex);
+ semaphore_init(&chip->netlink_list_mutex);
INIT_LIST_HEAD(&chip->netlink_registered_processes);
/* fill in DJ capabilities for this device */
diff -rupNB hdjmod-1.28/midi.c hdjmod-1.28_MODIF/midi.c
--- hdjmod-1.28/midi.c 2009-08-24 01:14:03.000000000 +0200
+++ hdjmod-1.28_MODIF/midi.c 2009-08-24 22:57:10.000000000 +0200
@@ -677,7 +677,7 @@ static int controller_output_init(struct
/* this buffer and URB below are for general control requests, like changing the
* mouse setting or setting LEDs */
- init_MUTEX(&controller_state->output_control_ctl_mutex);
+ semaphore_init(&controller_state->output_control_ctl_mutex);
init_completion(&controller_state->output_control_ctl_completion);
controller_state->output_control_ctl_req = usb_buffer_alloc(ep->umidi->chip->dev,
sizeof(*(controller_state->output_control_ctl_req)),
On 2009-10-08, at 11:12 PM, Garth Dahlstrom wrote:
Hi everyone,
I've just about completed the upgrade from 9.04 to 9.10 (Ubuntu
Studio has been a PITA due to LP #410867), the transition broke the
hdj_mod dkms kernel module. I believe the cause was some ALSA API
changes in 2.6.31, attached you will find a patch that can be used
to get the driver going on 2.6.31.
To use it, follow roughly these steps:
sudo dkms build -m hdj_mod -v 1.28 # this will fail but explode
everything needed to build with
cd /var/lib/dkms/hdjmod/1.28/build
sudo sh -c "cat ~/Desktop/hdj_mod-2.6.31-alsa.patch | patch"
sudo make
sudo make install
The patch is a transcription of on a similar patch that was found
attached to this posting: http://www.nabble.com/Re%3A-em8300-vs-new-I%C2%B2C-driver-model----please-test-p25407474.html
Cheers,
-G
<hdj_mod-2.6.31-alsa.patch>
------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Mixxx-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mixxx-devel