Kodi Community Forum
[LINUX] HOW-TO get multi-channel HD sound output working over NVIDIA HDMI - Printable Version

+- Kodi Community Forum (http://forum.kodi.tv)
+-- Forum: Announcements, Info, and General Discussion (/forumdisplay.php?fid=85)
+--- Forum: Tips, tricks, and step by step guides (/forumdisplay.php?fid=110)
+--- Thread: [LINUX] HOW-TO get multi-channel HD sound output working over NVIDIA HDMI (/showthread.php?tid=59877)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30


aac > pcm audio mixed up using 5.1 sound system - Flomaster - 2010-08-19 05:15

delete


- DejaVu - 2010-08-28 19:31

Sound on the Revo with XBMC Ubuntu is.... borked!!!

I had enough. Windows awaits!


HDMI stereo works. No surround... - Vetal - 2010-09-14 18:50

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


HDMI sound in Ubuntu and XBMC without complex modifications - peter10000 - 2010-10-20 00:20

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.


- BoxFreak - 2010-10-20 12:00

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?


- Flomaster - 2010-10-20 16:35

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=587800&postcount=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=-


- BoxFreak - 2010-10-20 19:46

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.


- lloydsmart - 2010-10-20 23:46

^ 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. :-(


- Flomaster - 2010-10-20 23:59

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=-


Error in my giode :-( - peter10000 - 2010-10-21 22:25

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.


- pricinosus - 2010-10-23 07:16

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


- polkaroo - 2010-10-30 09:27

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=587800&postcount=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=-



- Jyujinkai - 2010-11-01 13:50

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


- myrison - 2010-11-01 14:58

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.


- martdj - 2010-12-18 00:45

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.