提交 7f6d75d7 编写于 作者: F Fabio Estevam 提交者: Mark Brown

ASoC: sgtl5000: Cleanup the comments

Fix grammar and typos.

Besides that, also fix the comment about the range of SYS_MCLK, which is from
8 to 27 MHz.
Signed-off-by: NFabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: NMark Brown <broonie@kernel.org>
上级 f114040e
...@@ -530,16 +530,16 @@ static int sgtl5000_set_dai_sysclk(struct snd_soc_dai *codec_dai, ...@@ -530,16 +530,16 @@ static int sgtl5000_set_dai_sysclk(struct snd_soc_dai *codec_dai,
/* /*
* set clock according to i2s frame clock, * set clock according to i2s frame clock,
* sgtl5000 provide 2 clock sources. * sgtl5000 provides 2 clock sources:
* 1. sys_mclk. sample freq can only configure to * 1. sys_mclk: sample freq can only be configured to
* 1/256, 1/384, 1/512 of sys_mclk. * 1/256, 1/384, 1/512 of sys_mclk.
* 2. pll. can derive any audio clocks. * 2. pll: can derive any audio clocks.
* *
* clock setting rules: * clock setting rules:
* 1. in slave mode, only sys_mclk can use. * 1. in slave mode, only sys_mclk can be used
* 2. as constraint by sys_mclk, sample freq should * 2. as constraint by sys_mclk, sample freq should be set to 32 kHz, 44.1 kHz
* set to 32k, 44.1k and above. * and above.
* 3. using sys_mclk prefer to pll to save power. * 3. usage of sys_mclk is preferred over pll to save power.
*/ */
static int sgtl5000_set_clock(struct snd_soc_codec *codec, int frame_rate) static int sgtl5000_set_clock(struct snd_soc_codec *codec, int frame_rate)
{ {
...@@ -549,8 +549,8 @@ static int sgtl5000_set_clock(struct snd_soc_codec *codec, int frame_rate) ...@@ -549,8 +549,8 @@ static int sgtl5000_set_clock(struct snd_soc_codec *codec, int frame_rate)
/* /*
* sample freq should be divided by frame clock, * sample freq should be divided by frame clock,
* if frame clock lower than 44.1khz, sample feq should set to * if frame clock is lower than 44.1 kHz, sample freq should be set to
* 32khz or 44.1khz. * 32 kHz or 44.1 kHz.
*/ */
switch (frame_rate) { switch (frame_rate) {
case 8000: case 8000:
...@@ -603,7 +603,8 @@ static int sgtl5000_set_clock(struct snd_soc_codec *codec, int frame_rate) ...@@ -603,7 +603,8 @@ static int sgtl5000_set_clock(struct snd_soc_codec *codec, int frame_rate)
/* /*
* calculate the divider of mclk/sample_freq, * calculate the divider of mclk/sample_freq,
* factor of freq =96k can only be 256, since mclk in range (12m,27m) * factor of freq = 96 kHz can only be 256, since mclk is in the range
* of 8 MHz - 27 MHz
*/ */
switch (sgtl5000->sysclk / sys_fs) { switch (sgtl5000->sysclk / sys_fs) {
case 256: case 256:
...@@ -619,7 +620,7 @@ static int sgtl5000_set_clock(struct snd_soc_codec *codec, int frame_rate) ...@@ -619,7 +620,7 @@ static int sgtl5000_set_clock(struct snd_soc_codec *codec, int frame_rate)
SGTL5000_MCLK_FREQ_SHIFT; SGTL5000_MCLK_FREQ_SHIFT;
break; break;
default: default:
/* if mclk not satisify the divider, use pll */ /* if mclk does not satisfy the divider, use pll */
if (sgtl5000->master) { if (sgtl5000->master) {
clk_ctl |= SGTL5000_MCLK_FREQ_PLL << clk_ctl |= SGTL5000_MCLK_FREQ_PLL <<
SGTL5000_MCLK_FREQ_SHIFT; SGTL5000_MCLK_FREQ_SHIFT;
...@@ -795,7 +796,7 @@ static int ldo_regulator_enable(struct regulator_dev *dev) ...@@ -795,7 +796,7 @@ static int ldo_regulator_enable(struct regulator_dev *dev)
SGTL5000_LINEREG_D_POWERUP, SGTL5000_LINEREG_D_POWERUP,
SGTL5000_LINEREG_D_POWERUP); SGTL5000_LINEREG_D_POWERUP);
/* when internal ldo enabled, simple digital power can be disabled */ /* when internal ldo is enabled, simple digital power can be disabled */
snd_soc_update_bits(codec, SGTL5000_CHIP_ANA_POWER, snd_soc_update_bits(codec, SGTL5000_CHIP_ANA_POWER,
SGTL5000_LINREG_SIMPLE_POWERUP, SGTL5000_LINREG_SIMPLE_POWERUP,
0); 0);
...@@ -1079,7 +1080,7 @@ static bool sgtl5000_readable(struct device *dev, unsigned int reg) ...@@ -1079,7 +1080,7 @@ static bool sgtl5000_readable(struct device *dev, unsigned int reg)
/* /*
* sgtl5000 has 3 internal power supplies: * sgtl5000 has 3 internal power supplies:
* 1. VAG, normally set to vdda/2 * 1. VAG, normally set to vdda/2
* 2. chargepump, set to different value * 2. charge pump, set to different value
* according to voltage of vdda and vddio * according to voltage of vdda and vddio
* 3. line out VAG, normally set to vddio/2 * 3. line out VAG, normally set to vddio/2
* *
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册