[SRU][B/OEM-B/C/D][PATCH 0/1] audio output has constant noise on a Dell machine

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

[SRU][B/OEM-B/C/D][PATCH 0/1] audio output has constant noise on a Dell machine

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

[Impact]
the audio output (headpohne, lineout and internal speaker) has constant
noise when playing sound.

[Fix]
Set the pin configuration and some secret coeff registers, the noise
disappears. This patch is written by Realtek engineer and is upstreamd
already.


[Test Case]
play sound via internal speaker, lineout and headphone, no noise anymore.


[Regression Potential]
Very low, this patch is upstreamd for a while, no regression is reported.


Kailang Yang (1):
  ALSA: hda/realtek - Fixed headphone issue for ALC700

 sound/pci/hda/patch_realtek.c | 33 +++++++++++++++++++++++++++++++++
 1 file changed, 33 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/OEM-B/C][PATCH] ALSA: hda/realtek - Fixed headphone issue for ALC700

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

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

If it plugged headphone or headset into the jack, then
do the reboot, it will have a chance to cause headphone no sound.
It just need to run the headphone mode procedure after boot time.
The issue will be fixed.
It also suitable for ALC234 ALC274 and ALC294.

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

diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 7dd14740d570..631475fb1083 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -7110,6 +7110,37 @@ static void alc269_fill_coef(struct hda_codec *codec)
  alc_update_coef_idx(codec, 0x4, 0, 1<<11);
 }
 
+static void alc294_hp_init(struct hda_codec *codec)
+{
+ struct alc_spec *spec = codec->spec;
+ hda_nid_t hp_pin = spec->gen.autocfg.hp_pins[0];
+ int i, val;
+
+ if (!hp_pin)
+ return;
+
+ snd_hda_codec_write(codec, hp_pin, 0,
+    AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE);
+
+ msleep(100);
+
+ snd_hda_codec_write(codec, hp_pin, 0,
+    AC_VERB_SET_PIN_WIDGET_CONTROL, 0x0);
+
+ alc_update_coef_idx(codec, 0x6f, 0x000f, 0);/* Set HP depop to manual mode */
+ alc_update_coefex_idx(codec, 0x58, 0x00, 0x8000, 0x8000); /* HP depop procedure start */
+
+ /* Wait for depop procedure finish  */
+ val = alc_read_coefex_idx(codec, 0x58, 0x01);
+ for (i = 0; i < 20 && val & 0x0080; i++) {
+ msleep(50);
+ val = alc_read_coefex_idx(codec, 0x58, 0x01);
+ }
+ /* Set HP depop to auto mode */
+ alc_update_coef_idx(codec, 0x6f, 0x000f, 0x000b);
+ msleep(50);
+}
+
 /*
  */
 static int patch_alc269(struct hda_codec *codec)
@@ -7248,6 +7279,7 @@ static int patch_alc269(struct hda_codec *codec)
  spec->codec_variant = ALC269_TYPE_ALC294;
  spec->gen.mixer_nid = 0; /* ALC2x4 does not have any loopback mixer path */
  alc_update_coef_idx(codec, 0x6b, 0x0018, (1<<4) | (1<<3)); /* UAJ MIC Vref control by verb */
+ alc294_hp_init(codec);
  break;
  case 0x10ec0700:
  case 0x10ec0701:
@@ -7255,6 +7287,7 @@ static int patch_alc269(struct hda_codec *codec)
  spec->codec_variant = ALC269_TYPE_ALC700;
  spec->gen.mixer_nid = 0; /* ALC700 does not have any loopback mixer path */
  alc_update_coef_idx(codec, 0x4a, 1 << 15, 0); /* Combo jack auto trigger control */
+ alc294_hp_init(codec);
  break;
 
  }
--
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][D][PATCH] ALSA: hda/realtek - Fixed headphone issue for ALC700

Hui Wang
In reply to this post by Hui Wang
From: Kailang Yang <[hidden email]>

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

If it plugged headphone or headset into the jack, then
do the reboot, it will have a chance to cause headphone no sound.
It just need to run the headphone mode procedure after boot time.
The issue will be fixed.
It also suitable for ALC234 ALC274 and ALC294.

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

diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index cf5d26642bcd..78a090eda61c 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -7200,6 +7200,37 @@ static void alc269_fill_coef(struct hda_codec *codec)
  alc_update_coef_idx(codec, 0x4, 0, 1<<11);
 }
 
+static void alc294_hp_init(struct hda_codec *codec)
+{
+ struct alc_spec *spec = codec->spec;
+ hda_nid_t hp_pin = spec->gen.autocfg.hp_pins[0];
+ int i, val;
+
+ if (!hp_pin)
+ return;
+
+ snd_hda_codec_write(codec, hp_pin, 0,
+    AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE);
+
+ msleep(100);
+
+ snd_hda_codec_write(codec, hp_pin, 0,
+    AC_VERB_SET_PIN_WIDGET_CONTROL, 0x0);
+
+ alc_update_coef_idx(codec, 0x6f, 0x000f, 0);/* Set HP depop to manual mode */
+ alc_update_coefex_idx(codec, 0x58, 0x00, 0x8000, 0x8000); /* HP depop procedure start */
+
+ /* Wait for depop procedure finish  */
+ val = alc_read_coefex_idx(codec, 0x58, 0x01);
+ for (i = 0; i < 20 && val & 0x0080; i++) {
+ msleep(50);
+ val = alc_read_coefex_idx(codec, 0x58, 0x01);
+ }
+ /* Set HP depop to auto mode */
+ alc_update_coef_idx(codec, 0x6f, 0x000f, 0x000b);
+ msleep(50);
+}
+
 /*
  */
 static int patch_alc269(struct hda_codec *codec)
@@ -7325,6 +7356,7 @@ static int patch_alc269(struct hda_codec *codec)
  spec->codec_variant = ALC269_TYPE_ALC294;
  spec->gen.mixer_nid = 0; /* ALC2x4 does not have any loopback mixer path */
  alc_update_coef_idx(codec, 0x6b, 0x0018, (1<<4) | (1<<3)); /* UAJ MIC Vref control by verb */
+ alc294_hp_init(codec);
  break;
  case 0x10ec0300:
  spec->codec_variant = ALC269_TYPE_ALC300;
@@ -7336,6 +7368,7 @@ static int patch_alc269(struct hda_codec *codec)
  spec->codec_variant = ALC269_TYPE_ALC700;
  spec->gen.mixer_nid = 0; /* ALC700 does not have any loopback mixer path */
  alc_update_coef_idx(codec, 0x4a, 1 << 15, 0); /* Combo jack auto trigger control */
+ alc294_hp_init(codec);
  break;
 
  }
--
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/cmnt: [SRU][B/OEM-B/C/D][PATCH 0/1] audio output has constant noise on a Dell machine

Kleber Souza
In reply to this post by Hui Wang
On 1/8/19 7:28 AM, Hui Wang wrote:

> BugLink: https://bugs.launchpad.net/bugs/1810891
>
> [Impact]
> the audio output (headpohne, lineout and internal speaker) has constant
> noise when playing sound.
>
> [Fix]
> Set the pin configuration and some secret coeff registers, the noise
> disappears. This patch is written by Realtek engineer and is upstreamd
> already.
>
>
> [Test Case]
> play sound via internal speaker, lineout and headphone, no noise anymore.
>
>
> [Regression Potential]
> Very low, this patch is upstreamd for a while, no regression is reported.
>
>
> Kailang Yang (1):
>   ALSA: hda/realtek - Fixed headphone issue for ALC700
>
>  sound/pci/hda/patch_realtek.c | 33 +++++++++++++++++++++++++++++++++
>  1 file changed, 33 insertions(+)
>
Hi Hui Wang,

Why there's a separate patch for D? Both patches state they were
cherry-picked, if that was the case the same patch could have been
submitted for all the requested series. If that's not the case, i.e. for
some of the series doing a 'git am' with the same patch would not work,
then that patch needs to be flagged as "backported from" instead of
"cherry picked from".

Anyway this is a minor issue and the patches look good.


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
|

Re: ACK/cmnt: [SRU][B/OEM-B/C/D][PATCH 0/1] audio output has constant noise on a Dell machine

Hui Wang
On 2019/1/8 下午10:24, Kleber Souza wrote:

> On 1/8/19 7:28 AM, Hui Wang wrote:
>> BugLink: https://bugs.launchpad.net/bugs/1810891
>>
>> [Impact]
>> the audio output (headpohne, lineout and internal speaker) has constant
>> noise when playing sound.
>>
>> [Fix]
>> Set the pin configuration and some secret coeff registers, the noise
>> disappears. This patch is written by Realtek engineer and is upstreamd
>> already.
>>
>>
>> [Test Case]
>> play sound via internal speaker, lineout and headphone, no noise anymore.
>>
>>
>> [Regression Potential]
>> Very low, this patch is upstreamd for a while, no regression is reported.
>>
>>
>> Kailang Yang (1):
>>    ALSA: hda/realtek - Fixed headphone issue for ALC700
>>
>>   sound/pci/hda/patch_realtek.c | 33 +++++++++++++++++++++++++++++++++
>>   1 file changed, 33 insertions(+)
>>
> Hi Hui Wang,
>
> Why there's a separate patch for D? Both patches state they were
> cherry-picked, if that was the case the same patch could have been
> submitted for all the requested series. If that's not the case, i.e. for
> some of the series doing a 'git am' with the same patch would not work,
> then that patch needs to be flagged as "backported from" instead of
> "cherry picked from".

At first, I cherry-picked this patch under bionic kernel, then git
format the patch, and git am the patch to cosmic, there is no error. But
when I git am the patch to disco, there are errors. Then I cherry-picked
this commit under disco kernel, there is no error. As a result, I sent
the 1st cherry-picked patch for B/C and sent the 2nd cherry-picked patch
for D.

Thanks.

>
> Anyway this is a minor issue and the patches look good.
>
>
> 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
|

Re: ACK/cmnt: [SRU][B/OEM-B/C/D][PATCH 0/1] audio output has constant noise on a Dell machine

Kai-Heng Feng


> On Jan 9, 2019, at 9:35 AM, Hui Wang <[hidden email]> wrote:
>
> On 2019/1/8 下午10:24, Kleber Souza wrote:
>> On 1/8/19 7:28 AM, Hui Wang wrote:
>>> BugLink: https://bugs.launchpad.net/bugs/1810891
>>>
>>> [Impact]
>>> the audio output (headpohne, lineout and internal speaker) has constant
>>> noise when playing sound.
>>>
>>> [Fix]
>>> Set the pin configuration and some secret coeff registers, the noise
>>> disappears. This patch is written by Realtek engineer and is upstreamd
>>> already.
>>>
>>>
>>> [Test Case]
>>> play sound via internal speaker, lineout and headphone, no noise anymore.
>>>
>>>
>>> [Regression Potential]
>>> Very low, this patch is upstreamd for a while, no regression is reported.
>>>
>>>
>>> Kailang Yang (1):
>>>   ALSA: hda/realtek - Fixed headphone issue for ALC700
>>>
>>>  sound/pci/hda/patch_realtek.c | 33 +++++++++++++++++++++++++++++++++
>>>  1 file changed, 33 insertions(+)
>>>
>> Hi Hui Wang,
>>
>> Why there's a separate patch for D? Both patches state they were
>> cherry-picked, if that was the case the same patch could have been
>> submitted for all the requested series. If that's not the case, i.e. for
>> some of the series doing a 'git am' with the same patch would not work,
>> then that patch needs to be flagged as "backported from" instead of
>> "cherry picked from".
>
> At first, I cherry-picked this patch under bionic kernel, then git format the patch, and git am the patch to cosmic, there is no error. But when I git am the patch to disco, there are errors. Then I cherry-picked this commit under disco kernel, there is no error. As a result, I sent the 1st cherry-picked patch for B/C and sent the 2nd cherry-picked patch for D.

I also met this situation a while back. Formatted patch cannot be applied
to other releases, but it’s considered clean cherry-pick by git.

Kai-Heng

>
> Thanks.
>
>>
>> Anyway this is a minor issue and the patches look good.
>>
>>
>> Acked-by: Kleber Sacilotto de Souza <[hidden email]>
>>
>>
>
>
> --
> 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
Reply | Threaded
Open this post in threaded view
|

Re: ACK/cmnt: [SRU][B/OEM-B/C/D][PATCH 0/1] audio output has constant noise on a Dell machine

Stefan Bader-2
On 09.01.19 04:39, Kai Heng Feng wrote:

>
>
>> On Jan 9, 2019, at 9:35 AM, Hui Wang <[hidden email]> wrote:
>>
>> On 2019/1/8 下午10:24, Kleber Souza wrote:
>>> On 1/8/19 7:28 AM, Hui Wang wrote:
>>>> BugLink: https://bugs.launchpad.net/bugs/1810891
>>>>
>>>> [Impact]
>>>> the audio output (headpohne, lineout and internal speaker) has constant
>>>> noise when playing sound.
>>>>
>>>> [Fix]
>>>> Set the pin configuration and some secret coeff registers, the noise
>>>> disappears. This patch is written by Realtek engineer and is upstreamd
>>>> already.
>>>>
>>>>
>>>> [Test Case]
>>>> play sound via internal speaker, lineout and headphone, no noise anymore.
>>>>
>>>>
>>>> [Regression Potential]
>>>> Very low, this patch is upstreamd for a while, no regression is reported.
>>>>
>>>>
>>>> Kailang Yang (1):
>>>>   ALSA: hda/realtek - Fixed headphone issue for ALC700
>>>>
>>>>  sound/pci/hda/patch_realtek.c | 33 +++++++++++++++++++++++++++++++++
>>>>  1 file changed, 33 insertions(+)
>>>>
>>> Hi Hui Wang,
>>>
>>> Why there's a separate patch for D? Both patches state they were
>>> cherry-picked, if that was the case the same patch could have been
>>> submitted for all the requested series. If that's not the case, i.e. for
>>> some of the series doing a 'git am' with the same patch would not work,
>>> then that patch needs to be flagged as "backported from" instead of
>>> "cherry picked from".
>>
>> At first, I cherry-picked this patch under bionic kernel, then git format the patch, and git am the patch to cosmic, there is no error. But when I git am the patch to disco, there are errors. Then I cherry-picked this commit under disco kernel, there is no error. As a result, I sent the 1st cherry-picked patch for B/C and sent the 2nd cherry-picked patch for D.
>
> I also met this situation a while back. Formatted patch cannot be applied
> to other releases, but it’s considered clean cherry-pick by git.
This is often slight differences (fuzz) in context lines. If its only one line
git am -C2 helps. Generally I would suggest cherry-picking into the most recent
release and format-patch that to git am that backwards from newer to older
series. Sometimes -C2 does not work, in which case I normally switch to make it
a seperate patch saying backported and minor context adjustments.

-Stefan

>
> Kai-Heng
>
>>
>> Thanks.
>>
>>>
>>> Anyway this is a minor issue and the patches look good.
>>>
>>>
>>> Acked-by: Kleber Sacilotto de Souza <[hidden email]>
>>>
>>>
>>
>>
>> --
>> 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

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

ACK: [SRU][B/OEM-B/C/D][PATCH 0/1] audio output has constant noise on a Dell machine

Stefan Bader-2
In reply to this post by Hui Wang
On 08.01.19 07:28, Hui Wang wrote:

> BugLink: https://bugs.launchpad.net/bugs/1810891
>
> [Impact]
> the audio output (headpohne, lineout and internal speaker) has constant
> noise when playing sound.
>
> [Fix]
> Set the pin configuration and some secret coeff registers, the noise
> disappears. This patch is written by Realtek engineer and is upstreamd
> already.
>
>
> [Test Case]
> play sound via internal speaker, lineout and headphone, no noise anymore.
>
>
> [Regression Potential]
> Very low, this patch is upstreamd for a while, no regression is reported.
>
>
> Kailang Yang (1):
>   ALSA: hda/realtek - Fixed headphone issue for ALC700
>
>  sound/pci/hda/patch_realtek.c | 33 +++++++++++++++++++++++++++++++++
>  1 file changed, 33 insertions(+)
>
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
|

NAK[D]: [SRU][D][PATCH] ALSA: hda/realtek - Fixed headphone issue for ALC700

Seth Forshee
In reply to this post by Hui Wang
On Tue, Jan 08, 2019 at 02:28:13PM +0800, Hui Wang wrote:

> From: Kailang Yang <[hidden email]>
>
> BugLink: https://bugs.launchpad.net/bugs/1810891
>
> If it plugged headphone or headset into the jack, then
> do the reboot, it will have a chance to cause headphone no sound.
> It just need to run the headphone mode procedure after boot time.
> The issue will be fixed.
> It also suitable for ALC234 ALC274 and ALC294.
>
> Signed-off-by: Kailang Yang <[hidden email]>
> Cc: <[hidden email]>
> Signed-off-by: Takashi Iwai <[hidden email]>
> (cherry picked from commit bde1a7459623a66c2abec4d0a841e4b06cc88d9a)
> Signed-off-by: Hui Wang <[hidden email]>

Disco already got this patch from upstream stable. Thanks!

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

APPLIED(B,C): [SRU][B/OEM-B/C/D][PATCH 0/1] audio output has constant noise on a Dell machine

Khaled Elmously
In reply to this post by Hui Wang
On 2019-01-08 14:28:11 , Hui Wang wrote:

> BugLink: https://bugs.launchpad.net/bugs/1810891
>
> [Impact]
> the audio output (headpohne, lineout and internal speaker) has constant
> noise when playing sound.
>
> [Fix]
> Set the pin configuration and some secret coeff registers, the noise
> disappears. This patch is written by Realtek engineer and is upstreamd
> already.
>
>
> [Test Case]
> play sound via internal speaker, lineout and headphone, no noise anymore.
>
>
> [Regression Potential]
> Very low, this patch is upstreamd for a while, no regression is reported.
>
>
> Kailang Yang (1):
>   ALSA: hda/realtek - Fixed headphone issue for ALC700
>
>  sound/pci/hda/patch_realtek.c | 33 +++++++++++++++++++++++++++++++++
>  1 file changed, 33 insertions(+)
>
> --
> 2.17.1
>
>
> --
> 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