]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
ASoC: Merge up 6.2 fixes
authorMark Brown <broonie@kernel.org>
Wed, 18 Jan 2023 15:33:51 +0000 (15:33 +0000)
committerMark Brown <broonie@kernel.org>
Wed, 18 Jan 2023 15:33:51 +0000 (15:33 +0000)
To resolve a conflict and support further development.

1  2 
sound/soc/fsl/fsl-asoc-card.c
sound/soc/mediatek/mt8186/mt8186-mt6366-rt1019-rt5682s.c
sound/soc/sof/pm.c
sound/soc/sof/sof-audio.c

Simple merge
index e7fce9e4a0d234c8871c62b8427e881f67e013d3,8722bbd7fd3d7810cfd8effe9018ec9fce12da1d..8d3383085d12c4ffb8ff5c09417f1ec43937b378
@@@ -179,10 -179,10 +179,10 @@@ static int sof_resume(struct device *de
  static int sof_suspend(struct device *dev, bool runtime_suspend)
  {
        struct snd_sof_dev *sdev = dev_get_drvdata(dev);
 -      const struct sof_ipc_pm_ops *pm_ops = sdev->ipc->ops->pm;
 -      const struct sof_ipc_tplg_ops *tplg_ops = sdev->ipc->ops->tplg;
 +      const struct sof_ipc_pm_ops *pm_ops = sof_ipc_get_ops(sdev, pm);
 +      const struct sof_ipc_tplg_ops *tplg_ops = sof_ipc_get_ops(sdev, tplg);
        pm_message_t pm_state;
-       u32 target_state = 0;
+       u32 target_state = snd_sof_dsp_power_target(sdev);
        int ret;
  
        /* do nothing if dsp suspend callback is not set */
index e1ab8380e7d846269d0338081c2fe36ab6574cf1,275b1ae453062a80c6f9d65fb20f4033cdebfb6c..f17d405a9da9e5d110ac6f3d16a49c9801e233ca
@@@ -268,17 -266,16 +268,17 @@@ static int sof_setup_pipeline_connectio
  static void
  sof_unprepare_widgets_in_path(struct snd_sof_dev *sdev, struct snd_soc_dapm_widget *widget)
  {
 -      const struct sof_ipc_tplg_ops *ipc_tplg_ops = sdev->ipc->ops->tplg;
 -      const struct sof_ipc_tplg_widget_ops *widget_ops = ipc_tplg_ops->widget;
 +      const struct sof_ipc_tplg_ops *tplg_ops = sof_ipc_get_ops(sdev, tplg);
        struct snd_sof_widget *swidget = widget->dobj.private;
 +      const struct sof_ipc_tplg_widget_ops *widget_ops;
        struct snd_soc_dapm_path *p;
  
-       /* return if the widget is in use or if it is already unprepared */
-       if (!swidget->prepared || swidget->use_count > 1)
-               return;
+       /* skip if the widget is in use or if it is already unprepared */
+       if (!swidget || !swidget->prepared || swidget->use_count > 0)
+               goto sink_unprepare;
  
 -      if (widget_ops[widget->id].ipc_unprepare)
 +      widget_ops = tplg_ops ? tplg_ops->widget : NULL;
 +      if (widget_ops && widget_ops[widget->id].ipc_unprepare)
                /* unprepare the source widget */
                widget_ops[widget->id].ipc_unprepare(swidget);
  
@@@ -306,11 -304,7 +307,11 @@@ sof_prepare_widgets_in_path(struct snd_
        struct snd_soc_dapm_path *p;
        int ret;
  
-       if (!widget_ops[widget->id].ipc_prepare || swidget->prepared)
 +      widget_ops = tplg_ops ? tplg_ops->widget : NULL;
 +      if (!widget_ops)
 +              return 0;
 +
+       if (!swidget || !widget_ops[widget->id].ipc_prepare || swidget->prepared)
                goto sink_prepare;
  
        /* prepare the source widget */