All of lore.kernel.org
 help / color / mirror / Atom feed
From: AngeloGioacchino Del Regno  <angelogioacchino.delregno@collabora.com>
To: broonie@kernel.org
Cc: lgirdwood@gmail.com, perex@perex.cz, tiwai@suse.com,
	matthias.bgg@gmail.com, wenst@chromium.org,
	pierre-louis.bossart@linux.intel.com,
	peter.ujfalusi@linux.intel.com, yung-chuan.liao@linux.intel.com,
	ranjani.sridharan@linux.intel.com, kai.vehmanen@linux.intel.com,
	daniel.baluta@nxp.com, trevor.wu@mediatek.com,
	tzungbi@google.com, angelogioacchino.delregno@collabora.com,
	yc.hung@mediatek.com, Allen-KH.Cheng@mediatek.com,
	geert@linux-m68k.org, chunxu.li@mediatek.com,
	alsa-devel@alsa-project.org,
	linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org,
	sound-open-firmware@alsa-project.org, kernel@collabora.com
Subject: [PATCH 1/5] ASoC: mediatek: mt8195-mt6359: Properly register sound card for SOF
Date: Tue,  6 Sep 2022 11:27:23 +0200	[thread overview]
Message-ID: <20220906092727.37324-2-angelogioacchino.delregno@collabora.com> (raw)
In-Reply-To: <20220906092727.37324-1-angelogioacchino.delregno@collabora.com>

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: 0caf1120c583 ("ASoC: mediatek: mt8195: extract SOF common code")
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
---
 sound/soc/mediatek/mt8195/mt8195-mt6359.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/sound/soc/mediatek/mt8195/mt8195-mt6359.c b/sound/soc/mediatek/mt8195/mt8195-mt6359.c
index c530e3fc27e4..961e769602d6 100644
--- a/sound/soc/mediatek/mt8195/mt8195-mt6359.c
+++ b/sound/soc/mediatek/mt8195/mt8195-mt6359.c
@@ -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;
 	}
 
-- 
2.37.2


WARNING: multiple messages have this Message-ID (diff)
From: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
To: broonie@kernel.org
Cc: alsa-devel@alsa-project.org, chunxu.li@mediatek.com,
	Allen-KH.Cheng@mediatek.com, lgirdwood@gmail.com,
	kernel@collabora.com, yung-chuan.liao@linux.intel.com,
	sound-open-firmware@alsa-project.org,
	peter.ujfalusi@linux.intel.com, tiwai@suse.com,
	pierre-louis.bossart@linux.intel.com, tzungbi@google.com,
	geert@linux-m68k.org, ranjani.sridharan@linux.intel.com,
	wenst@chromium.org, trevor.wu@mediatek.com,
	linux-mediatek@lists.infradead.org, matthias.bgg@gmail.com,
	daniel.baluta@nxp.com, linux-arm-kernel@lists.infradead.org,
	angelogioacchino.delregno@collabora.com,
	kai.vehmanen@linux.intel.com, linux-kernel@vger.kernel.org,
	yc.hung@mediatek.com
Subject: [PATCH 1/5] ASoC: mediatek: mt8195-mt6359: Properly register sound card for SOF
Date: Tue,  6 Sep 2022 11:27:23 +0200	[thread overview]
Message-ID: <20220906092727.37324-2-angelogioacchino.delregno@collabora.com> (raw)
In-Reply-To: <20220906092727.37324-1-angelogioacchino.delregno@collabora.com>

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: 0caf1120c583 ("ASoC: mediatek: mt8195: extract SOF common code")
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
---
 sound/soc/mediatek/mt8195/mt8195-mt6359.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/sound/soc/mediatek/mt8195/mt8195-mt6359.c b/sound/soc/mediatek/mt8195/mt8195-mt6359.c
index c530e3fc27e4..961e769602d6 100644
--- a/sound/soc/mediatek/mt8195/mt8195-mt6359.c
+++ b/sound/soc/mediatek/mt8195/mt8195-mt6359.c
@@ -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;
 	}
 
-- 
2.37.2


WARNING: multiple messages have this Message-ID (diff)
From: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
To: broonie@kernel.org
Cc: lgirdwood@gmail.com, perex@perex.cz, tiwai@suse.com,
	matthias.bgg@gmail.com, wenst@chromium.org,
	pierre-louis.bossart@linux.intel.com,
	peter.ujfalusi@linux.intel.com, yung-chuan.liao@linux.intel.com,
	ranjani.sridharan@linux.intel.com, kai.vehmanen@linux.intel.com,
	daniel.baluta@nxp.com, trevor.wu@mediatek.com,
	tzungbi@google.com, angelogioacchino.delregno@collabora.com,
	yc.hung@mediatek.com, Allen-KH.Cheng@mediatek.com,
	geert@linux-m68k.org, chunxu.li@mediatek.com,
	alsa-devel@alsa-project.org,
	linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org,
	sound-open-firmware@alsa-project.org, kernel@collabora.com
Subject: [PATCH 1/5] ASoC: mediatek: mt8195-mt6359: Properly register sound card for SOF
Date: Tue,  6 Sep 2022 11:27:23 +0200	[thread overview]
Message-ID: <20220906092727.37324-2-angelogioacchino.delregno@collabora.com> (raw)
In-Reply-To: <20220906092727.37324-1-angelogioacchino.delregno@collabora.com>

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: 0caf1120c583 ("ASoC: mediatek: mt8195: extract SOF common code")
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
---
 sound/soc/mediatek/mt8195/mt8195-mt6359.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/sound/soc/mediatek/mt8195/mt8195-mt6359.c b/sound/soc/mediatek/mt8195/mt8195-mt6359.c
index c530e3fc27e4..961e769602d6 100644
--- a/sound/soc/mediatek/mt8195/mt8195-mt6359.c
+++ b/sound/soc/mediatek/mt8195/mt8195-mt6359.c
@@ -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;
 	}
 
-- 
2.37.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2022-09-06  9:27 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-06  9:27 [PATCH 0/5] ASoC: Fixes for MT8195 SOF support AngeloGioacchino Del Regno
2022-09-06  9:27 ` AngeloGioacchino Del Regno
2022-09-06  9:27 ` AngeloGioacchino Del Regno
2022-09-06  9:27 ` AngeloGioacchino Del Regno [this message]
2022-09-06  9:27   ` [PATCH 1/5] ASoC: mediatek: mt8195-mt6359: Properly register sound card for SOF AngeloGioacchino Del Regno
2022-09-06  9:27   ` AngeloGioacchino Del Regno
2022-09-06  9:27 ` [PATCH 2/5] ASoC: SOF: mediatek: mt8195: Import namespace SND_SOC_SOF_MTK_COMMON AngeloGioacchino Del Regno
2022-09-06  9:27   ` AngeloGioacchino Del Regno
2022-09-06  9:27   ` AngeloGioacchino Del Regno
2022-09-06  9:27 ` [PATCH 3/5] ASoC: SOF: mediatek: mt8195: Add mailbox generic callbacks for IPC AngeloGioacchino Del Regno
2022-09-06  9:27   ` AngeloGioacchino Del Regno
2022-09-06  9:27   ` AngeloGioacchino Del Regno
2022-09-06  9:27 ` [PATCH 4/5] ASoC: SOF: mediatek: mt8195: Add generic pcm_{open,close} callbacks AngeloGioacchino Del Regno
2022-09-06  9:27   ` AngeloGioacchino Del Regno
2022-09-06  9:27   ` [PATCH 4/5] ASoC: SOF: mediatek: mt8195: Add generic pcm_{open, close} callbacks AngeloGioacchino Del Regno
2022-09-06  9:27 ` [PATCH 5/5] ASoC: SOF: mediatek: mt8195: Add devicetree support to select topologies AngeloGioacchino Del Regno
2022-09-06  9:27   ` AngeloGioacchino Del Regno
2022-09-06  9:27   ` AngeloGioacchino Del Regno
2022-09-07 14:29 ` [PATCH 0/5] ASoC: Fixes for MT8195 SOF support Mark Brown
2022-09-07 14:29   ` Mark Brown
2022-09-07 14:29   ` Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220906092727.37324-2-angelogioacchino.delregno@collabora.com \
    --to=angelogioacchino.delregno@collabora.com \
    --cc=Allen-KH.Cheng@mediatek.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=chunxu.li@mediatek.com \
    --cc=daniel.baluta@nxp.com \
    --cc=geert@linux-m68k.org \
    --cc=kai.vehmanen@linux.intel.com \
    --cc=kernel@collabora.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=matthias.bgg@gmail.com \
    --cc=perex@perex.cz \
    --cc=peter.ujfalusi@linux.intel.com \
    --cc=pierre-louis.bossart@linux.intel.com \
    --cc=ranjani.sridharan@linux.intel.com \
    --cc=sound-open-firmware@alsa-project.org \
    --cc=tiwai@suse.com \
    --cc=trevor.wu@mediatek.com \
    --cc=tzungbi@google.com \
    --cc=wenst@chromium.org \
    --cc=yc.hung@mediatek.com \
    --cc=yung-chuan.liao@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.