diff mbox

[1/1] ALSA: ALC283 codec - Avoid pop noise on headphones during suspend/resume

Message ID 1412852696-32423-1-git-send-email-harshapriya.n@intel.com (mailing list archive)
State Accepted
Commit b450b17c156e264bc44a198046d3ebaaef5a041d
Delegated to: Takashi Iwai
Headers show

Commit Message

Harsha Priya Oct. 9, 2014, 11:04 a.m. UTC
This patch sets the headphones mode to default before suspending
which helps avoid the pop noise on headphones

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

Comments

David Henningsson Oct. 13, 2014, 10:50 a.m. UTC | #1
On 2014-10-09 20:41, Takashi Iwai wrote:
> At Thu,  9 Oct 2014 11:04:56 +0000,
> Harsha Priya wrote:
>> 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?

>
>
> thanks,
>
> Takashi
>
>> Signed-off-by: Harsha Priya <harshapriya.n@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
>>
Hui Wang Oct. 14, 2014, 4:10 p.m. UTC | #2
On 10/13/2014 06:50 PM, David Henningsson wrote:
>
> On 2014-10-09 20:41, Takashi Iwai wrote:
>> At Thu,  9 Oct 2014 11:04:56 +0000,
>> Harsha Priya wrote:
>>> 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.

>
>>
>>
>> thanks,
>>
>> Takashi
>>
>>> Signed-off-by: Harsha Priya <harshapriya.n@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 Oct. 15, 2014, 9:34 a.m. UTC | #3
At Wed, 15 Oct 2014 00:10:54 +0800,
Hui Wang wrote:
> 
> On 10/13/2014 06:50 PM, David Henningsson wrote:
> >
> > On 2014-10-09 20:41, Takashi Iwai wrote:
> >> At Thu,  9 Oct 2014 11:04:56 +0000,
> >> Harsha Priya wrote:
> >>> 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

> 
> >
> >>
> >>
> >> thanks,
> >>
> >> Takashi
> >>
> >>> Signed-off-by: Harsha Priya <harshapriya.n@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
> >>>
> >
> >
>
Hui Wang Oct. 19, 2014, 8:25 p.m. UTC | #4
On 10/13/2014 06:50 PM, David Henningsson wrote:
>
> On 2014-10-09 20:41, Takashi Iwai wrote:
>> At Thu,  9 Oct 2014 11:04:56 +0000,
>> Harsha Priya wrote:
>>> 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.

>
>>
>>
>> thanks,
>>
>> Takashi
>>
>>> Signed-off-by: Harsha Priya <harshapriya.n@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
>>>
>
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
>
Takashi Iwai Oct. 20, 2014, 5:50 a.m. UTC | #5
At Mon, 20 Oct 2014 04:25:00 +0800,
Hui Wang wrote:
> 
> On 10/13/2014 06:50 PM, David Henningsson wrote:
> >
> > On 2014-10-09 20:41, Takashi Iwai wrote:
> >> At Thu,  9 Oct 2014 11:04:56 +0000,
> >> Harsha Priya wrote:
> >>> 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."

Thanks for a quick test!
Now I applied it.  I added Cc to stable as it deserves.


Takashi

> 
> 
> Regards,
> Hui.
> 
> >
> >>
> >>
> >> thanks,
> >>
> >> Takashi
> >>
> >>> Signed-off-by: Harsha Priya <harshapriya.n@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
> >>>
> >
> > _______________________________________________
> > Alsa-devel mailing list
> > Alsa-devel@alsa-project.org
> > http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
> >
>
diff mbox

Patch

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