alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* wrong channel mappings for HDMI audio
@ 2010-11-11  0:27 Dan Christensen
  2010-11-11  6:58 ` Clemens Ladisch
  2010-11-12 22:07 ` Anssi Hannula
  0 siblings, 2 replies; 6+ messages in thread
From: Dan Christensen @ 2010-11-11  0:27 UTC (permalink / raw)
  To: alsa-devel

[System specs at end.]

When I try to use 5.1 audio over HDMI, the front left and front right
channels are correct, but the others are wrong:

- surround (rear) left and center are swapped
- surround (rear) right and LFE are swapped

This has been tested using "speaker-test -c6 -Dhw:0,3 -twav" and
also by playing

  http://www.avenard.org/files/media/videotest/audiotest/idch_AviaSurroundTest-AAC.mkv
  http://www.avenard.org/files/media/videotest/audiotest/idch_AviaSurroundTest-DTS.mkv

using mplayer and mythtv.  They play correctly with digital passthrough:
AAC and DTS for mythtv, and DTS for mplayer.

Jean-Yves Avenard reports that they play correctly using 5.1 analog
output on the same motherboard, but I haven't tested that myself.
Let me know if this would be helpful, e.g. if it is hard to believe
that analog has the correct mapping while HDMI doesn't.

James Courtier-Dutton suggested that I report this here, in the hopes
that ALSA can be taught the correct mapping for my sound card.

I'm also interested in the best way to work around this in the meantime.

Thanks for any help!

Dan

System specs:

Motherboard: Gigabyte GA-E7AUM-DS2H
  http://gigabyte.com/products/product-page.aspx?pid=2946#ov

Up-to-date Debian squeeze with 2.6.32-5-686-bigmem kernel.

ALSA packages installed:

alsa-base         1.0.23+dfsg-2  ALSA driver configuration files
alsa-oss          1.0.17-4       ALSA wrapper for OSS applications
alsa-source       1.0.23+dfsg-2  ALSA driver sources
alsa-utils        1.0.23-3       Utilities for configuring and using ALSA
alsaplayer-alsa   0.99.80-5+b1   PCM player designed for ALSA (ALSA output module)
alsaplayer-common 0.99.80-5+b1   PCM player designed for ALSA (common files)
alsaplayer-oss    0.99.80-5+b1   PCM player designed for ALSA (OSS output module)
alsaplayer-text   0.99.80-5+b1   PCM player designed for ALSA (text version)
libasound2        1.0.23-2.1     shared library for ALSA applications
linux-sound-base  1.0.23+dfsg-2  base package for ALSA and OSS sound systems
xmms2-plugin-alsa 0.7DrNo+dfsg-2 XMMS2 - ALSA output

Pioneer VSX-820-K receiver, which has 5 speakers connected (no
subwoofer), receiving input over HDMI.

asound.conf:

pcm.!default {
type hw
card 0
device 3
}

lspci -vv output:

00:08.0 Audio device: nVidia Corporation MCP79 High Definition Audio (rev b1)
        Subsystem: Giga-byte Technology Device a102
        Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
        Status: Cap+ 66MHz+ UDF- FastB2B+ ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
        Latency: 0 (500ns min, 1250ns max)
        Interrupt: pin A routed to IRQ 21
        Region 0: Memory at d9180000 (32-bit, non-prefetchable) [size=16K]
        Capabilities: [44] Power Management version 2
                Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot+,D3cold+)
                Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
        Kernel driver in use: HDA Intel
        Kernel modules: snd-hda-intel

[To save you scrolling: there's nothing else after the /proc output.]

Output of cat /proc/asound/card0/codec#3 [below is #0 in case it helps]:

Codec: Nvidia MCP7A HDMI
Address: 3
Function Id: 0x1
Vendor Id: 0x10de0007
Subsystem Id: 0x10de0101
Revision Id: 0x100100
No Modem Function Group found
Default PCM:
    rates [0x0]:
    bits [0x0]:
    formats [0x0]:
Default Amp-In caps: N/A
Default Amp-Out caps: N/A
GPIO: io=0, o=0, i=0, unsolicited=0, wake=0
Node 0x04 [Audio Output] wcaps 0x211: Stereo Digital
  Converter: stream=0, channel=0
  Digital: Enabled
  Digital category: 0x0
  PCM:
    rates [0xc0]: 48000 88200
    bits [0xf]: 8 16 20 24
    formats [0x1]: PCM
Node 0x05 [Pin Complex] wcaps 0x400381: Stereo Digital
  Pincap 0x00000014: OUT Detect
  Pin Default 0x18560110: [Jack] Digital Out at Int HDMI
    Conn = Digital, Color = Unknown
    DefAssociation = 0x1, Sequence = 0x0
    Misc = NO_PRESENCE
  Pin-ctls: 0x40: OUT
  Unsolicited: tag=00, enabled=0
  Connection: 1
     0x04
Node 0x06 [Audio Output] wcaps 0x211: Stereo Digital
  Converter: stream=0, channel=0
  Digital:
  Digital category: 0x0
  PCM:
    rates [0xc0]: 48000 88200
    bits [0xf]: 8 16 20 24
    formats [0x1]: PCM
Node 0x07 [Pin Complex] wcaps 0x400381: Stereo Digital
  Pincap 0x00000014: OUT Detect
  Pin Default 0x58560121: [N/A] Digital Out at Int HDMI
    Conn = Digital, Color = Unknown
    DefAssociation = 0x2, Sequence = 0x1
    Misc = NO_PRESENCE
  Pin-ctls: 0x40: OUT
  Unsolicited: tag=00, enabled=0
  Connection: 1
     0x06
Node 0x08 [Audio Output] wcaps 0x211: Stereo Digital
  Converter: stream=0, channel=0
  Digital:
  Digital category: 0x0
  PCM:
    rates [0xc0]: 48000 88200
    bits [0xf]: 8 16 20 24
    formats [0x1]: PCM
Node 0x09 [Pin Complex] wcaps 0x400381: Stereo Digital
  Pincap 0x00000014: OUT Detect
  Pin Default 0x58560122: [N/A] Digital Out at Int HDMI
    Conn = Digital, Color = Unknown
    DefAssociation = 0x2, Sequence = 0x2
    Misc = NO_PRESENCE
  Pin-ctls: 0x40: OUT
  Unsolicited: tag=00, enabled=0
  Connection: 1
     0x08
Node 0x0a [Audio Output] wcaps 0x211: Stereo Digital
  Converter: stream=0, channel=0
  Digital:
  Digital category: 0x0
  PCM:
    rates [0xc0]: 48000 88200
    bits [0xf]: 8 16 20 24
    formats [0x1]: PCM
Node 0x0b [Pin Complex] wcaps 0x400381: Stereo Digital
  Pincap 0x00000014: OUT Detect
  Pin Default 0x58560123: [N/A] Digital Out at Int HDMI
    Conn = Digital, Color = Unknown
    DefAssociation = 0x2, Sequence = 0x3
    Misc = NO_PRESENCE
  Pin-ctls: 0x40: OUT
  Unsolicited: tag=00, enabled=0
  Connection: 1
     0x0a
Node 0x0c [Audio Output] wcaps 0x211: Stereo Digital
  Converter: stream=0, channel=0
  Digital:
  Digital category: 0x0
  PCM:
    rates [0xc0]: 48000 88200
    bits [0xf]: 8 16 20 24
    formats [0x1]: PCM
Node 0x0d [Pin Complex] wcaps 0x400381: Stereo Digital
  Pincap 0x00000014: OUT Detect
  Pin Default 0x58560124: [N/A] Digital Out at Int HDMI
    Conn = Digital, Color = Unknown
    DefAssociation = 0x2, Sequence = 0x4
    Misc = NO_PRESENCE
  Pin-ctls: 0x40: OUT
  Unsolicited: tag=00, enabled=0
  Connection: 1
     0x0c

Output of cat /proc/asound/card0/codec#0:

Codec: Realtek ALC889A
Address: 0
Function Id: 0x1
Vendor Id: 0x10ec0885
Subsystem Id: 0x1458a002
Revision Id: 0x100101
No Modem Function Group found
Default PCM:
    rates [0x560]: 44100 48000 96000 192000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM
Default Amp-In caps: N/A
Default Amp-Out caps: N/A
GPIO: io=2, o=0, i=0, unsolicited=1, wake=0
  IO[0]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
  IO[1]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
Node 0x02 [Audio Output] wcaps 0x11: Stereo
  Converter: stream=0, channel=0
  PCM:
    rates [0x560]: 44100 48000 96000 192000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM
Node 0x03 [Audio Output] wcaps 0x11: Stereo
  Converter: stream=0, channel=0
  PCM:
    rates [0x560]: 44100 48000 96000 192000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM
Node 0x04 [Audio Output] wcaps 0x11: Stereo
  Converter: stream=0, channel=0
  PCM:
    rates [0x560]: 44100 48000 96000 192000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM
Node 0x05 [Audio Output] wcaps 0x11: Stereo
  Converter: stream=0, channel=0
  PCM:
    rates [0x560]: 44100 48000 96000 192000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM
Node 0x06 [Audio Output] wcaps 0x211: Stereo Digital
  Converter: stream=0, channel=0
  Digital: Enabled GenLevel
  Digital category: 0x2
  PCM:
    rates [0x5e0]: 44100 48000 88200 96000 192000
    bits [0x1e]: 16 20 24 32
    formats [0x1]: PCM
Node 0x07 [Audio Input] wcaps 0x10011b: Stereo Amp-In
  Amp-In caps: ofs=0x10, nsteps=0x2e, stepsize=0x03, mute=1
  Amp-In vals:  [0x1c 0x1c]
  Converter: stream=0, channel=0
  SDI-Select: 0
  PCM:
    rates [0x560]: 44100 48000 96000 192000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM
  Connection: 1
     0x24
Node 0x08 [Audio Input] wcaps 0x10011b: Stereo Amp-In
  Amp-In caps: ofs=0x10, nsteps=0x2e, stepsize=0x03, mute=1
  Amp-In vals:  [0x00 0x00]
  Converter: stream=0, channel=0
  SDI-Select: 0
  PCM:
    rates [0x560]: 44100 48000 96000 192000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM
  Connection: 1
     0x23
Node 0x09 [Audio Input] wcaps 0x10011b: Stereo Amp-In
  Amp-In caps: ofs=0x10, nsteps=0x2e, stepsize=0x03, mute=1
  Amp-In vals:  [0x00 0x00]
  Converter: stream=0, channel=0
  SDI-Select: 0
  PCM:
    rates [0x560]: 44100 48000 96000 192000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM
  Connection: 1
     0x22
Node 0x0a [Audio Input] wcaps 0x100391: Stereo Digital
  Converter: stream=0, channel=0
  SDI-Select: 0
  Digital:
  Digital category: 0x0
  PCM:
    rates [0x560]: 44100 48000 96000 192000
    bits [0x1e]: 16 20 24 32
    formats [0x1]: PCM
  Unsolicited: tag=00, enabled=0
  Connection: 1
     0x1f
Node 0x0b [Audio Mixer] wcaps 0x20010b: Stereo Amp-In
  Amp-In caps: ofs=0x17, nsteps=0x1f, stepsize=0x05, mute=1
  Amp-In vals:  [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x97 0x97] [0x97 0x97] [0x97 0x97] [0x97 0x97] [0x97 0x97]
  Connection: 10
     0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x14 0x15 0x16 0x17
Node 0x0c [Audio Mixer] wcaps 0x20010f: Stereo Amp-In Amp-Out
  Amp-In caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-In vals:  [0x00 0x00] [0x00 0x00]
  Amp-Out caps: ofs=0x40, nsteps=0x40, stepsize=0x03, mute=0
  Amp-Out vals:  [0x40 0x40]
  Connection: 2
     0x02 0x0b
Node 0x0d [Audio Mixer] wcaps 0x20010f: Stereo Amp-In Amp-Out
  Amp-In caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-In vals:  [0x00 0x00] [0x00 0x00]
  Amp-Out caps: ofs=0x40, nsteps=0x40, stepsize=0x03, mute=0
  Amp-Out vals:  [0x40 0x40]
  Connection: 2
     0x03 0x0b
Node 0x0e [Audio Mixer] wcaps 0x20010f: Stereo Amp-In Amp-Out
  Amp-In caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-In vals:  [0x00 0x00] [0x00 0x00]
  Amp-Out caps: ofs=0x40, nsteps=0x40, stepsize=0x03, mute=0
  Amp-Out vals:  [0x40 0x00]
  Connection: 2
     0x04 0x0b
Node 0x0f [Audio Mixer] wcaps 0x20010f: Stereo Amp-In Amp-Out
  Amp-In caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-In vals:  [0x00 0x00] [0x00 0x00]
  Amp-Out caps: ofs=0x40, nsteps=0x40, stepsize=0x03, mute=0
  Amp-Out vals:  [0x00 0x00]
  Connection: 2
     0x05 0x0b
Node 0x10 [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x11 [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x12 [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x13 [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x14 [Pin Complex] wcaps 0x40018f: Stereo Amp-In Amp-Out
  Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0
  Amp-In vals:  [0x00 0x00]
  Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-Out vals:  [0x00 0x00]
  Pincap 0x0000373c: IN OUT HP Detect
    Vref caps: HIZ 50 GRD 80 100
  Pin Default 0x01014410: [Jack] Line Out at Ext Rear
    Conn = 1/8, Color = Green
    DefAssociation = 0x1, Sequence = 0x0
  Pin-ctls: 0x40: OUT VREF_HIZ
  Unsolicited: tag=00, enabled=0
  Connection: 5
     0x0c* 0x0d 0x0e 0x0f 0x26
Node 0x15 [Pin Complex] wcaps 0x40018f: Stereo Amp-In Amp-Out
  Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0
  Amp-In vals:  [0x00 0x00]
  Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-Out vals:  [0x00 0x00]
  Pincap 0x0000373c: IN OUT HP Detect
    Vref caps: HIZ 50 GRD 80 100
  Pin Default 0x01011412: [Jack] Line Out at Ext Rear
    Conn = 1/8, Color = Black
    DefAssociation = 0x1, Sequence = 0x2
  Pin-ctls: 0x40: OUT VREF_HIZ
  Unsolicited: tag=00, enabled=0
  Connection: 5
     0x0c 0x0d* 0x0e 0x0f 0x26
Node 0x16 [Pin Complex] wcaps 0x40018f: Stereo Amp-In Amp-Out
  Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0
  Amp-In vals:  [0x00 0x00]
  Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-Out vals:  [0x00 0x00]
  Pincap 0x0000003c: IN OUT HP Detect
  Pin Default 0x01016411: [Jack] Line Out at Ext Rear
    Conn = 1/8, Color = Orange
    DefAssociation = 0x1, Sequence = 0x1
  Pin-ctls: 0x40: OUT
  Unsolicited: tag=00, enabled=0
  Connection: 5
     0x0c 0x0d 0x0e* 0x0f 0x26
Node 0x17 [Pin Complex] wcaps 0x40018f: Stereo Amp-In Amp-Out
  Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0
  Amp-In vals:  [0x00 0x00]
  Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-Out vals:  [0x00 0x00]
  Pincap 0x0000003c: IN OUT HP Detect
  Pin Default 0x01012414: [Jack] Line Out at Ext Rear
    Conn = 1/8, Color = Grey
    DefAssociation = 0x1, Sequence = 0x4
  Pin-ctls: 0x40: OUT
  Unsolicited: tag=00, enabled=0
  Connection: 5
     0x0c 0x0d 0x0e 0x0f* 0x26
Node 0x18 [Pin Complex] wcaps 0x40018f: Stereo Amp-In Amp-Out
  Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0
  Amp-In vals:  [0x00 0x00]
  Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-Out vals:  [0x80 0x80]
  Pincap 0x0000373c: IN OUT HP Detect
    Vref caps: HIZ 50 GRD 80 100
  Pin Default 0x01a19c40: [Jack] Mic at Ext Rear
    Conn = 1/8, Color = Pink
    DefAssociation = 0x4, Sequence = 0x0
  Pin-ctls: 0x24: IN VREF_80
  Unsolicited: tag=00, enabled=0
  Connection: 5
     0x0c* 0x0d 0x0e 0x0f 0x26
Node 0x19 [Pin Complex] wcaps 0x40018f: Stereo Amp-In Amp-Out
  Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0
  Amp-In vals:  [0x00 0x00]
  Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-Out vals:  [0x80 0x80]
  Pincap 0x0000373c: IN OUT HP Detect
    Vref caps: HIZ 50 GRD 80 100
  Pin Default 0x02a19c50: [Jack] Mic at Ext Front
    Conn = 1/8, Color = Pink
    DefAssociation = 0x5, Sequence = 0x0
  Pin-ctls: 0x24: IN VREF_80
  Unsolicited: tag=00, enabled=0
  Connection: 5
     0x0c* 0x0d 0x0e 0x0f 0x26
Node 0x1a [Pin Complex] wcaps 0x40018f: Stereo Amp-In Amp-Out
  Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0
  Amp-In vals:  [0x00 0x00]
  Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-Out vals:  [0x80 0x80]
  Pincap 0x0000373c: IN OUT HP Detect
    Vref caps: HIZ 50 GRD 80 100
  Pin Default 0x0181344f: [Jack] Line In at Ext Rear
    Conn = 1/8, Color = Blue
    DefAssociation = 0x4, Sequence = 0xf
  Pin-ctls: 0x20: IN VREF_HIZ
  Unsolicited: tag=00, enabled=0
  Connection: 5
     0x0c* 0x0d 0x0e 0x0f 0x26
Node 0x1b [Pin Complex] wcaps 0x40018f: Stereo Amp-In Amp-Out
  Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0
  Amp-In vals:  [0x00 0x00]
  Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-Out vals:  [0x00 0x00]
  Pincap 0x0000373c: IN OUT HP Detect
    Vref caps: HIZ 50 GRD 80 100
  Pin Default 0x02214c20: [Jack] HP Out at Ext Front
    Conn = 1/8, Color = Green
    DefAssociation = 0x2, Sequence = 0x0
  Pin-ctls: 0xc0: OUT HP VREF_HIZ
  Unsolicited: tag=00, enabled=0
  Connection: 5
     0x0c* 0x0d 0x0e 0x0f 0x26
Node 0x1c [Pin Complex] wcaps 0x400001: Stereo
  Pincap 0x00000020: IN
  Pin Default 0x593301f0: [N/A] CD at Int ATAPI
    Conn = ATAPI, Color = Unknown
    DefAssociation = 0xf, Sequence = 0x0
    Misc = NO_PRESENCE
  Pin-ctls: 0x20: IN
Node 0x1d [Pin Complex] wcaps 0x400000: Mono
  Pincap 0x00000020: IN
  Pin Default 0x4005e601: [N/A] Line Out at Ext N/A
    Conn = Optical, Color = White
    DefAssociation = 0x0, Sequence = 0x1
  Pin-ctls: 0x20: IN
Node 0x1e [Pin Complex] wcaps 0x400300: Mono Digital
  Pincap 0x00000010: OUT
  Pin Default 0x014b6130: [Jack] SPDIF Out at Ext Rear
    Conn = Comb, Color = Orange
    DefAssociation = 0x3, Sequence = 0x0
    Misc = NO_PRESENCE
  Pin-ctls: 0x40: OUT
  Connection: 1
     0x06
Node 0x1f [Pin Complex] wcaps 0x400200: Mono Digital
  Pincap 0x00000020: IN
  Pin Default 0x01cb7160: [Jack] SPDIF In at Ext Rear
    Conn = Comb, Color = Yellow
    DefAssociation = 0x6, Sequence = 0x0
    Misc = NO_PRESENCE
  Pin-ctls: 0x20: IN
Node 0x20 [Vendor Defined Widget] wcaps 0xf00040: Mono
  Processing caps: benign=0, ncoeff=17
  Processing Coefficient: 0xc128
  Coefficient Index: 0x02
Node 0x21 [Volume Knob Widget] wcaps 0x600080: Mono
  Volume-Knob: delta=0, steps=32, direct=0, val=0
  Unsolicited: tag=00, enabled=0
  Connection: 0
Node 0x22 [Audio Mixer] wcaps 0x20010b: Stereo Amp-In
  Amp-In caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-In vals:  [0x00 0x00] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80]
  Connection: 11
     0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x14 0x15 0x16 0x17 0x0b
Node 0x23 [Audio Mixer] wcaps 0x20010b: Stereo Amp-In
  Amp-In caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-In vals:  [0x00 0x00] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80]
  Connection: 11
     0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x14 0x15 0x16 0x17 0x0b
Node 0x24 [Audio Mixer] wcaps 0x20010b: Stereo Amp-In
  Amp-In caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-In vals:  [0x00 0x00] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80]
  Connection: 11
     0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x14 0x15 0x16 0x17 0x0b
Node 0x25 [Audio Output] wcaps 0x11: Stereo
  Converter: stream=0, channel=0
  PCM:
    rates [0x560]: 44100 48000 96000 192000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM
Node 0x26 [Audio Mixer] wcaps 0x20010f: Stereo Amp-In Amp-Out
  Amp-In caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-In vals:  [0x00 0x00] [0x00 0x00]
  Amp-Out caps: ofs=0x40, nsteps=0x40, stepsize=0x03, mute=0
  Amp-Out vals:  [0x40 0x40]
  Connection: 2
     0x25 0x0b

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: wrong channel mappings for HDMI audio
  2010-11-11  0:27 wrong channel mappings for HDMI audio Dan Christensen
@ 2010-11-11  6:58 ` Clemens Ladisch
  2010-11-12 13:16   ` Dan Christensen
  2010-11-12 22:07 ` Anssi Hannula
  1 sibling, 1 reply; 6+ messages in thread
From: Clemens Ladisch @ 2010-11-11  6:58 UTC (permalink / raw)
  To: Dan Christensen; +Cc: alsa-devel

Dan Christensen wrote:
> When I try to use 5.1 audio over HDMI, the front left and front right
> channels are correct, but the others are wrong:
> ...
> asound.conf:
> 
> pcm.!default {
> type hw
> card 0
> device 3
> }

With this definition, you are disabling ALSA's channel mapping.

Try this:

  pcm.!default pcm.hdmi

or just tell you applications to use the device "hdmi".


Regards,
Clemens

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: wrong channel mappings for HDMI audio
  2010-11-11  6:58 ` Clemens Ladisch
@ 2010-11-12 13:16   ` Dan Christensen
  0 siblings, 0 replies; 6+ messages in thread
From: Dan Christensen @ 2010-11-12 13:16 UTC (permalink / raw)
  To: alsa-devel

Clemens Ladisch <clemens@ladisch.de> writes:

> Dan Christensen wrote:
>> When I try to use 5.1 audio over HDMI, the front left and front right
>> channels are correct, but the others are wrong:
>> ...
>> asound.conf:
>> 
>> pcm.!default {
>> type hw
>> card 0
>> device 3
>> }
>
> With this definition, you are disabling ALSA's channel mapping.
...
> or just tell you applications to use the device "hdmi".

I get exactly the same problem if I do

  speaker-test -c6 -twav -Dhdmi

Any other suggestions?

Dan

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: wrong channel mappings for HDMI audio
  2010-11-11  0:27 wrong channel mappings for HDMI audio Dan Christensen
  2010-11-11  6:58 ` Clemens Ladisch
@ 2010-11-12 22:07 ` Anssi Hannula
  2010-11-13  0:26   ` Dan Christensen
  1 sibling, 1 reply; 6+ messages in thread
From: Anssi Hannula @ 2010-11-12 22:07 UTC (permalink / raw)
  To: Dan Christensen; +Cc: alsa-devel

On 11.11.2010 02:27, Dan Christensen wrote:
> [System specs at end.]
> 
> When I try to use 5.1 audio over HDMI, the front left and front right
> channels are correct, but the others are wrong:
> 
> - surround (rear) left and center are swapped
> - surround (rear) right and LFE are swapped
[...]
> James Courtier-Dutton suggested that I report this here, in the hopes
> that ALSA can be taught the correct mapping for my sound card.
> 
> I'm also interested in the best way to work around this in the meantime.
> 
> Thanks for any help!
> 
> Dan
> 
> System specs:
> 
> Motherboard: Gigabyte GA-E7AUM-DS2H
>   http://gigabyte.com/products/product-page.aspx?pid=2946#ov
[...]

This is a known issue, the NVIDIA MCP79/7A HDMI hardware has incorrect
channel mapping.

I reported this several months ago as "Wrong channel order with
multichannel HDMI on MCP7A":
http://www.spinics.net/lists/alsa-devel/msg35948.html
(there are some earlier reports from 2009 as well)

I'm using this workaround at the moment:
 pcm.!hdmi {
     type             route
     slave.pcm
"cards.HDA-Intel.pcm.hdmi.0:CARD=NVidia,AES0=0x4,AES1=0x82,AES2=0x0,AES3=0x2"
     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
 }

(not a perfect workaround as I'm hardcoding AESx instead of using the
ones provided as arguments, but at least you get the idea)

As for the preferred solution to this problem, as far as I understand,
that would be for the driver to have some ioctl that would provide
alsa-lib information about the unusual channel mapping, and alsa-lib
could then remap the channels using a channel remapping plugin.

-- 
Anssi Hannula

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: wrong channel mappings for HDMI audio
  2010-11-12 22:07 ` Anssi Hannula
@ 2010-11-13  0:26   ` Dan Christensen
  2010-11-13  3:32     ` Anssi Hannula
  0 siblings, 1 reply; 6+ messages in thread
From: Dan Christensen @ 2010-11-13  0:26 UTC (permalink / raw)
  To: alsa-devel

Anssi Hannula <anssi.hannula@iki.fi> writes:

> This is a known issue, the NVIDIA MCP79/7A HDMI hardware has incorrect
> channel mapping.
>
> I reported this several months ago as "Wrong channel order with
> multichannel HDMI on MCP7A":
> http://www.spinics.net/lists/alsa-devel/msg35948.html
> (there are some earlier reports from 2009 as well)

Great, thanks for confirming it's not just me.

> I'm using this workaround at the moment:
>  pcm.!hdmi {
>      type             route
>      slave.pcm "cards.HDA-Intel.pcm.hdmi.0:CARD=NVidia,AES0=0x4,AES1=0x82,AES2=0x0,AES3=0x2"
>      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
>  }

I can confirm that this fixes things for me.

> (not a perfect workaround as I'm hardcoding AESx instead of using the
> ones provided as arguments, but at least you get the idea)

I don't understand this comment, but hopefully if I just put the above
in my asound.conf, all should be fine, right?

> As for the preferred solution to this problem, as far as I understand,
> that would be for the driver to have some ioctl that would provide
> alsa-lib information about the unusual channel mapping, and alsa-lib
> could then remap the channels using a channel remapping plugin.

Alternatively, can the fix just be hardcoded for this audio card?

Dan

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: wrong channel mappings for HDMI audio
  2010-11-13  0:26   ` Dan Christensen
@ 2010-11-13  3:32     ` Anssi Hannula
  0 siblings, 0 replies; 6+ messages in thread
From: Anssi Hannula @ 2010-11-13  3:32 UTC (permalink / raw)
  To: alsa-devel

On 13.11.2010 02:26, Dan Christensen wrote:
> Anssi Hannula <anssi.hannula@iki.fi> writes:
> 
>> This is a known issue, the NVIDIA MCP79/7A HDMI hardware has incorrect
>> channel mapping.
>>
>> I reported this several months ago as "Wrong channel order with
>> multichannel HDMI on MCP7A":
>> http://www.spinics.net/lists/alsa-devel/msg35948.html
>> (there are some earlier reports from 2009 as well)
> 
> Great, thanks for confirming it's not just me.
> 
>> I'm using this workaround at the moment:
>>  pcm.!hdmi {
>>      type             route
>>      slave.pcm "cards.HDA-Intel.pcm.hdmi.0:CARD=NVidia,AES0=0x4,AES1=0x82,AES2=0x0,AES3=0x2"
>>      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
>>  }
> 
> I can confirm that this fixes things for me.
> 
>> (not a perfect workaround as I'm hardcoding AESx instead of using the
>> ones provided as arguments, but at least you get the idea)
> 
> I don't understand this comment, but hopefully if I just put the above
> in my asound.conf, all should be fine, right?

Yes, it is just that programs can't specify their own AES parameters. If
everything works with your receiver, it is ok.

>> As for the preferred solution to this problem, as far as I understand,
>> that would be for the driver to have some ioctl that would provide
>> alsa-lib information about the unusual channel mapping, and alsa-lib
>> could then remap the channels using a channel remapping plugin.
> 
> Alternatively, can the fix just be hardcoded for this audio card?

Unfortunately I don't see a way of doing that, as all HDA-Intel codecs
use the same HDA-Intel.conf...
Maybe someone more knowledged knows a way, though.

-- 
Anssi Hannula

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-11-13  3:32 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-11  0:27 wrong channel mappings for HDMI audio Dan Christensen
2010-11-11  6:58 ` Clemens Ladisch
2010-11-12 13:16   ` Dan Christensen
2010-11-12 22:07 ` Anssi Hannula
2010-11-13  0:26   ` Dan Christensen
2010-11-13  3:32     ` Anssi Hannula

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).