* [PATCH] ASoC: cht-bsw-rt5645: Also enable/disable the clock on Cherry Trail
@ 2017-10-14 12:22 Hans de Goede
2017-10-16 14:38 ` Pierre-Louis Bossart
0 siblings, 1 reply; 2+ messages in thread
From: Hans de Goede @ 2017-10-14 12:22 UTC (permalink / raw)
To: Mark Brown, Bard Liao, Oder Chiou; +Cc: Hans de Goede, alsa-devel, Takashi Iwai
Just like on Bay Trail the codec mclk is also controlled by the common
clk framework as pmc_plt_clk_3 on Cherry Trail and the cht-bsw-rt5645
needs to control it so that it has the right frequency and gets
en/disabled as appropriate.
This fixes the sound crackling (like a bonfire) when the clock was not
set up properly before Linux boots and turns the clock off when not in
use saving power.
BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=196351
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
sound/soc/intel/boards/cht_bsw_rt5645.c | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
diff --git a/sound/soc/intel/boards/cht_bsw_rt5645.c b/sound/soc/intel/boards/cht_bsw_rt5645.c
index 5bcde01d15e6..d553e2b67c92 100644
--- a/sound/soc/intel/boards/cht_bsw_rt5645.c
+++ b/sound/soc/intel/boards/cht_bsw_rt5645.c
@@ -682,14 +682,12 @@ static int snd_cht_mc_probe(struct platform_device *pdev)
cht_rt5645_cpu_dai_name;
}
- if (is_valleyview()) {
- drv->mclk = devm_clk_get(&pdev->dev, "pmc_plt_clk_3");
- if (IS_ERR(drv->mclk)) {
- dev_err(&pdev->dev,
- "Failed to get MCLK from pmc_plt_clk_3: %ld\n",
- PTR_ERR(drv->mclk));
- return PTR_ERR(drv->mclk);
- }
+ drv->mclk = devm_clk_get(&pdev->dev, "pmc_plt_clk_3");
+ if (IS_ERR(drv->mclk)) {
+ dev_err(&pdev->dev,
+ "Failed to get MCLK from pmc_plt_clk_3: %ld\n",
+ PTR_ERR(drv->mclk));
+ return PTR_ERR(drv->mclk);
}
snd_soc_card_set_drvdata(card, drv);
--
2.14.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ASoC: cht-bsw-rt5645: Also enable/disable the clock on Cherry Trail
2017-10-14 12:22 [PATCH] ASoC: cht-bsw-rt5645: Also enable/disable the clock on Cherry Trail Hans de Goede
@ 2017-10-16 14:38 ` Pierre-Louis Bossart
0 siblings, 0 replies; 2+ messages in thread
From: Pierre-Louis Bossart @ 2017-10-16 14:38 UTC (permalink / raw)
To: Hans de Goede, Mark Brown, Bard Liao, Oder Chiou; +Cc: alsa-devel, Takashi Iwai
On 10/14/17 7:22 AM, Hans de Goede wrote:
> Just like on Bay Trail the codec mclk is also controlled by the common
> clk framework as pmc_plt_clk_3 on Cherry Trail and the cht-bsw-rt5645
> needs to control it so that it has the right frequency and gets
> en/disabled as appropriate.
This is already merged by Mark, I submitted this change a couple of
weeks ago.
>
> This fixes the sound crackling (like a bonfire) when the clock was not
> set up properly before Linux boots and turns the clock off when not in
> use saving power.
>
> BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=196351
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> ---
> sound/soc/intel/boards/cht_bsw_rt5645.c | 14 ++++++--------
> 1 file changed, 6 insertions(+), 8 deletions(-)
>
> diff --git a/sound/soc/intel/boards/cht_bsw_rt5645.c b/sound/soc/intel/boards/cht_bsw_rt5645.c
> index 5bcde01d15e6..d553e2b67c92 100644
> --- a/sound/soc/intel/boards/cht_bsw_rt5645.c
> +++ b/sound/soc/intel/boards/cht_bsw_rt5645.c
> @@ -682,14 +682,12 @@ static int snd_cht_mc_probe(struct platform_device *pdev)
> cht_rt5645_cpu_dai_name;
> }
>
> - if (is_valleyview()) {
> - drv->mclk = devm_clk_get(&pdev->dev, "pmc_plt_clk_3");
> - if (IS_ERR(drv->mclk)) {
> - dev_err(&pdev->dev,
> - "Failed to get MCLK from pmc_plt_clk_3: %ld\n",
> - PTR_ERR(drv->mclk));
> - return PTR_ERR(drv->mclk);
> - }
> + drv->mclk = devm_clk_get(&pdev->dev, "pmc_plt_clk_3");
> + if (IS_ERR(drv->mclk)) {
> + dev_err(&pdev->dev,
> + "Failed to get MCLK from pmc_plt_clk_3: %ld\n",
> + PTR_ERR(drv->mclk));
> + return PTR_ERR(drv->mclk);
> }
>
> snd_soc_card_set_drvdata(card, drv);
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-10-16 14:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-14 12:22 [PATCH] ASoC: cht-bsw-rt5645: Also enable/disable the clock on Cherry Trail Hans de Goede
2017-10-16 14:38 ` Pierre-Louis Bossart
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).