Kodi Community Forum

Full Version: [LINUX] HOW-TO get multi-channel HD sound output working over NVIDIA HDMI
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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
Kali Wrote:remove
/etc/modprobe.d/alsa-base.conf
run alsaconf select hda-intel and reboot

Thanks for the suggestion,

I have reset the .conf but still no sound. It is as if the receiver cannot recognize the audio signal from XBMC

Another clue:
if I try to play some mp3 music or a movie with mp3 audio I just do not get any sound. Instead if I play a movie with dolby digital or where it is supposed to use pass-through I get a "failed to initialized audio device" message.
It is really hard to decide between pulse and alsa way.
On one hand alsa way give perfect sound but pulse will transform e.g. DTS Neo to LPCM and thus my receiver can then play nicely the normally unsupported codecs. Even MP3 are resampled to play on all 5 speakers ( and I luv it Smile)

On the other hand Pulse is too much for my acer atom if a flash movie is watched via firefox and ugly cracking occur during playback Sad
I am using resample-method = ffmpeg.

Something in between would be perfect Smile Alsa for standard things (Firefox and XBMC if movies are using codecs that are supported by the receiver and pulse otherwise.

I guess such a setup is not possible ?
Is there a reason to use PulseAudio over ALSA's normal dmixer? The following asound.conf works well for me (it is just analog over HDMI):

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

pcm.!remap-surround71 {
  type route
  slave.pcm "dmixer"
  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
  }
}

pcm.!default {
    type plug
    slave.pcm "dmixer"
}
pcm.dsp0 {
    type plug
    slave.pcm "dmixer"
}
pcm.dmixer {
    type dmix
    ipc_key 1024
    slave {
        pcm "hw:0,3"
        #period_time 0
        period_size 1024
        buffer_size 8192
        #periods 128
        rate 44100
     }
     bindings {
        0 0
        1 1
     }
}
ctl.mixer0 {
    type hw
    card 0
}
samanoske Wrote:It is really hard to decide between pulse and alsa way.
On one hand alsa way give perfect sound but pulse will transform e.g. DTS Neo to LPCM and thus my receiver can then play nicely the normally unsupported codecs. Even MP3 are resampled to play on all 5 speakers ( and I luv it Smile)

You don't need pulse for this !!!!!

You just need to untick the dts,ac3 capable receiver options in xbmc.
Yesterday I finished with the configuration, and it seems working.
I used Ubuntu Karmic + Nvidia drivers 185 series + XBMC 9.11beta1.
The mainboard is Point Of View ION330-1
Im not finished with the full test, but at least the speaker tests are working, and maps the correct channel. Also worked the DTS too.
But i cant find this configuration panel.
I can see only in the alsa mixer the NVIDIA HDMI. (is this ok?)

Today I get some multi channel flac files from here. And found some tool with to convert DTS-MA/DDTrueHD. Maybe this is ok (Clown_BD v0.75, tsMuxeR v1.10.06, eac3to v3.17, BDSup2Sub v3.98,Aften x86).

This remote also works somehow, except playback keys not (Play, Stop Pause...).
The mouse function works tooSmile

BTW I just seen that the new 2nd beta of XBMC 9.11 released. Smile
My question is how can I update and can I loose anything?
Maybe the same way like before:
Code:
$ sudo add-apt-repository ppa:team-xbmc
     $ sudo apt-get update
     $ sudo apt-get install xbmc
     $ sudo apt-get update
Offtopic, but...
Comments for the video quality: I get tearing always, and m2ts file playback not really good (mkv ok). I enabled vsync in xbmc settings, but nothing happened. I read somewhere that there is a bug in the nvidia driver...have to set in the driver pane the vsync , but only works if one monitor connected.

It is possible to test ffmpeg for HD Audio passthrough somehow?
(Without the needed conversion to FLAC...sorry for this question...)
Will be possible the passthrough with ION under Linux?
alanwww1 Wrote:You don't need pulse for this !!!!!

You just need to untick the dts,ac3 capable receiver options in xbmc.

Shocked

That means, I could shift back to Alsa, have natively those formats that my receiver supports, e.g. LPCM (2/5.1), Dolby Digital or Dolby Prologic and the other unsupported formats, e.g. Dolby Digital EX, DTS-ES or DTS-NEO:6 would be resample to LPCM ?

[update] audio is not resampled to lpcm 5channels Sad
bitlisz Wrote:But i cant find this configuration panel.

yes it is ok, that configuration panel is quite simplified in Karmic. Just change the output settings in "Sound preferences.

bitlisz Wrote:This remote also works somehow, except playback keys not (Play, Stop Pause...).

You can edit your remote maps in Lircmap.xml that should be in /usr/share/xbmc/system/
or somewhere in the subfolders. To find out the codes output of your remote use "irw" command and press your play.stop, pause keys

Once you have finalized your remote setup remember to save a copy somewhere. Every-time you upgrade XBMC, the installer will overwrite your custom remote settings
Kaaino Wrote:...
Once you have finalized your remote setup remember to save a copy somewhere. Every-time you upgrade XBMC, the installer will overwrite your custom remote settings
You can save it here to prevent overwriting:
Code:
~/.xbmc/userdata/Lircmap.xml
bitlisz Wrote:Yesterday I finished with the configuration, and it seems working.
I used Ubuntu Karmic + Nvidia drivers 185 series + XBMC 9.11beta1.
The mainboard is Point Of View ION330-1
Im not finished with the full test, but at least the speaker tests are working, and maps the correct channel. Also worked the DTS too.
But i cant find this configuration panel.
I can see only in the alsa mixer the NVIDIA HDMI. (is this ok?)

Today I get some multi channel flac files from here. And found some tool with to convert DTS-MA/DDTrueHD. Maybe this is ok (Clown_BD v0.75, tsMuxeR v1.10.06, eac3to v3.17, BDSup2Sub v3.98,Aften x86).

This remote also works somehow, except playback keys not (Play, Stop Pause...).
The mouse function works tooSmile

BTW I just seen that the new 2nd beta of XBMC 9.11 released. Smile
My question is how can I update and can I loose anything?
Maybe the same way like before:
Code:
$ sudo add-apt-repository ppa:team-xbmc
     $ sudo apt-get update
     $ sudo apt-get install xbmc
     $ sudo apt-get update
Offtopic, but...
Comments for the video quality: I get tearing always, and m2ts file playback not really good (mkv ok). I enabled vsync in xbmc settings, but nothing happened. I read somewhere that there is a bug in the nvidia driver...have to set in the driver pane the vsync , but only works if one monitor connected.

It is possible to test ffmpeg for HD Audio passthrough somehow?
(Without the needed conversion to FLAC...sorry for this question...)
Will be possible the passthrough with ION under Linux?

Just a thought, you might have more luck if you separate out the questions not related to this thread (mouse, remote, ripping/converting, video quality, HD passthrough, etc.) and post them elsewhere separately. I know the situation you're in with wanting to get things figured out, but I think you've lumped too much into one post and put it in a thread that is unlreated to the majority of the questions, so I'm not sure you're going to get all of those questions answered here.

Of course you're more than welcome to try, just thought I might save you some frustration with the suggestion. Big Grin
alanwww1 Wrote:If it worked fine, why have you upgraded ?

44100hz for sure does NOT work with stock alsa for sure. Only in the next stable release probably. So it is important to check if the upgrade went fine, So you could run these commands.

Sorry it took so long to get back.. busy life.. I ran the commands below but I get no sound what so ever. Not through my tv or my receiver. Any ideas? The alsa upgrade went fine from what I can see.

speaker-test -Dhdmi -c2 -r48000 -FS16_LE
speaker-test -Dhdmi -c6 -r192000 -FS32_LE
Phantisy Wrote:Sorry it took so long to get back.. busy life.. I ran the commands below but I get no sound what so ever. Not through my tv or my receiver. Any ideas? The alsa upgrade went fine from what I can see.

speaker-test -Dhdmi -c2 -r48000 -FS16_LE
speaker-test -Dhdmi -c6 -r192000 -FS32_LE

Make sure you try these command with X server runnng, also check with alsa mixer that ALL of your iec devices are unmuted.
alanwww1 Wrote:I defined "remap-surround71" virtual device to control which channels sound where. It is defined in /etc/asound.conf

Maybe archlinux ignores this file at booting. Try
speaker-test -Dremap-surround71 -c6

check if the channels are in good place. If not you can still tune this file easily to match your configuration.

Alan - first of all, thank you a ton for putting this together. Before your script, any TrueHD source was downconverted to 2-channel stereo in XBMC. No

Immediately fter running your script I was able to get TrueHD via PCM to my Denon 3808 receiver from my Acer Aspire Revo 1600! Big Grin (FYI, I'm running Ubuntu 9.04, XBMC Camelot beta 2)

The one problem I thought I had run into was the channel mapping for 5.1 or 7.1 sound. However, as I thought about it more I believe it is not a channel mapping problem but a problem with the way the channels are named in the speaker-test script.

I have a 7.1 channel setup. The two side speakers (to the side and slightly back from the normal listening position) are traditionally called surround speakers (i.e. The front 3 (LCR) + 2 "surrounds" in 5.1 audio). In the speaker-test, however, the surrounds are listed as rear right and rear left. This doesn't seem like a big deal until you move to an 8 channel test.

When you change speaker-test to run an 8 channel test (7.1), it adds two channels to its test (traditionally the last 2 channels in 7.1 are known as rear surrounds [those that are directly behind the main listening area]). However, in the speaker-test, the two "new" channels that are now in the 8 channel test are referred to as "side right" and "side left."

Originally when I saw the test and heard the output I thought the channels were mapped incorrectly,but after I thought about it more I believe they are just named wrong in the speaker test and are in fact mapped correctly. Considering that in the 5.1 test, the surround right and surround left speakers are properly mapped (but called "rear" speakers), and that in the 7.1 test the two newly added speakers play sound from the rear surrounds (even though they are called "side" speakers in speaker-test), I believe all is well, and it's just a naming issue with the test.

To check my understanding and to confirm for anyone else who is curious about this in the future, I thought I'd post this here to save someone else time in the future. (Alan, if my understanding is correct and these names are a result of your script you might want to edit them in the future. If not, hopefully this post clears it up for anyone else in the same boat in the future).

Either way, thanks again. Awesome work!

Jason
alanwww1 Wrote:Make sure you try these command with X server runnng, also check with alsa mixer that ALL of your iec devices are unmuted.

Well I just did that and I have no problem getting sound with the speaker-test -Dhdmi -c2 -r48000 -FS16_LE test but when I run the speaker-test -Dhdmi -c6 -r192000 -FS32_LE test i get sound in the left and right only. All other channels dont work. I have the Onkyo tx-sr706 so it should have no problem playing these.

Also I am not showing iec devices in alsamixer i have s/pdif. That a problem?

UPDATE:

I just ran alsaconf and selected my sound card and now all 6 channels work fine. guess I will try mp3's again

UPDATE2:
OK still no mp3 sounds but all my movies play fine with sound. I don't get it though since the visualizations even react with the music. I just get no sound what so ever.
Hello alanwww1 !

At december 16 alsa-1.0.22 is out, i look at patch_nvhdmi.c, it is identical to patch in this thread, this is good. My question is in do we steel need to make a custom asound.conf and HDA-Intel.conf with this alsa-driver and alsa-lib version ?
Den4t Wrote:Hello alanwww1 !

At december 16 alsa-1.0.22 is out, i look at patch_nvhdmi.c, it is identical to patch in this thread, this is good. My question is in do we steel need to make a custom asound.conf and HDA-Intel.conf with this alsa-driver and alsa-lib version ?

It is great news. From now we don't have to patch the kernel source code anymore, but as the channel mapping is still wrong in the code we still need those custom files. I will upgrade the whole guide to use with karmic and the new alsa if i have a little time.
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