Giter Site home page Giter Site logo

asus-strix-raid-dlx-kernel-module's Introduction

Asus Strix Raid DLX Kernel Module for control box

Here you can find a kernel module for the control box of the ASUS Soundcard Strix Raid DLX. Since ASUS doesn't provide drivers for linux I tried to reverse engineer the windows driver and wrote a kernel module for it.

I tested it under Manjaro Kernel 5.4 and 5.5 and its working fine. I cannot say how it works under other distributions, but it should do.

This is my first attempt to build a kernel module from scratch. So if you find errors please feel free to clone the repository and get rid of them and/or modify some code. My code is licenced under GPLv2.

I am limited of time so I cannot provide much support.

1. Introduction

The ASUS soundcard Strix Raid DLX comes with a control box which is connected externally to the soundcard. Thix box is intended to be placed on the desk and you can plug in your headphones easily. With a button you can switch between headphones (connected to the box) and speaker (directly connected to the soundcard). You can change also the volume with a rotation of the button.

The soundcard uses a Asmedia USB controller chip where the soundchip and the control box are internally connected. On button press a microcontroller inside the box starts an interrupt on interface 4 of the usb chip with a special request.

Here comes the module into play which reads the usb interrupts and changes the output between soundcard and headphone and can set the leds per volume. A userspace daemon has access to this module. It can read the volume and set it to the master channel of alsamixer. If you change the volume with another method (keyboard, volume control or other) the daemon writes the new volume to the module so the correct leds will be set on the control box.

2. Prerequisits

You will need:

kernel-sources base-devel (debian: build-essential) with make and gcc alsalib (libasound) dkms

3. Installation

sudo sh dkms-install.sh
make daemon

The daemon should get access to the /dev/strixdlx, so copy the rules file for udev

sudo cp 90-strixdlx.rules to /etc/udev/udev.rules.d/

Since the usbhid driver catches always the device before this kernel module gets access to it, we need usbhid to block for this device. If usbhid is compiled as module you can use a quirk to block it:

sudo cp usbhid.conf /etc/modprobe.d/

If usbhid is not a module you have to build a udev rule to block the usbhid driver for this device. But be careful: If you block usbhid completly it can be that your mouse and keyboard doesn't work anymore.

Remake initramfs

sudo mkinitcipio -P

The userspace daemon can be copied where you want. I use /usr/bin for it:

cp strix-daemon /usr/bin

The daemon must be started as user.

mkdir -p ~/.config/systemd/usr/
cp strix-daemon.service ~/config/systemd/usr/
systemctl --user start strix-daemon.service

4. Manual Installation

You can use

make

to build only the kernel module without dkms. Afterwards you can try it out by using insmod or copy copy it over to your kernel.

asus-strix-raid-dlx-kernel-module's People

Contributors

reddevil156 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.