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>
This commit is contained in:
committed by
Mark Brown
parent
aa4ef01de5
commit
5f2a9384a9
@ -399,8 +399,9 @@ static int uda1380_set_dai_fmt_both(struct snd_soc_dai *codec_dai,
|
|||||||
iface |= R01_SFORI_MSB | R01_SFORO_MSB;
|
iface |= R01_SFORI_MSB | R01_SFORO_MSB;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((fmt & SND_SOC_DAIFMT_MASTER_MASK) == SND_SOC_DAIFMT_CBM_CFM)
|
/* DATAI is slave only, so in single-link mode, this has to be slave */
|
||||||
iface |= R01_SIM;
|
if ((fmt & SND_SOC_DAIFMT_MASTER_MASK) != SND_SOC_DAIFMT_CBS_CFS)
|
||||||
|
return -EINVAL;
|
||||||
|
|
||||||
uda1380_write(codec, UDA1380_IFACE, iface);
|
uda1380_write(codec, UDA1380_IFACE, iface);
|
||||||
|
|
||||||
@ -428,6 +429,10 @@ static int uda1380_set_dai_fmt_playback(struct snd_soc_dai *codec_dai,
|
|||||||
iface |= R01_SFORI_MSB;
|
iface |= R01_SFORI_MSB;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* DATAI is slave only, so this has to be slave */
|
||||||
|
if ((fmt & SND_SOC_DAIFMT_MASTER_MASK) != SND_SOC_DAIFMT_CBS_CFS)
|
||||||
|
return -EINVAL;
|
||||||
|
|
||||||
uda1380_write(codec, UDA1380_IFACE, iface);
|
uda1380_write(codec, UDA1380_IFACE, iface);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
Reference in New Issue
Block a user