ASoC: tlv320aic26: Use modern ASoC DAI format terminology
As part of moving to remove the old style defines for the bus clocks update the tlv320aic26 driver to use more modern terminology for clocking. Signed-off-by: Mark Brown <broonie@kernel.org> Reported-by: kernel test robot <lkp@intel.com> Link: https://lore.kernel.org/r/20220602135316.3554400-17-broonie@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
b9ff35c7af
commit
8d322f170b
|
@ -32,7 +32,7 @@ struct aic26 {
|
|||
struct spi_device *spi;
|
||||
struct regmap *regmap;
|
||||
struct snd_soc_component *component;
|
||||
int master;
|
||||
int clock_provider;
|
||||
int datfm;
|
||||
int mclk;
|
||||
|
||||
|
@ -117,8 +117,8 @@ static int aic26_hw_params(struct snd_pcm_substream *substream,
|
|||
reg = dval << 2;
|
||||
snd_soc_component_write(component, AIC26_REG_PLL_PROG2, reg);
|
||||
|
||||
/* Audio Control 3 (master mode, fsref rate) */
|
||||
if (aic26->master)
|
||||
/* Audio Control 3 (clock provider mode, fsref rate) */
|
||||
if (aic26->clock_provider)
|
||||
reg = 0x0800;
|
||||
if (fsref == 48000)
|
||||
reg = 0x2000;
|
||||
|
@ -178,10 +178,9 @@ static int aic26_set_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt)
|
|||
dev_dbg(&aic26->spi->dev, "aic26_set_fmt(dai=%p, fmt==%i)\n",
|
||||
codec_dai, fmt);
|
||||
|
||||
/* set master/slave audio interface */
|
||||
switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
|
||||
case SND_SOC_DAIFMT_CBM_CFM: aic26->master = 1; break;
|
||||
case SND_SOC_DAIFMT_CBS_CFS: aic26->master = 0; break;
|
||||
switch (fmt & SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK) {
|
||||
case SND_SOC_DAIFMT_CBP_CFP: aic26->clock_provider = 1; break;
|
||||
case SND_SOC_DAIFMT_CBC_CFC: aic26->clock_provider = 0; break;
|
||||
default:
|
||||
dev_dbg(&aic26->spi->dev, "bad master\n"); return -EINVAL;
|
||||
}
|
||||
|
@ -363,7 +362,7 @@ static int aic26_spi_probe(struct spi_device *spi)
|
|||
/* Initialize the driver data */
|
||||
aic26->spi = spi;
|
||||
dev_set_drvdata(&spi->dev, aic26);
|
||||
aic26->master = 1;
|
||||
aic26->clock_provider = 1;
|
||||
|
||||
ret = devm_snd_soc_register_component(&spi->dev,
|
||||
&aic26_soc_component_dev, &aic26_dai, 1);
|
||||
|
|
Loading…
Reference in New Issue