Gå til hovedinnhold

ASRock ION 3D 152B/152D with Ubuntu Linux and XBMC. Remote control / HDMI audio

ASrock ION 3D 152B

I landed on this little computer as my mediacenter for my living room. It's small, looks nice and has all the features you would like to run a mediacenter. I wanted to write about my experience with setting it up with Ubuntu Linux and XBMC. I don't want to describe every detail of it because most of it works quite nicely. So I will focus on the harder parts, which is basically making the remote control work with the XBMC interface and getting the audio through the HDMI cable.

I also would like to add that I switched the default harddrive which is a normal HDD 5400 rpm and works quite slow.

-I installed the latest version of Ubuntu Desktop and made sure that the audio and video drivers works as they should, which they do. I then removed software afterwards which I don't need. You can also do this the other way round by installing a minimal installation like LXDE.

-I then installed XBMC by following these steps. Which is simply adding the repository and installing from the terminal window.

-I then created an user in ubuntu called 'xbmc' and selected this to log on automatically. In the log on screen for Ubuntu you can select which environment the selected user should log in to. After you have installed XBMC standalone you can opt to log into XBMC. The next time you boot it will automatically log in as user 'xbmc' and into XBMC standalone.

Then, over to the harder parts


The remote control


The CIR device is based on MCE and the hardware in the ASRock HTPCs are called Nuvoton.
I have tried a lot, but what you should NOT do is to install the LIRC Nuvoton drivers from ASRock. They do not work. They only collide with everything else.

I've found 2 ways to make this work, one with Lirc and one with Ir-keytable. I recommend the Ir-keytable since it seems far more responsive and stable than I ever experienced with Lirc.

1. with Ir-keytable:

This thread from XBMC forum says it all things work without LIRC.
Just follow this right through and you should be there!

I only want to add a little bit of information, this is where you find default files of those you are about to edit or create if you go for this solution:
Default rc6_mce: /lib/udev/rc_keymaps/
default keyboard.xml : /usr/share/xbmc/system/keymaps


2. with Lirc:
I found this great guide for the ASRock 330 HT, and it works perfectly for ION 3D as well.

It also seems you have to add a custom Lircmap.xml to make things work in Ubuntu 11.10:

<lircmap>
<remote device="mceusb">
<PLAY>KEY_PLAY</PLAY>
<PAUSE>KEY_PAUSE</PAUSE>
<STOP>KEY_STOP</STOP>
<FORWARD>KEY_FORWARD</FORWARD>
<REVERSE>KEY_REWIND</REVERSE>
<LEFT>KEY_LEFT</LEFT>
<RIGHT>KEY_RIGHT</RIGHT>
<UP>KEY_UP</UP>
<DOWN>KEY_DOWN</DOWN>
<SELECT>KEY_OK</SELECT>
<PAGEPLUS>KEY_CHANNELUP</PAGEPLUS>
<PAGEMINUS>KEY_CHANNELDOWN</PAGEMINUS>
<BACK>KEY_BACK</BACK>
<MENU>KEY_PREVIOUSMENU</MENU>
<TITLE>KEY_RECORD</TITLE>
<INFO>More</INFO>
<SKIPPLUS>KEY_SKIP</SKIPPLUS>
<SKIPMINUS>KEY_REPLAY</SKIPMINUS>
<DISPLAY>Teletext</DISPLAY>
<START>KEY_HOME</START>
<RECORD>Guide</RECORD>
<VOLUMEPLUS>KEY_VOLUP</VOLUMEPLUS>
<VOLUMEMINUS>KEY_VOLDOWN</VOLUMEMINUS>
<MUTE>KEY_MUTE</MUTE>
<POWER>KEY_POWER</POWER>
<MYVIDEO>KEY_VIDEOS</MYVIDEO>
<MYMUSIC>KEY_MUSIC</MYMUSIC>
<MYPICTURES>KEY_PICTURES</MYPICTURES>
<MYTV>KEY_TV</MYTV>
<ONE>KEY_1</ONE>
<TWO>KEY_2</TWO>
<THREE>KEY_3</THREE>
<FOUR>KEY_4</FOUR>
<FIVE>KEY_5</FIVE>
<SIX>KEY_6</SIX>
<SEVEN>KEY_7</SEVEN>
<EIGHT>KEY_8</EIGHT>
<NINE>KEY_9</NINE>
<ZERO>KEY_0</ZERO>
<STAR>Star</STAR>
<HASH>Hash</HASH>
<CLEAR>KEY_CLEAR</CLEAR>
<ENTER>KEY_ENTER</ENTER>
<RED>KEY_RED</RED>
<GREEN>KEY_GREEN</GREEN>
<YELLOW>KEY_YELLOW</YELLOW>
<BLUE>KEY_BLUE</BLUE>
</remote>
</lircmap>


Audio through HDMI

Assuming you are using ALSA, if not you can install this and remove whatever sound system you are using now.

I'll get right to the point, open terminal and go sudo su.
Type this command : aplay -l

For my ASRock Ion 3D it gives me this list:
**** List of PLAYBACK Hardware Devices ****
card 0: Intel [HDA Intel], device 0: ALC892 Analog [ALC892 Analog]
  Subdevices: 0/1
  Subdevice #0: subdevice #0
card 0: Intel [HDA Intel], device 1: ALC892 Digital [ALC892 Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 7: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 8: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 9: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

Now notice the ones that says NVidia and HDMI. Then notice the card number and the device number for these. You could try more of them.

So now start XBMC and go to Settings-System-Audio output.
Of course you have selected HDMI in the top?

Under sound device you select custom, a textbox opens up.
Type "plughw:1,7" here 
Under passthrough device you select ALSA (iec958).

That should be it!
NB! 1,7 means card 1, device 7. You can also try device 3,8 or 9 on card 1. They represent different set ups, like 5 speakers, 7 speakers, stereo...

My config-file guisettings.xml looks like this under the audiooutput section:
<audiooutput>
   <ac3passthrough>false</ac3passthrough>
   <audiodevice>custom</audiodevice>
   <channellayout>0</channellayout>
   <customdevice>plughw:1,7</customdevice>
   <custompassthrough></custompassthrough>
   <dontnormalizelevels>false</dontnormalizelevels>
   <dtspassthrough>false</dtspassthrough>
   <mode>2</mode>
   <passthroughaac>false</passthroughaac>
   <passthroughdevice>alsa:iec958</passthroughdevice>
   <passthroughmp1>false</passthroughmp1>
   <passthroughmp2>false</passthroughmp2>
   <passthroughmp3>false</passthroughmp3>
</audiooutput>


And finally a screenshot, I use only a stereo speaker system at the moment.


Hope that'll help ya out!
Atle

Kommentarer

  1. Hi,

    The only issue you've got is the remote which does not function after installation of Ubuntu/XBMC? What about other drivers like network, graphics etc?

    Did you install Ubuntu and added the XBMC repositories to Ubuntu? Why not using the XBMCbuntu version?

    I'm looking around for a device to install XBMC and this ASrock looks great.

    SvarSlett
    Svar
    1. Hi

      Basically the remote is my only issue when I have a fresh install of Ubuntu and XBMC. It kind of works but it's not precice and a lot of buttons simply doesn't work and you don't know where you configure it. That's why I first used LIRC but then went over to ir-keytable which I find more stable and precice.

      networks, graphics and sound drivers are all good. Ubuntu works great when it comes to this.

      I did however some research before I could configure XBMC to provide the sound through the HDMI-cable. This is a configuration-thing and I just make sure I backup the config-files for XBMC so I won't have to figure it out again.
      I can post this configuration of you like

      Yes I installed first Ubuntu and then added the XBMC repositories and configured the xbmc-user and autologon into XBMC. I've never tried to install XBMCubuntu, but my guess would be it gives the same result, just faster. There's really no good reason why I haven't tried it :-]

      The ASrock is great. The only backdraw is the slow harddrive, so I've replaced it with SSD and it boots in about 15 seconds

      Slett
  2. Can Someone on here who as XBMC audio through hdmi please post what is in configuration files or a link to help with this. I have been looking for awhile now and have had not much luck. Video is working great through HDMI as well as remote.

    SvarSlett
    Svar
    1. I'd love to give you the answer on that one, I can't find the forum post where I learned this so I have to explain everything myself.

      Assuming you are using ALSA, if not you can install this and remove whatever sound system you are using now.

      I'll get right to the point, open terminal and go sudo su.
      Type this command : aplay -l

      For my ASRock Ion 3D it gives me this list:
      **** List of PLAYBACK Hardware Devices ****
      card 0: Intel [HDA Intel], device 0: ALC892 Analog [ALC892 Analog]
      Subdevices: 0/1
      Subdevice #0: subdevice #0
      card 0: Intel [HDA Intel], device 1: ALC892 Digital [ALC892 Digital]
      Subdevices: 1/1
      Subdevice #0: subdevice #0
      card 1: NVidia [HDA NVidia], device 3: HDMI 0 [HDMI 0]
      Subdevices: 1/1
      Subdevice #0: subdevice #0
      card 1: NVidia [HDA NVidia], device 7: HDMI 0 [HDMI 0]
      Subdevices: 1/1
      Subdevice #0: subdevice #0
      card 1: NVidia [HDA NVidia], device 8: HDMI 0 [HDMI 0]
      Subdevices: 1/1
      Subdevice #0: subdevice #0
      card 1: NVidia [HDA NVidia], device 9: HDMI 0 [HDMI 0]
      Subdevices: 1/1
      Subdevice #0: subdevice #0

      Now notice the ones that says NVidia and HDMI. Then notice the card number and the device number for these. You could try more of them.

      So now start XBMC and go to Settings-System-Audio output.
      Of course you have selected HDMI in the top?

      Under sound device you select custom, a textbox opens up.
      Type "plughw:1,7" here
      Under passthrough device you select ALSA (iec958).

      Have a look at the blog again, where I have put the config-file audio section from guisettings.xml

      Hope that'll help ya out!
      Atle

      Slett
  3. I also updated the blog post, the part of the HDMI sound has been missing out.

    SvarSlett
  4. Thank You For updating this information I am new to XBMC and Ubuntu issues. I will give it a try soon and post back if I have anymore questions.

    SvarSlett
  5. So I must have configured something wrong I believe that I must have went wrong with using ALSA. I am only able to get certain audio through the cable but it seems that 5.1 audio from a DVD wont work.. I assume that I have set something up wrong for this to not work.

    SvarSlett
  6. I'm sorry but I'm not sure if I can help out here since I configured my system towards a stereo only sound system.

    Regarding ALSA I only make sure none of the lines out are muted. You can check this by enter the command alsamixer

    Maybe you should try with plughw:1,3 or 1,8 or 1,9?

    I can test with a DVD that contains 5.1 and come back to you.

    SvarSlett
  7. I reinstalled and finally have the audio working this blog has been super helpful now all that's left is to add in the remote settings

    SvarSlett
  8. Hello I was wondering if you could help me I have bought this system and downloaded the xbmcbuntu cd installed it and updated on install . On the first boot everything was perfect the remote audio video through hdmi no problems but after rebooting it no longer will play audio video or anything.... I don't understand why do you think you could help me with this?

    SvarSlett
    Svar
    1. Hello there,

      Quite difficult to say but I would start by looking at the log-file in the home-folder under .xbmc/temp/xbmc.log and look at the error messages there. Do you get any errormessages in the XBMC gui?

      Slett
  9. I NEED TO BUY REMOT CONTTROLER

    SvarSlett

Legg inn en kommentar

Populære innlegg fra denne bloggen

Galaxy Tab 7 GT-P1000 - install Gingerbread

1st here's a good full guide with descriptions that I've read through here . 2nd there another good guide here . Download Samsung Kies here . Download Odin 1.7 from XDA-developers  here . Download Firmware of chosen version here  (tsar3000) or here  (thegalaxytabforum). Now this is how you do it step by step: 1. Install Samsung Kies and connect your Tab If you haven't already installed Kies and tested that your tab can connect to your computer, you should do it now. This is mainly because Kies will take care of the needed drivers to connect to the computer. So go ahead and check if there's connection. 2. Put your tab into download mode Turn it off - then turn it on by holding power button and volume down button. You need this to work before you can go on. Should look like this: 3. Start Odin and connect the Galaxy Tab Just start Odin and connect the tab with USB. If it connects the ID:COM field will look something like this:  with the te...

XBMC library - sharing and securely saving library in a database / mysql

So first of all you should look at XBMC's official explanation as it's probably more presice than mine now: http://wiki.xbmc.org/index.php?title=HOW-TO:Sync_multiple_libraries I will short it down to the basics: When you add a source in XBMC the library automatically stores itself on a local database called Sqlite on your local filesystem somewhere. Most people don't know about this and it will easily be lost when reinstalling. To not lose your library information that has been recorded over a long time you really should use a database like MySQL to store it. More databases is probably supported and equally set up. Library information is stuff like which episodes and movies have you seen, have you seen only half the movie etc. It also contains filepaths for each and every file. So all you need to watch your videos and listen to your music is stored here. It will also suit for sharing the information if you have several xbmc installations (I will refer to them as cl...

Galaxy Tab GT-P1000 - fix partitions

This little guide is written down after I managed to screw up my partitions on my Galaxy Tab while rooting it. Luckily I still had some space that allowed me to reinstall stock firmware through Odin. I wrote a blog post on how to do this here . Then I had to get a recovery bootloader that gave me root access in recovery mode and the parted tool. So if you have a booting Android but with fucked up partitions, try this. PS! Android will probably not boot after this. So know you will have to reinstall. And if you have something on your SDcard you should back it up, you probably need to remove all partitions if you have a real screw up. You can resize if you want to get advanced though. The guide is written for windows command line . 1. You device must be booted into Android at first. Install Samsung Kies and make sure it can connect to your PC, you need the drivers that comes with it. 2. Install ADB, it comes with Android SDK . When you have ADB you should test it. First set your...