diff options
author | Philipp Zabel <philipp.zabel@gmail.com> | 2009-03-03 10:10:52 -0500 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2009-03-03 10:58:51 -0500 |
commit | 5f2a9384a9291d898b4bf85c4fbf497eef582977 (patch) | |
tree | 6bc0ac967a4cab2b7396030ab82dcf3d1c3793d1 /sound/soc/codecs | |
parent | aa4ef01de5f2e7ed948b88f9f1cfc93c8e0c3f25 (diff) |
ASoC: UDA1380: DATAI is slave only
Only allow SND_SOC_DAIFMT_CBS_CFS for the playback DAI.
Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/codecs')
-rw-r--r-- | sound/soc/codecs/uda1380.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sound/soc/codecs/uda1380.c b/sound/soc/codecs/uda1380.c index 1c9d2a75addb..1b10f488328c 100644 --- a/sound/soc/codecs/uda1380.c +++ b/sound/soc/codecs/uda1380.c | |||
@@ -399,8 +399,9 @@ static int uda1380_set_dai_fmt_both(struct snd_soc_dai *codec_dai, | |||
399 | iface |= R01_SFORI_MSB | R01_SFORO_MSB; | 399 | iface |= R01_SFORI_MSB | R01_SFORO_MSB; |
400 | } | 400 | } |
401 | 401 | ||
402 | if ((fmt & SND_SOC_DAIFMT_MASTER_MASK) == SND_SOC_DAIFMT_CBM_CFM) | 402 | /* DATAI is slave only, so in single-link mode, this has to be slave */ |
403 | iface |= R01_SIM; | 403 | if ((fmt & SND_SOC_DAIFMT_MASTER_MASK) != SND_SOC_DAIFMT_CBS_CFS) |
404 | return -EINVAL; | ||
404 | 405 | ||
405 | uda1380_write(codec, UDA1380_IFACE, iface); | 406 | uda1380_write(codec, UDA1380_IFACE, iface); |
406 | 407 | ||
@@ -428,6 +429,10 @@ static int uda1380_set_dai_fmt_playback(struct snd_soc_dai *codec_dai, | |||
428 | iface |= R01_SFORI_MSB; | 429 | iface |= R01_SFORI_MSB; |
429 | } | 430 | } |
430 | 431 | ||
432 | /* DATAI is slave only, so this has to be slave */ | ||
433 | if ((fmt & SND_SOC_DAIFMT_MASTER_MASK) != SND_SOC_DAIFMT_CBS_CFS) | ||
434 | return -EINVAL; | ||
435 | |||
431 | uda1380_write(codec, UDA1380_IFACE, iface); | 436 | uda1380_write(codec, UDA1380_IFACE, iface); |
432 | 437 | ||
433 | return 0; | 438 | return 0; |