Patch "ASoC: simple-card-utils: Fix device module clock" has been added to the 5.4-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: simple-card-utils: Fix device module clock

to the 5.4-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-simple-card-utils-fix-device-module-clock.patch
and it can be found in the queue-5.4 subdirectory.

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



commit f71cd49824e302d7605641d52ad02f7812c4b527
Author: Sameer Pujar <spujar@xxxxxxxxxx>
Date:   Wed Feb 10 12:13:39 2021 +0530

    ASoC: simple-card-utils: Fix device module clock
    
    [ Upstream commit 1e30f642cf2939bbdac82ea0dd3071232670b5ab ]
    
    If "clocks = <&xxx>" is specified from the CPU or Codec component
    device node, the clock is not getting enabled. Thus audio playback
    or capture fails.
    
    Fix this by populating "simple_dai->clk" field when clocks property
    is specified from device node as well. Also tidy up by re-organising
    conditional statements of parsing logic.
    
    Fixes: bb6fc620c2ed ("ASoC: simple-card-utils: add asoc_simple_card_parse_clk()")
    Cc: Kuninori Morimoto <kuninori.morimoto.gx@xxxxxxxxxxx>
    Signed-off-by: Sameer Pujar <spujar@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/1612939421-19900-2-git-send-email-spujar@xxxxxxxxxx
    Signed-off-by: Mark Brown <broonie@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/sound/soc/generic/simple-card-utils.c b/sound/soc/generic/simple-card-utils.c
index 9b794775df537..edad6721251f4 100644
--- a/sound/soc/generic/simple-card-utils.c
+++ b/sound/soc/generic/simple-card-utils.c
@@ -172,16 +172,15 @@ int asoc_simple_parse_clk(struct device *dev,
 	 *  or device's module clock.
 	 */
 	clk = devm_get_clk_from_child(dev, node, NULL);
-	if (!IS_ERR(clk)) {
-		simple_dai->sysclk = clk_get_rate(clk);
+	if (IS_ERR(clk))
+		clk = devm_get_clk_from_child(dev, dlc->of_node, NULL);
 
+	if (!IS_ERR(clk)) {
 		simple_dai->clk = clk;
-	} else if (!of_property_read_u32(node, "system-clock-frequency", &val)) {
+		simple_dai->sysclk = clk_get_rate(clk);
+	} else if (!of_property_read_u32(node, "system-clock-frequency",
+					 &val)) {
 		simple_dai->sysclk = val;
-	} else {
-		clk = devm_get_clk_from_child(dev, dlc->of_node, NULL);
-		if (!IS_ERR(clk))
-			simple_dai->sysclk = clk_get_rate(clk);
 	}
 
 	if (of_property_read_bool(node, "system-clock-direction-out"))



[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