pcm1681.c (8be98d2f2a0a262f8bf8a0bc1fdf522b3c7aab17) pcm1681.c (1900cb5375c3e95382601deed6ef95fb7b121a2e)
1// SPDX-License-Identifier: GPL-2.0-or-later
2/*
3 * PCM1681 ASoC codec driver
4 *
5 * Copyright (c) StreamUnlimited GmbH 2013
6 * Marek Belisko <marek.belisko@streamunlimited.com>
7 */
8

--- 122 unchanged lines hidden (view full) ---

131}
132
133static int pcm1681_set_dai_fmt(struct snd_soc_dai *codec_dai,
134 unsigned int format)
135{
136 struct snd_soc_component *component = codec_dai->component;
137 struct pcm1681_private *priv = snd_soc_component_get_drvdata(component);
138
1// SPDX-License-Identifier: GPL-2.0-or-later
2/*
3 * PCM1681 ASoC codec driver
4 *
5 * Copyright (c) StreamUnlimited GmbH 2013
6 * Marek Belisko <marek.belisko@streamunlimited.com>
7 */
8

--- 122 unchanged lines hidden (view full) ---

131}
132
133static int pcm1681_set_dai_fmt(struct snd_soc_dai *codec_dai,
134 unsigned int format)
135{
136 struct snd_soc_component *component = codec_dai->component;
137 struct pcm1681_private *priv = snd_soc_component_get_drvdata(component);
138
139 /* The PCM1681 can only be slave to all clocks */
140 if ((format & SND_SOC_DAIFMT_MASTER_MASK) != SND_SOC_DAIFMT_CBS_CFS) {
139 /* The PCM1681 can only be consumer to all clocks */
140 if ((format & SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK) != SND_SOC_DAIFMT_CBC_CFC) {
141 dev_err(component->dev, "Invalid clocking mode\n");
142 return -EINVAL;
143 }
144
145 priv->format = format;
146
147 return 0;
148}

--- 191 unchanged lines hidden ---
141 dev_err(component->dev, "Invalid clocking mode\n");
142 return -EINVAL;
143 }
144
145 priv->format = format;
146
147 return 0;
148}

--- 191 unchanged lines hidden ---