ASoC: pcm3060: Use modern ASoC DAI format terminology

As part of moving to remove the old style defines for the bus clocks update
the pcm3060 driver to use more modern terminology for clocking.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20220223014731.2765283-1-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Mark Brown 2022-02-23 01:47:31 +00:00
parent 9b3ff6378d
commit 3c7d8a3517
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0
2 changed files with 8 additions and 8 deletions

View File

@ -68,15 +68,15 @@ static int pcm3060_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)
return -EINVAL; return -EINVAL;
} }
switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) { switch (fmt & SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK) {
case SND_SOC_DAIFMT_CBM_CFM: case SND_SOC_DAIFMT_CBP_CFP:
priv->dai[dai->id].is_master = true; priv->dai[dai->id].is_provider = true;
break; break;
case SND_SOC_DAIFMT_CBS_CFS: case SND_SOC_DAIFMT_CBC_CFC:
priv->dai[dai->id].is_master = false; priv->dai[dai->id].is_provider = false;
break; break;
default: default:
dev_err(comp->dev, "unsupported DAI master mode: 0x%x\n", fmt); dev_err(comp->dev, "unsupported DAI mode: 0x%x\n", fmt);
return -EINVAL; return -EINVAL;
} }
@ -116,7 +116,7 @@ static int pcm3060_hw_params(struct snd_pcm_substream *substream,
unsigned int reg; unsigned int reg;
unsigned int val; unsigned int val;
if (!priv->dai[dai->id].is_master) { if (!priv->dai[dai->id].is_provider) {
val = PCM3060_REG_MS_S; val = PCM3060_REG_MS_S;
goto val_ready; goto val_ready;
} }

View File

@ -23,7 +23,7 @@ extern const struct regmap_config pcm3060_regmap;
#define PCM3060_CLK2 2 #define PCM3060_CLK2 2
struct pcm3060_priv_dai { struct pcm3060_priv_dai {
bool is_master; bool is_provider;
unsigned int sclk_freq; unsigned int sclk_freq;
}; };