Re: [PATCH 05/25] ASoC: soc-component: add snd_soc_component_prepare()

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

 



On 2019-07-24 03:51, Kuninori Morimoto wrote:> +
+int snd_soc_component_prepare(struct snd_soc_component *component,
+			      struct snd_pcm_substream *substream)
+{
+	if (component->driver->ops &&
+	    component->driver->ops->prepare)
+		return component->driver->ops->prepare(substream);
+
+	return 0;
+}
diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c
index 86d2e6b..a77a14c 100644
--- a/sound/soc/soc-pcm.c
+++ b/sound/soc/soc-pcm.c
@@ -774,11 +774,7 @@ static int soc_pcm_prepare(struct snd_pcm_substream *substream)
  	for_each_rtdcom(rtd, rtdcom) {
  		component = rtdcom->component;
- if (!component->driver->ops ||
-		    !component->driver->ops->prepare)
-			continue;
-
-		ret = component->driver->ops->prepare(substream);
+		snd_soc_component_prepare(component, substream);
  		if (ret < 0) {
  			dev_err(component->dev,
  				"ASoC: platform prepare error: %d\n", ret);


Compared to old code, ret gets ignored here. Guess unintended modification?
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel



[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