Showing posts with label sound. Show all posts
Showing posts with label sound. Show all posts

May 21, 2013

XBMC + Xubuntu 12.10 + VDPAU working flawlessly [Nvidia ION Media Center]



Xubuntu 12.10 is lightweight, stable, and fast. It's Ubuntu with a turbo slapped on. In this post, we'll go over setting up a XBMC media box with Dolby Digital/DTS out and Chrome with adobe flash over HDMI.

With the newest version of XBMC, the installation was smooth. I did not have to configure the sound output for DD over HDMI--the sound worked immediately after installing XBMC. In my previous blog posts, you'll notice the issues I ran into getting sound to work over HDMI. The only challenges I ran into this time around was getting overscan issues corrected and getting Google Chrome to work with Adobe flash hardware acceleration to which a solution was eventually found. Let's give this a go.

My set up:

Zotac Nvidia ION, Atom N330 Dual Core
2GB DDR RAM
Xubuntu 12.10 x386
XBMC Camelot Beta 1
Western Digital 150 GB Velociraptor

1. Download Xubuntu 12.10 x386 (I chose 32bit because Flash was more stable for me)
2. Either burn it to disk or create a startup USB: http://www.pendrivelinux.com/universal-usb-installer-easy-as-1-2-3/
3. Install Xubuntu and choose login automatically. Then reboot
4. On your HTPC, open up Firefox and go to this blog post
5. Install Nvidia drivers by opening up terminal and copy and paste line by line

Copied from mygeekopinions blog:
sudo add-apt-repository ppa:ubuntu-x-swat/x-updates
sudo apt-get update
sudo apt-get install nvidia-current

6. Reboot

7. If you have Overscan issues, open terminal and run (more info on nvidia-xconfig):
sudo nvidia-xconfig

This will set up a xorg.conf file located /etc/X11/xorg.conf

For my installation, I used this nvidia-settings to find the right resolution for my TV. You will need to modify this to best fit your TV. (from the pclinuxos forums):

nvidia-settings --assign 0/CurrentMetaMode="DFP-1: 1920x1080 { ViewPortOut=1820x1020+50+30, ViewPortIn=1920x1080 }"

Once you find the optimal settings, do the following to set it permanently:

cd /etc/X11/

sudo apt-get install gedit

sudo gedit xorg.conf

Paste the Option line, in the Section "Screen", between EndSubSection and EndSection

EndSubSection
Option "metamodes" "DFP-1: 1920x1080 { ViewPortOut=1820x1020+50+30, ViewPortIn=1920x1080 }"
EndSection

8. Save & restart

9. Enable VDPAU (from the linuxforums)

sudo apt-get install libvdpau1 vdpau-va-driver

10. Unmute HDMI/spdif

11. Open Firefox and install Flashaid
https://addons.mozilla.org/en-us/firefox/addon/flash-aid/

12. Restart firefox and open Flashaid and choose Adobe Stable 32 from the repo

Under tweaking options, place a checkmark next to Override GPU Validation and Enable Linux HWDecode

Follow the instructions, and once complete, restart Firefox

13. Install XBMC
http://www.noobslab.com/2012/11/install-xbmc-media-center-120-beta-1-in.html

sudo add-apt-repository ppa:team-xbmc/unstable
sudo apt-get update
sudo apt-get install xbmc

14. Install Amazon Prime Video addon via HowtoGeek

http://www.howtogeek.com/113491/how-to-get-hulu-and-amazon-video-on-xbmc/

15. Go to Xubuntu Settings Manager
Then Window Manager Tweaks
Go to the Compositor tab and uncheck Enable display compositing

16. Install Chrome
* Go to: http://about:plugins
* Click on the + Details to expand details
* Disable all versions of flash except for Version:11.2 r202
* Restart Chrome
* Confirm flash hardware acceleration is on by playing a video, right click, and Show Video Info
* Accelerated video rendering, accelerated video decoding should be displayed

Jun 19, 2012

XBMC & VDPAU Ubuntu 12.04 LTS 64bit w/HDMI Sound [HTPC]



XBMC Ubuntu 12.04 HTPC Tutorial

My Setup:
Zotac ION N330 w/integrated Nvidia ION Desktop GPU
Ubuntu 12.04 64-bit
Nvidia 295.49 Driver (302.17 removed overscan and broke sound)
HDMI Sound and Digital Passthrough for Dolby Digital and DTS
BIOS Southbridge - Internal Codec only
Nvidia HDMI to HDMI DD/DTC receiver - from HDMI DD/DTC receiver to HDMI TV (From the PC, a HDMI cable goes to HDMI receiver input | Another HDMI cable connects to the HDMI receiver output and goes to the HDMI input on the TV)

Instructions:

1. Install Ubuntu 12.04 LTS, during setup, choose autologin, and update software with an internet connection

2. Download System Software Updates once the system reboots

3. Get the latest Nvidia driver
4. Reboot

5. Upon Rebooting go into the BIOS.
In your BIOS, go to Southbridge configuration and change the video RAM from 256MB to 512MB (THIS IS OPTIONAL, MY SYSTEM PLAYS BACK BLURAY WITH 256MB SELECTED). Inside the Southbridge config, change Audio codec to Internal only--this will limit sound to HDMI only, so analog sound will no longer display in Ubuntu. Internal+External will enable both HDMI and analog.

6. Install XBMC--super easy tutorial thanks to Noobslab
Install XBMC on Ubuntu 12.04 Precise Pangolin

7. Unmute HDMI/spdif

First, check to see if sound is enabled and unmuted. SPDIF should be unmuted as well:


"Code:
alsasmixer
Press <F6> to select the correct soundcard.
Press <F3> to show playback levels. <F4> selects capture levels [or use <Tab>]
Use the left/right arrow keys to select and up/down arrow keys to change levels. <M> to mute/unmute.
Go to "System ->Preferences ->Sound" and make sure the correct soundcard is default and adjust your profile on the hardware tab. 
On the output tab choose the correct device."

8. Enabling HDMI sound in XBMC

Getting Sound over HDMI was a challenge for me. This was due to my own error in modifying the sound configuration files, which I did for my previous installations. Originally, I assumed I had to modify /etc/pulse/default.pa and .asound, in the home folder, but in the end, those steps broke sound over HDMI. I had to go back and delete all modifications to get DD/DTS sound over HDMI in XBMC.

With the newer Ubuntu 12.04, XBMC, Nvidia, and Ubuntu work well with one another. HDMI system sounds should work out of the box with some minor setting changes.
  • Select HDMI in Audio Output
  • Under Audio Output Device, select Defaults (ALSA)
  • For passthrough sound to your receiver, select Defaults (PulseAudio)

8.5 Change sound outputs in Ubuntu


9. Install Xubuntu and fix video tearing

10. Enable VDPAU accelerated HD flash for browsing Youtube/Vimeo with Flashaid

11. Install Google Chrome http://www.google.com/chrome

Recap, now you should have video and system sounds over HDMI, XBMC DD/DTS passthrough over HDMI, HD VDPAU accelerated Adobe flash playback with sound, 

12. Now get some popcorn going, sit back, and enjoy your HTPC!

Troubleshooting links:

http://http.download.nvidia.com/XFree86/gpu-hdmi-audio-document/gpu-hdmi-audio.html#_verify_your_eld_is_valid
http://ubuntuforums.org/showthread.php?t=1668737

Dec 5, 2011

XBMC & Nvidia VDPAU on Ubuntu 11.10 with working Sound over HDMI


I've successfully built another XBMC Ubuntu 11.10 machine with sound over HDMI thanks to various internet resources and some good ole troubleshooting. Sound is audible through the Internet Browser as well as through XBMC, so we have system sounds as well as movie sounds enabled. 

My system plays 1080p and 720p movies smoothly with almost no CPU utilization e.g. a 15 gigabyte 1080p Blu-ray rip runs perfectly smooth. Nvidia's VDPAU handles all of the HD processing, and the video is stunning. Also, XMBC's AEON skin is just as beautiful. Note: Adobe's Flash 11 has numerous bugs in its current state, so it does not work 100% with this build, and it seems slightly more stable in Firefox than in Chrome.

This tutorial should work for Nvidia hardware users as well as give some troubleshooting ideas for ATI users.

Tutorial

My Setup:
Acer Revo R1600 (stock and unmodded)
Nvidia ION LE
Ubuntu 11.10 64-bit
HDMI

Instructions:

1. Install Ubuntu 11.10

2. Get the Nvidia driver
How To Install Nvidia 275.09.07 Driver in Ubuntu 11.10 Oneiric Ocelot?

3. Install XBMC
Install XBMC on Ubuntu 11.10 Oneiric Ocelot/Linux

4. Getting Sound to play over HDMI may take several steps:

First, check to see if sound is enabled and unmuted. SPDIF should be unmuted as well:


"Code:
alsasmixer
Press <F6> to select the correct soundcard.
Press <F3> to show playback levels. <F4> selects capture levels [or use <Tab>]
Use the left/right arrow keys to select and up/down arrow keys to change levels. <M> to mute/unmute.
Go to "System ->Preferences ->Sound" and make sure the correct soundcard is default and adjust your profile on the hardware tab. 
On the output tab choose the correct device."
Then we'll check to see where our sound device is located by:
Code:
aplay -l
(Mine was 0,3)

Next, we'll load a module to finally get system sounds working:

From Ubuntuforums user efflandt on http://ubuntuforums.org/showpost.php?p=10367062&postcount=5 (I've modified the hardware location to match my hardware 0,3) :

"
Code:
aplay -D plughw:0,3 /usr/share/sounds/alsa/Front_Center.wav
Mine is 0,3 so I added a line to /etc/pulse/default.pa after alsa-sink line:

Code:
#load-module module-alsa-sink
load-module module-alsa-sink device=hw:0,3
Reboot. The only odd thing it that in the Output tab of Sound Preferences you will need to select the HDA NVidia device that does NOT say HDMI to get HDMI sound. The speaker test in Sound Preferences will not work, but if you play Rythmbox, etc. you should be able to switch sound output on the fly."

Lastly, we're going to enable HDMI sound in XBMC

Select HDMI in Audio Output
Under Audio Output Device, select Defaults
For passthrough sound to your receiver, choose the setting your setup requires.

Now get some popcorn going, sit back, and enjoy your HTPC!

Troubleshooting & Tips

Fix Video Tearing:

Overscan compensation:

Enable HD flash
http://ubuntuforums.org/showthread.php?t=1685845

Change icon size
http://www.upubuntu.com/2011/10/how-to-resize-gnome-shell-icons-in.html

Change font sizes (just change the DPI for bigger fonts)
http://ubuntuforums.org/showthread.php?p=11484414

Autologin
http://www.groupofnowhere.com/2011/10/19/xubuntu-11-10-oneiric-ocelot/