[alsa-devel] [PATCH 1/4] ASoC: rt5645: Remove the unused variable
The patch is for removing the unused variable.
Signed-off-by: Oder Chiou oder_chiou@realtek.com --- sound/soc/codecs/rt5645.c | 1 - 1 file changed, 1 deletion(-)
diff --git a/sound/soc/codecs/rt5645.c b/sound/soc/codecs/rt5645.c index 7d8cc16..37ec468 100644 --- a/sound/soc/codecs/rt5645.c +++ b/sound/soc/codecs/rt5645.c @@ -1166,7 +1166,6 @@ static int rt5645_spk_event(struct snd_soc_dapm_widget *w, struct snd_kcontrol *kcontrol, int event) { struct snd_soc_codec *codec = w->codec; - struct rt5645_priv *rt5645 = snd_soc_codec_get_drvdata(codec);
switch (event) { case SND_SOC_DAPM_POST_PMU:
The patch is for staticising non-exported symbols
Signed-off-by: Oder Chiou oder_chiou@realtek.com --- sound/soc/codecs/rt5645.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/sound/soc/codecs/rt5645.c b/sound/soc/codecs/rt5645.c index 37ec468..9d8c7c8 100644 --- a/sound/soc/codecs/rt5645.c +++ b/sound/soc/codecs/rt5645.c @@ -2248,7 +2248,7 @@ static int rt5645_resume(struct snd_soc_codec *codec) #define RT5645_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE | \ SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S8)
-struct snd_soc_dai_ops rt5645_aif_dai_ops = { +static struct snd_soc_dai_ops rt5645_aif_dai_ops = { .hw_params = rt5645_hw_params, .set_fmt = rt5645_set_dai_fmt, .set_sysclk = rt5645_set_dai_sysclk, @@ -2256,7 +2256,7 @@ struct snd_soc_dai_ops rt5645_aif_dai_ops = { .set_pll = rt5645_set_dai_pll, };
-struct snd_soc_dai_driver rt5645_dai[] = { +static struct snd_soc_dai_driver rt5645_dai[] = { { .name = "rt5645-aif1", .id = RT5645_AIF1, @@ -2459,7 +2459,7 @@ static int rt5645_i2c_remove(struct i2c_client *i2c) return 0; }
-struct i2c_driver rt5645_i2c_driver = { +static struct i2c_driver rt5645_i2c_driver = { .driver = { .name = "rt5645", .owner = THIS_MODULE,
The patch moves the private register settings from probe() to reg_default struct.
Signed-off-by: Oder Chiou oder_chiou@realtek.com --- sound/soc/codecs/rt5645.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/sound/soc/codecs/rt5645.c b/sound/soc/codecs/rt5645.c index 9d8c7c8..4be9000 100644 --- a/sound/soc/codecs/rt5645.c +++ b/sound/soc/codecs/rt5645.c @@ -50,6 +50,10 @@ static const struct regmap_range_cfg rt5645_ranges[] = {
static const struct reg_default init_list[] = { {RT5645_PR_BASE + 0x3d, 0x3600}, + {RT5645_PR_BASE + 0x1c, 0xfd20); + {RT5645_PR_BASE + 0x20, 0x611f); + {RT5645_PR_BASE + 0x21, 0x4040); + {RT5645_PR_BASE + 0x23, 0x0004); }; #define RT5645_INIT_REG_LEN ARRAY_SIZE(init_list)
@@ -2205,10 +2209,6 @@ static int rt5645_probe(struct snd_soc_codec *codec) rt5645_set_bias_level(codec, SND_SOC_BIAS_OFF);
snd_soc_update_bits(codec, RT5645_CHARGE_PUMP, 0x0300, 0x0200); - snd_soc_write(codec, RT5645_PR_BASE + 0x1c, 0xfd20); - snd_soc_write(codec, RT5645_PR_BASE + 0x20, 0x611f); - snd_soc_write(codec, RT5645_PR_BASE + 0x21, 0x4040); - snd_soc_write(codec, RT5645_PR_BASE + 0x23, 0x0004);
return 0; }
The patch corrects the cache sync function
Signed-off-by: Oder Chiou oder_chiou@realtek.com --- sound/soc/codecs/rt5645.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/codecs/rt5645.c b/sound/soc/codecs/rt5645.c index 4be9000..6db6f81 100644 --- a/sound/soc/codecs/rt5645.c +++ b/sound/soc/codecs/rt5645.c @@ -2235,7 +2235,7 @@ static int rt5645_resume(struct snd_soc_codec *codec) struct rt5645_priv *rt5645 = snd_soc_codec_get_drvdata(codec);
regcache_cache_only(rt5645->regmap, false); - snd_soc_cache_sync(codec); + regcache_sync(rt5645->regmap);
return 0; }
participants (2)
-
Mark Brown
-
Oder Chiou