diff options
Diffstat (limited to 'sound/soc/fsl/fsl_spdif.c')
-rw-r--r-- | sound/soc/fsl/fsl_spdif.c | 33 |
1 files changed, 5 insertions, 28 deletions
diff --git a/sound/soc/fsl/fsl_spdif.c b/sound/soc/fsl/fsl_spdif.c index eedf20e03a3f..a91d785461fd 100644 --- a/sound/soc/fsl/fsl_spdif.c +++ b/sound/soc/fsl/fsl_spdif.c @@ -123,7 +123,6 @@ struct fsl_spdif_priv { u32 regcache_srpc; struct clk *pll8k_clk; struct clk *pll11k_clk; - u8 streams; }; static struct fsl_spdif_soc_data fsl_spdif_vf610 = { @@ -606,9 +605,6 @@ static int fsl_spdif_hw_params(struct snd_pcm_substream *substream, ret = spdif_set_rx_clksrc(spdif_priv, SPDIF_DEFAULT_GAINSEL, 1); } - if (!ret) - spdif_priv->streams |= BIT(substream->stream); - return ret; } @@ -642,17 +638,6 @@ static int fsl_spdif_trigger(struct snd_pcm_substream *substream, return 0; } -static int fsl_spdif_hw_free(struct snd_pcm_substream *substream, - struct snd_soc_dai *dai) -{ - struct snd_soc_pcm_runtime *rtd = substream->private_data; - struct fsl_spdif_priv *spdif_priv = snd_soc_dai_get_drvdata(rtd->cpu_dai); - - spdif_priv->streams &= ~BIT(substream->stream); - - return 0; -} - static u32 fsl_spdif_txclk_caldiv(struct fsl_spdif_priv *spdif_priv, struct clk *clk, u64 savesub, enum spdif_txrate index, bool round) @@ -793,18 +778,11 @@ static int fsl_spdif_set_dai_sysclk(struct snd_soc_dai *cpu_dai, if (pll) { npll = (do_div(ratio, 8000) ? data->pll11k_clk : data->pll8k_clk); if (!clk_is_match(pll, npll)) { - if (!data->streams) { - ret = clk_set_parent(p, npll); - if (ret < 0) - dev_warn(cpu_dai->dev, - "failed to set parent %s: %d\n", - __clk_get_name(npll), ret); - } else { - dev_err(cpu_dai->dev, - "PLL %s is in use by a running stream.\n", - __clk_get_name(pll)); - return -EINVAL; - } + ret = clk_set_parent(p, npll); + if (ret < 0) + dev_warn(cpu_dai->dev, + "failed to set parent %s: %d\n", + __clk_get_name(npll), ret); } } @@ -830,7 +808,6 @@ static const struct snd_soc_dai_ops fsl_spdif_dai_ops = { .hw_params = fsl_spdif_hw_params, .trigger = fsl_spdif_trigger, .shutdown = fsl_spdif_shutdown, - .hw_free = fsl_spdif_hw_free, }; /* |