UCM vs SOF vs HDMI passthrough

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

 



Hi,

afaik for HDMI passthrough there should be a usable PCM mapping present
for user space:
aplay -L | grep hdmi
hdmi:CARD=PCH,DEV=0
hdmi:CARD=PCH,DEV=1
hdmi:CARD=PCH,DEV=2

or similar.

SOF with IPC4 (Meteor Lake and newer or some TGL/ADL setups with 2024.03
release) it is possible to use passthrough via HDMI technically but we
are lacking the "hdmi:..." PCMs, so in reality it is not usable for
applications. Afaik.

So far I managed to cook up two ways of doing this, but neither one is
good enough as they will create the "hdmi:..." for both IPC3 and IPC4
setups and IPC3 firmware cannot support passthrough.

Setups:
sof-hda-dsp cards have HDMI PCMs: pcm3-5
sof-soundwire cards have HDMI PCMs: pcm5-7

[A] use card profile
Add these to /usr/share/alsa/cards/aliases.conf:
sof-hda-dsp cards.sof-hda-dsp
sof-soundwire cards.sof-soundwire

Create the minimal sof-hda-ds.conf and sof-soundwire.conf to handle the
two types of HDMI PCM numbering.

[B] Using UCM
https://github.com/ujfalusi/alsa-ucm-conf/tree/topic/sof-hdmi

It is using the BootSequence[] to create three files:
[1] /var/lib/alsa/conf.d/42-sof-hdmi.conf
[2] /var/lib/alsa/card[card_number].conf.d/30-sof-hdmi-common.conf
[3] /var/lib/alsa/card[card_number].conf.d/31-sof-hdmi.conf

[1] includes the pcm/iec958.conf and pcm/hdmi.conf to global space of
    alsaconf to be used by the card macros
[2] Card specific macros for hdmi PCM definition, ampping
[3] Card specific definitions of the three HDMI port

In both case I have the needed PCMs:
aplay -L | grep hdmi

hdmi:CARD=sofhdadsp,DEV=0
hdmi:CARD=sofhdadsp,DEV=1
hdmi:CARD=sofhdadsp,DEV=2
or
hdmi:CARD=sofsoundwire,DEV=0
hdmi:CARD=sofsoundwire,DEV=1
hdmi:CARD=sofsoundwire,DEV=2

But it is unconditional and they will be created for all sof-hda-dsp and
sof-soundwire cards.

I would really appreciate some guidance on how we can achieve this
correctly (the code for the UCM way leaves much to be desired, I know).

How can this be done conditionally?
We can set the HDMI PCMs to advertise IEC958_SUBFRAME_LE for IPC4 only,
but how can we use that?
Should we add some parameter to 'amixer -c0 info', like ipc_version:4/3,
so if the ipc_version is 3 or missing we assume that passthrough is not
supported?

Thanks for the help,
Péter



[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