* [PATCH] ASoC: ti: omap-hdmi: Re-add dai_link->platform to fix card init
@ 2025-05-31 14:13 Yuuki NAGAO
2025-06-02 15:50 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: Yuuki NAGAO @ 2025-05-31 14:13 UTC (permalink / raw)
To: Peter Ujfalusi, Jarkko Nikula, Liam Girdwood, Mark Brown,
Jaroslav Kysela, Takashi Iwai
Cc: linux-sound, linux-omap, linux-kernel, Yuuki NAGAO
The removed dai_link->platform component cause a fail which
is exposed at runtime. (ex: when a sound tool is used)
This patch re-adds the dai_link->platform component to have
a full card registered.
Before this patch:
$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 1: HDMI [HDMI], device 0: HDMI snd-soc-dummy-dai-0 []
Subdevices: 1/1
Subdevice #0: subdevice #0
$ speaker-test -D plughw:1,0 -t sine
speaker-test 1.2.8
Playback device is plughw:1,0
Stream parameters are 48000Hz, S16_LE, 1 channels
Sine wave rate is 440.0000Hz
Playback open error: -22,Invalid argument
After this patch which restores the platform component:
$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: HDMI [HDMI], device 0: HDMI snd-soc-dummy-dai-0 [HDMI snd-soc-dummy-dai-0]
Subdevices: 0/1
Subdevice #0: subdevice #0
-> Resolve the playback error.
Fixes: 3b0db249cf8f ("ASoC: ti: remove unnecessary dai_link->platform")
Signed-off-by: Yuuki NAGAO <wf.yn386@gmail.com>
---
sound/soc/ti/omap-hdmi.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/sound/soc/ti/omap-hdmi.c b/sound/soc/ti/omap-hdmi.c
index cf43ac19c4a6..55e7cb96858f 100644
--- a/sound/soc/ti/omap-hdmi.c
+++ b/sound/soc/ti/omap-hdmi.c
@@ -361,17 +361,20 @@ static int omap_hdmi_audio_probe(struct platform_device *pdev)
if (!card->dai_link)
return -ENOMEM;
- compnent = devm_kzalloc(dev, sizeof(*compnent), GFP_KERNEL);
+ compnent = devm_kzalloc(dev, 2 * sizeof(*compnent), GFP_KERNEL);
if (!compnent)
return -ENOMEM;
- card->dai_link->cpus = compnent;
+ card->dai_link->cpus = &compnent[0];
card->dai_link->num_cpus = 1;
card->dai_link->codecs = &snd_soc_dummy_dlc;
card->dai_link->num_codecs = 1;
+ card->dai_link->platforms = &compnent[1];
+ card->dai_link->num_platforms = 1;
card->dai_link->name = card->name;
card->dai_link->stream_name = card->name;
card->dai_link->cpus->dai_name = dev_name(ad->dssdev);
+ card->dai_link->platforms->name = dev_name(ad->dssdev);
card->num_links = 1;
card->dev = dev;
--
2.43.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ASoC: ti: omap-hdmi: Re-add dai_link->platform to fix card init
2025-05-31 14:13 [PATCH] ASoC: ti: omap-hdmi: Re-add dai_link->platform to fix card init Yuuki NAGAO
@ 2025-06-02 15:50 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2025-06-02 15:50 UTC (permalink / raw)
To: Peter Ujfalusi, Jarkko Nikula, Liam Girdwood, Jaroslav Kysela,
Takashi Iwai, Yuuki NAGAO
Cc: linux-sound, linux-omap, linux-kernel
On Sat, 31 May 2025 23:13:41 +0900, Yuuki NAGAO wrote:
> The removed dai_link->platform component cause a fail which
> is exposed at runtime. (ex: when a sound tool is used)
> This patch re-adds the dai_link->platform component to have
> a full card registered.
>
> Before this patch:
> $ aplay -l
> **** List of PLAYBACK Hardware Devices ****
> card 1: HDMI [HDMI], device 0: HDMI snd-soc-dummy-dai-0 []
> Subdevices: 1/1
> Subdevice #0: subdevice #0
>
> [...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/1] ASoC: ti: omap-hdmi: Re-add dai_link->platform to fix card init
commit: bae071aa7bcd034054cec91666c80f812adeccd9
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-06-02 15:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-31 14:13 [PATCH] ASoC: ti: omap-hdmi: Re-add dai_link->platform to fix card init Yuuki NAGAO
2025-06-02 15:50 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox