sof icon indicating copy to clipboard operation
sof copied to clipboard

sof-icl-es8336-ssp0.tplg: HDMI PCM/pipeline ids (5/6/7) mismatch iDisp/HDA token IDs (3/4/5) — causes sof IPC hw_params errors

Open marmabiswas123 opened this issue 1 month ago • 16 comments

Summary When booting with intel/sof/sof-icl.ri + topology intel/sof-tplg/sof-icl-es8336-ssp0.tplg, the SOF driver reports IPC errors for HDMI playback streams and ASoC hw_params failures (ipc tx error ... -5, sof_ipc3_pcm_hw_params), caused by a mismatch between HDMI PCM IDs / pipeline indices and the iDisp/HDA IDs encoded in the topology. This causes HDMI PCM hw_params IPC failures (HDMI streams fail to start). See dmesg excerpts below and attached decompiled topology file.

Impact

HDMI PCM (iDisp) playback streams fail to set hw_params → audio over HDMI unavailable.

IPC errors reported in dmesg: ipc tx error for 0x60010000 ... -5 and sof_ipc3_pcm_hw_params: pcm6 (HDMI 2) ... STREAM_PCM_PARAMS ipc failed.

Affects machines using this topology with ES8336 codec + ICL SOF firmware.

Environment / versions (from dmesg)

Linux dmesg excerpt (relevant lines):

[    0.068320] software IO TLB: area num 4.
[    0.679839] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <[email protected]>
[    0.784715] PCI-DMA: Using software bounce buffering for IO (SWIOTLB)
[    0.784718] software IO TLB: mapped [mem 0x000000000b000000-0x000000000f000000] (64MB)
[    4.090941] sof-audio-pci-intel-icl 0000:00:1f.3: enabling device (0000 -> 0002)
[    4.091097] sof-audio-pci-intel-icl 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if 0x040380
[    4.091161] sof-audio-pci-intel-icl 0000:00:1f.3: bound 0000:00:02.0 (ops intel_audio_component_bind_ops [i915])
[    4.098595] sof-audio-pci-intel-icl 0000:00:1f.3: use msi interrupt mode
[    4.113422] sof-audio-pci-intel-icl 0000:00:1f.3: hda codecs found, mask 4
[    4.113427] sof-audio-pci-intel-icl 0000:00:1f.3: BT link detected in NHLT tables: 0x0
[    4.113429] sof-audio-pci-intel-icl 0000:00:1f.3: DMICs detected in NHLT tables: 0
[    4.113431] sof-audio-pci-intel-icl 0000:00:1f.3: NHLT device I2S(4) detected, ssp_mask 0x1
[    4.113433] sof-audio-pci-intel-icl 0000:00:1f.3: Overriding topology with MCLK mask 0x1 from NHLT
[    4.120484] sof-audio-pci-intel-icl 0000:00:1f.3: Firmware paths/files for ipc type 0:
[    4.120490] sof-audio-pci-intel-icl 0000:00:1f.3:  Firmware file:     intel/sof/sof-icl.ri
[    4.120493] sof-audio-pci-intel-icl 0000:00:1f.3:  Topology file:     intel/sof-tplg/sof-icl-es8336-ssp0.tplg
[    4.121155] sof-audio-pci-intel-icl 0000:00:1f.3: Firmware info: version 2:2:0-57864
[    4.121160] sof-audio-pci-intel-icl 0000:00:1f.3: Firmware: ABI 3:22:1 Kernel ABI 3:23:1
[    4.210820] sof-audio-pci-intel-icl 0000:00:1f.3: Firmware info: version 2:2:0-57864
[    4.210827] sof-audio-pci-intel-icl 0000:00:1f.3: Firmware: ABI 3:22:1 Kernel ABI 3:23:1
[    4.220599] sof-essx8336 sof-essx8336: quirk mask 0x0
[    4.220604] sof-essx8336 sof-essx8336: quirk SSP0
[    4.221463] sof-audio-pci-intel-icl 0000:00:1f.3: Topology: ABI 3:22:1 Kernel ABI 3:23:1
[    4.221650] sof-essx8336 sof-essx8336: ASoC: Parent card not yet available, widget card binding deferred
[    4.551088] sof-essx8336 sof-essx8336: hda_dsp_hdmi_build_controls: no PCM in topology for HDMI converter 3
[    4.564017] input: sof-essx8336 Headset as /devices/pci0000:00/0000:00:1f.3/sof-essx8336/sound/card0/input12
[    4.564073] input: sof-essx8336 HDMI/DP,pcm=5 as /devices/pci0000:00/0000:00:1f.3/sof-essx8336/sound/card0/input13
[    4.564116] input: sof-essx8336 HDMI/DP,pcm=6 as /devices/pci0000:00/0000:00:1f.3/sof-essx8336/sound/card0/input14
[    4.564168] input: sof-essx8336 HDMI/DP,pcm=7 as /devices/pci0000:00/0000:00:1f.3/sof-essx8336/sound/card0/input15
[    8.620950] sof-audio-pci-intel-icl 0000:00:1f.3: ipc tx error for 0x60010000 (msg/reply size: 108/20): -5
[    8.620960] sof-audio-pci-intel-icl 0000:00:1f.3: sof_ipc3_pcm_hw_params: pcm6 (HDMI 2), dir 0: STREAM_PCM_PARAMS ipc failed for stream_tag 1
[    8.620964] sof-audio-pci-intel-icl 0000:00:1f.3: ASoC error (-5): at snd_soc_pcm_component_hw_params() on 0000:00:1f.3

Reproduction steps

Boot the machine with the included topology (intel/sof-tplg/sof-icl-es8336-ssp0.tplg) and SOF firmware intel/sof/sof-icl.ri.

Attempt to open an HDMI playback device (e.g., play audio to HDMI or run aplay -D hw:0,6 ... for PCM6).

Observe dmesg errors shown above and that HDMI audio is not available.

Raw evidence / logs

Key topology pieces (excerpts from the decompiled file):

sof-icl-es8336-ssp0-tplg.conf.txt

SectionPCM shows:

SectionPCM {
	'ES8336' {
		dai.'ES8336 0'.id 0
		pcm {
			playback.capabilities 'Passthrough Playback 0'
			capture.capabilities 'Low Latency Capture 0'
		}
	}
	'HDMI 1' {
		id 5
		dai.'HDMI 1 5'.id 5
		pcm.playback.capabilities 'Passthrough Playback 5'
	}
	'HDMI 2' {
		id 6
		dai.'HDMI 2 6'.id 6
		pcm.playback.capabilities 'Passthrough Playback 6'
	}
	'HDMI 3' {
		id 7
		dai.'HDMI 3 7'.id 7
		pcm.playback.capabilities 'Passthrough Playback 7'
	}
}

SectionBE shows:

SectionBE {
	SSP0-Codec.data 'SSP0-Codec:tuple0'
	iDisp1 {
		id 3
		default_hw_conf_id 3
		data 'iDisp1:tuple0'
	}
	iDisp2 {
		id 4
		default_hw_conf_id 4
		data 'iDisp2:tuple0'
	}
	iDisp3 {
		id 5
		default_hw_conf_id 5
		data 'iDisp3:tuple0'
	}
}

Vendor tuples (HDA3/HDA4/HDA5) encode token155 values:

HDA3.OUT:tuple0 → token155 3

HDA4.OUT:tuple0 → token155 4

HDA5.OUT:tuple0 → token155 5

Observation: PCM indexes for HDMI are 5,6,7 while iDisp / HDA token indices are 3,4,5. Pipelines are declared with indices 5/6/7 (for PCM5/6/7) but HDA tuple token155 values refer to 3/4/5. This mismatch between the pipeline/PCM IDs and the HDA/iDisp IDs leads to incorrect mapping when SOF builds the IPC objects for HDMI, causing STREAM_PCM_PARAMS IPC to be sent with wrong IDs/params and the firmware to return error (-5).

Root cause (analysis)

The topology assigns PCM / pipeline IDs 5, 6, 7 to HDMI PCMs (SectionPCM and pipeline sections), but the iDisp/HDA endpoints and their tuples (SectionBE VendorTuples token155) are encoded as 3, 4, 5. The mismatch results in the driver building IPC messages referencing pipelines/devices that do not match the HDA endpoint IDs encoded in the topology, and the firmware rejects the hw_params IPC (error -5). In short: HDA token/pipeline indices are inconsistent inside the topology (PCM/pipeline indices ≠ HDA/iDisp token indices).

Proposed fix (concrete)

There are two consistent fixes — pick one and apply to the topology:

Option A (recommended): Update the iDisp entries and the token155 values in the HDA tuples to match PCM/pipeline IDs (5/6/7). This is minimally invasive because the PCM/pipeline blocks already use 5/6/7.

Option B (alternate): Renumber the PCM/pipeline entries to 3/4/5 to match current iDisp/HDA token indices. This would require renaming the PCM playback capability names (PCM5P/PCM6P/PCM7P etc.) and pipeline indices accordingly.

marmabiswas123 avatar Nov 21 '25 11:11 marmabiswas123