HDA HDMI PCM device allocation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I am trying to fix some issues in UCM for the HDA HDMI devices [1][2]. I would like to summary the current situation at first (correct me, if I miss something):

We have two methods to map the PINs in the HDA HDMI driver to the PCM devices (legacy/static - 1:1 mapping, dynamic - used for new devices with the MST capability). There is also set of converters in each HDMI codec and the number of simultaneously used PCM devices cannot go beyond this count of converters in hardware (otherwise -EBUSY error is returned). The count of converters is 3 or 4 depending on the hardware.

Things to discuss:

It seems quite straight to limit the count of created PCMs to the count of converters. We cannot use more anyway and it does not help, if more PCM devices are allocated (and Jacks reported) to applications when they cannot be used simultaneously.

Legacy/static mapping should be converted to dynamic (unless the count of created PCM devices is equal to the count of codec converters).

There may be 1:1 mapping between the converter and the PCM device to make things easier.

There is a corner case, when more HDMI devices are connected than the count of converters. In this case, an extra method (a module parameter and/or a control element and/or procfs) may be used to filter unwanted HDMI devices. It may be a bit difficult to select the proper filtering key - it may be the PIN/MST device hash or so. The driver may report this key in eld#* files (procfs).

Impact to applications:

Those days, pulseaudio or pipewire servers are mostly used on the current hardware. Both servers share the legacy probe code for HDMI devices - they are trying to open PCM devices sequentially and check for the error code. There should not be a problem when the connected HDMI devices do not go beyond the count of converters. A minor issue is that the name of the used sink/port may be different (users may be forced to reselect the output path).

For other applications, the PCM device assigned to the connected HDMI device may be different (available in a different ALSA device name). I do not think that it's a big issue. It should be easy solvable with an updated software configuration.


Let me know about your opinion about this.

					Thank you,
						Jaroslav

[1] https://github.com/alsa-project/alsa-lib/issues/245
[2] https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/2481

--
Jaroslav Kysela <perex@xxxxxxxx>
Linux Sound Maintainer; ALSA Project; Red Hat, Inc.



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux