Nov 30, 2009

Tutorial: Nvidia ION N330 + XBMC + VDPAU + 1080P w/sound over HDMI


Alright guys and gals, I got around to updating my HTPC box over Thanksgiving weekend, and I can now say that the beta XBMC build looks mighty sexy when displayed in 1080P resolution. Also, DD, DTS passthrough, and Nav sounds are working 100% as well, including system sounds and Youtube in Firefox.

From reading the comments, in my previous post, it looks like the boxee instructions may not have worked 100% for some of you, my apologies, so I went ahead and did a fresh install to create new XBMC specific instructions for the following system:

Zotac Nvidia ION, Atom N330 Dual Core
2GB DDR RAM
Western Digital 150 GB Velociraptor

This will get you the 185 NVIDIA graphics drivers:
From what I read online, it looks like the newer 190 drivers may break HDMI sound? I'm using 185, and sound/graphics work beautifully.

Update Dec. 2nd, 2009: I'm now using 190.42 drivers without problems. Tested sound and video. Haven't tested passthrough on the 190.42 yet.

Update Dec. 3rd, 2009: Passthrough is working great. Suspend problems though with the 190.42 drivers. Ubuntu goes into suspend okay but no graphics or response upon resume.

Add these repositories to your sources:

deb http://ppa.launchpad.net/nvidia-vdpau/ppa/ubuntu karmic main
deb-src http://ppa.launchpad.net/nvidia-vdpau/ppa/ubuntu karmic main

Open up a terminal:

sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 71609D4D2F1518FA9C5DC0FB1DABDBB4CEC06767
sudo apt-get update
sudo apt-get install linux-headers-generic nvidia-glx-185
sudo reboot

Upon Rebooting go into the BIOS.
(the following instruction is from my memory, so if you dont' find it there, it's somewhere in your BIOS) In your BIOS, go to Southbridge configuration and change the video RAM from 256MB to 512MB. Inside the Southbridge config, change Audio codec to Internal only.

This will get you sound/passthrough over HDMI:
(haven't tested coax or optical)

Boot into Ubuntu, and open up a terminal and type:
sudo gedit /etc/asoundrc.conf
Paste the following into that file:
pcm.dmixer {
type dmix
ipc_key 1024
ipc_key_add_uid false
ipc_perm 0660
slave {
pcm "hw:0,3"
rate 48000
channels 2
period_time 0
period_size 1024
buffer_time 0
buffer_size 4096
}
}
pcm.!default {
type plug
slave.pcm "dmixer"
}

Open up another terminal (this will enable Youtube, and XBMC system sounds):
Type in: alsamixer
Make sure that IEC958 is unmuted by pressing the letter "m" without quotes.
If it it muted, then it will look like this - Item: IEC958 [off]
Once you unmute it, then it will look like this - Item: IEC958

Thanks to Greenhughes.com for the alsamixer tip.

Save. Close it. Reboot.


Inside XBMC:
Go to Settings, Audio and change the following:

Instead of:
sound: Internal Codec HDMI
passthrough: ie958

Change to custom (type hdmi):
sound: hdmi
passthrough: hdmi

Now you will have HD video and sound in Ubuntu and XBMC from your HD videos all the way to SD youtube, hulu, or whatever you want to play. Now go have fun!

14 comments:

  1. Nice!

    shouldn't it be

    'gedit ~/.asoundrc'

    though?

    ReplyDelete
  2. Hi, thanks! I believe ~/.asoundrc is for Boxee, and /etc/asoundrc is for XBMC. The /etc/asoundrc will be a system wide setting. ~/.asoundrc will be stored in the home folder for boxee to access--in case anyone was wondering.

    My post had an error with ~/asoundrc when it should be /etc/asoundrc, and I've updated it. Cheers!

    ReplyDelete
    Replies
    1. Perfect instructions. Thanks.

      I have a Zotac IONITX F-E (Dual-core Atom 330 with NVIDIA ION GPU generation 1) and this procedure worked immediately with excellent sound quality!

      Running Xubuntu 11.10, XBMC Eden, Sickbeard, and Sabnzbdplus. Using the XBMC Android "Official" client for remote control on every phone in my bloody house (get ambushed by kids and better half, now).

      Delete
  3. Hi thanks for the guide. However I'm unable to to get digital sound to work. Says device could not be initialized. If I change it back to analog everything is fine. But that sort of defeats the purpose of DTS or 5.1 MKV files. :(

    Any help appreciated

    ReplyDelete
  4. Hi, what hardware are you running on? It could be several things such as, is your alsamixer unmuted, or have you tried going into the BIOS and under Southbridge config, change Audio codec to Internal only? Also, the guide will only work with HDMI. Let me know how it goes, cheers.

    ReplyDelete
  5. I have everything exactly as you have it. NVIDIO ION 330 http://www.zotacusa.com/zotac-ionitx-a-u-atom-n330-1-6ghz-dual-core-mini-itx-intel-motherboard.html

    I have internal only in the BIOS. hdmi typed as custom in both fields. DTS and AC3 and digital turned on. My aslamixer is unmuted. As I said if I play an analog .. no problems when I try to play an mkv with DTS or AC3 no sound and yes this is all through HDMI no other audio/video cables are hooked up.

    ReplyDelete
  6. Also... did you install any additional driver for your audio? If I play an mkv file in the systems built-in media player and then change the audio from Stereo to 5.1 or AC3 my receiver still continues to say Direct. Normally when I do this in Windows or XBMC for Windows the receiver will change from direct to digital. It leads me to think I'm missing a required driver in Ubuntu 9.10 to use digital audio over HDMI (only analog audio seems to be working).

    Thanks again for any help

    ReplyDelete
  7. Hi, I did not have to install additional drivers. Try "sudo gedit /etc/asoundrc.conf" without the quotes and paste the above code (in the post) into it. I believe my original post may have had an error in it. Also, analog should no longer work once you select "Internal" only in the BIOS. Cheers

    ReplyDelete
  8. Hey there, just wanted to say thank you!

    I'm using the Confluence skin and the settings read a bit different. Here's the settings that worked for me:

    Audio output: Analog
    Audio output device: Internal Audio Digital Stereo (HDMI)

    Thanks for the post.

    ReplyDelete
  9. thank you . I searched for ages for this sound over HDMI. It finally works. Thank you so much. I do have to mention that normally you do not have "gedit" in the xbmc live version. So what i did was :
    nano /etc/asoundrc.conf

    thank you again.

    ReplyDelete
  10. I made tha audio work through HDMI by unmuting the HDMI in alsamixer, nothing else needed to be done.

    Terminal -> type alsamixer
    use arrows to get to HDMI (name is probably something else e.g. IC956)
    press m to unmute

    ReplyDelete
  11. Hi,
    this setup will definitely not give you surround sound over HDMI, as you can read from this post : http://forum.xbmc.org/showthread.php?t=59877
    To quote the relevant part :
    You need the Nvidia drivers 185 series. IMPORTANT: the 190 series driver breaks lpcm hdmi output totally or partially
    And I can tell you that 195.x drivers, this is not fixed yet;

    ReplyDelete
  12. WOW!
    Thanks a lot! Finally managed to get sound over HDMI on my ASUS ION AT3N7A-I!

    ReplyDelete
  13. Worked first time for me on ZOTAC ION A-U - Southbridge BIOS config was wrong. Thanks

    ReplyDelete