diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2022-04-05 04:06:25 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2022-04-05 19:49:57 +0200 |
commit | c08673ede71fba70a10be0470565ed2470ef1fe5 (patch) | |
tree | 7ac7b5dc45d912614a980f0d196c125a5cc4e921 /sound/soc/codecs | |
parent | ASoC: ak4613: tidyup ak4613_interface (diff) | |
download | linux-c08673ede71fba70a10be0470565ed2470ef1fe5.tar.xz linux-c08673ede71fba70a10be0470565ed2470ef1fe5.zip |
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: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87czhwp9lq.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs')
-rw-r--r-- | sound/soc/codecs/ak4613.c | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/sound/soc/codecs/ak4613.c b/sound/soc/codecs/ak4613.c index a20bbf82e8df..b19c7c4a1971 100644 --- a/sound/soc/codecs/ak4613.c +++ b/sound/soc/codecs/ak4613.c @@ -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; } |