Repository navigation
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
Replacing the legacy HDA topology fallback with dummy prevents the sound card from loading when function topology is disabled or no fragments are found, even if the legacy topology is installed.
1 open issue
What changed in this PR
This PR adds function-topology support to the generic HDA machine driver (skl_hda_dsp_generic), extending support already available for SoundWire and I2S machines.
Changes:
- Selects topology fragments for HDA codecs, HDMI, DMIC, and SSP links.
- Registers the HDA fragment-selection callback.
- Encodes the Intel platform name for constructing fragment filenames.
| File | Description |
|---|---|
sound/soc/sof/intel/hda.c |
Adds platform-specific topology naming during HDA machine selection. |
sound/soc/intel/common/sof-function-topology-lib.h |
Declares the HDA topology-selection helper. |
sound/soc/intel/common/sof-function-topology-lib.c |
Implements HDA fragment selection and filename generation. |
sound/soc/intel/common/soc-acpi-intel-hda-match.c |
Registers the helper for the generic HDA machine. |
Review effort: Balanced
| * Analog Playback and Capture - HDA analog codec | ||
| * Digital Playback and Capture - HDA digital codec (same tplg as the analog) | ||
| * dmic01/dmic16k - PCH DMIC | ||
| * SSP<n>-BT - BT offload |
There was a problem hiding this comment.
How HDMI-IN and UAOL can be added here?
There was a problem hiding this comment.
HDMI-IN is already supported by get_ssp_tplg_dev(). Regarding UAOL, we need to add a new tplg_device_id and add a else if (strstr(dai_link->name, "<UAOL link name>")
There was a problem hiding this comment.
like this:
63c7689
and will work on hda as well?
There was a problem hiding this comment.
like this: 63c7689
and will work on hda as well?
It only works for SDW, but the same approach will work on HDA, too.
3dbfe9e to
365c105
Compare
There was a problem hiding this comment.
🟡 Changes recommended
Zero-microphone configurations incorrectly trigger monolithic fallback because DMIC prelinks are still processed; skip them when the count is zero while preserving fallback for unsupported nonzero counts.
1 open issue
1 resolved since last review
Review effort: Balanced
Add sof_hda_get_tplg_files() callback for the skl_hda_dsp_generic machine driver. It finds the function topologies according to the dai links created by the machine driver: iDisp (HDMI), HDA analog/digital codecs, PCH DMIC, SSP BT offload and SSP HDMI IN. The analog and digital HDA codec dai links share one topology. Like the HDMI one, it has no NHLT blob and doesn't depend on the platform, so its name has no platform: sof-hda-id<BE id>.tplg. When a dai link has no function topology, e.g. with 1 or 3 dmics, no function topology is used so that the monolithic topology is loaded instead, unless best effort is requested. Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Set get_function_tplg_files to sof_hda_get_tplg_files() so that the skl_hda_dsp_generic machine can use function topologies. The monolithic sof-hda-generic topologies are still used when any of the function topologies is missing. The HDA and HDMI function topologies are platform independent, so an HDA machine with only HDA codec and HDMI links uses function topologies on any platform once they are installed, the same as with the platform independent sof-hda-generic topologies. Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
The platform name is needed to form the file names of the DMIC and SSP function topologies, which depend on the platform NHLT blobs. get_platform_name() takes it from sof_tplg_filename, but the one of the HDA generic match table is platform independent, and it can't be replaced: it is also the monolithic topology that is used when the function topologies are not available, e.g. on platforms that have no function topologies or with an older sof-firmware. mach_params.platform can't be used either, it is the name of the ASoC platform component the machine drivers bind their dai links to. Add mach_params.tplg_platform, set it to the platform name in hda_generic_machine_select(), and use it in get_platform_name() when it is set. Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
365c105 to
5f3cbbe
Compare
There was a problem hiding this comment.
🟡 Changes recommended
Two critical issues remain: fragment-only installations still fail probe because the monolithic topology is required prematurely, and BT fragment allocation failures are silently ignored, allowing an incomplete topology set to load.
2 open issues
1 resolved since last review
Review effort: Balanced
| .drv_name = "skl_hda_dsp_generic", | ||
| .sof_tplg_filename = "sof-hda-generic", /* the tplg suffix is added at run time */ | ||
| .tplg_quirk_mask = SND_SOC_ACPI_TPLG_INTEL_DMIC_NUMBER, | ||
| .get_function_tplg_files = sof_hda_get_tplg_files, |
| if (get_ssp_tplg_dev(card->dev, dai_link, &hdmi_in_mask, | ||
| &tplg_dev, &tplg_dev_name) < 0) | ||
| continue; |


The SoundWire and I2S machine can already use function topology. This series adds the same support to
the HDA generic machine driver (skl_hda_dsp_generic).