Patch "ASoC: soc-core: disable route checks for legacy devices" has been added to the 5.6-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: disable route checks for legacy devices

to the 5.6-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-disable-route-checks-for-legacy-device.patch
and it can be found in the queue-5.6 subdirectory.

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



commit 1f67d05183c33851e2f6a14d8b356eab7a9a9fe3
Author: Pierre-Louis Bossart <pierre-louis.bossart@xxxxxxxxxxxxxxx>
Date:   Mon Mar 9 14:27:43 2020 -0500

    ASoC: soc-core: disable route checks for legacy devices
    
    commit a22ae72b86a4f754e8d25fbf9ea5a8f77365e531 upstream.
    
    v5.4 changes in soc-core tightened the checks on soc_dapm_add_routes,
    which results in the ASoC card probe failing.
    
    Introduce a flag to be set in machine drivers to prevent the probe
    from stopping in case of incomplete topologies or missing routes. This
    flag is for backwards compatibility only and shall not be used for
    newer machine drivers.
    
    Example with an HDaudio card with a bad topology:
    
    [ 236.177898] skl_hda_dsp_generic skl_hda_dsp_generic: ASoC: Failed to
    add route iDisp1_out -> direct -> iDisp1 Tx
    
    [ 236.177902] skl_hda_dsp_generic skl_hda_dsp_generic:
    snd_soc_bind_card: snd_soc_dapm_add_routes failed: -19
    
    with the disable_route_checks set:
    
    [ 64.031657] skl_hda_dsp_generic skl_hda_dsp_generic: ASoC: Failed to
    add route iDisp1_out -> direct -> iDisp1 Tx
    
    [ 64.031661] skl_hda_dsp_generic skl_hda_dsp_generic:
    snd_soc_bind_card: disable_route_checks set, ignoring errors on
    add_routes
    
    Fixes: daa480bde6b3a9 ("ASoC: soc-core: tidyup for snd_soc_dapm_add_routes()")
    Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@xxxxxxxxxxxxxxx>
    Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@xxxxxxxxxxx>
    Link: https://lore.kernel.org/r/20200309192744.18380-2-pierre-louis.bossart@xxxxxxxxxxxxxxx
    Signed-off-by: Mark Brown <broonie@xxxxxxxxxx>
    Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>

diff --git a/include/sound/soc.h b/include/sound/soc.h
index 8a2266676b2dd..efb8bad7b0fab 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -1058,6 +1058,7 @@ struct snd_soc_card {
 	const struct snd_soc_dapm_route *of_dapm_routes;
 	int num_of_dapm_routes;
 	bool fully_routed;
+	bool disable_route_checks;
 
 	/* lists of probed devices belonging to this card */
 	struct list_head component_dev_list;
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 068d809c349a2..b17366bac8463 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -1256,8 +1256,18 @@ static int soc_probe_component(struct snd_soc_card *card,
 	ret = snd_soc_dapm_add_routes(dapm,
 				      component->driver->dapm_routes,
 				      component->driver->num_dapm_routes);
-	if (ret < 0)
-		goto err_probe;
+	if (ret < 0) {
+		if (card->disable_route_checks) {
+			dev_info(card->dev,
+				 "%s: disable_route_checks set, ignoring errors on add_routes\n",
+				 __func__);
+		} else {
+			dev_err(card->dev,
+				"%s: snd_soc_dapm_add_routes failed: %d\n",
+				__func__, ret);
+			goto err_probe;
+		}
+	}
 
 	/* see for_each_card_components */
 	list_add(&component->card_list, &card->component_dev_list);
@@ -1938,8 +1948,18 @@ static int snd_soc_bind_card(struct snd_soc_card *card)
 
 	ret = snd_soc_dapm_add_routes(&card->dapm, card->dapm_routes,
 				      card->num_dapm_routes);
-	if (ret < 0)
-		goto probe_end;
+	if (ret < 0) {
+		if (card->disable_route_checks) {
+			dev_info(card->dev,
+				 "%s: disable_route_checks set, ignoring errors on add_routes\n",
+				 __func__);
+		} else {
+			dev_err(card->dev,
+				 "%s: snd_soc_dapm_add_routes failed: %d\n",
+				 __func__, ret);
+			goto probe_end;
+		}
+	}
 
 	ret = snd_soc_dapm_add_routes(&card->dapm, card->of_dapm_routes,
 				      card->num_of_dapm_routes);



[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