[SRU][B/C/D][PATCH 0/1] Headphone jack switch sense is inverted: plugging in headphones disables headphone output

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

[SRU][B/C/D][PATCH 0/1] Headphone jack switch sense is inverted: plugging in headphones disables headphone output

Hui Wang
BugLink: https://bugs.launchpad.net/bugs/1824259

[Impact]
On the LattePanda board, the headphone detection signal is not correct, it is
inverted: plugging in headphones disables headphone output

[Fix]
In the codec driver, there already is a fixup, just set the inv_jd1_1 to true.

[Test Case]
It is tested by the bug reporter, please refer to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1824259/comments/23

[Regression Risk]
Low. This fix is specific to a board which is defined by DMI strings.


Hui Wang (1):
  ASoC: rt5645: Headphone Jack sense inverts on the LattePanda board

 sound/soc/codecs/rt5645.c | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

--
2.17.1


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

[SRU][B][PATCH 1/1] ASoC: rt5645: Headphone Jack sense inverts on the LattePanda board

Hui Wang
BugLink: https://bugs.launchpad.net/bugs/1824259

The LattePanda board has a sound card chtrt5645, when there is nothing
plugged in the headphone jack, the system thinks the headphone is
plugged in, while we plug a headphone in the jack, the system thinks
the headphone is unplugged.

If adding quirk=0x21 in the module parameter, the headphone jack can
work well. So let us fix it via platform_data.

https://bugs.launchpad.net/bugs/182459
Signed-off-by: Hui Wang <[hidden email]>
Signed-off-by: Mark Brown <[hidden email]>
(backported from commit 406dcbc55a0a20fd155be889a4a0c4b812f7c18e
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git)
Signed-off-by: Hui Wang <[hidden email]>
---
 sound/soc/codecs/rt5645.c | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/sound/soc/codecs/rt5645.c b/sound/soc/codecs/rt5645.c
index edc152c8a1fe..66fce92fb1a9 100644
--- a/sound/soc/codecs/rt5645.c
+++ b/sound/soc/codecs/rt5645.c
@@ -3681,6 +3681,23 @@ static const struct dmi_system_id dmi_platform_minix_z83_4[] = {
  { }
 };
 
+static const struct rt5645_platform_data lattepanda_board_platform_data = {
+       .jd_mode = 2,
+       .inv_jd1_1 = true,
+};
+
+static const struct dmi_system_id dmi_platform_lattepanda_board[] = {
+ {
+ .ident = "LattePanda board",
+ .matches = {
+  DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "AMI Corporation"),
+  DMI_EXACT_MATCH(DMI_BOARD_NAME, "Cherry Trail CR"),
+  DMI_EXACT_MATCH(DMI_BOARD_VERSION, "Default string"),
+ },
+ },
+ { }
+};
+
 static bool rt5645_check_dp(struct device *dev)
 {
  if (device_property_present(dev, "realtek,in2-differential") ||
@@ -3737,6 +3754,8 @@ static int rt5645_i2c_probe(struct i2c_client *i2c,
  rt5645->pdata = general_platform_data2;
  else if (dmi_check_system(dmi_platform_minix_z83_4))
  rt5645->pdata = minix_z83_4_platform_data;
+ else if (dmi_check_system(dmi_platform_lattepanda_board))
+ rt5645->pdata = lattepanda_board_platform_data;
 
  if (quirk != -1) {
  rt5645->pdata.in2_diff = QUIRK_IN2_DIFF(quirk);
--
2.17.1


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

[SRU][C/D][PATCH] ASoC: rt5645: Headphone Jack sense inverts on the LattePanda board

Hui Wang
In reply to this post by Hui Wang
BugLink: https://bugs.launchpad.net/bugs/1824259

The LattePanda board has a sound card chtrt5645, when there is nothing
plugged in the headphone jack, the system thinks the headphone is
plugged in, while we plug a headphone in the jack, the system thinks
the headphone is unplugged.

If adding quirk=0x21 in the module parameter, the headphone jack can
work well. So let us fix it via platform_data.

https://bugs.launchpad.net/bugs/182459
Signed-off-by: Hui Wang <[hidden email]>
Signed-off-by: Mark Brown <[hidden email]>
(cherry picked from commit 406dcbc55a0a20fd155be889a4a0c4b812f7c18e
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git)
Signed-off-by: Hui Wang <[hidden email]>
---
 sound/soc/codecs/rt5645.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/sound/soc/codecs/rt5645.c b/sound/soc/codecs/rt5645.c
index 1dc70f452c1b..f842db498c74 100644
--- a/sound/soc/codecs/rt5645.c
+++ b/sound/soc/codecs/rt5645.c
@@ -3662,6 +3662,11 @@ static const struct rt5645_platform_data jd_mode3_platform_data = {
  .jd_mode = 3,
 };
 
+static const struct rt5645_platform_data lattepanda_board_platform_data = {
+ .jd_mode = 2,
+ .inv_jd1_1 = true
+};
+
 static const struct dmi_system_id dmi_platform_data[] = {
  {
  .ident = "Chrome Buddy",
@@ -3759,6 +3764,15 @@ static const struct dmi_system_id dmi_platform_data[] = {
  },
  .driver_data = (void *)&intel_braswell_platform_data,
  },
+ {
+ .ident = "LattePanda board",
+ .matches = {
+  DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "AMI Corporation"),
+  DMI_EXACT_MATCH(DMI_BOARD_NAME, "Cherry Trail CR"),
+  DMI_EXACT_MATCH(DMI_BOARD_VERSION, "Default string"),
+ },
+ .driver_data = (void *)&lattepanda_board_platform_data,
+ },
  { }
 };
 
--
2.17.1


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

ACK: [SRU][B/C/D][PATCH 0/1] Headphone jack switch sense is inverted: plugging in headphones disables headphone output

Kleber Souza
In reply to this post by Hui Wang
On 5/7/19 7:50 AM, Hui Wang wrote:

> BugLink: https://bugs.launchpad.net/bugs/1824259
>
> [Impact]
> On the LattePanda board, the headphone detection signal is not correct, it is
> inverted: plugging in headphones disables headphone output
>
> [Fix]
> In the codec driver, there already is a fixup, just set the inv_jd1_1 to true.
>
> [Test Case]
> It is tested by the bug reporter, please refer to:
> https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1824259/comments/23
>
> [Regression Risk]
> Low. This fix is specific to a board which is defined by DMI strings.
>
>
> Hui Wang (1):
>   ASoC: rt5645: Headphone Jack sense inverts on the LattePanda board
>
>  sound/soc/codecs/rt5645.c | 19 +++++++++++++++++++
>  1 file changed, 19 insertions(+)
>

The changes look good, tested by the reporter.

I have also fixed the nominations on the bug report.

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



Thanks,
Kleber

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

ACK / APPLIED[Unstable]: [SRU][B/C/D][PATCH 0/1] Headphone jack switch sense is inverted: plugging in headphones disables headphone output

Seth Forshee
In reply to this post by Hui Wang
On Tue, May 07, 2019 at 01:50:06PM +0800, Hui Wang wrote:

> BugLink: https://bugs.launchpad.net/bugs/1824259
>
> [Impact]
> On the LattePanda board, the headphone detection signal is not correct, it is
> inverted: plugging in headphones disables headphone output
>
> [Fix]
> In the codec driver, there already is a fixup, just set the inv_jd1_1 to true.
>
> [Test Case]
> It is tested by the bug reporter, please refer to:
> https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1824259/comments/23
>
> [Regression Risk]
> Low. This fix is specific to a board which is defined by DMI strings.

Acked-by: Seth Forshee <[hidden email]>

Applied to unstable/master, thanks!

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

ACK: [SRU][B/C/D][PATCH 0/1] Headphone jack switch sense is inverted: plugging in headphones disables headphone output

Connor Kuehl
In reply to this post by Hui Wang
On 5/6/19 10:50 PM, Hui Wang wrote:

> BugLink: https://bugs.launchpad.net/bugs/1824259
>
> [Impact]
> On the LattePanda board, the headphone detection signal is not correct, it is
> inverted: plugging in headphones disables headphone output
>
> [Fix]
> In the codec driver, there already is a fixup, just set the inv_jd1_1 to true.
>
> [Test Case]
> It is tested by the bug reporter, please refer to:
> https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1824259/comments/23
>
> [Regression Risk]
> Low. This fix is specific to a board which is defined by DMI strings.
>
>
> Hui Wang (1):
>   ASoC: rt5645: Headphone Jack sense inverts on the LattePanda board
>
>  sound/soc/codecs/rt5645.c | 19 +++++++++++++++++++
>  1 file changed, 19 insertions(+)
>
Acked-by: Connor Kuehl <[hidden email]>


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

pEpkey.asc (5K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

APPLIED: [SRU][B/C/D][PATCH 0/1] Headphone jack switch sense is inverted: plugging in headphones disables headphone output

Kleber Souza
In reply to this post by Hui Wang
On 5/7/19 7:50 AM, Hui Wang wrote:

> BugLink: https://bugs.launchpad.net/bugs/1824259
>
> [Impact]
> On the LattePanda board, the headphone detection signal is not correct, it is
> inverted: plugging in headphones disables headphone output
>
> [Fix]
> In the codec driver, there already is a fixup, just set the inv_jd1_1 to true.
>
> [Test Case]
> It is tested by the bug reporter, please refer to:
> https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1824259/comments/23
>
> [Regression Risk]
> Low. This fix is specific to a board which is defined by DMI strings.
>
>
> Hui Wang (1):
>   ASoC: rt5645: Headphone Jack sense inverts on the LattePanda board
>
>  sound/soc/codecs/rt5645.c | 19 +++++++++++++++++++
>  1 file changed, 19 insertions(+)
>


Applied to bionic, cosmic and disco/master-next branches.

Thanks,
Kleber

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