[PATCH 02/10] ASoC: fsl-asoc-card: prevent deferment with dummy codec

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

 



From: Elinor Montmasson <elinor.montmasson@xxxxxxxxxxxxxxxxxxxx>

Prevent deferment during sound card initialisation when using the
dummy codec.
If the codec isn't an ac97, it is expected to have a device tree node
for the codec. If not, the sound card initialisation is deferred.
However, the dummy codec has no device tree node, thus we must
handle this specific use case.

Signed-off-by: Elinor Montmasson <elinor.montmasson@xxxxxxxxxxxxxxxxxxxx>
Co-authored-by: Philip-Dylan Gleonec <philip-dylan.gleonec@xxxxxxxxxxxxxxxxxxxx>
---
 sound/soc/fsl/fsl-asoc-card.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/sound/soc/fsl/fsl-asoc-card.c b/sound/soc/fsl/fsl-asoc-card.c
index c12a356a86d5..d656df0b0eea 100644
--- a/sound/soc/fsl/fsl-asoc-card.c
+++ b/sound/soc/fsl/fsl-asoc-card.c
@@ -748,7 +748,8 @@ static int fsl_asoc_card_probe(struct platform_device *pdev)
 	of_node_put(bitclkprovider);
 	of_node_put(frameprovider);
 
-	if (!fsl_asoc_card_is_ac97(priv) && !codec_dev) {
+	if (!fsl_asoc_card_is_ac97(priv) && !codec_dev
+	  && !of_device_is_compatible(np, "fsl,imx-audio-dummy-codec")) {
 		dev_dbg(&pdev->dev, "failed to find codec device\n");
 		ret = -EPROBE_DEFER;
 		goto asrc_fail;
-- 
2.25.1




[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux