ASoC: tlv320aic31xx: Use modern ASoC DAI format terminology
As part of moving to remove the old style defines for the bus clocks update the tlv320aic31xx driver to use more modern terminology for clocking. Signed-off-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20220602135316.3554400-18-broonie@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
8d322f170b
commit
2fd8298aed
|
@ -1033,8 +1033,8 @@ static int aic31xx_clock_master_routes(struct snd_soc_component *component,
|
|||
struct aic31xx_priv *aic31xx = snd_soc_component_get_drvdata(component);
|
||||
int ret;
|
||||
|
||||
fmt &= SND_SOC_DAIFMT_MASTER_MASK;
|
||||
if (fmt == SND_SOC_DAIFMT_CBS_CFS &&
|
||||
fmt &= SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK;
|
||||
if (fmt == SND_SOC_DAIFMT_CBC_CFC &&
|
||||
aic31xx->master_dapm_route_applied) {
|
||||
/*
|
||||
* Remove the DAPM route(s) for codec clock master modes,
|
||||
|
@ -1051,7 +1051,7 @@ static int aic31xx_clock_master_routes(struct snd_soc_component *component,
|
|||
return ret;
|
||||
|
||||
aic31xx->master_dapm_route_applied = false;
|
||||
} else if (fmt != SND_SOC_DAIFMT_CBS_CFS &&
|
||||
} else if (fmt != SND_SOC_DAIFMT_CBC_CFC &&
|
||||
!aic31xx->master_dapm_route_applied) {
|
||||
/*
|
||||
* Add the needed DAPM route(s) for codec clock master modes,
|
||||
|
@ -1083,21 +1083,20 @@ static int aic31xx_set_dai_fmt(struct snd_soc_dai *codec_dai,
|
|||
|
||||
dev_dbg(component->dev, "## %s: fmt = 0x%x\n", __func__, fmt);
|
||||
|
||||
/* set master/slave audio interface */
|
||||
switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
|
||||
case SND_SOC_DAIFMT_CBM_CFM:
|
||||
switch (fmt & SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK) {
|
||||
case SND_SOC_DAIFMT_CBP_CFP:
|
||||
iface_reg1 |= AIC31XX_BCLK_MASTER | AIC31XX_WCLK_MASTER;
|
||||
break;
|
||||
case SND_SOC_DAIFMT_CBS_CFM:
|
||||
case SND_SOC_DAIFMT_CBC_CFP:
|
||||
iface_reg1 |= AIC31XX_WCLK_MASTER;
|
||||
break;
|
||||
case SND_SOC_DAIFMT_CBM_CFS:
|
||||
case SND_SOC_DAIFMT_CBP_CFC:
|
||||
iface_reg1 |= AIC31XX_BCLK_MASTER;
|
||||
break;
|
||||
case SND_SOC_DAIFMT_CBS_CFS:
|
||||
case SND_SOC_DAIFMT_CBC_CFC:
|
||||
break;
|
||||
default:
|
||||
dev_err(component->dev, "Invalid DAI master/slave interface\n");
|
||||
dev_err(component->dev, "Invalid DAI clock provider\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue