diff options
Diffstat (limited to 'sound/soc/codecs/tlv320dac33.c')
-rw-r--r-- | sound/soc/codecs/tlv320dac33.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sound/soc/codecs/tlv320dac33.c b/sound/soc/codecs/tlv320dac33.c index bc35f3ff8717..3ef3255cd1e7 100644 --- a/sound/soc/codecs/tlv320dac33.c +++ b/sound/soc/codecs/tlv320dac33.c | |||
@@ -993,6 +993,7 @@ static int dac33_set_dai_fmt(struct snd_soc_dai *codec_dai, | |||
993 | unsigned int fmt) | 993 | unsigned int fmt) |
994 | { | 994 | { |
995 | struct snd_soc_codec *codec = codec_dai->codec; | 995 | struct snd_soc_codec *codec = codec_dai->codec; |
996 | struct tlv320dac33_priv *dac33 = codec->private_data; | ||
996 | u8 aictrl_a, aictrl_b; | 997 | u8 aictrl_a, aictrl_b; |
997 | 998 | ||
998 | aictrl_a = dac33_read_reg_cache(codec, DAC33_SER_AUDIOIF_CTRL_A); | 999 | aictrl_a = dac33_read_reg_cache(codec, DAC33_SER_AUDIOIF_CTRL_A); |
@@ -1005,7 +1006,11 @@ static int dac33_set_dai_fmt(struct snd_soc_dai *codec_dai, | |||
1005 | break; | 1006 | break; |
1006 | case SND_SOC_DAIFMT_CBS_CFS: | 1007 | case SND_SOC_DAIFMT_CBS_CFS: |
1007 | /* Codec Slave */ | 1008 | /* Codec Slave */ |
1008 | aictrl_a &= ~(DAC33_MSBCLK | DAC33_MSWCLK); | 1009 | if (dac33->fifo_mode) { |
1010 | dev_err(codec->dev, "FIFO mode requires master mode\n"); | ||
1011 | return -EINVAL; | ||
1012 | } else | ||
1013 | aictrl_a &= ~(DAC33_MSBCLK | DAC33_MSWCLK); | ||
1009 | break; | 1014 | break; |
1010 | default: | 1015 | default: |
1011 | return -EINVAL; | 1016 | return -EINVAL; |