Discussion:
[PATCH 1/1] ALSA: ALC283 codec - Avoid pop noise on headphones during suspend/resume
Harsha Priya
2014-10-09 11:32:37 UTC
Permalink
This patch sets the headphones mode to default before suspending
which helps avoid the pop noise on headphones

Signed-off-by: Harsha Priya <***@intel.com>

diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 69d1236..e839e7a 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -2884,6 +2884,9 @@ static void alc283_shutup(struct hda_codec *codec)

alc_write_coef_idx(codec, 0x43, 0x9004);

+ /*depop hp during suspend*/
+ alc_write_coef_idx(codec, 0x06, 0x2100);
+
snd_hda_codec_write(codec, hp_pin, 0,
AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE);
--
1.9.1
Takashi Iwai
2014-10-09 18:41:26 UTC
Permalink
At Thu, 9 Oct 2014 11:04:56 +0000,
Post by Harsha Priya
This patch sets the headphones mode to default before suspending
which helps avoid the pop noise on headphones
The change looks simple, but since it's a mysterious COEF, I'd like to
hear from people testing with other machines with this codec before
applying the patch.

David, do you know anyone in your team have such a machine to test?


thanks,

Takashi
Post by Harsha Priya
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 69d1236..e839e7a 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -2884,6 +2884,9 @@ static void alc283_shutup(struct hda_codec *codec)
alc_write_coef_idx(codec, 0x43, 0x9004);
+ /*depop hp during suspend*/
+ alc_write_coef_idx(codec, 0x06, 0x2100);
+
snd_hda_codec_write(codec, hp_pin, 0,
AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE);
--
1.9.1
David Henningsson
2014-10-13 10:50:52 UTC
Permalink
Post by Takashi Iwai
At Thu, 9 Oct 2014 11:04:56 +0000,
Post by Harsha Priya
This patch sets the headphones mode to default before suspending
which helps avoid the pop noise on headphones
The change looks simple, but since it's a mysterious COEF, I'd like to
hear from people testing with other machines with this codec before
applying the patch.
David, do you know anyone in your team have such a machine to test?
Looping Hui here, do you have a machine with ALC283 to test with or
knows who has one?
Post by Takashi Iwai
thanks,
Takashi
Post by Harsha Priya
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 69d1236..e839e7a 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -2884,6 +2884,9 @@ static void alc283_shutup(struct hda_codec *codec)
alc_write_coef_idx(codec, 0x43, 0x9004);
+ /*depop hp during suspend*/
+ alc_write_coef_idx(codec, 0x06, 0x2100);
+
snd_hda_codec_write(codec, hp_pin, 0,
AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE);
--
1.9.1
Hui Wang
2014-10-14 16:10:54 UTC
Permalink
Post by David Henningsson
Post by Takashi Iwai
At Thu, 9 Oct 2014 11:04:56 +0000,
Post by Harsha Priya
This patch sets the headphones mode to default before suspending
which helps avoid the pop noise on headphones
The change looks simple, but since it's a mysterious COEF, I'd like to
hear from people testing with other machines with this codec before
applying the patch.
David, do you know anyone in your team have such a machine to test?
Looping Hui here, do you have a machine with ALC283 to test with or
knows who has one?
I will find one or two machines with ALC283 to do a test. Since I am not
in the office right now, after I find the machines, I will ask someone
else to help do the test, it will take more time. So give me couple of days.
Post by David Henningsson
Post by Takashi Iwai
thanks,
Takashi
Post by Harsha Priya
diff --git a/sound/pci/hda/patch_realtek.c
b/sound/pci/hda/patch_realtek.c
index 69d1236..e839e7a 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -2884,6 +2884,9 @@ static void alc283_shutup(struct hda_codec *codec)
alc_write_coef_idx(codec, 0x43, 0x9004);
+ /*depop hp during suspend*/
+ alc_write_coef_idx(codec, 0x06, 0x2100);
+
snd_hda_codec_write(codec, hp_pin, 0,
AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE);
--
1.9.1
Takashi Iwai
2014-10-15 09:34:35 UTC
Permalink
At Wed, 15 Oct 2014 00:10:54 +0800,
Post by Hui Wang
Post by David Henningsson
Post by Takashi Iwai
At Thu, 9 Oct 2014 11:04:56 +0000,
Post by Harsha Priya
This patch sets the headphones mode to default before suspending
which helps avoid the pop noise on headphones
The change looks simple, but since it's a mysterious COEF, I'd like to
hear from people testing with other machines with this codec before
applying the patch.
David, do you know anyone in your team have such a machine to test?
Looping Hui here, do you have a machine with ALC283 to test with or
knows who has one?
I will find one or two machines with ALC283 to do a test. Since I am not
in the office right now, after I find the machines, I will ask someone
else to help do the test, it will take more time. So give me couple of days.
Sure, thanks! The patch itself is small, so it can go into 3.18 once
when it's confirmed to work and not break.


Takashi
Post by Hui Wang
Post by David Henningsson
Post by Takashi Iwai
thanks,
Takashi
Post by Harsha Priya
diff --git a/sound/pci/hda/patch_realtek.c
b/sound/pci/hda/patch_realtek.c
index 69d1236..e839e7a 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -2884,6 +2884,9 @@ static void alc283_shutup(struct hda_codec *codec)
alc_write_coef_idx(codec, 0x43, 0x9004);
+ /*depop hp during suspend*/
+ alc_write_coef_idx(codec, 0x06, 0x2100);
+
snd_hda_codec_write(codec, hp_pin, 0,
AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE);
--
1.9.1
Hui Wang
2014-10-19 20:25:00 UTC
Permalink
Post by David Henningsson
Post by Takashi Iwai
At Thu, 9 Oct 2014 11:04:56 +0000,
Post by Harsha Priya
This patch sets the headphones mode to default before suspending
which helps avoid the pop noise on headphones
The change looks simple, but since it's a mysterious COEF, I'd like to
hear from people testing with other machines with this codec before
applying the patch.
David, do you know anyone in your team have such a machine to test?
Looping Hui here, do you have a machine with ALC283 to test with or
knows who has one?
One of my colleague performed the test, and seems the patch did work.
Below is the feedback from my colleague:

"I tested the patch on Dell Inspiron 3531 which has ALC283 Codec on it.
Without the patch, I can hear a pop noise from the headphone, not very harshly, but I can
hear there is a pop sound clearly when suspend or reboot.
With the patch, there is still a pop sound with very low volume when
suspend, you can notice the sound when listening it carefully.
When reboot, there is no pop sound."


Regards,
Hui.
Post by David Henningsson
Post by Takashi Iwai
thanks,
Takashi
Post by Harsha Priya
diff --git a/sound/pci/hda/patch_realtek.c
b/sound/pci/hda/patch_realtek.c
index 69d1236..e839e7a 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -2884,6 +2884,9 @@ static void alc283_shutup(struct hda_codec *codec)
alc_write_coef_idx(codec, 0x43, 0x9004);
+ /*depop hp during suspend*/
+ alc_write_coef_idx(codec, 0x06, 0x2100);
+
snd_hda_codec_write(codec, hp_pin, 0,
AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE);
--
1.9.1
_______________________________________________
Alsa-devel mailing list
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
Takashi Iwai
2014-10-20 05:50:26 UTC
Permalink
At Mon, 20 Oct 2014 04:25:00 +0800,
Post by Hui Wang
Post by David Henningsson
Post by Takashi Iwai
At Thu, 9 Oct 2014 11:04:56 +0000,
Post by Harsha Priya
This patch sets the headphones mode to default before suspending
which helps avoid the pop noise on headphones
The change looks simple, but since it's a mysterious COEF, I'd like to
hear from people testing with other machines with this codec before
applying the patch.
David, do you know anyone in your team have such a machine to test?
Looping Hui here, do you have a machine with ALC283 to test with or
knows who has one?
One of my colleague performed the test, and seems the patch did work.
"I tested the patch on Dell Inspiron 3531 which has ALC283 Codec on it.
Without the patch, I can hear a pop noise from the headphone, not very harshly, but I can
hear there is a pop sound clearly when suspend or reboot.
With the patch, there is still a pop sound with very low volume when
suspend, you can notice the sound when listening it carefully.
When reboot, there is no pop sound."
Thanks for a quick test!
Now I applied it. I added Cc to stable as it deserves.


Takashi
Post by Hui Wang
Regards,
Hui.
Post by David Henningsson
Post by Takashi Iwai
thanks,
Takashi
Post by Harsha Priya
diff --git a/sound/pci/hda/patch_realtek.c
b/sound/pci/hda/patch_realtek.c
index 69d1236..e839e7a 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -2884,6 +2884,9 @@ static void alc283_shutup(struct hda_codec *codec)
alc_write_coef_idx(codec, 0x43, 0x9004);
+ /*depop hp during suspend*/
+ alc_write_coef_idx(codec, 0x06, 0x2100);
+
snd_hda_codec_write(codec, hp_pin, 0,
AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE);
--
1.9.1
_______________________________________________
Alsa-devel mailing list
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
Harsha Priya
2014-10-09 11:04:56 UTC
Permalink
This patch sets the headphones mode to default before suspending
which helps avoid the pop noise on headphones

Signed-off-by: Harsha Priya <***@intel.com>

diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 69d1236..e839e7a 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -2884,6 +2884,9 @@ static void alc283_shutup(struct hda_codec *codec)

alc_write_coef_idx(codec, 0x43, 0x9004);

+ /*depop hp during suspend*/
+ alc_write_coef_idx(codec, 0x06, 0x2100);
+
snd_hda_codec_write(codec, hp_pin, 0,
AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE);
--
1.9.1
Loading...