mirror of
https://github.com/torvalds/linux.git
synced 2024-11-24 13:11:40 +00:00
ALSA: ASoC: tlv320aic3x: Fix DSP DAI format and signal polarities matching
- Codec doesn't support to configure bit clock and frame sync polarities - Codec doesn't support DSP_A format but DSP_B with inverted bit clock polarity - Match also other formats with their signal polarities Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
da6320becf
commit
4b7d283150
@ -863,17 +863,21 @@ static int aic3x_set_dai_fmt(struct snd_soc_dai *codec_dai,
|
|||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* interface format */
|
/*
|
||||||
switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) {
|
* match both interface format and signal polarities since they
|
||||||
case SND_SOC_DAIFMT_I2S:
|
* are fixed
|
||||||
|
*/
|
||||||
|
switch (fmt & (SND_SOC_DAIFMT_FORMAT_MASK |
|
||||||
|
SND_SOC_DAIFMT_INV_MASK)) {
|
||||||
|
case (SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF):
|
||||||
break;
|
break;
|
||||||
case SND_SOC_DAIFMT_DSP_A:
|
case (SND_SOC_DAIFMT_DSP_B | SND_SOC_DAIFMT_IB_NF):
|
||||||
iface_breg |= (0x01 << 6);
|
iface_breg |= (0x01 << 6);
|
||||||
break;
|
break;
|
||||||
case SND_SOC_DAIFMT_RIGHT_J:
|
case (SND_SOC_DAIFMT_RIGHT_J | SND_SOC_DAIFMT_NB_NF):
|
||||||
iface_breg |= (0x02 << 6);
|
iface_breg |= (0x02 << 6);
|
||||||
break;
|
break;
|
||||||
case SND_SOC_DAIFMT_LEFT_J:
|
case (SND_SOC_DAIFMT_LEFT_J | SND_SOC_DAIFMT_NB_NF):
|
||||||
iface_breg |= (0x03 << 6);
|
iface_breg |= (0x03 << 6);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
Loading…
Reference in New Issue
Block a user