Ticket #626 (closed defect: wontfix)

Opened 3 years ago

Last modified 2 years ago

Some nvidia hdmis now supports more than 2 channels

Reported by: howl Owned by: lennart
Milestone: Component: module-alsa-*
Keywords: Cc: howl.nsp@…

Description

Not sure if this must go here or to alsa.

In kernel 2.6.31-rc1 tag a patch to support 8 channels hdmi found on some "recent" nvidia gpus was merged.

I have been messing arround with pulseaudio 0.9.16 and when using autodetection the hdmi is shown as stereo only, also specifying 8 channels default in pulseaudio config. This is shown in the first screenshot.

When setting manually alsa-source module with hdmi:0 then pulseaudio shows the 8 channels but with a wrong mapping. This is shown in the second screenshot. Setting 10 channels default in the pulseaudio config the correct mapping is shown, Front left, front right, Rear left, Rear right, Center and LFE.

Attachments

hdmi perfil.jpg (118.8 kB) - added by howl 3 years ago.
hdmi manual.png (176.9 kB) - added by howl 3 years ago.

Change History

Changed 3 years ago by howl

Changed 3 years ago by howl

Changed 3 years ago by lennart

To my knowledge HDMI has now fixed channel mapping, so some negotiation of channel mapping needs to take place, and I don't see how ALSA would support that.

In PA 0.9.16 it is very easy to extend the list of know mappings, by editing /usr/share/pulseaudio/alsa-mixer/profile-sets/default.conf. So if there is a an ALSA device string which has a known channel mapping it is very easy to add it to the list of profiles PA can probe for.

In older versions you can still use module-sink directly and use channel_map to define the channel mapping manually.

Changed 3 years ago by lennart

  • component changed from module-hal-detect to module-alsa-*

Changed 3 years ago by howl

  • cc howl.nsp@… added

With previous module versions pulseaudio says that the device corresponding to the hdmi only supports 2 channels if more than 2 is set in the config for default and really it only shows max 2 channels but with the latest module present in 2.6.31 no message is shown the mixer shows channels up to 8. Could be a way to test or to ask how many channels a device can have at max.

Changed 3 years ago by lennart

Sure we can ask how many channels a device has. However the problem is we wouldn't now how those channels are mapped.

I.e. which channel is L? Which R? What is Front? What Rear? Is there LFE? Is ther a Center? and so on. We cannot map which channel belongs to which position. That's why we cannot autoconfigure this for multichannel audio.

For stereo this is easy since 0 is almost certainly left, and 1 is almost certainly right. But for anything beyond that we have no clue.

Changed 2 years ago by howl

Could not be mapped to a defaul channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe,side-left,side-right like the analog 7.1? following the same rule analog 5.1 or 7.1 should be automapped as some cards can have switched the center and lfe analog channels.

Mine is using the default or at least the more used mapping, could be interesting to know what combination is the most used by hdmi manufactures and use it by default.

This is the mapping I have done as should be usable for all the nvidia hdmis, if people with 8-ch amd or intel hdmis can test if it works with them I thinks that this could be the default mapping.

[Mapping hdmi-surround-71] description = Digital Surround 7.1 (HDMI) device-strings = hdmi:%f channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe,side-left,side-right priority = 6 direction = output

Changed 2 years ago by howl

Sorry I writed the code wrong:

[Mapping hdmi-surround-71]
description = Digital Surround 7.1 (HDMI)
device-strings = hdmi:%f
channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe,side-left,side-right
priority = 6
direction = output

I put the description to match the other outputs because without it in the profile selector hdmi-surround-71 is shown instead.

Changed 2 years ago by lennart

For analog, ALSA provides device strings like "surround51:xx" which can be used to imply a very specific channel order. However, there is only one "hdmi:xxxx" device string which does not imply any channel order. HDMI on the hw level is very flexible in the selection of channel maps. For every number of channels it supports a number of different number of maps -- which is negotiated between the PC and the hdmi receiver.

If we'd add a 'default' mapping for multichannel here then this might work for you, but won't work people with dfferent hardware.

To support this properly we need to wait until ALSA introduces a proper channel map negotiation API, or at least hdmi device strings that imply a channel order (i.e. 'hdmi-surround51:xxxx' or something like that. But it doesn't do that right now.

Changed 2 years ago by howl

  • status changed from new to closed
  • resolution set to wontfix

Thanks for the explanation with surround51:x I knew this type of devices output but didn't see the implication in the channel mapping. If you let me I set this as wontfix. Anyway i'm going to attach in another bug I opened a way to have in pulseaudio options like graphical channel remaping and multiple output without doing it in text and without the need of profiles but this in the other one.

Note: See TracTickets for help on using tickets.