Commit c08673ed authored by Kuninori Morimoto's avatar Kuninori Morimoto Committed by Mark Brown

ASoC: ak4613: return error if it was setup as clock provider

Renesas is only user of ak4613 on upstream, and it is tested
only under "clock consumer" because of board mounting situation.

Thus, "clock provider" is not supperted/tested.
This patch return error if it was setup as clock provider.
Signed-off-by: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87czhwp9lq.wl-kuninori.morimoto.gx@renesas.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent f7c0e14f
......@@ -329,13 +329,13 @@ static int ak4613_dai_set_sysclk(struct snd_soc_dai *codec_dai,
return 0;
}
static int ak4613_dai_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)
static int ak4613_dai_set_fmt(struct snd_soc_dai *dai, unsigned int format)
{
struct snd_soc_component *component = dai->component;
struct ak4613_priv *priv = snd_soc_component_get_drvdata(component);
unsigned int fmt;
fmt &= SND_SOC_DAIFMT_FORMAT_MASK;
fmt = format & SND_SOC_DAIFMT_FORMAT_MASK;
switch (fmt) {
case SND_SOC_DAIFMT_LEFT_J:
case SND_SOC_DAIFMT_I2S:
......@@ -345,6 +345,19 @@ static int ak4613_dai_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)
return -EINVAL;
}
fmt = format & SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK;
switch (fmt) {
case SND_SOC_DAIFMT_CBC_CFC:
break;
default:
/*
* SUPPORTME
*
* "clock provider" is not yet supperted
*/
return -EINVAL;
}
return 0;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment