CAPTCHA
Image CAPTCHA
Enter the characters shown in the image.
This question is for testing whether or not you are human.
  • Create new account
  • Reset your password

User account menu

Home
The Hyperlogos
Read Everything

Main navigation

  • Home
  • My Resumé
  • blog
  • Howtos
  • Pages
  • Contact
  • Search

Mixman DM2 on Linux; SPIN_LOCK_UNLOCKED

Breadcrumb

  • Home
  • User Blogs
  • User Blog
  • Mixman DM2 on Linux; SPIN_LOCK_UNLOCKED
By drink | Sun March 04, 2012

Since I got a Mixman DM2 and like to run Linux I decided to put the two together. Slight hassle, though, the kernel doesn't sit still while you're not watching. A slight tweak is needed to get the driver to work on a modern kernel; in my case, 3.0.0-14-generic on Ubuntu.

I got an error about SPIN_LOCK_UNLOCK being deprecated, and that led me to google around until I found a nice kerneltrap blog entry on solutions for SPIN_LOCK_UNLOCKED errors. One of these was appropriate to the current case:

2. allocating a data structure dynamically & initializing the spinlock embedded within use spin_lock_init() e.g linux-core/via_dmablit.c

- blitq->blit_lock = SPIN_LOCK_UNLOCKED; 
+ spin_lock_init(&blitq->blit_lock);

So naturally I applied the same detail to the code. So here's the actual how-to.

  1. Install the sources
    You're going to need to install module-assistant before you can install the driver source package.
  2. Unpack the sources
    Visit /usr/src and sudo tar xvfj dm2.tar.bz2 which will produce a modules directory. You could back up dm2.tar.bz2 in case you make a mistake.
  3. Edit the offending file
    You want to edit modules/dm2/dm2.c at line 991. replace dev->lock = SPIN_LOCK_UNLOCKED; with spin_lock_init(&dev->lock);
  4. Regenerate the source archive
    sudo tar cvfj dm2.tar.bz2 modules
  5. Build the driver
    sudo m-a a-i dm2-source
  6. Plug in the Mixman

LEDs should flash. If not, please come back and leave a comment. My current goal is to use the unit with Mixxx... TBC

music
controller
howto
linux
  • Log in or register to post comments

Footer menu

  • Contact
Powered by Drupal

Copyright © 2025 Martin Espinoza - All rights reserved