Repository navigation
Conversation
|
Fixes: #4594 |
| int num_links, link_index = 0; | ||
| char *name, *cpu_dai_name; | ||
| char *codec_name, *codec_dai_name; | ||
| int codec_index, hdmi_num; |
There was a problem hiding this comment.
i really don't like two variables without any correlation on the same line. It's legal in C but it looks weird. Why would we group codec_index and hdmi_num?
| dev_dbg(dev, "sdw %d, ssp %d, dmic %d, hdmi %d, bt: %d\n", | ||
| sdw_be_num, ssp_num, dmic_num, hdmi_num, bt_num); | ||
| sdw_be_num, ssp_num, dmic_num, | ||
| ctx->hdmi.idisp_codec ? hdmi_num : 0, bt_num); |
f32bd2f to
1ca9c97
Compare
|
Changes since v1:
|
1ca9c97 to
588a533
Compare
|
Changes since v2:
|
The topology files for SDW devices require HDMI dai links to be present and this is granted under normal conditions but in case of special use cases the display (i915) driver might not be enabled due to deny-listing, booting with nomodeset or just not compiled at all. This should not block the non HDMI audio to be usable so register the dai links unconditionally. The code has been prepared for this and in case of no HDMI audio the link is created with dummy codec. Closes: thesofproject#4594 Closes: thesofproject#4648 Signed-off-by: Peter Ujfalusi <[email protected]>
588a533 to
b19702e
Compare
|
Changes since v3:
|
|
@plbossart, @keqiaozhang, internal test runs: 33544 and 33550. So the card forms with this patch but the non existent HDMI is not working. Let me see if I can figure out something for this. |
|
This is the exact behavior with HDA machines also. If the HDMI is disabled (nomodeset or denylisted/not compiled display driver) then attempt to play to HDMI PCM results: I'm not sure how this can be fixed, dummy dai almost works (iow does not). I can get it probe with that with a hack in sound/soc/sof/topology.c : diff --git a/sound/soc/sof/topology.c b/sound/soc/sof/topology.c
index a3a3af252259..b123f4ee9b48 100644
--- a/sound/soc/sof/topology.c
+++ b/sound/soc/sof/topology.c
@@ -1089,6 +1091,8 @@ static int sof_connect_dai_widget(struct snd_soc_component *scomp,
if (!snd_soc_dai_get_widget(cpu_dai, stream)) {
snd_soc_dai_set_widget(cpu_dai, stream, w);
break;
+ } else if (!strcmp(cpu_dai->name, "snd-soc-dummy-dai")) {
+ break;
}
}
if (i == rtd->dai_link->num_cpus) {But then the DAPM route is messed up badly and the playback attempt will fail with different error. I'm not sure if we want or need to fix that and to how... FWIW, before b785e24 the codec for HDMI did showed up and that's why the playback did not failed: vs after the patch: |
The topology files for SDW devices require HDMI dai links to be present and
this is granted under normal conditions but in case of special use cases
the display (i915) driver might not be enabled due to deny-listing,
booting with nomodeset or just not compiled at all.
This should not block the non HDMI audio to be usable so register the dai
links unconditionally. The code has been prepared for this and in case of
no HDMI audio the link is created with dummy codec.
Closes: #4594
Closes: #4648