* [PATCH 1/6] ASoC: rt5640: Remove the pre-allocated size of reg_default
@ 2014-03-28 12:28 Oder Chiou
2014-03-28 12:28 ` [PATCH 2/6] ASoC: rt5640: Rename the function of clock checking Oder Chiou
` (5 more replies)
0 siblings, 6 replies; 13+ messages in thread
From: Oder Chiou @ 2014-03-28 12:28 UTC (permalink / raw)
To: broonie, lgirdwood; +Cc: Oder Chiou, bardliao, alsa-devel, flove
In order to prevent the redundant memory usage, the pre-allocated size of
reg_default should be remove.
Signed-off-by: Oder Chiou <oder_chiou@realtek.com>
---
sound/soc/codecs/rt5640.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/codecs/rt5640.c b/sound/soc/codecs/rt5640.c
index cf041e3..9427511 100644
--- a/sound/soc/codecs/rt5640.c
+++ b/sound/soc/codecs/rt5640.c
@@ -59,7 +59,7 @@ static struct reg_default init_list[] = {
};
#define RT5640_INIT_REG_LEN ARRAY_SIZE(init_list)
-static const struct reg_default rt5640_reg[RT5640_VENDOR_ID2 + 1] = {
+static const struct reg_default rt5640_reg[] = {
{ 0x00, 0x000e },
{ 0x01, 0xc8c8 },
{ 0x02, 0xc8c8 },
--
1.8.1.1.439.g50a6b54
^ permalink raw reply related [flat|nested] 13+ messages in thread* [PATCH 2/6] ASoC: rt5640: Rename the function of clock checking 2014-03-28 12:28 [PATCH 1/6] ASoC: rt5640: Remove the pre-allocated size of reg_default Oder Chiou @ 2014-03-28 12:28 ` Oder Chiou 2014-03-28 12:53 ` Mark Brown 2014-03-28 12:28 ` [PATCH 3/6] ASoC: rt5640: Remove the unused or incorrect setting of clock source Oder Chiou ` (4 subsequent siblings) 5 siblings, 1 reply; 13+ messages in thread From: Oder Chiou @ 2014-03-28 12:28 UTC (permalink / raw) To: broonie, lgirdwood; +Cc: Oder Chiou, bardliao, alsa-devel, flove In order to identify clearly, the patch renames the function "check_sysclk1_source" to "is_sys_clk_from_pll". Signed-off-by: Oder Chiou <oder_chiou@realtek.com> --- sound/soc/codecs/rt5640.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/sound/soc/codecs/rt5640.c b/sound/soc/codecs/rt5640.c index 9427511..2afce49 100644 --- a/sound/soc/codecs/rt5640.c +++ b/sound/soc/codecs/rt5640.c @@ -480,7 +480,7 @@ static int set_dmic_clk(struct snd_soc_dapm_widget *w, return idx; } -static int check_sysclk1_source(struct snd_soc_dapm_widget *source, +static int is_sys_clk_from_pll(struct snd_soc_dapm_widget *source, struct snd_soc_dapm_widget *sink) { unsigned int val; @@ -1273,22 +1273,22 @@ static const struct snd_soc_dapm_route rt5640_dapm_routes[] = { {"Stereo ADC MIXL", "ADC1 Switch", "Stereo ADC L1 Mux"}, {"Stereo ADC MIXL", "ADC2 Switch", "Stereo ADC L2 Mux"}, {"Stereo ADC MIXL", NULL, "Stereo Filter"}, - {"Stereo Filter", NULL, "PLL1", check_sysclk1_source}, + {"Stereo Filter", NULL, "PLL1", is_sys_clk_from_pll}, {"Stereo ADC MIXR", "ADC1 Switch", "Stereo ADC R1 Mux"}, {"Stereo ADC MIXR", "ADC2 Switch", "Stereo ADC R2 Mux"}, {"Stereo ADC MIXR", NULL, "Stereo Filter"}, - {"Stereo Filter", NULL, "PLL1", check_sysclk1_source}, + {"Stereo Filter", NULL, "PLL1", is_sys_clk_from_pll}, {"Mono ADC MIXL", "ADC1 Switch", "Mono ADC L1 Mux"}, {"Mono ADC MIXL", "ADC2 Switch", "Mono ADC L2 Mux"}, {"Mono ADC MIXL", NULL, "Mono Left Filter"}, - {"Mono Left Filter", NULL, "PLL1", check_sysclk1_source}, + {"Mono Left Filter", NULL, "PLL1", is_sys_clk_from_pll}, {"Mono ADC MIXR", "ADC1 Switch", "Mono ADC R1 Mux"}, {"Mono ADC MIXR", "ADC2 Switch", "Mono ADC R2 Mux"}, {"Mono ADC MIXR", NULL, "Mono Right Filter"}, - {"Mono Right Filter", NULL, "PLL1", check_sysclk1_source}, + {"Mono Right Filter", NULL, "PLL1", is_sys_clk_from_pll}, {"IF2 ADC L", NULL, "Mono ADC MIXL"}, {"IF2 ADC R", NULL, "Mono ADC MIXR"}, @@ -1377,13 +1377,13 @@ static const struct snd_soc_dapm_route rt5640_dapm_routes[] = { {"DIG MIXR", "DAC R2 Switch", "DAC R2 Mux"}, {"DAC L1", NULL, "Stereo DAC MIXL"}, - {"DAC L1", NULL, "PLL1", check_sysclk1_source}, + {"DAC L1", NULL, "PLL1", is_sys_clk_from_pll}, {"DAC R1", NULL, "Stereo DAC MIXR"}, - {"DAC R1", NULL, "PLL1", check_sysclk1_source}, + {"DAC R1", NULL, "PLL1", is_sys_clk_from_pll}, {"DAC L2", NULL, "Mono DAC MIXL"}, - {"DAC L2", NULL, "PLL1", check_sysclk1_source}, + {"DAC L2", NULL, "PLL1", is_sys_clk_from_pll}, {"DAC R2", NULL, "Mono DAC MIXR"}, - {"DAC R2", NULL, "PLL1", check_sysclk1_source}, + {"DAC R2", NULL, "PLL1", is_sys_clk_from_pll}, {"SPK MIXL", "REC MIXL Switch", "RECMIXL"}, {"SPK MIXL", "INL Switch", "INL VOL"}, -- 1.8.1.1.439.g50a6b54 ^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [PATCH 2/6] ASoC: rt5640: Rename the function of clock checking 2014-03-28 12:28 ` [PATCH 2/6] ASoC: rt5640: Rename the function of clock checking Oder Chiou @ 2014-03-28 12:53 ` Mark Brown 0 siblings, 0 replies; 13+ messages in thread From: Mark Brown @ 2014-03-28 12:53 UTC (permalink / raw) To: Oder Chiou; +Cc: bardliao, alsa-devel, lgirdwood, flove [-- Attachment #1.1: Type: text/plain, Size: 192 bytes --] On Fri, Mar 28, 2014 at 08:28:26PM +0800, Oder Chiou wrote: > In order to identify clearly, the patch renames the function > "check_sysclk1_source" to "is_sys_clk_from_pll". Applied, 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] 13+ messages in thread
* [PATCH 3/6] ASoC: rt5640: Remove the unused or incorrect setting of clock source 2014-03-28 12:28 [PATCH 1/6] ASoC: rt5640: Remove the pre-allocated size of reg_default Oder Chiou 2014-03-28 12:28 ` [PATCH 2/6] ASoC: rt5640: Rename the function of clock checking Oder Chiou @ 2014-03-28 12:28 ` Oder Chiou 2014-03-28 12:53 ` Mark Brown 2014-03-28 12:28 ` [PATCH 4/6] ASoC: rt5640: Remove the unused field in private data Oder Chiou ` (3 subsequent siblings) 5 siblings, 1 reply; 13+ messages in thread From: Oder Chiou @ 2014-03-28 12:28 UTC (permalink / raw) To: broonie, lgirdwood; +Cc: Oder Chiou, bardliao, alsa-devel, flove The patch removes the unused or incorrect setting of clock source. Signed-off-by: Oder Chiou <oder_chiou@realtek.com> --- sound/soc/codecs/rt5640.c | 8 +------- sound/soc/codecs/rt5640.h | 2 -- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/sound/soc/codecs/rt5640.c b/sound/soc/codecs/rt5640.c index 2afce49..096edfe 100644 --- a/sound/soc/codecs/rt5640.c +++ b/sound/soc/codecs/rt5640.c @@ -487,7 +487,7 @@ static int is_sys_clk_from_pll(struct snd_soc_dapm_widget *source, val = snd_soc_read(source->codec, RT5640_GLB_CLK); val &= RT5640_SCLK_SRC_MASK; - if (val == RT5640_SCLK_SRC_PLL1 || val == RT5640_SCLK_SRC_PLL1T) + if (val == RT5640_SCLK_SRC_PLL1) return 1; else return 0; @@ -1694,12 +1694,6 @@ static int rt5640_set_dai_sysclk(struct snd_soc_dai *dai, case RT5640_SCLK_S_PLL1: reg_val |= RT5640_SCLK_SRC_PLL1; break; - case RT5640_SCLK_S_PLL1_TK: - reg_val |= RT5640_SCLK_SRC_PLL1T; - break; - case RT5640_SCLK_S_RCCLK: - reg_val |= RT5640_SCLK_SRC_RCCLK; - break; default: dev_err(codec->dev, "Invalid clock id (%d)\n", clk_id); return -EINVAL; diff --git a/sound/soc/codecs/rt5640.h b/sound/soc/codecs/rt5640.h index 5e8df25a..cbd07b5 100644 --- a/sound/soc/codecs/rt5640.h +++ b/sound/soc/codecs/rt5640.h @@ -976,8 +976,6 @@ #define RT5640_SCLK_SRC_SFT 14 #define RT5640_SCLK_SRC_MCLK (0x0 << 14) #define RT5640_SCLK_SRC_PLL1 (0x1 << 14) -#define RT5640_SCLK_SRC_PLL1T (0x2 << 14) -#define RT5640_SCLK_SRC_RCCLK (0x3 << 14) /* 15MHz */ #define RT5640_PLL1_SRC_MASK (0x3 << 12) #define RT5640_PLL1_SRC_SFT 12 #define RT5640_PLL1_SRC_MCLK (0x0 << 12) -- 1.8.1.1.439.g50a6b54 ^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [PATCH 3/6] ASoC: rt5640: Remove the unused or incorrect setting of clock source 2014-03-28 12:28 ` [PATCH 3/6] ASoC: rt5640: Remove the unused or incorrect setting of clock source Oder Chiou @ 2014-03-28 12:53 ` Mark Brown 0 siblings, 0 replies; 13+ messages in thread From: Mark Brown @ 2014-03-28 12:53 UTC (permalink / raw) To: Oder Chiou; +Cc: bardliao, alsa-devel, lgirdwood, flove [-- Attachment #1.1: Type: text/plain, Size: 147 bytes --] On Fri, Mar 28, 2014 at 08:28:27PM +0800, Oder Chiou wrote: > The patch removes the unused or incorrect setting of clock source. Applied, 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] 13+ messages in thread
* [PATCH 4/6] ASoC: rt5640: Remove the unused field in private data 2014-03-28 12:28 [PATCH 1/6] ASoC: rt5640: Remove the pre-allocated size of reg_default Oder Chiou 2014-03-28 12:28 ` [PATCH 2/6] ASoC: rt5640: Rename the function of clock checking Oder Chiou 2014-03-28 12:28 ` [PATCH 3/6] ASoC: rt5640: Remove the unused or incorrect setting of clock source Oder Chiou @ 2014-03-28 12:28 ` Oder Chiou 2014-03-28 12:53 ` Mark Brown 2014-03-28 12:28 ` [PATCH 5/6] ASoC: rt5640: Remove the unnecessary parentheses Oder Chiou ` (2 subsequent siblings) 5 siblings, 1 reply; 13+ messages in thread From: Oder Chiou @ 2014-03-28 12:28 UTC (permalink / raw) To: broonie, lgirdwood; +Cc: Oder Chiou, bardliao, alsa-devel, flove The patch removes the unused field in private data. Signed-off-by: Oder Chiou <oder_chiou@realtek.com> --- sound/soc/codecs/rt5640.h | 1 - 1 file changed, 1 deletion(-) diff --git a/sound/soc/codecs/rt5640.h b/sound/soc/codecs/rt5640.h index cbd07b5..d7bd525 100644 --- a/sound/soc/codecs/rt5640.h +++ b/sound/soc/codecs/rt5640.h @@ -2095,7 +2095,6 @@ struct rt5640_priv { int pll_in; int pll_out; - int dmic_en; bool hp_mute; }; -- 1.8.1.1.439.g50a6b54 ^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [PATCH 4/6] ASoC: rt5640: Remove the unused field in private data 2014-03-28 12:28 ` [PATCH 4/6] ASoC: rt5640: Remove the unused field in private data Oder Chiou @ 2014-03-28 12:53 ` Mark Brown 0 siblings, 0 replies; 13+ messages in thread From: Mark Brown @ 2014-03-28 12:53 UTC (permalink / raw) To: Oder Chiou; +Cc: bardliao, alsa-devel, lgirdwood, flove [-- Attachment #1.1: Type: text/plain, Size: 132 bytes --] On Fri, Mar 28, 2014 at 08:28:28PM +0800, Oder Chiou wrote: > The patch removes the unused field in private data. Applied, 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] 13+ messages in thread
* [PATCH 5/6] ASoC: rt5640: Remove the unnecessary parentheses 2014-03-28 12:28 [PATCH 1/6] ASoC: rt5640: Remove the pre-allocated size of reg_default Oder Chiou ` (2 preceding siblings ...) 2014-03-28 12:28 ` [PATCH 4/6] ASoC: rt5640: Remove the unused field in private data Oder Chiou @ 2014-03-28 12:28 ` Oder Chiou 2014-03-28 12:53 ` Mark Brown 2014-03-28 12:28 ` [PATCH 6/6] ASoC: rt5640: Change the setting method of idle_bias_off Oder Chiou 2014-03-28 12:52 ` [PATCH 1/6] ASoC: rt5640: Remove the pre-allocated size of reg_default Mark Brown 5 siblings, 1 reply; 13+ messages in thread From: Oder Chiou @ 2014-03-28 12:28 UTC (permalink / raw) To: broonie, lgirdwood; +Cc: Oder Chiou, bardliao, alsa-devel, flove The patch removes the unnecessary parentheses. Signed-off-by: Oder Chiou <oder_chiou@realtek.com> --- sound/soc/codecs/rt5640.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/codecs/rt5640.c b/sound/soc/codecs/rt5640.c index 096edfe..b5014a2 100644 --- a/sound/soc/codecs/rt5640.c +++ b/sound/soc/codecs/rt5640.c @@ -2102,7 +2102,7 @@ static int rt5640_i2c_probe(struct i2c_client *i2c, } regmap_read(rt5640->regmap, RT5640_VENDOR_ID2, &val); - if ((val != RT5640_DEVICE_ID)) { + if (val != RT5640_DEVICE_ID) { dev_err(&i2c->dev, "Device with ID register %x is not rt5640/39\n", val); return -ENODEV; -- 1.8.1.1.439.g50a6b54 ^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [PATCH 5/6] ASoC: rt5640: Remove the unnecessary parentheses 2014-03-28 12:28 ` [PATCH 5/6] ASoC: rt5640: Remove the unnecessary parentheses Oder Chiou @ 2014-03-28 12:53 ` Mark Brown 0 siblings, 0 replies; 13+ messages in thread From: Mark Brown @ 2014-03-28 12:53 UTC (permalink / raw) To: Oder Chiou; +Cc: bardliao, alsa-devel, lgirdwood, flove [-- Attachment #1.1: Type: text/plain, Size: 127 bytes --] On Fri, Mar 28, 2014 at 08:28:29PM +0800, Oder Chiou wrote: > The patch removes the unnecessary parentheses. Applied, 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] 13+ messages in thread
* [PATCH 6/6] ASoC: rt5640: Change the setting method of idle_bias_off 2014-03-28 12:28 [PATCH 1/6] ASoC: rt5640: Remove the pre-allocated size of reg_default Oder Chiou ` (3 preceding siblings ...) 2014-03-28 12:28 ` [PATCH 5/6] ASoC: rt5640: Remove the unnecessary parentheses Oder Chiou @ 2014-03-28 12:28 ` Oder Chiou 2014-03-28 12:54 ` Mark Brown 2014-03-28 12:52 ` [PATCH 1/6] ASoC: rt5640: Remove the pre-allocated size of reg_default Mark Brown 5 siblings, 1 reply; 13+ messages in thread From: Oder Chiou @ 2014-03-28 12:28 UTC (permalink / raw) To: broonie, lgirdwood; +Cc: Oder Chiou, bardliao, alsa-devel, flove The patch moves the idle_bias_off setting to struct "soc_codec_dev_rt5640". Signed-off-by: Oder Chiou <oder_chiou@realtek.com> --- sound/soc/codecs/rt5640.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/codecs/rt5640.c b/sound/soc/codecs/rt5640.c index b5014a2..2a349b0 100644 --- a/sound/soc/codecs/rt5640.c +++ b/sound/soc/codecs/rt5640.c @@ -1879,7 +1879,6 @@ static int rt5640_probe(struct snd_soc_codec *codec) rt5640->codec = codec; - codec->dapm.idle_bias_off = 1; rt5640_set_bias_level(codec, SND_SOC_BIAS_OFF); snd_soc_update_bits(codec, RT5640_DUMMY1, 0x0301, 0x0301); @@ -1988,6 +1987,7 @@ static struct snd_soc_codec_driver soc_codec_dev_rt5640 = { .suspend = rt5640_suspend, .resume = rt5640_resume, .set_bias_level = rt5640_set_bias_level, + .idle_bias_off = true, .controls = rt5640_snd_controls, .num_controls = ARRAY_SIZE(rt5640_snd_controls), .dapm_widgets = rt5640_dapm_widgets, -- 1.8.1.1.439.g50a6b54 ^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [PATCH 6/6] ASoC: rt5640: Change the setting method of idle_bias_off 2014-03-28 12:28 ` [PATCH 6/6] ASoC: rt5640: Change the setting method of idle_bias_off Oder Chiou @ 2014-03-28 12:54 ` Mark Brown 2014-03-31 2:24 ` [PATCH 6/6] ASoC: rt5640: Change the setting methodofidle_bias_off Oder Chiou 0 siblings, 1 reply; 13+ messages in thread From: Mark Brown @ 2014-03-28 12:54 UTC (permalink / raw) To: Oder Chiou; +Cc: bardliao, alsa-devel, lgirdwood, flove [-- Attachment #1.1: Type: text/plain, Size: 221 bytes --] On Fri, Mar 28, 2014 at 08:28:30PM +0800, Oder Chiou wrote: > The patch moves the idle_bias_off setting to struct "soc_codec_dev_rt5640". This doesn't seem to apply against current code, can you please check and resend? [-- 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] 13+ messages in thread
* Re: [PATCH 6/6] ASoC: rt5640: Change the setting methodofidle_bias_off 2014-03-28 12:54 ` Mark Brown @ 2014-03-31 2:24 ` Oder Chiou 0 siblings, 0 replies; 13+ messages in thread From: Oder Chiou @ 2014-03-31 2:24 UTC (permalink / raw) To: Mark Brown Cc: Oder Chiou, Bard Liao, alsa-devel@alsa-project.org, lgirdwood@gmail.com, Flove > -----Original Message----- > From: Mark Brown [mailto:broonie@kernel.org] > Sent: Friday, March 28, 2014 8:54 PM > To: Oder Chiou > Cc: lgirdwood@gmail.com; alsa-devel@alsa-project.org; Bard Liao; Flove > Subject: Re: [PATCH 6/6] ASoC: rt5640: Change the setting method ofidle_bias_off > > On Fri, Mar 28, 2014 at 08:28:30PM +0800, Oder Chiou wrote: > > The patch moves the idle_bias_off setting to struct "soc_codec_dev_rt5640". > > This doesn't seem to apply against current code, can you please check and resend? I've resent it, thank you. ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 1/6] ASoC: rt5640: Remove the pre-allocated size of reg_default 2014-03-28 12:28 [PATCH 1/6] ASoC: rt5640: Remove the pre-allocated size of reg_default Oder Chiou ` (4 preceding siblings ...) 2014-03-28 12:28 ` [PATCH 6/6] ASoC: rt5640: Change the setting method of idle_bias_off Oder Chiou @ 2014-03-28 12:52 ` Mark Brown 5 siblings, 0 replies; 13+ messages in thread From: Mark Brown @ 2014-03-28 12:52 UTC (permalink / raw) To: Oder Chiou; +Cc: bardliao, alsa-devel, lgirdwood, flove [-- Attachment #1.1: Type: text/plain, Size: 186 bytes --] On Fri, Mar 28, 2014 at 08:28:25PM +0800, Oder Chiou wrote: > In order to prevent the redundant memory usage, the pre-allocated size of > reg_default should be remove. Applied, 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] 13+ messages in thread
end of thread, other threads:[~2014-03-31 2:24 UTC | newest] Thread overview: 13+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2014-03-28 12:28 [PATCH 1/6] ASoC: rt5640: Remove the pre-allocated size of reg_default Oder Chiou 2014-03-28 12:28 ` [PATCH 2/6] ASoC: rt5640: Rename the function of clock checking Oder Chiou 2014-03-28 12:53 ` Mark Brown 2014-03-28 12:28 ` [PATCH 3/6] ASoC: rt5640: Remove the unused or incorrect setting of clock source Oder Chiou 2014-03-28 12:53 ` Mark Brown 2014-03-28 12:28 ` [PATCH 4/6] ASoC: rt5640: Remove the unused field in private data Oder Chiou 2014-03-28 12:53 ` Mark Brown 2014-03-28 12:28 ` [PATCH 5/6] ASoC: rt5640: Remove the unnecessary parentheses Oder Chiou 2014-03-28 12:53 ` Mark Brown 2014-03-28 12:28 ` [PATCH 6/6] ASoC: rt5640: Change the setting method of idle_bias_off Oder Chiou 2014-03-28 12:54 ` Mark Brown 2014-03-31 2:24 ` [PATCH 6/6] ASoC: rt5640: Change the setting methodofidle_bias_off Oder Chiou 2014-03-28 12:52 ` [PATCH 1/6] ASoC: rt5640: Remove the pre-allocated size of reg_default Mark Brown
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox