Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/4] ASoC: rt5645: Remove the unused variable
@ 2014-05-08  6:47 Oder Chiou
  2014-05-08  6:47 ` [PATCH 2/4] ASoC: rt5645: Staticise non-exported symbols Oder Chiou
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Oder Chiou @ 2014-05-08  6:47 UTC (permalink / raw)
  To: broonie, lgirdwood; +Cc: oder_chiou, bardliao, alsa-devel, flove

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:
-- 
1.8.1.1.439.g50a6b54

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/4] ASoC: rt5645: Staticise non-exported symbols
  2014-05-08  6:47 [PATCH 1/4] ASoC: rt5645: Remove the unused variable Oder Chiou
@ 2014-05-08  6:47 ` Oder Chiou
  2014-05-08  6:47 ` [PATCH 3/4] ASoC: rt5645: Move settings from probe() to reg_default struct Oder Chiou
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Oder Chiou @ 2014-05-08  6:47 UTC (permalink / raw)
  To: broonie, lgirdwood; +Cc: oder_chiou, bardliao, alsa-devel, flove

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,
-- 
1.8.1.1.439.g50a6b54

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 3/4] ASoC: rt5645: Move settings from probe() to reg_default struct
  2014-05-08  6:47 [PATCH 1/4] ASoC: rt5645: Remove the unused variable Oder Chiou
  2014-05-08  6:47 ` [PATCH 2/4] ASoC: rt5645: Staticise non-exported symbols Oder Chiou
@ 2014-05-08  6:47 ` Oder Chiou
  2014-05-08  6:47 ` [PATCH 4/4] ASoC: rt5645: Correct the cache sync function Oder Chiou
  2014-05-08  7:05 ` [PATCH 1/4] ASoC: rt5645: Remove the unused variable Mark Brown
  3 siblings, 0 replies; 5+ messages in thread
From: Oder Chiou @ 2014-05-08  6:47 UTC (permalink / raw)
  To: broonie, lgirdwood; +Cc: oder_chiou, bardliao, alsa-devel, flove

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;
 }
-- 
1.8.1.1.439.g50a6b54

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 4/4] ASoC: rt5645: Correct the cache sync function
  2014-05-08  6:47 [PATCH 1/4] ASoC: rt5645: Remove the unused variable Oder Chiou
  2014-05-08  6:47 ` [PATCH 2/4] ASoC: rt5645: Staticise non-exported symbols Oder Chiou
  2014-05-08  6:47 ` [PATCH 3/4] ASoC: rt5645: Move settings from probe() to reg_default struct Oder Chiou
@ 2014-05-08  6:47 ` Oder Chiou
  2014-05-08  7:05 ` [PATCH 1/4] ASoC: rt5645: Remove the unused variable Mark Brown
  3 siblings, 0 replies; 5+ messages in thread
From: Oder Chiou @ 2014-05-08  6:47 UTC (permalink / raw)
  To: broonie, lgirdwood; +Cc: oder_chiou, bardliao, alsa-devel, flove

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;
 }
-- 
1.8.1.1.439.g50a6b54

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/4] ASoC: rt5645: Remove the unused variable
  2014-05-08  6:47 [PATCH 1/4] ASoC: rt5645: Remove the unused variable Oder Chiou
                   ` (2 preceding siblings ...)
  2014-05-08  6:47 ` [PATCH 4/4] ASoC: rt5645: Correct the cache sync function Oder Chiou
@ 2014-05-08  7:05 ` Mark Brown
  3 siblings, 0 replies; 5+ messages in thread
From: Mark Brown @ 2014-05-08  7:05 UTC (permalink / raw)
  To: Oder Chiou; +Cc: bardliao, alsa-devel, lgirdwood, flove


[-- Attachment #1.1: Type: text/plain, Size: 131 bytes --]

On Thu, May 08, 2014 at 02:47:34PM +0800, Oder Chiou wrote:
> The patch is for removing the unused variable.

Applied all, thanks.

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-05-08  7:05 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-08  6:47 [PATCH 1/4] ASoC: rt5645: Remove the unused variable Oder Chiou
2014-05-08  6:47 ` [PATCH 2/4] ASoC: rt5645: Staticise non-exported symbols Oder Chiou
2014-05-08  6:47 ` [PATCH 3/4] ASoC: rt5645: Move settings from probe() to reg_default struct Oder Chiou
2014-05-08  6:47 ` [PATCH 4/4] ASoC: rt5645: Correct the cache sync function Oder Chiou
2014-05-08  7:05 ` [PATCH 1/4] ASoC: rt5645: Remove the unused variable Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox