diff options
author | Mark Brown <broonie@kernel.org> | 2021-08-06 01:46:24 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2021-08-06 01:46:24 +0100 |
commit | ddaa1ed52c5da64fe9adf1d5ea6202cda3a53eea (patch) | |
tree | 119c5b9dcf67841af4a92f3d3a9b5e4efcc4557b /sound/soc/ti/j721e-evm.c | |
parent | 585fb31c2c3aad38a5add009171d7e3277b76d45 (diff) | |
parent | e2f6867299ac85ce227eee18be11ce2c4a568447 (diff) | |
download | linux-ddaa1ed52c5da64fe9adf1d5ea6202cda3a53eea.tar.bz2 |
Merge some cs42l42 patches into asoc-5.15
Diffstat (limited to 'sound/soc/ti/j721e-evm.c')
-rw-r--r-- | sound/soc/ti/j721e-evm.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/sound/soc/ti/j721e-evm.c b/sound/soc/ti/j721e-evm.c index 7d4e2e241f6a..9347f982c3e1 100644 --- a/sound/soc/ti/j721e-evm.c +++ b/sound/soc/ti/j721e-evm.c @@ -200,7 +200,7 @@ static int j721e_configure_refclk(struct j721e_priv *priv, return ret; } - if (priv->hsdiv_rates[domain->parent_clk_id] != scki) { + if (domain->parent_clk_id == -1 || priv->hsdiv_rates[domain->parent_clk_id] != scki) { dev_dbg(priv->dev, "domain%u configuration for %u Hz: %s, %dxFS (SCKI: %u Hz)\n", audio_domain, rate, @@ -281,23 +281,29 @@ static int j721e_audio_startup(struct snd_pcm_substream *substream) j721e_rule_rate, &priv->rate_range, SNDRV_PCM_HW_PARAM_RATE, -1); - mutex_unlock(&priv->mutex); if (ret) - return ret; + goto out; /* Reset TDM slots to 32 */ ret = snd_soc_dai_set_tdm_slot(cpu_dai, 0x3, 0x3, 2, 32); if (ret && ret != -ENOTSUPP) - return ret; + goto out; for_each_rtd_codec_dais(rtd, i, codec_dai) { ret = snd_soc_dai_set_tdm_slot(codec_dai, 0x3, 0x3, 2, 32); if (ret && ret != -ENOTSUPP) - return ret; + goto out; } - return 0; + if (ret == -ENOTSUPP) + ret = 0; +out: + if (ret) + domain->active--; + mutex_unlock(&priv->mutex); + + return ret; } static int j721e_audio_hw_params(struct snd_pcm_substream *substream, |