Patch "ASoC: atmel: atmel-classd: Re-add dai_link->platform to fix card init" has been added to the 6.9-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: atmel: atmel-classd: Re-add dai_link->platform to fix card init

to the 6.9-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-atmel-atmel-classd-re-add-dai_link-platform-to-.patch
and it can be found in the queue-6.9 subdirectory.

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



commit 1237fd41b5d950d5324ab34549b039af0aeccf9c
Author: Andrei Simion <andrei.simion@xxxxxxxxxxxxx>
Date:   Tue Jun 4 13:10:30 2024 +0300

    ASoC: atmel: atmel-classd: Re-add dai_link->platform to fix card init
    
    [ Upstream commit 2ed22161b19b11239aa742804549f63edd7c91e3 ]
    
    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 0: CLASSD [CLASSD], device 0: CLASSD PCM snd-soc-dummy-dai-0 []
        Subdevices: 1/1
        Subdevice #0: subdevice #0
    
    :~$ speaker-test -t sine
    speaker-test 1.2.6
    Playback device is default
    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: CLASSD [CLASSD], device 0: CLASSD PCM snd-soc-dummy-dai-0
                                                    [CLASSD PCM snd-soc-dummy-dai-0]
        Subdevices: 1/1
        Subdevice #0: subdevice #0
    -> Resolve the playback error.
    
    Fixes: 2f650f87c03c ("ASoC: atmel: remove unnecessary dai_link->platform")
    Signed-off-by: Andrei Simion <andrei.simion@xxxxxxxxxxxxx>
    Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@xxxxxxxxxxx>
    Link: https://msgid.link/r/20240604101030.237792-1-andrei.simion@xxxxxxxxxxxxx
    Signed-off-by: Mark Brown <broonie@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/sound/soc/atmel/atmel-classd.c b/sound/soc/atmel/atmel-classd.c
index 6aed1ee443b44..ba314b2799190 100644
--- a/sound/soc/atmel/atmel-classd.c
+++ b/sound/soc/atmel/atmel-classd.c
@@ -473,19 +473,22 @@ static int atmel_classd_asoc_card_init(struct device *dev,
 	if (!dai_link)
 		return -ENOMEM;
 
-	comp = devm_kzalloc(dev, sizeof(*comp), GFP_KERNEL);
+	comp = devm_kzalloc(dev, 2 * sizeof(*comp), GFP_KERNEL);
 	if (!comp)
 		return -ENOMEM;
 
-	dai_link->cpus		= comp;
+	dai_link->cpus		= &comp[0];
 	dai_link->codecs	= &snd_soc_dummy_dlc;
+	dai_link->platforms	= &comp[1];
 
 	dai_link->num_cpus	= 1;
 	dai_link->num_codecs	= 1;
+	dai_link->num_platforms = 1;
 
 	dai_link->name			= "CLASSD";
 	dai_link->stream_name		= "CLASSD PCM";
 	dai_link->cpus->dai_name	= dev_name(dev);
+	dai_link->platforms->name	= dev_name(dev);
 
 	card->dai_link	= dai_link;
 	card->num_links	= 1;




[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