Archive:Remap HDMI audio on Gen 1 ION - Linux: Difference between revisions

From Official Kodi Wiki
Jump to navigation Jump to search
>UNiversal
m (moved HOW-TO:Configure HDMI audio on Gen 1 ION (linux) to HOW-TO:Remap HDMI audio on Gen 1 ION - Linux: Linux with capital letter and this is a remap though technically its a configuration we still want to distinguish the two.)
>UNiversal
m (→‎For 7.1: Eden: could work in frodo idk so mark it as untested.)
Line 10: Line 10:


===For 7.1: Eden===
===For 7.1: Eden===
Untested in Frodo.
<pre>
<pre>
pcm.hdmi-remap {
pcm.hdmi-remap {
Line 31: Line 32:
<pre>speaker-test -D hdmi-remap -c 6</pre>
<pre>speaker-test -D hdmi-remap -c 6</pre>


Hopefully the channels will now be mapped correctly.  
Hopefully the channels will now be mapped correctly.


===For 5.1: Frodo===
===For 5.1: Frodo===

Revision as of 12:29, 18 December 2012

HDMI audio output requires several steps to configure properly. My requirements were passthrough, non-passthrough and menu sounds all coming over HDMI to my receiver (fairly common). Some challenges were that the Gen 1 ION had incorrect channel mappings (e.g. Center came out of Left Rear) and menu sounds do not default to HDMI.

Remapping Surround Channels

I first noticed the audio channels were mis-mapped while watching a movie - all the voices were coming out of the left rear channel, not center. To verify this, I ran the following command:

speaker-test -D hdmi -c 6

To correct the output, I created the following channel mapping in ~/.asoundrc or /etc/asound.conf(.asoundrc overrides the default alsa settings per user, while /etc/asound.conf is a global settings override)

For 7.1: Eden

Untested in Frodo.

pcm.hdmi-remap {
       type route
       slave.pcm hdmi
       ttable.0.0 1
       ttable.1.1 1
       ttable.2.4 1
       ttable.3.5 1
       ttable.4.2 1
       ttable.5.3 1
       ttable.6.6 1 
       ttable.7.7 1 
}
Note: There is intentionally no slave.channels line in the configuration file since it seems to corrupt the digital stream and prevented proper DTS and DD passthrough to my receiver. If you hear static when using passthrough, this might be the reason why!

To test our new configuration, we can run:

speaker-test -D hdmi-remap -c 6

Hopefully the channels will now be mapped correctly.

For 5.1: Frodo

pcm.!default {
    type plug
    slave {
        pcm both
    }
}

pcm.both {
    type route
    slave {
        pcm hdmi
    }
       ttable.0.0 1
       ttable.1.1 1
       ttable.2.4 1
       ttable.3.5 1
       ttable.4.2 1
       ttable.5.3 1
}

To test our new configuration, we can run:

speaker-test -D hdmi -c 6

Menu Sounds

Note: Not needed in Frodo.

To configure menu sounds, I told alsa to use the hdmi-remap device as default. I did this by adding the following section to my ~/.asoundrc file:

pcm.!default {
	type plug
	slave.pcm hdmi-remap
}

XBMC Configuration

Within Settings -> System -> Audio Output, I set the following values:

Eden

  • Audio Output : HDMI
  • Speaker Configuration : 7.1
  • Boost volume level on downmix : No
  • Dolby Digitla (AC3) capable receiver : Yes
  • DTS capable receiver : Yes
  • Audio output device : Custom
  • Custom audio device : hdmi-remap
  • Passthrough output device : hdmi(ALSA)

Frodo

  • Audio Output : HDMI
  • Speaker Configuration : 5.1
  • Boost volume level on downmix : No
  • Dolby Digitla (AC3) capable receiver : Yes
  • DTS capable receiver : Yes
  • Audio output device : HDA NVidia HDMI 0
  • Passthrough output device : HDA NVidia HDMI 0

After a reboot, sound should be working as expected. Feel free to update this information as needed.

Attention talk.png Linux Frodo HDMI audio channel remap discussion