ASoC: rt5670: fix wrong audio route
Subsystems (3)
PATCH 1/3 ASoC: rt5670: fix wrong audio route
When we select "IF1_ADC4" for IF1 ADC Muxes, it is actually connected to "TxDP_ADC" widget. This patch fixes the audio route and remove the unexisting "IF1_ADC4" widget.
--- sound/soc/codecs/rt5670.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
sound/soc/codecs/rt5670.c +2 -3
@@ -1717,7 +1717,6 @@ static const struct snd_soc_dapm_widget rt5670_dapm_widgets[] = {SND_SOC_DAPM_PGA ("IF1_ADC1" ,SND_SOC_NOPM ,0 ,0 ,NULL ,0 ),SND_SOC_DAPM_PGA ("IF1_ADC2" ,SND_SOC_NOPM ,0 ,0 ,NULL ,0 ),SND_SOC_DAPM_PGA ("IF1_ADC3" ,SND_SOC_NOPM ,0 ,0 ,NULL ,0 ), -SND_SOC_DAPM_PGA ("IF1_ADC4" ,SND_SOC_NOPM ,0 ,0 ,NULL ,0 ),/* DSP */ SND_SOC_DAPM_PGA("TxDP_ADC", SND_SOC_NOPM, 0, 0, NULL, 0),
@@ -2086,13 +2085,13 @@ static const struct snd_soc_dapm_route rt5670_dapm_routes[] = { { "IF1 ADC1 IN1 Mux", "IF1_ADC3", "IF1_ADC3" }, { "IF1 ADC1 IN2 Mux", "IF1_ADC1_IN1", "IF1 ADC1 IN1 Mux" }, - { "IF1 ADC1 IN2 Mux", "IF1_ADC4", "IF1_ADC4" }, + { "IF1 ADC1 IN2 Mux", "IF1_ADC4", "TxDP_ADC" }, { "IF1 ADC2 IN Mux", "IF_ADC2", "IF_ADC2" }, { "IF1 ADC2 IN Mux", "VAD_ADC", "VAD_ADC" }, { "IF1 ADC2 IN1 Mux", "IF1_ADC2_IN", "IF1 ADC2 IN Mux" }, - { "IF1 ADC2 IN1 Mux", "IF1_ADC4", "IF1_ADC4" }, + { "IF1 ADC2 IN1 Mux", "IF1_ADC4", "TxDP_ADC" }, { "IF1_ADC1" , NULL, "IF1 ADC1 IN2 Mux" }, { "IF1_ADC2" , NULL, "IF1 ADC2 IN1 Mux" },
Signature · 1 line
2.7.4
PATCH 2/3 ASoC: rt5670: remove duplicate route.
{ "ADC Stereo1 Filter", NULL, "PLL1", is_sys_clk_from_pll }, and { "ADC Stereo2 Filter", NULL, "PLL1", is_sys_clk_from_pll }, are defined twice in the driver.
--- sound/soc/codecs/rt5670.c | 2 -- 1 file changed, 2 deletions(-)
sound/soc/codecs/rt5670.c +0 -2
@@ -2022,7 +2022,6 @@ static const struct snd_soc_dapm_route rt5670_dapm_routes[] = { { "Stereo1 ADC MIXL", NULL, "Sto1 ADC MIXL" }, { "Stereo1 ADC MIXL", NULL, "ADC Stereo1 Filter" }, - { "ADC Stereo1 Filter", NULL, "PLL1", is_sys_clk_from_pll }, { "Stereo1 ADC MIXR", NULL, "Sto1 ADC MIXR" }, { "Stereo1 ADC MIXR", NULL, "ADC Stereo1 Filter" },
@@ -2061,7 +2060,6 @@ static const struct snd_soc_dapm_route rt5670_dapm_routes[] = { { "Stereo2 ADC MIXL", NULL, "Stereo2 ADC LR Mux" }, { "Stereo2 ADC MIXL", NULL, "ADC Stereo2 Filter" }, - { "ADC Stereo2 Filter", NULL, "PLL1", is_sys_clk_from_pll }, { "Stereo2 ADC MIXR", NULL, "Sto2 ADC MIXR" }, { "Stereo2 ADC MIXR", NULL, "ADC Stereo2 Filter" },
Signature · 1 line
2.7.4
Mark Brown
maintainerApplied "ASoC: rt5670: remove duplicate route." to the asoc tree
The patch
ASoC: rt5670: remove duplicate route.
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
90384fcc054f701e17e9cbbff5c14db5f877c614Mon Sep 17 00:00:00 2001
From: Bard Liao <[email protected]>
Date: Wed, 28 Jun 2017 15:38:01 +0800
Subject: [PATCH] ASoC: rt5670: remove duplicate route.
{ "ADC Stereo1 Filter", NULL, "PLL1", is_sys_clk_from_pll }, and { "ADC Stereo2 Filter", NULL, "PLL1", is_sys_clk_from_pll }, are defined twice in the driver.
--- sound/soc/codecs/rt5670.c | 2 -- 1 file changed, 2 deletions(-)
sound/soc/codecs/rt5670.c +0 -2
@@ -2022,7 +2022,6 @@ static const struct snd_soc_dapm_route rt5670_dapm_routes[] = { { "Stereo1 ADC MIXL", NULL, "Sto1 ADC MIXL" }, { "Stereo1 ADC MIXL", NULL, "ADC Stereo1 Filter" }, - { "ADC Stereo1 Filter", NULL, "PLL1", is_sys_clk_from_pll }, { "Stereo1 ADC MIXR", NULL, "Sto1 ADC MIXR" }, { "Stereo1 ADC MIXR", NULL, "ADC Stereo1 Filter" },
@@ -2061,7 +2060,6 @@ static const struct snd_soc_dapm_route rt5670_dapm_routes[] = { { "Stereo2 ADC MIXL", NULL, "Stereo2 ADC LR Mux" }, { "Stereo2 ADC MIXL", NULL, "ADC Stereo2 Filter" }, - { "ADC Stereo2 Filter", NULL, "PLL1", is_sys_clk_from_pll }, { "Stereo2 ADC MIXR", NULL, "Sto2 ADC MIXR" }, { "Stereo2 ADC MIXR", NULL, "ADC Stereo2 Filter" },
Signature · 1 line
2.13.2
PATCH 3/3 ASoC: rt5670: 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/rt5670.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)
sound/soc/codecs/rt5670.c +4 -5
@@ -2442,10 +2442,9 @@ static int rt5670_set_dai_fmt(struct snd_soc_dai *dai, unsigned int fmt)return 0 ; } -static int rt5670_set_dai_sysclk (struct snd_soc_dai *dai, -int clk_id,unsigned int freq,int dir) +static int rt5670_set_codec_sysclk (struct snd_soc_dai *dai,int clk_id, +int source,unsigned int freq,int dir) { -struct snd_soc_codec *codec = dai->codec;struct rt5670_priv *rt5670 =snd_soc_codec_get_drvdata (codec);unsigned int reg_val =0 ;
@@ -2469,7 +2468,7 @@ static int rt5670_set_dai_sysclk(struct snd_soc_dai *dai,if (clk_id !=RT5670_SCLK_S_RCCLK ) rt5670->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 : %dHz clock id : %d\n" , freq, clk_id);return 0 ; }
@@ -2721,7 +2720,6 @@ static int rt5670_resume(struct snd_soc_codec *codec)static const struct snd_soc_dai_ops rt5670_aif_dai_ops = { .hw_params = rt5670_hw_params, .set_fmt = rt5670_set_dai_fmt, - .set_sysclk = rt5670_set_dai_sysclk, .set_tdm_slot = rt5670_set_tdm_slot, .set_pll = rt5670_set_dai_pll, };
@@ -2774,6 +2772,7 @@ static struct snd_soc_codec_driver soc_codec_dev_rt5670 = { .resume = rt5670_resume, .set_bias_level = rt5670_set_bias_level, .idle_bias_off = true, + .set_sysclk = rt5670_set_codec_sysclk, .component_driver = { .controls = rt5670_snd_controls, .num_controls = ARRAY_SIZE(rt5670_snd_controls),
Signature · 1 line
2.7.4
Mark Brown
maintainerApplied "ASoC: rt5670: move set_sysclk to codec level" to the asoc tree
The patch
ASoC: rt5670: 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
6c28ce3c425e32d372c7c6ee98d3c3711f13ad69Mon Sep 17 00:00:00 2001
From: Bard Liao <[email protected]>
Date: Wed, 28 Jun 2017 15:38:02 +0800
Subject: [PATCH] ASoC: rt5670: 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/rt5670.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)
sound/soc/codecs/rt5670.c +4 -5
@@ -2442,10 +2442,9 @@ static int rt5670_set_dai_fmt(struct snd_soc_dai *dai, unsigned int fmt)return 0 ; } -static int rt5670_set_dai_sysclk (struct snd_soc_dai *dai, -int clk_id,unsigned int freq,int dir) +static int rt5670_set_codec_sysclk (struct snd_soc_dai *dai,int clk_id, +int source,unsigned int freq,int dir) { -struct snd_soc_codec *codec = dai->codec;struct rt5670_priv *rt5670 =snd_soc_codec_get_drvdata (codec);unsigned int reg_val =0 ;
@@ -2469,7 +2468,7 @@ static int rt5670_set_dai_sysclk(struct snd_soc_dai *dai,if (clk_id !=RT5670_SCLK_S_RCCLK ) rt5670->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 : %dHz clock id : %d\n" , freq, clk_id);return 0 ; }
@@ -2721,7 +2720,6 @@ static int rt5670_resume(struct snd_soc_codec *codec)static const struct snd_soc_dai_ops rt5670_aif_dai_ops = { .hw_params = rt5670_hw_params, .set_fmt = rt5670_set_dai_fmt, - .set_sysclk = rt5670_set_dai_sysclk, .set_tdm_slot = rt5670_set_tdm_slot, .set_pll = rt5670_set_dai_pll, };
@@ -2774,6 +2772,7 @@ static struct snd_soc_codec_driver soc_codec_dev_rt5670 = { .resume = rt5670_resume, .set_bias_level = rt5670_set_bias_level, .idle_bias_off = true, + .set_sysclk = rt5670_set_codec_sysclk, .component_driver = { .controls = rt5670_snd_controls, .num_controls = ARRAY_SIZE(rt5670_snd_controls),
Signature · 1 line
2.13.2
Mark Brown
maintainerApplied "ASoC: rt5670: fix wrong audio route" to the asoc tree
In reply to Bard LiaoThe patch
ASoC: rt5670: fix wrong audio route
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
8e2d163b736e719ef850493ac7740a61d30b8f23Mon Sep 17 00:00:00 2001
From: Bard Liao <[email protected]>
Date: Wed, 28 Jun 2017 15:38:00 +0800
Subject: [PATCH] ASoC: rt5670: fix wrong audio route
When we select "IF1_ADC4" for IF1 ADC Muxes, it is actually connected to "TxDP_ADC" widget. This patch fixes the audio route and remove the unexisting "IF1_ADC4" widget.
--- sound/soc/codecs/rt5670.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
sound/soc/codecs/rt5670.c +2 -3
@@ -1717,7 +1717,6 @@ static const struct snd_soc_dapm_widget rt5670_dapm_widgets[] = {SND_SOC_DAPM_PGA ("IF1_ADC1" ,SND_SOC_NOPM ,0 ,0 ,NULL ,0 ),SND_SOC_DAPM_PGA ("IF1_ADC2" ,SND_SOC_NOPM ,0 ,0 ,NULL ,0 ),SND_SOC_DAPM_PGA ("IF1_ADC3" ,SND_SOC_NOPM ,0 ,0 ,NULL ,0 ), -SND_SOC_DAPM_PGA ("IF1_ADC4" ,SND_SOC_NOPM ,0 ,0 ,NULL ,0 ),/* DSP */ SND_SOC_DAPM_PGA("TxDP_ADC", SND_SOC_NOPM, 0, 0, NULL, 0),
@@ -2086,13 +2085,13 @@ static const struct snd_soc_dapm_route rt5670_dapm_routes[] = { { "IF1 ADC1 IN1 Mux", "IF1_ADC3", "IF1_ADC3" }, { "IF1 ADC1 IN2 Mux", "IF1_ADC1_IN1", "IF1 ADC1 IN1 Mux" }, - { "IF1 ADC1 IN2 Mux", "IF1_ADC4", "IF1_ADC4" }, + { "IF1 ADC1 IN2 Mux", "IF1_ADC4", "TxDP_ADC" }, { "IF1 ADC2 IN Mux", "IF_ADC2", "IF_ADC2" }, { "IF1 ADC2 IN Mux", "VAD_ADC", "VAD_ADC" }, { "IF1 ADC2 IN1 Mux", "IF1_ADC2_IN", "IF1 ADC2 IN Mux" }, - { "IF1 ADC2 IN1 Mux", "IF1_ADC4", "IF1_ADC4" }, + { "IF1 ADC2 IN1 Mux", "IF1_ADC4", "TxDP_ADC" }, { "IF1_ADC1" , NULL, "IF1 ADC1 IN2 Mux" }, { "IF1_ADC2" , NULL, "IF1 ADC2 IN1 Mux" },
Signature · 1 line
2.13.2