[HowTo] HTPC with XBMC on OpenSUSE
#1
This is my HTPC (version 0.1):
  • A general purpose PC
  • Creative Technology, Ltd SoundBlaster Live! 24-bit External (I'm using analog5.1 output)
  • XBMC SVN rev17445
  • OpenSUSE 11.0 (I'm quite sure 11.1 will work too)

Please note this is not an "type this, type that" howto. You have to think yourself somtimes. (Sorry Linux Newbies!)

First of all install OpenSUSE, create the user "xbmc" with autologin and IceWM as desktop. Gnome or KDE are not needed.

The SoundBlaster Live External has a very nice remote. We will use it to control XBMC via lirc.
Image

Installing lirc:
Code:
zypper in lirc
Configuration:
Open /etc/sysconfig/lirc and set LIRCD_DRIVER to [alsa_usb/B] and
[b]LIRCD_DEVICE
to hw:External

/etc/lircd.conf:
Code:
begin remote

  name  rm1500.lirc
  bits            8
  eps            30
  aeps          100

  one             0     0
  zero            0     0
  gap          315991
  toggle_bit_mask 0x0

      begin codes
          power                    0x9E
          1                        0x74
          2                        0x70
          3                        0x6F
          4                        0x75
          5                        0x7B
          6                        0x87
          7                        0x76
          8                        0x7C
          9                        0x88
          0                        0x7F
          cmss                     0x8E
          eax                      0x73
          mute                     0x91
          vol-                     0x9C
          vol+                     0x9D
          left                     0x78
          right                    0x8A
          up                       0x84
          down                     0x72
          ok                       0x7E
          return                   0x71
          start                    0x77
          cancel                   0x83
          rec                      0x8C
          options                  0x7D
          display                  0x89
          prev                     0x80
          play_pause               0x86
          next                     0x85
          slow                     0x82
          stop                     0x7A
          step                     0x81
      end codes

end remote

/home/xbmc/.lircrc:
Code:
#power button sends "S" (shutdown menu)
begin
        prog = irxevent
        button = power
        config = Key KeyCode:39 CurrentWindow
end

#minus
begin
        prog = irxevent
        button = vol-
        config = Key KeyCode:61 CurrentWindow
end

#plus
begin
        prog = irxevent
        button = vol+
        config = Key KeyCode:35 CurrentWindow
end

#arrow left
begin
        prog = irxevent
        button = left
        config = Key KeyCode:100 CurrentWindow
end

#arrow right
begin
        prog = irxevent
        button = right
        config = Key KeyCode:102 CurrentWindow
end

#arrow up
begin
        prog = irxevent
        button = up
        config = Key KeyCode:98 CurrentWindow
end

#arrow down
begin
        prog = irxevent
        button = down
        config = Key KeyCode:104 CurrentWindow
end

#return
begin
        prog = irxevent
        button = ok
        config = Key KeyCode:36 CurrentWindow
end

#backspace
begin
        prog = irxevent
        button = return
        config = Key KeyCode:22 CurrentWindow
end

begin
        prog = irxevent
        button = start
        config = Key KeyCode:117 CurrentWindow
end

#esc
begin
        prog = irxevent
        button = cancel
        config = Key KeyCode:9 CurrentWindow
end

#menu
begin
        prog = irxevent
        button = options
        config = Key KeyCode:117 CurrentWindow
end

begin
        prog = irxevent
        button = prev
        config = Key KeyCode:59 CurrentWindow
end


begin
        prog = irxevent
        button = next
        config = Key KeyCode:60 CurrentWindow
end

#tab
begin
        prog = irxevent
        button = display
        config = Key KeyCode:23 CurrentWindow
end

begin
        prog = irxevent
        button = play_pause
        config = Key KeyCode:33 CurrentWindow
end

begin
        prog = irxevent
        button = stop
        config = Key KeyCode:53 CurrentWindow
end

start lirc and make it start on boot:
Code:
rclirc start
insserv -d lirc

Now it's time to install XBMC.
You can install XBMC-stable from PackMan:
http://packman.links2linux.de/package/XBMC
I built it from SVN because alsa support is less crappy.

Audio setup:
/etc/asound.conf:
Code:
defaults.ctl.card 2
defaults.pcm.card 2

pcm.20to51 {
     type route
     slave.pcm "surround51"
     slave.channels 6
     ttable.0.0 1
     ttable.1.1 1
     ttable.0.2 1
     ttable.1.3 1
     ttable.0.4 0.5
     ttable.1.4 0.5
     ttable.0.5 0.5
     ttable.1.5 0.5
}

pcm.!default {
    type plug
    slave.pcm       "20to51"
}

This configuration makes my External Soundblaster (id 2) to the default device. (You can get the id by doing "cat /proc/asound/cards".)
The rest performs channel upmixing to 5.1. When playing stereo movies all speakers have to run. Smile

/home/xbmc/.xbmc/userdata/advancedsettings.xml:
Code:
<advancedsettings>
    <audio>
        <analogmultichannel>true</analogmultichannel>
    </audio>
</advancedsettings>

Now we've have to write a litte script which starts xbmc an some helper programms.
Create /home/xbmc/.icewm/startup:
Code:
#!/bin/sh
#xbmc has to use alsa
export SDL_AUDIODRIVER=alsa

#set the best resolution for the beamer
/usr/bin/xrandr -s 1024x768
#unmute the soundblaster (card id 2!)
/usr/bin/amixer -c 2 set PCM unmute

#start the lirc helper programms
/usr/bin/irxevent -d
/usr/bin/irexec -d

#and finally xbmc
#i installed xbmc into /opt/xbmc
/opt/xbmc/bin/xbmc --standalone -fs

That's it!
Reboot and have a lot of fun!
//richard
Reply

Logout Mark Read Team Forum Stats Members Help
[HowTo] HTPC with XBMC on OpenSUSE0