Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 16f29b7f authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "ASoC: wcd9306: remove runtime PM voting"

parents a13d1584 f01c35c5
Loading
Loading
Loading
Loading
+0 −40
Original line number Diff line number Diff line
@@ -3378,13 +3378,8 @@ static unsigned int tapan_read(struct snd_soc_codec *codec,
static int tapan_startup(struct snd_pcm_substream *substream,
		struct snd_soc_dai *dai)
{
	struct wcd9xxx *tapan_core = dev_get_drvdata(dai->codec->dev->parent);
	dev_dbg(dai->codec->dev, "%s(): substream = %s  stream = %d\n",
		 __func__, substream->name, substream->stream);
	if ((tapan_core != NULL) &&
	    (tapan_core->dev != NULL) &&
	    (tapan_core->dev->parent != NULL))
		pm_runtime_get_sync(tapan_core->dev->parent);

	return 0;
}
@@ -3392,29 +3387,8 @@ static int tapan_startup(struct snd_pcm_substream *substream,
static void tapan_shutdown(struct snd_pcm_substream *substream,
		struct snd_soc_dai *dai)
{
	struct wcd9xxx *tapan_core = dev_get_drvdata(dai->codec->dev->parent);
	struct tapan_priv *tapan = snd_soc_codec_get_drvdata(dai->codec);
	u32 active = 0;

	dev_dbg(dai->codec->dev, "%s(): substream = %s  stream = %d\n",
		 __func__, substream->name, substream->stream);

	if (dai->id < NUM_CODEC_DAIS) {
		if (tapan->dai[dai->id].ch_mask) {
			active = 1;
			dev_dbg(dai->codec->dev, "%s(): Codec DAI: chmask[%d] = 0x%lx\n",
				 __func__, dai->id,
				 tapan->dai[dai->id].ch_mask);
		}
	}
	if ((tapan_core != NULL) &&
	    (tapan_core->dev != NULL) &&
	    (tapan_core->dev->parent != NULL) &&
	    (active == 0)) {
		pm_runtime_mark_last_busy(tapan_core->dev->parent);
		pm_runtime_put(tapan_core->dev->parent);
		dev_dbg(dai->codec->dev, "%s: unvote requested", __func__);
	}
}

static void tapan_set_vdd_cx_current(struct snd_soc_codec *codec,
@@ -4221,13 +4195,6 @@ static int tapan_codec_enable_slimrx(struct snd_soc_dapm_widget *w,
			dev_dbg(codec->dev, "%s: Disconnect RX port, ret = %d\n",
				 __func__, ret);
		}
		if ((core != NULL) &&
		    (core->dev != NULL) &&
		    (core->dev->parent != NULL)) {
			pm_runtime_mark_last_busy(core->dev->parent);
			pm_runtime_put(core->dev->parent);
			dev_dbg(codec->dev, "%s: unvote requested", __func__);
		}
		dai->bus_down_in_recovery = false;
		break;
	}
@@ -4278,13 +4245,6 @@ static int tapan_codec_enable_slimtx(struct snd_soc_dapm_widget *w,
			dev_dbg(codec->dev, "%s: Disconnect RX port, ret = %d\n",
				 __func__, ret);
		}
		if ((core != NULL) &&
		    (core->dev != NULL) &&
		    (core->dev->parent != NULL)) {
			pm_runtime_mark_last_busy(core->dev->parent);
			pm_runtime_put(core->dev->parent);
			dev_dbg(codec->dev, "%s: unvote requested", __func__);
		}
		dai->bus_down_in_recovery = false;
		break;
	}