Skip to content

Commit

Permalink
ASoC: mediatek: mt8195-mt6359: Properly register sound card for SOF
Browse files Browse the repository at this point in the history
[ Upstream commit 64ec924 ]

Adding a probe callback on this snd_soc_card is required when
Sound Open Firmware support is desired, as we need to appropriately
populate the stream_name for SOF to be able to bind widgets.
Failing to do so will produce errors when applying the SOF topology
leading to card registration failure (so, no sound).
While at it, also make sure to fill the topology_shortname as required.

Fixes: 0caf112 ("ASoC: mediatek: mt8195: extract SOF common code")
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20220906092727.37324-2-angelogioacchino.delregno@collabora.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
AngeloGioacchino Del Regno authored and gregkh committed Oct 21, 2022
1 parent cfbdf6a commit c46550b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions sound/soc/mediatek/mt8195/mt8195-mt6359.c
Original file line number Diff line number Diff line change
Expand Up @@ -1383,7 +1383,13 @@ static int mt8195_mt6359_dev_probe(struct platform_device *pdev)
sof_priv->num_streams = ARRAY_SIZE(g_sof_conn_streams);
sof_priv->sof_dai_link_fixup = mt8195_dai_link_fixup;
soc_card_data->sof_priv = sof_priv;
card->probe = mtk_sof_card_probe;
card->late_probe = mtk_sof_card_late_probe;
if (!card->topology_shortname_created) {
snprintf(card->topology_shortname, 32, "sof-%s", card->name);
card->topology_shortname_created = true;
}
card->name = card->topology_shortname;
sof_on = 1;
}

Expand Down

0 comments on commit c46550b

Please sign in to comment.