Patch "ASoC: soc-core.c: Skip dummy codec when adding platforms" has been added to the 5.15-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    ASoC: soc-core.c: Skip dummy codec when adding platforms

to the 5.15-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     asoc-soc-core.c-skip-dummy-codec-when-adding-platfor.patch
and it can be found in the queue-5.15 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 849ed10b1bd62def81722cc1ccf5f9f547268342
Author: Chancel Liu <chancel.liu@xxxxxxx>
Date:   Tue Mar 5 15:56:06 2024 +0900

    ASoC: soc-core.c: Skip dummy codec when adding platforms
    
    [ Upstream commit 23fb6bc2696119391ec3a92ccaffe50e567c515e ]
    
    When pcm_runtime is adding platform components it will scan all
    registered components. In case of DPCM FE/BE some DAI links will
    configure dummy platform. However both dummy codec and dummy platform
    are using "snd-soc-dummy" as component->name. Dummy codec should be
    skipped when adding platforms otherwise there'll be overflow and UBSAN
    complains.
    
    Reported-by: Zhipeng Wang <zhipeng.wang_1@xxxxxxx>
    Signed-off-by: Chancel Liu <chancel.liu@xxxxxxx>
    Link: https://msgid.link/r/20240305065606.3778642-1-chancel.liu@xxxxxxx
    Signed-off-by: Mark Brown <broonie@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index a5b3ee69fb886..1c4d8b96f77b1 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -1042,6 +1042,9 @@ int snd_soc_add_pcm_runtime(struct snd_soc_card *card,
 			if (!snd_soc_is_matching_component(platform, component))
 				continue;
 
+			if (snd_soc_component_is_dummy(component) && component->num_dai)
+				continue;
+
 			snd_soc_rtd_add_component(rtd, component);
 		}
 	}




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux