[PATCH 09/11] ASoC: intel: Replace runtime->status->state reference to runtime->state

Takashi Iwai tiwai at suse.de
Mon Sep 26 15:55:56 CEST 2022


The recent change in ALSA core allows drivers to get the current PCM
state directly from runtime object.  Replace the calls accordingly.

Cc: Cezary Rojewski <cezary.rojewski at intel.com>
Cc: Pierre-Louis Bossart <pierre-louis.bossart at linux.intel.com>
Cc: Liam Girdwood <liam.r.girdwood at linux.intel.com>
Cc: Peter Ujfalusi <peter.ujfalusi at linux.intel.com>
Cc: Bard Liao <yung-chuan.liao at linux.intel.com>
Cc: Ranjani Sridharan <ranjani.sridharan at linux.intel.com>
Cc: Kai Vehmanen <kai.vehmanen at linux.intel.com>
Cc: Mark Brown <broonie at kernel.org>
Signed-off-by: Takashi Iwai <tiwai at suse.de>
---

I'm going to merge this through my sound git tree as it requires ALSA
core changes.

 sound/soc/intel/skylake/skl-pcm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/soc/intel/skylake/skl-pcm.c b/sound/soc/intel/skylake/skl-pcm.c
index 9d72ebd812af..1015716f9336 100644
--- a/sound/soc/intel/skylake/skl-pcm.c
+++ b/sound/soc/intel/skylake/skl-pcm.c
@@ -275,7 +275,7 @@ static int skl_pcm_prepare(struct snd_pcm_substream *substream,
 	 * calls prepare another time, reset the FW pipe to clean state
 	 */
 	if (mconfig &&
-		(substream->runtime->status->state == SNDRV_PCM_STATE_XRUN ||
+		(substream->runtime->state == SNDRV_PCM_STATE_XRUN ||
 		 mconfig->pipe->state == SKL_PIPE_CREATED ||
 		 mconfig->pipe->state == SKL_PIPE_PAUSED)) {
 
@@ -593,7 +593,7 @@ static int skl_link_pcm_prepare(struct snd_pcm_substream *substream,
 	/* In case of XRUN recovery, reset the FW pipe to clean state */
 	mconfig = skl_tplg_be_get_cpr_module(dai, substream->stream);
 	if (mconfig && !mconfig->pipe->passthru &&
-		(substream->runtime->status->state == SNDRV_PCM_STATE_XRUN))
+		(substream->runtime->state == SNDRV_PCM_STATE_XRUN))
 		skl_reset_pipe(skl, mconfig->pipe);
 
 	return 0;
-- 
2.35.3



More information about the Alsa-devel mailing list