[Artful][linux-oem][PATCH 0/4] four audio fixes for Artful+linux-oem

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

[Artful][linux-oem][PATCH 0/4] four audio fixes for Artful+linux-oem

Hui Wang
patch [1/4] is for BugLink: http://bugs.launchpad.net/bugs/1740971
patch [2/4] is for BugLink: http://bugs.launchpad.net/bugs/1740972
patch [3/4] is for BugLink: http://bugs.launchpad.net/bugs/1740973
patch [4/4] is for BugLink: http://bugs.launchpad.net/bugs/1740974


patch [1/4] is for a bug filed in the Dell somerville project, without this patch,
line-out jack can't work on this Dell machine.

patch [2/4] is for a bug filed in the Dell somerville project too, without is patch,
the external mic can't work through the headset jack on this machine.

patch [3/4] is for a bug filed in the lenovo sutton project, without this patch,
two front mics can't work since the pulseaudio can't handle two mics with the
same name so far.

patch [4/4] is for a bug filed in the HP stella project, without this patch, the
external headset mic can record sound, but system can't detect its plug/unplug.

[Impact]
These bugs were filed against oem project, and they are certification blocker,
and the fix for them is simple and straight-forward.

[Test Case]
Applying this patch and test the audio functions accordingly, all issues are fixed
by proper patch.

[Fix]
Backport the uptream patch, the patch was CCed to stable as well.

[Regression Potential]
No, it does not change any existing functions.


Hui Wang (3):
  ALSA: hda - fix headset mic detection issue on a Dell machine
  ALSA: hda - change the location for one mic on a Lenovo machine
  ALSA: hda - Add MIC_NO_PRESENCE fixup for 2 HP machines

Kailang Yang (1):
  ALSA: hda/realtek - Fix Dell AIO LineOut issue

 sound/pci/hda/patch_conexant.c | 29 +++++++++++++++++++++++++++++
 sound/pci/hda/patch_realtek.c  | 41 ++++++++++++++++++++++++++++++++++++++++-
 2 files changed, 69 insertions(+), 1 deletion(-)

--
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
|

[Artful][linux-oem][PATCH 1/4] ALSA: hda/realtek - Fix Dell AIO LineOut issue

Hui Wang
From: Kailang Yang <[hidden email]>

BugLink: http://bugs.launchpad.net/bugs/1740971

Dell AIO had LineOut jack.
Add LineOut verb into this patch.

[ Additional notes:
  the ALC274 codec seems requiring the fixed pin / DAC connections for
  HP / line-out pins for enabling EQ for speakers; i.e. the HP / LO
  pins expect to be connected with NID 0x03 while keeping the speaker
  with NID 0x02.  However, by adding a new line-out pin, the
  auto-parser assigns the NID 0x02 for HP/LO pins as primary outputs.
  As an easy workaround, we provide the preferred_pairs[] to map
  forcibly for these pins. -- tiwai ]

Fixes: 75ee94b20b46 ("ALSA: hda - fix headset mic problem for Dell machines with alc274")
Signed-off-by: Kailang Yang <[hidden email]>
Cc: <[hidden email]>
Signed-off-by: Takashi Iwai <[hidden email]>
(cherry picked from commit 9226665159f0367ad08bc7d5dd194aeadb90316f)
Signed-off-by: Hui Wang <[hidden email]>
---
 sound/pci/hda/patch_realtek.c | 35 ++++++++++++++++++++++++++++++++++-
 1 file changed, 34 insertions(+), 1 deletion(-)

diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 3b07373..af2de07 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -5156,6 +5156,22 @@ static void alc233_alc662_fixup_lenovo_dual_codecs(struct hda_codec *codec,
  }
 }
 
+/* Forcibly assign NID 0x03 to HP/LO while NID 0x02 to SPK for EQ */
+static void alc274_fixup_bind_dacs(struct hda_codec *codec,
+    const struct hda_fixup *fix, int action)
+{
+ struct alc_spec *spec = codec->spec;
+ static hda_nid_t preferred_pairs[] = {
+ 0x21, 0x03, 0x1b, 0x03, 0x16, 0x02,
+ 0
+ };
+
+ if (action != HDA_FIXUP_ACT_PRE_PROBE)
+ return;
+
+ spec->gen.preferred_dacs = preferred_pairs;
+}
+
 /* for hda_fixup_thinkpad_acpi() */
 #include "thinkpad_helper.c"
 
@@ -5273,6 +5289,8 @@ enum {
  ALC233_FIXUP_LENOVO_MULTI_CODECS,
  ALC294_FIXUP_LENOVO_MIC_LOCATION,
  ALC225_FIXUP_DELL_WYSE_MIC_NO_PRESENCE,
+ ALC274_FIXUP_DELL_BIND_DACS,
+ ALC274_FIXUP_DELL_AIO_LINEOUT_VERB,
 };
 
 static const struct hda_fixup alc269_fixups[] = {
@@ -6079,6 +6097,21 @@ static const struct hda_fixup alc269_fixups[] = {
  .chained = true,
  .chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC
  },
+ [ALC274_FIXUP_DELL_BIND_DACS] = {
+ .type = HDA_FIXUP_FUNC,
+ .v.func = alc274_fixup_bind_dacs,
+ .chained = true,
+ .chain_id = ALC269_FIXUP_DELL1_MIC_NO_PRESENCE
+ },
+ [ALC274_FIXUP_DELL_AIO_LINEOUT_VERB] = {
+ .type = HDA_FIXUP_PINS,
+ .v.pins = (const struct hda_pintbl[]) {
+ { 0x1b, 0x0401102f },
+ { }
+ },
+ .chained = true,
+ .chain_id = ALC274_FIXUP_DELL_BIND_DACS
+ },
 };
 
 static const struct snd_pci_quirk alc269_fixup_tbl[] = {
@@ -6540,7 +6573,7 @@ static const struct snd_hda_pin_quirk alc269_pin_fixup_tbl[] = {
  {0x14, 0x90170110},
  {0x1b, 0x90a70130},
  {0x21, 0x03211020}),
- SND_HDA_PIN_QUIRK(0x10ec0274, 0x1028, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE,
+ SND_HDA_PIN_QUIRK(0x10ec0274, 0x1028, "Dell", ALC274_FIXUP_DELL_AIO_LINEOUT_VERB,
  {0x12, 0xb7a60130},
  {0x13, 0xb8a61140},
  {0x16, 0x90170110},
--
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
|

[Artful][linux-oem][PATCH 2/4] ALSA: hda - fix headset mic detection issue on a Dell machine

Hui Wang
In reply to this post by Hui Wang
BugLink: http://bugs.launchpad.net/bugs/1740972

It has the codec alc256, and add its pin definition to pin quirk
table to let it apply ALC255_FIXUP_DELL1_MIC_NO_PRESENCE.

Cc: <[hidden email]>
Signed-off-by: Hui Wang <[hidden email]>
Signed-off-by: Takashi Iwai <[hidden email]>
(cherry picked from commit 285d5ddcffafa5d5e68c586f4c9eaa8b24a2897d)
---
 sound/pci/hda/patch_realtek.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index af2de07..375a243 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -6548,6 +6548,11 @@ static const struct snd_hda_pin_quirk alc269_pin_fixup_tbl[] = {
  {0x1b, 0x01011020},
  {0x21, 0x02211010}),
  SND_HDA_PIN_QUIRK(0x10ec0256, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
+ {0x12, 0x90a60130},
+ {0x14, 0x90170110},
+ {0x1b, 0x01011020},
+ {0x21, 0x0221101f}),
+ SND_HDA_PIN_QUIRK(0x10ec0256, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
  {0x12, 0x90a60160},
  {0x14, 0x90170120},
  {0x21, 0x02211030}),
--
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
|

[Artful][linux-oem][PATCH 3/4] ALSA: hda - change the location for one mic on a Lenovo machine

Hui Wang
In reply to this post by Hui Wang
BugLink: http://bugs.launchpad.net/bugs/1740973

There are two front mics on this machine, and current driver assign
the same name Mic to both of them, but pulseaudio can't handle them.
As a workaround, we change the location for one of them, then the
driver will assign "Front Mic" and "Mic" for them.

Cc: <[hidden email]>
Signed-off-by: Hui Wang <[hidden email]>
Signed-off-by: Takashi Iwai <[hidden email]>
(cherry picked from commit 8da5bbfc7cbba909f4f32d5e1dda3750baa5d853)
---
 sound/pci/hda/patch_realtek.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 375a243..9cd78bb 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -6295,6 +6295,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
  SND_PCI_QUIRK(0x17aa, 0x30bb, "ThinkCentre AIO", ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY),
  SND_PCI_QUIRK(0x17aa, 0x30e2, "ThinkCentre AIO", ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY),
  SND_PCI_QUIRK(0x17aa, 0x310c, "ThinkCentre Station", ALC294_FIXUP_LENOVO_MIC_LOCATION),
+ SND_PCI_QUIRK(0x17aa, 0x313c, "ThinkCentre Station", ALC294_FIXUP_LENOVO_MIC_LOCATION),
  SND_PCI_QUIRK(0x17aa, 0x3112, "ThinkCentre AIO", ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY),
  SND_PCI_QUIRK(0x17aa, 0x3902, "Lenovo E50-80", ALC269_FIXUP_DMIC_THINKPAD_ACPI),
  SND_PCI_QUIRK(0x17aa, 0x3977, "IdeaPad S210", ALC283_FIXUP_INT_MIC),
--
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
|

[Artful][linux-oem][PATCH 4/4] ALSA: hda - Add MIC_NO_PRESENCE fixup for 2 HP machines

Hui Wang
In reply to this post by Hui Wang
BugLink: http://bugs.launchpad.net/bugs/1740974

There is a headset jack on the front panel, when we plug a headset
into it, the headset mic can't trigger unsol events, and
read_pin_sense() can't detect its presence too. So add this fixup
to fix this issue.

Cc: <[hidden email]>
Signed-off-by: Hui Wang <[hidden email]>
Signed-off-by: Takashi Iwai <[hidden email]>
(cherry picked from commit 322f74ede933b3e2cb78768b6a6fdbfbf478a0c1)
---
 sound/pci/hda/patch_conexant.c | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c
index a81aacf..37e1cf8 100644
--- a/sound/pci/hda/patch_conexant.c
+++ b/sound/pci/hda/patch_conexant.c
@@ -271,6 +271,8 @@ enum {
  CXT_FIXUP_HP_SPECTRE,
  CXT_FIXUP_HP_GATE_MIC,
  CXT_FIXUP_MUTE_LED_GPIO,
+ CXT_FIXUP_HEADSET_MIC,
+ CXT_FIXUP_HP_MIC_NO_PRESENCE,
 };
 
 /* for hda_fixup_thinkpad_acpi() */
@@ -350,6 +352,18 @@ static void cxt_fixup_headphone_mic(struct hda_codec *codec,
  }
 }
 
+static void cxt_fixup_headset_mic(struct hda_codec *codec,
+    const struct hda_fixup *fix, int action)
+{
+ struct conexant_spec *spec = codec->spec;
+
+ switch (action) {
+ case HDA_FIXUP_ACT_PRE_PROBE:
+ spec->parse_flags |= HDA_PINCFG_HEADSET_MIC;
+ break;
+ }
+}
+
 /* OPLC XO 1.5 fixup */
 
 /* OLPC XO-1.5 supports DC input mode (e.g. for use with analog sensors)
@@ -880,6 +894,19 @@ static const struct hda_fixup cxt_fixups[] = {
  .type = HDA_FIXUP_FUNC,
  .v.func = cxt_fixup_mute_led_gpio,
  },
+ [CXT_FIXUP_HEADSET_MIC] = {
+ .type = HDA_FIXUP_FUNC,
+ .v.func = cxt_fixup_headset_mic,
+ },
+ [CXT_FIXUP_HP_MIC_NO_PRESENCE] = {
+ .type = HDA_FIXUP_PINS,
+ .v.pins = (const struct hda_pintbl[]) {
+ { 0x1a, 0x02a1113c },
+ { }
+ },
+ .chained = true,
+ .chain_id = CXT_FIXUP_HEADSET_MIC,
+ },
 };
 
 static const struct snd_pci_quirk cxt5045_fixups[] = {
@@ -934,6 +961,8 @@ static const struct snd_pci_quirk cxt5066_fixups[] = {
  SND_PCI_QUIRK(0x103c, 0x8115, "HP Z1 Gen3", CXT_FIXUP_HP_GATE_MIC),
  SND_PCI_QUIRK(0x103c, 0x814f, "HP ZBook 15u G3", CXT_FIXUP_MUTE_LED_GPIO),
  SND_PCI_QUIRK(0x103c, 0x822e, "HP ProBook 440 G4", CXT_FIXUP_MUTE_LED_GPIO),
+ SND_PCI_QUIRK(0x103c, 0x8299, "HP 800 G3 SFF", CXT_FIXUP_HP_MIC_NO_PRESENCE),
+ SND_PCI_QUIRK(0x103c, 0x829a, "HP 800 G3 DM", CXT_FIXUP_HP_MIC_NO_PRESENCE),
  SND_PCI_QUIRK(0x1043, 0x138d, "Asus", CXT_FIXUP_HEADPHONE_MIC_PIN),
  SND_PCI_QUIRK(0x152d, 0x0833, "OLPC XO-1.5", CXT_FIXUP_OLPC_XO),
  SND_PCI_QUIRK(0x17aa, 0x20f2, "Lenovo T400", CXT_PINCFG_LENOVO_TP410),
--
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
|

Re: [Artful][linux-oem][PATCH 0/4] four audio fixes for Artful+linux-oem

Aaron Ma
In reply to this post by Hui Wang
Reply | Threaded
Open this post in threaded view
|

ACK: [Artful][linux-oem][PATCH 0/4] four audio fixes for Artful+linux-oem

Seth Forshee
In reply to this post by Hui Wang
On Wed, Jan 03, 2018 at 11:07:26AM +0800, Hui Wang wrote:

> patch [1/4] is for BugLink: http://bugs.launchpad.net/bugs/1740971
> patch [2/4] is for BugLink: http://bugs.launchpad.net/bugs/1740972
> patch [3/4] is for BugLink: http://bugs.launchpad.net/bugs/1740973
> patch [4/4] is for BugLink: http://bugs.launchpad.net/bugs/1740974
>
>
> patch [1/4] is for a bug filed in the Dell somerville project, without this patch,
> line-out jack can't work on this Dell machine.
>
> patch [2/4] is for a bug filed in the Dell somerville project too, without is patch,
> the external mic can't work through the headset jack on this machine.
>
> patch [3/4] is for a bug filed in the lenovo sutton project, without this patch,
> two front mics can't work since the pulseaudio can't handle two mics with the
> same name so far.
>
> patch [4/4] is for a bug filed in the HP stella project, without this patch, the
> external headset mic can record sound, but system can't detect its plug/unplug.
>
> [Impact]
> These bugs were filed against oem project, and they are certification blocker,
> and the fix for them is simple and straight-forward.
>
> [Test Case]
> Applying this patch and test the audio functions accordingly, all issues are fixed
> by proper patch.
>
> [Fix]
> Backport the uptream patch, the patch was CCed to stable as well.
>
> [Regression Potential]
> No, it does not change any existing functions.

All clean cherry picks and upstream stable material.

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

Bionic has already received these patches via upstream stable updates.

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