All of lore.kernel.org
 help / color / mirror / Atom feed
* HDA HDMI PCM device allocation
@ 2022-09-19 15:56 Jaroslav Kysela
  2022-09-19 17:43 ` Kai Vehmanen
  0 siblings, 1 reply; 3+ messages in thread
From: Jaroslav Kysela @ 2022-09-19 15:56 UTC (permalink / raw)
  To: ALSA development; +Cc: Takashi Iwai, Kai Vehmanen

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@perex.cz>
Linux Sound Maintainer; ALSA Project; Red Hat, Inc.

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

end of thread, other threads:[~2022-09-20  6:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-19 15:56 HDA HDMI PCM device allocation Jaroslav Kysela
2022-09-19 17:43 ` Kai Vehmanen
2022-09-20  6:49   ` Takashi Iwai

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.