summaryrefslogtreecommitdiff
path: root/sound/soc/fsl/fsl_asrc.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/fsl/fsl_asrc.c')
-rw-r--r--sound/soc/fsl/fsl_asrc.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/sound/soc/fsl/fsl_asrc.c b/sound/soc/fsl/fsl_asrc.c
index 2b1decbe61cc..154937bd03a8 100644
--- a/sound/soc/fsl/fsl_asrc.c
+++ b/sound/soc/fsl/fsl_asrc.c
@@ -593,7 +593,7 @@ static int fsl_asrc_dai_hw_params(struct snd_pcm_substream *substream,
return ret;
}
- asrc_priv->pair_streams |= BIT(substream->stream);
+ pair->pair_streams |= BIT(substream->stream);
pair->config = &config;
if (width == 16)
@@ -650,14 +650,12 @@ static int fsl_asrc_dai_hw_params(struct snd_pcm_substream *substream,
static int fsl_asrc_dai_hw_free(struct snd_pcm_substream *substream,
struct snd_soc_dai *dai)
{
- struct fsl_asrc *asrc_priv = snd_soc_dai_get_drvdata(dai);
struct snd_pcm_runtime *runtime = substream->runtime;
struct fsl_asrc_pair *pair = runtime->private_data;
- if (asrc_priv->pair_streams & BIT(substream->stream)) {
- if (pair)
- fsl_asrc_release_pair(pair);
- asrc_priv->pair_streams &= ~BIT(substream->stream);
+ if (pair && (pair->pair_streams & BIT(substream->stream))) {
+ fsl_asrc_release_pair(pair);
+ pair->pair_streams &= ~BIT(substream->stream);
}
return 0;