RuneAudio Creative XFi 5.1 USB

After installing RuneAudio, it should already be possible to output audio throught the XFi. If not, browse to your RuneAudio page, and under settings>MPD, change the default audio device.

At this point, you will notice that the using the remote or the volume knob on the device don't do anything. The volume knob is internally 'wired' to the infrared receiver functions, so we will need to install the LIRC deamon to get it working.
Open a console (SSH for example) and update the ArchLinux package list with:

pacman -Sy
pacman -S lirc

Now we create a configuration file for the remote, in the LIRC config folder:

nano /etc/lirc/lircd.conf.d/creative_xfi_rm800.lirc.conf

Fill this file with the following config:


begin remote

        name    X-F.Surround-5.1.Remote.Control
        bits    8
        gap 300000

        begin codes
                knob-mute       0x0d
                knob-vol-       0x0f
                knob-vol+       0x10
                power           0x29
                mute            0x2a
                vol+            0x2b
                vol-            0x2c
                menu-back       0x2d
                display         0x2e
                play-pause      0x2f
                ok              0x30
                up              0x31
                down            0x32
                prev            0x33
                next            0x34
                cmss3d-on       0x37
                cmss3d-off      0x38
                cryst-on        0x39
                cryst-off       0x3a
                shuffle         0x3b
                repeat          0x3c
        end codes

end remote


Let's test this config.
Run the lircd daemon with
lircd -n --device=hw:S51 --driver=alsa_usb

It will keep running in the foreground
Open another console to start a lirc client that will show the remote conrol signals:

irw

Press some buttons on the remote or play with the volume knob. You should see the output on the console.


0000000000000010 07 knob-vol+ X-F.Surround-5.1.Remote.Control
0000000000000010 08 knob-vol+ X-F.Surround-5.1.Remote.Control
0000000000000010 09 knob-vol+ X-F.Surround-5.1.Remote.Control
000000000000000d 00 knob-mute X-F.Surround-5.1.Remote.Control
000000000000000d 01 knob-mute X-F.Surround-5.1.Remote.Control
000000000000000d 02 knob-mute X-F.Surround-5.1.Remote.Control
000000000000000f 00 knob-vol- X-F.Surround-5.1.Remote.Control
000000000000000f 01 knob-vol- X-F.Surround-5.1.Remote.Control
000000000000000f 02 knob-vol- X-F.Surround-5.1.Remote.Control
000000000000000f 03 knob-vol- X-F.Surround-5.1.Remote.Control
000000000000000f 04 knob-vol- X-F.Surround-5.1.Remote.Control

Now we will configure the lircd startup options so that it uses the alsa_usb device. Open the config file /etc/lirc/lirc_options.conf
Change it to have the following values:

[lircd]
nodaemon        = False
driver          = alsa_usb
device          = hw:S51

Enable the lircd daemon at startup with:

systemctl enable lircd.service
systemctl start lircd.service

Now we can connect the lirc output to a volume action:




http://alsa.opensrc.org/Usb-audio#Creative_USB_X-Fi_Surround_5.1
http://www.instructables.com/id/Make-the-Volume-Knob-of-Sound-Blaster-X-Fi-Surroun/?ALLSTEPS

Comments