[C][SRU][PATCH 0/3] Fix the audio on some Chromebooks

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

[C][SRU][PATCH 0/3] Fix the audio on some Chromebooks

Po-Hsu Lin (Sam)
BugLink: https://bugs.launchpad.net/bugs/1811566

== Justification ==
Commit 648e921888ad96ea3dc922739e96716ad3225d7f (clk: x86: Stop marking clocks
as CLK_IS_CRITICAL) backported to Cosmic kernel fixed the bug that keeps unused
clocks on, but it is breaking the audio support on some Chromebooks (Swanky /
Clapper/ Gnawty) since we were not using the right clock in the
cht_bsw_max98090_ti machine driver.

== Fix ==
a182ecd (ASoC: intel: cht_bsw_max98090_ti: Add quirk for boards using pmc_plt_clk_0)
984bfb3 (ASoC: intel: cht_bsw_max98090_ti: Add pmc_plt_clk_0 quirk)
94ea56c (ASoC: intel: cht_bsw_max98090_ti: Add pmc_plt_clk_0 quirk)

These 3 patches can be cherry-picked to Cosmic.

== Test ==
Test kernel with these 3 patches could be found in:
http://people.canonical.com/~phlin/kernel/lp-1811566-chromebook-Gnawty/

Bug reporter stated that this kernel can fix the audio issue as expected.

== Regression potential ==
Low,
changes are limited in the cht_bsw_max98090_ti driver with a new DMI based
quirk table that contains these 3 Chromebook models and some logic to
determine the right clock to use.


Hans de Goede (3):
  ASoC: intel: cht_bsw_max98090_ti: Add quirk for boards using
    pmc_plt_clk_0
  ASoC: intel: cht_bsw_max98090_ti: Add pmc_plt_clk_0 quirk for
    Chromebook Clapper
  ASoC: intel: cht_bsw_max98090_ti: Add pmc_plt_clk_0 quirk for
    Chromebook Gnawty

 sound/soc/intel/boards/cht_bsw_max98090_ti.c | 46 ++++++++++++++++++++++++++--
 1 file changed, 43 insertions(+), 3 deletions(-)

--
2.7.4


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

[C][SRU][PATCH 1/3] ASoC: intel: cht_bsw_max98090_ti: Add quirk for boards using pmc_plt_clk_0

Po-Hsu Lin (Sam)
From: Hans de Goede <[hidden email]>

BugLink: https://bugs.launchpad.net/bugs/1811566

Some boards such as the Swanky model Chromebooks use pmc_plt_clk_0 for the
mclk instead of pmc_plt_clk_3.

This commit adds a DMI based quirk for this.

This fixing audio no longer working on these devices after
commit 648e921888ad ("clk: x86: Stop marking clocks as CLK_IS_CRITICAL")
that commit fixes us unnecessary keeping unused clocks on, but in case
of the Swanky that was breaking audio support since we were not using
the right clock in the cht_bsw_max98090_ti machine driver.

Cc: [hidden email]
Fixes: 648e921888ad ("clk: x86: Stop marking clocks as CLK_IS_CRITICAL")
Reported-and-tested-by: Dean Wallace <[hidden email]>
Signed-off-by: Hans de Goede <[hidden email]>
Signed-off-by: Mark Brown <[hidden email]>
(cherry picked from commit a182ecd3809c8d5a2da80c520f3602e301c5317e)
Signed-off-by: Po-Hsu Lin <[hidden email]>
---
 sound/soc/intel/boards/cht_bsw_max98090_ti.c | 32 +++++++++++++++++++++++++---
 1 file changed, 29 insertions(+), 3 deletions(-)

diff --git a/sound/soc/intel/boards/cht_bsw_max98090_ti.c b/sound/soc/intel/boards/cht_bsw_max98090_ti.c
index db6976f..9d9f6e4 100644
--- a/sound/soc/intel/boards/cht_bsw_max98090_ti.c
+++ b/sound/soc/intel/boards/cht_bsw_max98090_ti.c
@@ -19,6 +19,7 @@
  * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  */
 
+#include <linux/dmi.h>
 #include <linux/module.h>
 #include <linux/platform_device.h>
 #include <linux/slab.h>
@@ -35,6 +36,8 @@
 #define CHT_PLAT_CLK_3_HZ 19200000
 #define CHT_CODEC_DAI "HiFi"
 
+#define QUIRK_PMC_PLT_CLK_0 0x01
+
 struct cht_mc_private {
  struct clk *mclk;
  struct snd_soc_jack jack;
@@ -385,11 +388,29 @@ static struct snd_soc_card snd_soc_card_cht = {
  .num_controls = ARRAY_SIZE(cht_mc_controls),
 };
 
+static const struct dmi_system_id cht_max98090_quirk_table[] = {
+ {
+ /* Swanky model Chromebook (Toshiba Chromebook 2) */
+ .matches = {
+ DMI_MATCH(DMI_PRODUCT_NAME, "Swanky"),
+ },
+ .driver_data = (void *)QUIRK_PMC_PLT_CLK_0,
+ },
+ {}
+};
+
 static int snd_cht_mc_probe(struct platform_device *pdev)
 {
+ const struct dmi_system_id *dmi_id;
  struct device *dev = &pdev->dev;
  int ret_val = 0;
  struct cht_mc_private *drv;
+ const char *mclk_name;
+ int quirks = 0;
+
+ dmi_id = dmi_first_match(cht_max98090_quirk_table);
+ if (dmi_id)
+ quirks = (unsigned long)dmi_id->driver_data;
 
  drv = devm_kzalloc(&pdev->dev, sizeof(*drv), GFP_KERNEL);
  if (!drv)
@@ -411,11 +432,16 @@ static int snd_cht_mc_probe(struct platform_device *pdev)
  snd_soc_card_cht.dev = &pdev->dev;
  snd_soc_card_set_drvdata(&snd_soc_card_cht, drv);
 
- drv->mclk = devm_clk_get(&pdev->dev, "pmc_plt_clk_3");
+ if (quirks & QUIRK_PMC_PLT_CLK_0)
+ mclk_name = "pmc_plt_clk_0";
+ else
+ mclk_name = "pmc_plt_clk_3";
+
+ drv->mclk = devm_clk_get(&pdev->dev, mclk_name);
  if (IS_ERR(drv->mclk)) {
  dev_err(&pdev->dev,
- "Failed to get MCLK from pmc_plt_clk_3: %ld\n",
- PTR_ERR(drv->mclk));
+ "Failed to get MCLK from %s: %ld\n",
+ mclk_name, PTR_ERR(drv->mclk));
  return PTR_ERR(drv->mclk);
  }
 
--
2.7.4


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

[C][SRU][PATCH 2/3] ASoC: intel: cht_bsw_max98090_ti: Add pmc_plt_clk_0 quirk for Chromebook Clapper

Po-Hsu Lin (Sam)
In reply to this post by Po-Hsu Lin (Sam)
From: Hans de Goede <[hidden email]>

BugLink: https://bugs.launchpad.net/bugs/1811566

The Clapper model Chromebook uses pmc_plt_clk_0 instead of pmc_plt_clk_3
for the mclk, just like the Swanky model.

This commit adds a DMI based quirk for this.

This fixing audio no longer working on these devices after
commit 648e921888ad ("clk: x86: Stop marking clocks as CLK_IS_CRITICAL")
that commit fixes us unnecessary keeping unused clocks on, but in case of
the Clapper that was breaking audio support since we were not using the
right clock in the cht_bsw_max98090_ti machine driver.

Cc: [hidden email]
Fixes: 648e921888ad ("clk: x86: Stop marking clocks as CLK_IS_CRITICAL")
Signed-off-by: Hans de Goede <[hidden email]>
Acked-by: Pierre-Louis Bossart <[hidden email]>
Signed-off-by: Mark Brown <[hidden email]>
(cherry picked from commit 984bfb398a3af6fa9b7e80165e524933b0616686)
Signed-off-by: Po-Hsu Lin <[hidden email]>
---
 sound/soc/intel/boards/cht_bsw_max98090_ti.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/sound/soc/intel/boards/cht_bsw_max98090_ti.c b/sound/soc/intel/boards/cht_bsw_max98090_ti.c
index 9d9f6e4..ad0c983 100644
--- a/sound/soc/intel/boards/cht_bsw_max98090_ti.c
+++ b/sound/soc/intel/boards/cht_bsw_max98090_ti.c
@@ -390,6 +390,13 @@ static struct snd_soc_card snd_soc_card_cht = {
 
 static const struct dmi_system_id cht_max98090_quirk_table[] = {
  {
+ /* Clapper model Chromebook */
+ .matches = {
+ DMI_MATCH(DMI_PRODUCT_NAME, "Clapper"),
+ },
+ .driver_data = (void *)QUIRK_PMC_PLT_CLK_0,
+ },
+ {
  /* Swanky model Chromebook (Toshiba Chromebook 2) */
  .matches = {
  DMI_MATCH(DMI_PRODUCT_NAME, "Swanky"),
--
2.7.4


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

[C][SRU][PATCH 3/3] ASoC: intel: cht_bsw_max98090_ti: Add pmc_plt_clk_0 quirk for Chromebook Gnawty

Po-Hsu Lin (Sam)
In reply to this post by Po-Hsu Lin (Sam)
From: Hans de Goede <[hidden email]>

BugLink: https://bugs.launchpad.net/bugs/1811566

The Gnawty model Chromebook uses pmc_plt_clk_0 instead of pmc_plt_clk_3
for the mclk, just like the Clapper and Swanky models.

This commit adds a DMI based quirk for this.

This fixing audio no longer working on these devices after
commit 648e921888ad ("clk: x86: Stop marking clocks as CLK_IS_CRITICAL")
that commit fixes us unnecessary keeping unused clocks on, but in case of
the Gnawty that was breaking audio support since we were not using the
right clock in the cht_bsw_max98090_ti machine driver.

BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=201787
Cc: [hidden email]
Fixes: 648e921888ad ("clk: x86: Stop marking clocks as CLK_IS_CRITICAL")
Reported-and-tested-by: Jaime PĂ©rez <[hidden email]>
Signed-off-by: Hans de Goede <[hidden email]>
Acked-by: Pierre-Louis Bossart <[hidden email]>
Signed-off-by: Mark Brown <[hidden email]>
(cherry picked from commit 94ea56cff506c769a509c5dd87904c7fe3806a81)
Signed-off-by: Po-Hsu Lin <[hidden email]>
---
 sound/soc/intel/boards/cht_bsw_max98090_ti.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/sound/soc/intel/boards/cht_bsw_max98090_ti.c b/sound/soc/intel/boards/cht_bsw_max98090_ti.c
index ad0c983..08a5152 100644
--- a/sound/soc/intel/boards/cht_bsw_max98090_ti.c
+++ b/sound/soc/intel/boards/cht_bsw_max98090_ti.c
@@ -397,6 +397,13 @@ static const struct dmi_system_id cht_max98090_quirk_table[] = {
  .driver_data = (void *)QUIRK_PMC_PLT_CLK_0,
  },
  {
+ /* Gnawty model Chromebook (Acer Chromebook CB3-111) */
+ .matches = {
+ DMI_MATCH(DMI_PRODUCT_NAME, "Gnawty"),
+ },
+ .driver_data = (void *)QUIRK_PMC_PLT_CLK_0,
+ },
+ {
  /* Swanky model Chromebook (Toshiba Chromebook 2) */
  .matches = {
  DMI_MATCH(DMI_PRODUCT_NAME, "Swanky"),
--
2.7.4


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

ACK: [C][SRU][PATCH 0/3] Fix the audio on some Chromebooks

Stefan Bader-2
In reply to this post by Po-Hsu Lin (Sam)
On 15.01.19 04:13, Po-Hsu Lin wrote:

> BugLink: https://bugs.launchpad.net/bugs/1811566
>
> == Justification ==
> Commit 648e921888ad96ea3dc922739e96716ad3225d7f (clk: x86: Stop marking clocks
> as CLK_IS_CRITICAL) backported to Cosmic kernel fixed the bug that keeps unused
> clocks on, but it is breaking the audio support on some Chromebooks (Swanky /
> Clapper/ Gnawty) since we were not using the right clock in the
> cht_bsw_max98090_ti machine driver.
>
> == Fix ==
> a182ecd (ASoC: intel: cht_bsw_max98090_ti: Add quirk for boards using pmc_plt_clk_0)
> 984bfb3 (ASoC: intel: cht_bsw_max98090_ti: Add pmc_plt_clk_0 quirk)
> 94ea56c (ASoC: intel: cht_bsw_max98090_ti: Add pmc_plt_clk_0 quirk)
>
> These 3 patches can be cherry-picked to Cosmic.
>
> == Test ==
> Test kernel with these 3 patches could be found in:
> http://people.canonical.com/~phlin/kernel/lp-1811566-chromebook-Gnawty/
>
> Bug reporter stated that this kernel can fix the audio issue as expected.
>
> == Regression potential ==
> Low,
> changes are limited in the cht_bsw_max98090_ti driver with a new DMI based
> quirk table that contains these 3 Chromebook models and some logic to
> determine the right clock to use.
>
>
> Hans de Goede (3):
>   ASoC: intel: cht_bsw_max98090_ti: Add quirk for boards using
>     pmc_plt_clk_0
>   ASoC: intel: cht_bsw_max98090_ti: Add pmc_plt_clk_0 quirk for
>     Chromebook Clapper
>   ASoC: intel: cht_bsw_max98090_ti: Add pmc_plt_clk_0 quirk for
>     Chromebook Gnawty
>
>  sound/soc/intel/boards/cht_bsw_max98090_ti.c | 46 ++++++++++++++++++++++++++--
>  1 file changed, 43 insertions(+), 3 deletions(-)
>
Limited risk for further regressions and testable. Just wondering about the
Disco nomination in the bug report. Is that still needed or just waiting on
moving ahead to unstable soon.

Acked-by: Stefan Bader <[hidden email]>


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team

signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: ACK: [C][SRU][PATCH 0/3] Fix the audio on some Chromebooks

Po-Hsu Lin (Sam)
Hi Stefan,

For the Disco nomination, I have mark it as Fix-released and remove
the disco tag as it has already include this patchset.
It looks like this patchset is in the unstable tree as well.
Hope this is correct.

Thanks
Sam

On Tue, Jan 15, 2019 at 9:59 PM Stefan Bader <[hidden email]> wrote:

>
> On 15.01.19 04:13, Po-Hsu Lin wrote:
> > BugLink: https://bugs.launchpad.net/bugs/1811566
> >
> > == Justification ==
> > Commit 648e921888ad96ea3dc922739e96716ad3225d7f (clk: x86: Stop marking clocks
> > as CLK_IS_CRITICAL) backported to Cosmic kernel fixed the bug that keeps unused
> > clocks on, but it is breaking the audio support on some Chromebooks (Swanky /
> > Clapper/ Gnawty) since we were not using the right clock in the
> > cht_bsw_max98090_ti machine driver.
> >
> > == Fix ==
> > a182ecd (ASoC: intel: cht_bsw_max98090_ti: Add quirk for boards using pmc_plt_clk_0)
> > 984bfb3 (ASoC: intel: cht_bsw_max98090_ti: Add pmc_plt_clk_0 quirk)
> > 94ea56c (ASoC: intel: cht_bsw_max98090_ti: Add pmc_plt_clk_0 quirk)
> >
> > These 3 patches can be cherry-picked to Cosmic.
> >
> > == Test ==
> > Test kernel with these 3 patches could be found in:
> > http://people.canonical.com/~phlin/kernel/lp-1811566-chromebook-Gnawty/
> >
> > Bug reporter stated that this kernel can fix the audio issue as expected.
> >
> > == Regression potential ==
> > Low,
> > changes are limited in the cht_bsw_max98090_ti driver with a new DMI based
> > quirk table that contains these 3 Chromebook models and some logic to
> > determine the right clock to use.
> >
> >
> > Hans de Goede (3):
> >   ASoC: intel: cht_bsw_max98090_ti: Add quirk for boards using
> >     pmc_plt_clk_0
> >   ASoC: intel: cht_bsw_max98090_ti: Add pmc_plt_clk_0 quirk for
> >     Chromebook Clapper
> >   ASoC: intel: cht_bsw_max98090_ti: Add pmc_plt_clk_0 quirk for
> >     Chromebook Gnawty
> >
> >  sound/soc/intel/boards/cht_bsw_max98090_ti.c | 46 ++++++++++++++++++++++++++--
> >  1 file changed, 43 insertions(+), 3 deletions(-)
> >
> Limited risk for further regressions and testable. Just wondering about the
> Disco nomination in the bug report. Is that still needed or just waiting on
> moving ahead to unstable soon.
>
> Acked-by: Stefan Bader <[hidden email]>
>

--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

ACK: [C][SRU][PATCH 0/3] Fix the audio on some Chromebooks

Kleber Souza
In reply to this post by Po-Hsu Lin (Sam)
On 1/15/19 4:13 AM, Po-Hsu Lin wrote:

> BugLink: https://bugs.launchpad.net/bugs/1811566
>
> == Justification ==
> Commit 648e921888ad96ea3dc922739e96716ad3225d7f (clk: x86: Stop marking clocks
> as CLK_IS_CRITICAL) backported to Cosmic kernel fixed the bug that keeps unused
> clocks on, but it is breaking the audio support on some Chromebooks (Swanky /
> Clapper/ Gnawty) since we were not using the right clock in the
> cht_bsw_max98090_ti machine driver.
>
> == Fix ==
> a182ecd (ASoC: intel: cht_bsw_max98090_ti: Add quirk for boards using pmc_plt_clk_0)
> 984bfb3 (ASoC: intel: cht_bsw_max98090_ti: Add pmc_plt_clk_0 quirk)
> 94ea56c (ASoC: intel: cht_bsw_max98090_ti: Add pmc_plt_clk_0 quirk)
>
> These 3 patches can be cherry-picked to Cosmic.
>
> == Test ==
> Test kernel with these 3 patches could be found in:
> http://people.canonical.com/~phlin/kernel/lp-1811566-chromebook-Gnawty/
>
> Bug reporter stated that this kernel can fix the audio issue as expected.
>
> == Regression potential ==
> Low,
> changes are limited in the cht_bsw_max98090_ti driver with a new DMI based
> quirk table that contains these 3 Chromebook models and some logic to
> determine the right clock to use.
>
>
> Hans de Goede (3):
>   ASoC: intel: cht_bsw_max98090_ti: Add quirk for boards using
>     pmc_plt_clk_0
>   ASoC: intel: cht_bsw_max98090_ti: Add pmc_plt_clk_0 quirk for
>     Chromebook Clapper
>   ASoC: intel: cht_bsw_max98090_ti: Add pmc_plt_clk_0 quirk for
>     Chromebook Gnawty
>
>  sound/soc/intel/boards/cht_bsw_max98090_ti.c | 46 ++++++++++++++++++++++++++--
>  1 file changed, 43 insertions(+), 3 deletions(-)
>
Clean cherry-picks, limited to specific hard and with good test results.

Acked-by: Kleber Sacilotto de Souza <[hidden email]>


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

APPLIED: [C][SRU][PATCH 0/3] Fix the audio on some Chromebooks

Khaled Elmously
In reply to this post by Po-Hsu Lin (Sam)
On 2019-01-15 11:13:31 , Po-Hsu Lin wrote:

> BugLink: https://bugs.launchpad.net/bugs/1811566
>
> == Justification ==
> Commit 648e921888ad96ea3dc922739e96716ad3225d7f (clk: x86: Stop marking clocks
> as CLK_IS_CRITICAL) backported to Cosmic kernel fixed the bug that keeps unused
> clocks on, but it is breaking the audio support on some Chromebooks (Swanky /
> Clapper/ Gnawty) since we were not using the right clock in the
> cht_bsw_max98090_ti machine driver.
>
> == Fix ==
> a182ecd (ASoC: intel: cht_bsw_max98090_ti: Add quirk for boards using pmc_plt_clk_0)
> 984bfb3 (ASoC: intel: cht_bsw_max98090_ti: Add pmc_plt_clk_0 quirk)
> 94ea56c (ASoC: intel: cht_bsw_max98090_ti: Add pmc_plt_clk_0 quirk)
>
> These 3 patches can be cherry-picked to Cosmic.
>
> == Test ==
> Test kernel with these 3 patches could be found in:
> http://people.canonical.com/~phlin/kernel/lp-1811566-chromebook-Gnawty/
>
> Bug reporter stated that this kernel can fix the audio issue as expected.
>
> == Regression potential ==
> Low,
> changes are limited in the cht_bsw_max98090_ti driver with a new DMI based
> quirk table that contains these 3 Chromebook models and some logic to
> determine the right clock to use.
>
>
> Hans de Goede (3):
>   ASoC: intel: cht_bsw_max98090_ti: Add quirk for boards using
>     pmc_plt_clk_0
>   ASoC: intel: cht_bsw_max98090_ti: Add pmc_plt_clk_0 quirk for
>     Chromebook Clapper
>   ASoC: intel: cht_bsw_max98090_ti: Add pmc_plt_clk_0 quirk for
>     Chromebook Gnawty
>
>  sound/soc/intel/boards/cht_bsw_max98090_ti.c | 46 ++++++++++++++++++++++++++--
>  1 file changed, 43 insertions(+), 3 deletions(-)
>
> --
> 2.7.4
>
>
> --
> kernel-team mailing list
> [hidden email]
> https://lists.ubuntu.com/mailman/listinfo/kernel-team

--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team