ASoC: soc-topology: fix modern dai link style
PATCH 1/1 ASoC: soc-topology: fix modern dai link style
The topology code can create a FE DAI link but did not allocate the memory for a platform component - whose name can be overridden at a later time.
--- sound/soc/soc-topology.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
sound/soc/soc-topology.c +6 -2
@@ -1882,8 +1882,8 @@ static int soc_tplg_fe_link_create(struct soc_tplg *tplg,struct snd_soc_dai_link_component *dlc;int ret; -/* link + cpu + codec */ - link =kzalloc (sizeof (*link) + (2 *sizeof (*dlc)),GFP_KERNEL ); +/* link + cpu + codec + platform */ + link =kzalloc (sizeof (*link) + (3 *sizeof (*dlc)),GFP_KERNEL );if (link ==NULL )return -ENOMEM ;
@@ -1891,9 +1891,11 @@ static int soc_tplg_fe_link_create(struct soc_tplg *tplg, link->cpus = &dlc[0 ]; link->codecs = &dlc[1 ]; + link->platforms = &dlc[2 ]; link->num_cpus =1 ; link->num_codecs =1 ; + link->num_platforms =1 ;if (strlen (pcm->pcm_name)) { link->name =kstrdup (pcm->pcm_name,GFP_KERNEL );
@@ -1907,6 +1909,8 @@ static int soc_tplg_fe_link_create(struct soc_tplg *tplg, link->codecs->name ="snd-soc-dummy" ; link->codecs->dai_name ="snd-soc-dummy-dai" ; + link->platforms->name ="snd-soc-dummy" ; +/* enable DPCM */ link->dynamic =1 ; link->dpcm_playback =le32_to_cpu (pcm->playback);
Signature · 1 line
2.20.1
Mark Brown
maintainerApplied "ASoC: soc-topology: fix modern dai link style" to the asoc tree
The patch
ASoC: soc-topology: fix modern dai link style
has been applied to the asoc tree at
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-5.3
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
Quoted 1 line
From
3e6de89409bf7ad149bfb05dd0dce6c5678ea0a8Mon Sep 17 00:00:00 2001
From: Pierre-Louis Bossart <[email protected]>
Date: Wed, 12 Jun 2019 11:38:45 -0500
Subject: [PATCH] ASoC: soc-topology: fix modern dai link style
The topology code can create a FE DAI link but did not allocate the memory for a platform component - whose name can be overridden at a later time.
--- sound/soc/soc-topology.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
sound/soc/soc-topology.c +6 -2
@@ -1882,8 +1882,8 @@ static int soc_tplg_fe_link_create(struct soc_tplg *tplg,struct snd_soc_dai_link_component *dlc;int ret; -/* link + cpu + codec */ - link =kzalloc (sizeof (*link) + (2 *sizeof (*dlc)),GFP_KERNEL ); +/* link + cpu + codec + platform */ + link =kzalloc (sizeof (*link) + (3 *sizeof (*dlc)),GFP_KERNEL );if (link ==NULL )return -ENOMEM ;
@@ -1891,9 +1891,11 @@ static int soc_tplg_fe_link_create(struct soc_tplg *tplg, link->cpus = &dlc[0 ]; link->codecs = &dlc[1 ]; + link->platforms = &dlc[2 ]; link->num_cpus =1 ; link->num_codecs =1 ; + link->num_platforms =1 ;if (strlen (pcm->pcm_name)) { link->name =kstrdup (pcm->pcm_name,GFP_KERNEL );
@@ -1907,6 +1909,8 @@ static int soc_tplg_fe_link_create(struct soc_tplg *tplg, link->codecs->name ="snd-soc-dummy" ; link->codecs->dai_name ="snd-soc-dummy-dai" ; + link->platforms->name ="snd-soc-dummy" ; +/* enable DPCM */ link->dynamic =1 ; link->dpcm_playback =le32_to_cpu (pcm->playback);
Signature · 1 line
2.20.1