Post

Setting up Creative Labs USB DAC volume knob on Linux

Lately I bought a Creative Labs SB1095, a 5.1 USB DAC for my laptop. This USB sound card works perfectly on Linux. The sound quality is better than the integrated, but it has a volume knob on it and a remote controller, which does not support out of the box by Linux distributions which I have tried(Ubuntu, Linux Mint, OpenSuse, Arch Linux). After digging up the internet a little bit I perceived that it is required to configure a software volume controller to handle the volume knob. However, I did not want to go for that kind of advanced configurations, and finally found an easy workaround for this purpose. Would like to take down the steps, so it might help others which have the same issue.

To achieve this I used lirc (an application which interprets IR actions) to detect volume knob and remote actions and wrapped it with irexec (trigger actions for lirc inputs) to change system sound volume.

I am currently using Linux Mint 18.1, so this solution will work perfectly with Ubuntu 16.04 derivatives. For other Linux distributions please follow this guide.

Requirements

First I installed these packages, selected Creative USB IR Receiver (SB0540) for remote controller configuration(not the SB1095, but it has the same configurations) and selected none for IR transmitter in appearing configuration menus when installing.

sudo apt install lirc lirc-x


Configurations

Then I changed the REMOTE_DRIVER in lirc hardware configuration file /etc/lirc/hardware.conf, left other settings unchanged.

# ~/.lircrc
begin
 remote = *
 prog = irexec
 config = amixer -D pulse sset Master 5%-
 button = vol-
 repeat = 1
end

begin
 remote = *
 prog = irexec
 config = amixer -D pulse sset Master 5%+
 button = vol+
 repeat = 1
end

begin
 remote = *
 prog = irexec
 config = amixer -D pulse sset Master 0
 button = mute
end


Test

Then I restarted lirc daemon and loaded irexec daemon.

sudo service lirc restart
irexec -d # make a startup entry to load on system boot up

Now I have the volume knob working just fine.
If the volume is not changing check whether lirc detects inputs by the USB device using the command irw

# irw sample output for volume knob changes
0000000000000010 01 vol+ RM-1500
0000000000000010 00 vol+ RM-1500
0000000000000010 01 vol+ RM-1500
000000000000000f 03 vol- RM-1500
000000000000000f 00 vol- RM-1500
000000000000000d 00 mute RM-1500

If the output is something like the above, try changing config values(commands to change sound volume) in the ~/.lircrc after that try restarting lirc daemon and loading irexec again.

Sources

http://alsa.opensrc.org/Usb-audio#Creative_USB_X-Fi_Surround_5.1
http://www.lirc.org/html/configure.html


This post is licensed under CC BY 4.0 by the author.

Comments powered by Disqus.