mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-05 07:46:53 +07:00
ASoC: tas2552: Rename mclk parameter to pll_clkin to match with the datasheet
MCLK is one of the possible source for the pll_clkin frequency. Make this clear by renaming the variable. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
dd6e305340
commit
16bd395259
@ -75,7 +75,7 @@ struct tas2552_data {
|
|||||||
struct regulator_bulk_data supplies[TAS2552_NUM_SUPPLIES];
|
struct regulator_bulk_data supplies[TAS2552_NUM_SUPPLIES];
|
||||||
struct gpio_desc *enable_gpio;
|
struct gpio_desc *enable_gpio;
|
||||||
unsigned char regs[TAS2552_VBAT_DATA];
|
unsigned char regs[TAS2552_VBAT_DATA];
|
||||||
unsigned int mclk;
|
unsigned int pll_clkin;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Input mux controls */
|
/* Input mux controls */
|
||||||
@ -141,13 +141,13 @@ static int tas2552_hw_params(struct snd_pcm_substream *substream,
|
|||||||
int d;
|
int d;
|
||||||
u8 p, j;
|
u8 p, j;
|
||||||
|
|
||||||
if (!tas2552->mclk)
|
if (!tas2552->pll_clkin)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
snd_soc_update_bits(codec, TAS2552_CFG_2, TAS2552_PLL_ENABLE, 0);
|
snd_soc_update_bits(codec, TAS2552_CFG_2, TAS2552_PLL_ENABLE, 0);
|
||||||
|
|
||||||
if (tas2552->mclk == TAS2552_245MHZ_CLK ||
|
if (tas2552->pll_clkin == TAS2552_245MHZ_CLK ||
|
||||||
tas2552->mclk == TAS2552_225MHZ_CLK) {
|
tas2552->pll_clkin == TAS2552_225MHZ_CLK) {
|
||||||
/* By pass the PLL configuration */
|
/* By pass the PLL configuration */
|
||||||
snd_soc_update_bits(codec, TAS2552_PLL_CTRL_2,
|
snd_soc_update_bits(codec, TAS2552_PLL_CTRL_2,
|
||||||
TAS2552_PLL_BYPASS_MASK,
|
TAS2552_PLL_BYPASS_MASK,
|
||||||
@ -171,8 +171,8 @@ static int tas2552_hw_params(struct snd_pcm_substream *substream,
|
|||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
j = (pll_clk * 2 * (1 << p)) / tas2552->mclk;
|
j = (pll_clk * 2 * (1 << p)) / tas2552->pll_clkin;
|
||||||
d = (pll_clk * 2 * (1 << p)) % tas2552->mclk;
|
d = (pll_clk * 2 * (1 << p)) % tas2552->pll_clkin;
|
||||||
|
|
||||||
snd_soc_update_bits(codec, TAS2552_PLL_CTRL_1,
|
snd_soc_update_bits(codec, TAS2552_PLL_CTRL_1,
|
||||||
TAS2552_PLL_J_MASK, j);
|
TAS2552_PLL_J_MASK, j);
|
||||||
@ -245,7 +245,7 @@ static int tas2552_set_dai_sysclk(struct snd_soc_dai *dai, int clk_id,
|
|||||||
struct snd_soc_codec *codec = dai->codec;
|
struct snd_soc_codec *codec = dai->codec;
|
||||||
struct tas2552_data *tas2552 = dev_get_drvdata(codec->dev);
|
struct tas2552_data *tas2552 = dev_get_drvdata(codec->dev);
|
||||||
|
|
||||||
tas2552->mclk = freq;
|
tas2552->pll_clkin = freq;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user