aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolin Chen <nicoleotsuka@gmail.com>2017-09-08 01:27:33 -0400
committerMark Brown <broonie@kernel.org>2017-09-19 09:37:35 -0400
commit758a3b0183a83a4827afc892c417cd6f8d12e189 (patch)
tree4c935f72c16681d57e9a0c24e9f5543bc2147333
parentb0a7043d5c2ccdd306959f295bf1a62be025cbf5 (diff)
ASoC: fsl-asoc-card: Don't error out if ENOTSUPP
The snd_soc_component_set_sysclk() and snd_soc_dai_set_tdm_slot() in the soc-core.c will return -ENOTSUPP if there is no function implementation for them in the dai and component drivers. So this patch tries to ignore this errno. Signed-off-by: Nicolin Chen <nicoleotsuka@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--sound/soc/fsl/fsl-asoc-card.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sound/soc/fsl/fsl-asoc-card.c b/sound/soc/fsl/fsl-asoc-card.c
index 2db4d0c80d33..3772abbdd7b7 100644
--- a/sound/soc/fsl/fsl-asoc-card.c
+++ b/sound/soc/fsl/fsl-asoc-card.c
@@ -166,7 +166,7 @@ static int fsl_asoc_card_hw_params(struct snd_pcm_substream *substream,
166 ret = snd_soc_dai_set_sysclk(rtd->cpu_dai, cpu_priv->sysclk_id[tx], 166 ret = snd_soc_dai_set_sysclk(rtd->cpu_dai, cpu_priv->sysclk_id[tx],
167 cpu_priv->sysclk_freq[tx], 167 cpu_priv->sysclk_freq[tx],
168 cpu_priv->sysclk_dir[tx]); 168 cpu_priv->sysclk_dir[tx]);
169 if (ret) { 169 if (ret && ret != -ENOTSUPP) {
170 dev_err(dev, "failed to set sysclk for cpu dai\n"); 170 dev_err(dev, "failed to set sysclk for cpu dai\n");
171 return ret; 171 return ret;
172 } 172 }
@@ -174,7 +174,7 @@ static int fsl_asoc_card_hw_params(struct snd_pcm_substream *substream,
174 if (cpu_priv->slot_width) { 174 if (cpu_priv->slot_width) {
175 ret = snd_soc_dai_set_tdm_slot(rtd->cpu_dai, 0x3, 0x3, 2, 175 ret = snd_soc_dai_set_tdm_slot(rtd->cpu_dai, 0x3, 0x3, 2,
176 cpu_priv->slot_width); 176 cpu_priv->slot_width);
177 if (ret) { 177 if (ret && ret != -ENOTSUPP) {
178 dev_err(dev, "failed to set TDM slot for cpu dai\n"); 178 dev_err(dev, "failed to set TDM slot for cpu dai\n");
179 return ret; 179 return ret;
180 } 180 }
@@ -270,7 +270,7 @@ static int fsl_asoc_card_set_bias_level(struct snd_soc_card *card,
270 270
271 ret = snd_soc_dai_set_sysclk(codec_dai, codec_priv->fll_id, 271 ret = snd_soc_dai_set_sysclk(codec_dai, codec_priv->fll_id,
272 pll_out, SND_SOC_CLOCK_IN); 272 pll_out, SND_SOC_CLOCK_IN);
273 if (ret) { 273 if (ret && ret != -ENOTSUPP) {
274 dev_err(dev, "failed to set SYSCLK: %d\n", ret); 274 dev_err(dev, "failed to set SYSCLK: %d\n", ret);
275 return ret; 275 return ret;
276 } 276 }
@@ -283,7 +283,7 @@ static int fsl_asoc_card_set_bias_level(struct snd_soc_card *card,
283 ret = snd_soc_dai_set_sysclk(codec_dai, codec_priv->mclk_id, 283 ret = snd_soc_dai_set_sysclk(codec_dai, codec_priv->mclk_id,
284 codec_priv->mclk_freq, 284 codec_priv->mclk_freq,
285 SND_SOC_CLOCK_IN); 285 SND_SOC_CLOCK_IN);
286 if (ret) { 286 if (ret && ret != -ENOTSUPP) {
287 dev_err(dev, "failed to switch away from FLL: %d\n", ret); 287 dev_err(dev, "failed to switch away from FLL: %d\n", ret);
288 return ret; 288 return ret;
289 } 289 }
@@ -459,7 +459,7 @@ static int fsl_asoc_card_late_probe(struct snd_soc_card *card)
459 459
460 ret = snd_soc_dai_set_sysclk(codec_dai, codec_priv->mclk_id, 460 ret = snd_soc_dai_set_sysclk(codec_dai, codec_priv->mclk_id,
461 codec_priv->mclk_freq, SND_SOC_CLOCK_IN); 461 codec_priv->mclk_freq, SND_SOC_CLOCK_IN);
462 if (ret) { 462 if (ret && ret != -ENOTSUPP) {
463 dev_err(dev, "failed to set sysclk in %s\n", __func__); 463 dev_err(dev, "failed to set sysclk in %s\n", __func__);
464 return ret; 464 return ret;
465 } 465 }