[LINUX] HOW-TO get multi-channel HD sound output working over NVIDIA HDMI

  Thread Rating:
  • 8 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
Flomaster Offline
Posting Freak
Posts: 1,287
Joined: Jun 2010
Reputation: 6
Location: East Texas
Post: #421
delete
(This post was last modified: 2010-08-19 16:26 by Flomaster.)
find quote
DejaVu Offline
Posting Freak
Posts: 1,159
Joined: May 2010
Reputation: 3
Location: United Kingdom
Post: #422
Sound on the Revo with XBMC Ubuntu is.... borked!!!

I had enough. Windows awaits!
find quote
Vetal Offline
Junior Member
Posts: 22
Joined: Sep 2010
Reputation: 0
Post: #423
Hello,

All I can get from my HDMI output, MSI GT210 card is stereo. Is it my config problem or it is hardware limitation?

Shall I dig further to make DTS/DD surround to work?

I have a receiver that plays HDMI audio, but it is limited to DD/DTS/2 ch PCM

I posted related topic here:

http://forum.xbmc.org/showthread.php?tid=81100

_____

Added on Sep 20.

Considering, I set up with ALSA 1.00.23, I just did a partial set-up. I missed part with 6 channel mapping with my pulse-audio.

Multi-channel working now fine.


Just wonder, where in the script it specifying HDMI device? my speaker test works with -Dhw0,N but not with -DHDMI
(This post was last modified: 2010-09-20 17:23 by Vetal.)
find quote
peter10000 Offline
Junior Member
Posts: 8
Joined: Feb 2007
Reputation: 0
Post: #424
The sound problem can be solved very easy.
I have tried many nights and after some testinstallations with XBMC-Live and full ubuntu I found a workaround for the pulseaudio problem.

The basic problems is a conflict between the pulseaudio settings from the ubuntu desktop and the management from XBMC. That makes it impossible to use HDMI output in ubuntu and parallel HDMI output for audio and video in XBMC.
The solution is to disable pulseaudio while XBMC is running - so it works then in the same operation mode as a XBMC-Live system.

1. Install and configure Ubuntu 10.04
2. Install XBMC
3. Configure Sound in Ubuntu => Hardware is "Digital Stereo (HDMI)..."
4. Create a file /home/.pulse/client.conf with the content "autospawn = no"
5. Reboot
6. Create a script for launching XBMC like "start.sh" and set the executable flag. Content of the file is:
pulseaudio -k
xbmc
pulseaudio --start


7. Use that script for launching XBMC. Pulseaudio is deactivated before starting XBMC and activated after finishing XBMC.
8. Configure audio outputs in XBMC to HDMI in all sections.
(This post was last modified: 2010-10-24 23:21 by peter10000.)
find quote
BoxFreak Offline
Senior Member
Posts: 198
Joined: Jan 2008
Reputation: 0
Location: Finland
Post: #425
peter10000 Wrote:The sound problem can be solved very easy.
I have tried many nights and after some testinstallations with XBMC-Live and full ubuntu I found a workaround for the pulseaudio problem.

The basic problems is a conflict between the pulseaudio settings from the ubuntu desktop and the management from XBMC. That makes it impossible to use HDMI output in ubuntu and parallel HDMI output for audio and video in XBMC.
The solution is to disable pulseaudio while XBMC is running - so it works then in the same operation mode as a XBMC-Live system.

1. Install and configure Ubuntu 10.04
2. Install XBMC
3. Configure Sound in Ubuntu => Hardware is "Digital Stereo (HDMI)..."
4. Create a file /home/.pulse/client.conf with the content "autospawn = no"
5. Reboot
6. Create a script for launching XBMC like "start.sh" and set the executable flag. Content of the file is:
pulseaudio --start
xbmc
pulseaudio --start


7. Use that script for launching XBMC. Pulseaudio is deactivated before starting XBMC and activated after finishing XBMC.
8. Configure audio outputs in XBMC to HDMI in all sections.

Does this work in live, and is there something that should be done differently then?
find quote
Flomaster Offline
Posting Freak
Posts: 1,287
Joined: Jun 2010
Reputation: 6
Location: East Texas
Post: #426
BoxFreak Wrote:Does this work in live, and is there something that should be done differently then?

do you not get hdmi audio in live?

type in
alsamixer

make sure your hdmi spdif are not muted on the far right.

http://forum.xbmc.org/showpost.php?p=587...tcount=290
then copy and paste these lines of code

Code:
[LIST]
[*]sudo rm /etc/asound.conf

[*]sudo rm /usr/share/alsa/cards/HDA-Intel.conf

[*]sudo wget http://pastebin.com/download.php?i=f5f9654bb -O /etc/asound.conf

[*]sudo wget http://pastebin.com/download.php?i=f2e38265 -O /usr/share/alsa/cards/HDA-Intel.conf

[*]sudo reboot
[/LIST]

also if you have a Ion 330 with Nvidia GPU you can use this
.asoundrc

file it works perfectly for me

Code:
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"
}

pcm.!hdmi-remap {
type asym
playback.pcm {
type plug
slave.pcm "remap-surround71"
}
}

pcm.!remap-surround71 {
  type route
  slave.pcm "hw:0,3"
  ttable {
    0.0= 1
    1.1= 1
    2.4= 1
    3.5= 1
    4.2= 1
    5.3= 1
    6.6= 1
    7.7= 1
  }
}

use these settings in xbmc
the perfect asound.conf http://flomaster.pastebin.com/HQtibwZ4
Audio Output: HDMI
Audio Output Device:HDMI
Passthrough: plughw:0,3
and if I want to get stereo sound to my zone two for backyard music I change to
Audio Output: plughw:0,0 and I get analog audio out of my green headphone jack.

my AAC tracks play on the correct channels.
mp3 audio is correct
DTS and Dolby Digital play as should.
all emulators play sound using this setup.

-=Jason=-
find quote
BoxFreak Offline
Senior Member
Posts: 198
Joined: Jan 2008
Reputation: 0
Location: Finland
Post: #427
Flomaster Wrote:do you not get hdmi audio in live?...
-=Jason=-

My sound works fine apart from navigation sounds and sound on video´s that have sample rate under 44100hz. Just thought that maybe pulseaudio is messing things up? Using ION2 and HDMI-out.
find quote
lloydsmart Offline
Donor
Posts: 311
Joined: Sep 2009
Reputation: 0
Post: #428
^ I have exactly the same symptoms on my system. Using Ubuntu 10.10 with Dharma Beta 3, and I have a motherboard with Nvidia 8300 and HDMI out. Everything else, including 5.1 PCM via HDMI, working perfectly, but low-samplerate audio and nav sounds have never worked for me. :-(
find quote
Flomaster Offline
Posting Freak
Posts: 1,287
Joined: Jun 2010
Reputation: 6
Location: East Texas
Post: #429
BoxFreak Wrote:My sound works fine apart from navigation sounds and sound on video´s that have sample rate under 44100hz. Just thought that maybe pulseaudio is messing things up? Using ION2 and HDMI-out.

well using my instructions I have 100% working audio with anything I throw at it. make a backup of your .asoundrc file and give my way a shot and see if it helps you out.

-=Jason=-
find quote
peter10000 Offline
Junior Member
Posts: 8
Joined: Feb 2007
Reputation: 0
Post: #430
Correct Code is:
...
6. Create a script for launching XBMC like "start.sh" and set the executable flag. Content of the file is:
pulseaudio -k <<<<=======
xbmc
pulseaudio --start

-k => stops pulseaudio

It could be neccesary to take "pulseaudio --start" into autostart to get OS based sound-support when booting up.
find quote
pricinosus Offline
Junior Member
Posts: 30
Joined: Dec 2009
Reputation: 2
Post: #431
peter10000 Wrote:Correct Code is:
...
6. Create a script for launching XBMC like "start.sh" and set the executable flag. Content of the file is:
pulseaudio -k <<<<=======
xbmc
pulseaudio --start

-k => stops pulseaudio

It could be neccesary to take "pulseaudio --start" into autostart to get OS based sound-support when booting up.


you can use your "edit" button to change that in original post here

Nerd
find quote
polkaroo Offline
Junior Member
Posts: 37
Joined: Aug 2010
Reputation: 0
Post: #432
Hi,

I’m trying to use XBMC Live via usb with an MSI N210 MD512H graphics card. I’m attempting to use audio via HDMI. So far, I am able to stream youtube and shoutcast with sound working fine (receiver indicates PCM). When I attempt to play a DVD or video file, I don’t get any sound. When attempting to see what the signal is from the receiver, it flashes, occasionally saying no signal. Will these instructions work for my MSI N210 graphics card? Has anyone seen this and if so, what can I do to correct? I am using Beta 3.

Flomaster Wrote:do you not get hdmi audio in live?

type in
alsamixer

make sure your hdmi spdif are not muted on the far right.

http://forum.xbmc.org/showpost.php?p=587...tcount=290
then copy and paste these lines of code

Code:
[LIST]
[*]sudo rm /etc/asound.conf

[*]sudo rm /usr/share/alsa/cards/HDA-Intel.conf

[*]sudo wget http://pastebin.com/download.php?i=f5f9654bb -O /etc/asound.conf

[*]sudo wget http://pastebin.com/download.php?i=f2e38265 -O /usr/share/alsa/cards/HDA-Intel.conf

[*]sudo reboot
[/LIST]

also if you have a Ion 330 with Nvidia GPU you can use this
.asoundrc

file it works perfectly for me

Code:
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"
}

pcm.!hdmi-remap {
type asym
playback.pcm {
type plug
slave.pcm "remap-surround71"
}
}

pcm.!remap-surround71 {
  type route
  slave.pcm "hw:0,3"
  ttable {
    0.0= 1
    1.1= 1
    2.4= 1
    3.5= 1
    4.2= 1
    5.3= 1
    6.6= 1
    7.7= 1
  }
}

use these settings in xbmc
the perfect asound.conf http://flomaster.pastebin.com/HQtibwZ4
Audio Output: HDMI
Audio Output Device:HDMI
Passthrough: plughw:0,3
and if I want to get stereo sound to my zone two for backyard music I change to
Audio Output: plughw:0,0 and I get analog audio out of my green headphone jack.

my AAC tracks play on the correct channels.
mp3 audio is correct
DTS and Dolby Digital play as should.
all emulators play sound using this setup.

-=Jason=-
find quote
Jyujinkai Offline
Senior Member
Posts: 191
Joined: Jul 2008
Reputation: 0
Post: #433
alanwww1 Wrote:
Code:
sudo wget http://pastebin.com/pastebin.php?dl=f5f9654bb -O /etc/asound.conf
sudo dos2unix /etc/asound.conf

All these pastebin things do not work Sad

XBMC user from XMP days... love this project and many thanks to the talent that keeps it alive
find quote
myrison Offline
Donor
Posts: 301
Joined: Nov 2009
Reputation: 3
Location: Austin, TX
Post: #434
The pastebin logs are still there, you can check them in any browser: http://pastebin.com/f5f9654bb

With that said, the post you are referencing is over a year old. The methods described in the first posts were priceless at the time they were written, but they are no longer necessary using the newest versions of XBMC Live / Dharma. Check out the link in my signature for a quick run-through. My guide is for Dharma 2, but the same steps apply, just change the link to download the latest XBMC Freak version, which is currently Dharma 3. After that upgrading to Dharma 4 is quite easy.

------------------------------------------
Dharma Quick Setup Guide:
XBMC tips on the TechNazgul Blog
------------------------------------------
find quote
martdj Offline
Junior Member
Posts: 41
Joined: Jul 2010
Reputation: 0
Post: #435
i discovered recently that I didn't have multichannel sound (which is my case meant I didn't have a center speaker, as I currently have a 3.1 setup) when playing multichannel soundfiles. So I tried to follow this guide to correct it. After a lot of time spent on this I did fix it, but definitely not with this guide. Just a word of warning to people who read this thread. The things I found:
  • Not a single nvidia driver in the 195.x range will give you multichannel sound
  • No need to use the 185.x series though. Go newer. I currently use 260.19.26 which works fine
  • Using this driver I didn't have any problems with channels switched around. No need to swap any files like asound.conf or HDA-Intel.conf files
  • Using the test files listed in this thread, I had weird behavior with my ac3 and dts test files. All other files were fine, but when these would start to play I have my front speakers telling me they were the rear speakers. However, when I played them again they were just fine. that took me a while to realise though.

So my advice would be, use the newest nvidia driver and first check if you actually have a problem before you try any tips from this thread.
find quote
Post Reply