ASoC: rt5659: register power bit of LOUT Amp
Subsystems (3)
PATCH 1/4 ASoC: rt5659: register power bit of LOUT Amp
There is a power bit for LOUT Amp.
--- sound/soc/codecs/rt5659.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
sound/soc/codecs/rt5659.c +2 -1
@@ -2744,7 +2744,8 @@ static const struct snd_soc_dapm_widget rt5659_dapm_widgets[] = { SND_SOC_DAPM_PRE_PMU),SND_SOC_DAPM_PGA_S ("HP Amp" ,1 ,SND_SOC_NOPM ,0 ,0 , rt5659_hp_event,SND_SOC_DAPM_PRE_PMD |SND_SOC_DAPM_POST_PMU ), -SND_SOC_DAPM_PGA ("LOUT Amp" ,SND_SOC_NOPM ,0 ,0 ,NULL ,0 ), +SND_SOC_DAPM_PGA_S ("LOUT Amp" ,1 ,RT5659_PWR_ANLG_1 ,RT5659_PWR_LM_BIT , +0 ,NULL ,0 ), SND_SOC_DAPM_SUPPLY("Charge Pump", SND_SOC_NOPM, 0, 0, rt5659_charge_pump_event, SND_SOC_DAPM_PRE_PMU |
Signature · 1 line
2.7.4
PATCH 2/4 ASoC: rt5659: connect LOUT Amp with Charge Pump
"Charge Pump" is necessary for "LOUT Amp".
--- sound/soc/codecs/rt5659.c | 1 + 1 file changed, 1 insertion(+)
sound/soc/codecs/rt5659.c +1 -0
@@ -3209,6 +3209,7 @@ static const struct snd_soc_dapm_route rt5659_dapm_routes[] = { { "LOUT R MIX", "OUTVOL R Switch", "OUTVOL R" }, { "LOUT Amp", NULL, "LOUT L MIX" }, { "LOUT Amp", NULL, "LOUT R MIX" }, + { "LOUT Amp", NULL, "Charge Pump" }, { "LOUT Amp", NULL, "SYS CLK DET" }, { "LOUT L Playback", "Switch", "LOUT Amp" }, { "LOUT R Playback", "Switch", "LOUT Amp" },
Signature · 1 line
2.7.4
Mark Brown
maintainerApplied "ASoC: rt5659: connect LOUT Amp with Charge Pump" to the asoc tree
The patch
ASoC: rt5659: connect LOUT Amp with Charge Pump
has been applied to the asoc tree at
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark
Quoted 1 line
From
a6189d371d05863720e4381361f83ce5d376fad7Mon Sep 17 00:00:00 2001
From: Bard Liao <[email protected]>
Date: Mon, 16 Oct 2017 19:15:14 +0800
Subject: [PATCH] ASoC: rt5659: connect LOUT Amp with Charge Pump
"Charge Pump" is necessary for "LOUT Amp".
--- sound/soc/codecs/rt5659.c | 1 + 1 file changed, 1 insertion(+)
sound/soc/codecs/rt5659.c +1 -0
@@ -3209,6 +3209,7 @@ static const struct snd_soc_dapm_route rt5659_dapm_routes[] = { { "LOUT R MIX", "OUTVOL R Switch", "OUTVOL R" }, { "LOUT Amp", NULL, "LOUT L MIX" }, { "LOUT Amp", NULL, "LOUT R MIX" }, + { "LOUT Amp", NULL, "Charge Pump" }, { "LOUT Amp", NULL, "SYS CLK DET" }, { "LOUT L Playback", "Switch", "LOUT Amp" }, { "LOUT R Playback", "Switch", "LOUT Amp" },
Signature · 1 line
2.14.1
PATCH 3/4 ASoC: rt5659: move set_sysclk to codec level
In reply to Bard LiaoMove set_sysclk to codec level and people can use it at both codec and dai level.
--- sound/soc/codecs/rt5659.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
sound/soc/codecs/rt5659.c +5 -5
@@ -3385,10 +3385,9 @@ static int rt5659_set_dai_fmt(struct snd_soc_dai *dai, unsigned int fmt)return 0 ; } -static int rt5659_set_dai_sysclk (struct snd_soc_dai *dai, -int clk_id,unsigned int freq,int dir) +static int rt5659_set_codec_sysclk (struct snd_soc_codec *codec,int clk_id, +int source,unsigned int freq,int dir) { -struct snd_soc_codec *codec = dai->codec;struct rt5659_priv *rt5659 =snd_soc_codec_get_drvdata (codec);unsigned int reg_val =0 ;
@@ -3414,7 +3413,8 @@ static int rt5659_set_dai_sysclk(struct snd_soc_dai *dai, rt5659->sysclk = freq; rt5659->sysclk_src = clk_id; -dev_dbg (dai->dev,"Sysclk is %dHz and clock id is %d\n" , freq, clk_id); +dev_dbg (codec->dev,"Sysclk is %dHz and clock id is %d\n" , + freq, clk_id);return 0 ; }
@@ -3666,7 +3666,6 @@ static int rt5659_resume(struct snd_soc_codec *codec)static const struct snd_soc_dai_ops rt5659_aif_dai_ops = { .hw_params = rt5659_hw_params, .set_fmt = rt5659_set_dai_fmt, - .set_sysclk = rt5659_set_dai_sysclk, .set_tdm_slot = rt5659_set_tdm_slot, .set_pll = rt5659_set_dai_pll, .set_bclk_ratio = rt5659_set_bclk_ratio,
@@ -3747,6 +3746,7 @@ static const struct snd_soc_codec_driver soc_codec_dev_rt5659 = { .dapm_routes = rt5659_dapm_routes, .num_dapm_routes = ARRAY_SIZE(rt5659_dapm_routes), }, + .set_sysclk = rt5659_set_codec_sysclk, };
Signature · 1 line
2.7.4
Mark Brown
maintainerApplied "ASoC: rt5659: move set_sysclk to codec level" to the asoc tree
The patch
ASoC: rt5659: move set_sysclk to codec level
has been applied to the asoc tree at
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark
Quoted 1 line
From
fe01e5e8fae91b235ecf928f6bf0a90c17d74e36Mon Sep 17 00:00:00 2001
From: Bard Liao <[email protected]>
Date: Mon, 16 Oct 2017 19:15:15 +0800
Subject: [PATCH] ASoC: rt5659: move set_sysclk to codec level
Move set_sysclk to codec level and people can use it at both codec and dai level.
--- sound/soc/codecs/rt5659.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
sound/soc/codecs/rt5659.c +5 -5
@@ -3385,10 +3385,9 @@ static int rt5659_set_dai_fmt(struct snd_soc_dai *dai, unsigned int fmt)return 0 ; } -static int rt5659_set_dai_sysclk (struct snd_soc_dai *dai, -int clk_id,unsigned int freq,int dir) +static int rt5659_set_codec_sysclk (struct snd_soc_codec *codec,int clk_id, +int source,unsigned int freq,int dir) { -struct snd_soc_codec *codec = dai->codec;struct rt5659_priv *rt5659 =snd_soc_codec_get_drvdata (codec);unsigned int reg_val =0 ;
@@ -3414,7 +3413,8 @@ static int rt5659_set_dai_sysclk(struct snd_soc_dai *dai, rt5659->sysclk = freq; rt5659->sysclk_src = clk_id; -dev_dbg (dai->dev,"Sysclk is %dHz and clock id is %d\n" , freq, clk_id); +dev_dbg (codec->dev,"Sysclk is %dHz and clock id is %d\n" , + freq, clk_id);return 0 ; }
@@ -3666,7 +3666,6 @@ static int rt5659_resume(struct snd_soc_codec *codec)static const struct snd_soc_dai_ops rt5659_aif_dai_ops = { .hw_params = rt5659_hw_params, .set_fmt = rt5659_set_dai_fmt, - .set_sysclk = rt5659_set_dai_sysclk, .set_tdm_slot = rt5659_set_tdm_slot, .set_pll = rt5659_set_dai_pll, .set_bclk_ratio = rt5659_set_bclk_ratio,
@@ -3747,6 +3746,7 @@ static const struct snd_soc_codec_driver soc_codec_dev_rt5659 = { .dapm_routes = rt5659_dapm_routes, .num_dapm_routes = ARRAY_SIZE(rt5659_dapm_routes), }, + .set_sysclk = rt5659_set_codec_sysclk, };
Signature · 1 line
2.14.1
PATCH 4/4 ASoC: rt5659: move set_pll to codec level
In reply to Bard LiaoMove set_pll function to codec level and people can use it at both codec and dai level.
--- sound/soc/codecs/rt5659.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
sound/soc/codecs/rt5659.c +8 -8
@@ -3419,15 +3419,15 @@ static int rt5659_set_codec_sysclk(struct snd_soc_codec *codec, int clk_id,return 0 ; } -static int rt5659_set_dai_pll (struct snd_soc_dai *dai,int pll_id,int Source, -unsigned int freq_in,unsigned int freq_out) +static int rt5659_set_codec_pll (struct snd_soc_codec *codec,int pll_id, +int source,unsigned int freq_in, +unsigned int freq_out) { -struct snd_soc_codec *codec = dai->codec;struct rt5659_priv *rt5659 =snd_soc_codec_get_drvdata (codec);struct rl6231_pll_code pll_code;int ret; -if (Source == rt5659->pll_src && freq_in == rt5659->pll_in && +if (source == rt5659->pll_src && freq_in == rt5659->pll_in && freq_out == rt5659->pll_out)return 0 ;
@@ -3441,7 +3441,7 @@ static int rt5659_set_dai_pll(struct snd_soc_dai *dai, int pll_id, int Source,return 0 ; } -switch (Source) { +switch (source) {case RT5659_PLL1_S_MCLK :snd_soc_update_bits (codec,RT5659_GLB_CLK ,RT5659_PLL1_SRC_MASK ,RT5659_PLL1_SRC_MCLK );
@@ -3459,7 +3459,7 @@ static int rt5659_set_dai_pll(struct snd_soc_dai *dai, int pll_id, int Source, RT5659_PLL1_SRC_MASK, RT5659_PLL1_SRC_BCLK3);break ;default : -dev_err (codec->dev,"Unknown PLL Source %d\n" , Source); +dev_err (codec->dev,"Unknown PLL source %d\n" , source);return -EINVAL ; }
@@ -3481,7 +3481,7 @@ static int rt5659_set_dai_pll(struct snd_soc_dai *dai, int pll_id, int Source, rt5659->pll_in = freq_in; rt5659->pll_out = freq_out; - rt5659->pll_src = Source; + rt5659->pll_src = source;return 0 ; }
@@ -3667,7 +3667,6 @@ static const struct snd_soc_dai_ops rt5659_aif_dai_ops = { .hw_params = rt5659_hw_params, .set_fmt = rt5659_set_dai_fmt, .set_tdm_slot = rt5659_set_tdm_slot, - .set_pll = rt5659_set_dai_pll, .set_bclk_ratio = rt5659_set_bclk_ratio, };
@@ -3747,6 +3746,7 @@ static const struct snd_soc_codec_driver soc_codec_dev_rt5659 = { .num_dapm_routes = ARRAY_SIZE(rt5659_dapm_routes), }, .set_sysclk = rt5659_set_codec_sysclk, + .set_pll = rt5659_set_codec_pll, };
Signature · 1 line
2.7.4
Mark Brown
maintainerApplied "ASoC: rt5659: move set_pll to codec level" to the asoc tree
The patch
ASoC: rt5659: move set_pll to codec level
has been applied to the asoc tree at
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark
Quoted 1 line
From
c8a04b5de4bbdd0c7553aaa315c72722b10f0207Mon Sep 17 00:00:00 2001
From: Bard Liao <[email protected]>
Date: Mon, 16 Oct 2017 19:15:16 +0800
Subject: [PATCH] ASoC: rt5659: move set_pll to codec level
Move set_pll function to codec level and people can use it at both codec and dai level.
--- sound/soc/codecs/rt5659.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
sound/soc/codecs/rt5659.c +8 -8
@@ -3419,15 +3419,15 @@ static int rt5659_set_codec_sysclk(struct snd_soc_codec *codec, int clk_id,return 0 ; } -static int rt5659_set_dai_pll (struct snd_soc_dai *dai,int pll_id,int Source, -unsigned int freq_in,unsigned int freq_out) +static int rt5659_set_codec_pll (struct snd_soc_codec *codec,int pll_id, +int source,unsigned int freq_in, +unsigned int freq_out) { -struct snd_soc_codec *codec = dai->codec;struct rt5659_priv *rt5659 =snd_soc_codec_get_drvdata (codec);struct rl6231_pll_code pll_code;int ret; -if (Source == rt5659->pll_src && freq_in == rt5659->pll_in && +if (source == rt5659->pll_src && freq_in == rt5659->pll_in && freq_out == rt5659->pll_out)return 0 ;
@@ -3441,7 +3441,7 @@ static int rt5659_set_dai_pll(struct snd_soc_dai *dai, int pll_id, int Source,return 0 ; } -switch (Source) { +switch (source) {case RT5659_PLL1_S_MCLK :snd_soc_update_bits (codec,RT5659_GLB_CLK ,RT5659_PLL1_SRC_MASK ,RT5659_PLL1_SRC_MCLK );
@@ -3459,7 +3459,7 @@ static int rt5659_set_dai_pll(struct snd_soc_dai *dai, int pll_id, int Source, RT5659_PLL1_SRC_MASK, RT5659_PLL1_SRC_BCLK3);break ;default : -dev_err (codec->dev,"Unknown PLL Source %d\n" , Source); +dev_err (codec->dev,"Unknown PLL source %d\n" , source);return -EINVAL ; }
@@ -3481,7 +3481,7 @@ static int rt5659_set_dai_pll(struct snd_soc_dai *dai, int pll_id, int Source, rt5659->pll_in = freq_in; rt5659->pll_out = freq_out; - rt5659->pll_src = Source; + rt5659->pll_src = source;return 0 ; }
@@ -3667,7 +3667,6 @@ static const struct snd_soc_dai_ops rt5659_aif_dai_ops = { .hw_params = rt5659_hw_params, .set_fmt = rt5659_set_dai_fmt, .set_tdm_slot = rt5659_set_tdm_slot, - .set_pll = rt5659_set_dai_pll, .set_bclk_ratio = rt5659_set_bclk_ratio, };
@@ -3747,6 +3746,7 @@ static const struct snd_soc_codec_driver soc_codec_dev_rt5659 = { .num_dapm_routes = ARRAY_SIZE(rt5659_dapm_routes), }, .set_sysclk = rt5659_set_codec_sysclk, + .set_pll = rt5659_set_codec_pll, };
Signature · 1 line
2.14.1
Mark Brown
maintainerApplied "ASoC: rt5659: register power bit of LOUT Amp" to the asoc tree
In reply to Bard LiaoThe patch
ASoC: rt5659: register power bit of LOUT Amp
has been applied to the asoc tree at
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark
Quoted 1 line
From
d1e84308ac8ad945a77f4fd7b08725d14181703bMon Sep 17 00:00:00 2001
From: Bard Liao <[email protected]>
Date: Mon, 16 Oct 2017 19:15:13 +0800
Subject: [PATCH] ASoC: rt5659: register power bit of LOUT Amp
There is a power bit for LOUT Amp.
--- sound/soc/codecs/rt5659.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
sound/soc/codecs/rt5659.c +2 -1
@@ -2744,7 +2744,8 @@ static const struct snd_soc_dapm_widget rt5659_dapm_widgets[] = { SND_SOC_DAPM_PRE_PMU),SND_SOC_DAPM_PGA_S ("HP Amp" ,1 ,SND_SOC_NOPM ,0 ,0 , rt5659_hp_event,SND_SOC_DAPM_PRE_PMD |SND_SOC_DAPM_POST_PMU ), -SND_SOC_DAPM_PGA ("LOUT Amp" ,SND_SOC_NOPM ,0 ,0 ,NULL ,0 ), +SND_SOC_DAPM_PGA_S ("LOUT Amp" ,1 ,RT5659_PWR_ANLG_1 ,RT5659_PWR_LM_BIT , +0 ,NULL ,0 ), SND_SOC_DAPM_SUPPLY("Charge Pump", SND_SOC_NOPM, 0, 0, rt5659_charge_pump_event, SND_SOC_DAPM_PRE_PMU |
Signature · 1 line
2.14.1