Set eapd to follow stream on or off
Hi Takashi,
HP machine had pop noise via speaker.
If EAPD on or off, speaker will have pop noise. So, they want to set eapd to follow with stream on or off.
Many Thanks.
BR,
Kailang
Quoted 1 line
From
8af68c6454203361cce2128df2144afe88e5842aMon Sep 17 00:00:00 2001
From: Kailang Yang <[email protected]>
Date: Tue, 20 May 2014 15:00:19 +0800
Subject: [PATCH] ALSA: hda/realtek - Set EAPD to follow stream on or off
HP machine has pop noise via speaker. Set EAPD on when system open stream.
Set EAPD off when system close stream.
sound/pci/hda/patch_realtek.c +42 -2
@@ -4175,6 +4175,37 @@ static void alc290_fixup_mono_speakers(struct hda_codec *codec, } } +/* +* ALC290 PCM hooks +*/ +static void ALC290_playback_pcm_hook (struct hda_pcm_stream *hinfo, +struct hda_codec *codec, +struct snd_pcm_substream *substream, +int action) +{ +struct sigmatel_spec *spec = codec->spec; + +switch (action) { +case HDA_GEN_PCM_ACT_OPEN : +set_eapd (codec,0x14 , true); +break ; +case HDA_GEN_PCM_ACT_CLOSE : +set_eapd (codec,0x14 , false); +break ; + } +} + +static void alc290_fixup_pop_noise (struct hda_codec *codec, +const struct hda_fixup *fix,int action) +{ +struct alc_spec *spec = codec->spec; + +if (action ==HDA_FIXUP_ACT_PRE_PROBE ) { +set_eapd (codec,0x14 , false); + spec->gen.pcm_playback_hook = ALC290_playback_pcm_hook; + } +} +/* for hda_fixup_thinkpad_acpi() */ #include "thinkpad_helper.c"
@@ -4237,6 +4268,7 @@ enum {ALC255_FIXUP_HEADSET_MODE_NO_HP_MIC ,ALC293_FIXUP_DELL1_MIC_NO_PRESENCE ,ALC292_FIXUP_TPT440_DOCK , + ALC290_FIXUP_HP_DEPOP, }; static const struct hda_fixup alc269_fixups[] = {
@@ -4650,6 +4682,12 @@ static const struct hda_fixup alc269_fixups[] = { .chained = true, .chain_id =ALC269_FIXUP_LIMIT_INT_MIC_BOOST }, + [ALC290_FIXUP_HP_DEPOP] = { + .type = HDA_FIXUP_FUNC, + .v.func = alc290_fixup_pop_noise, + .chained = true, + .chain_id = ALC269_FIXUP_HP_MUTE_LED_MIC1, + }, };static const struct snd_pci_quirk alc269_fixup_tbl[] = {
@@ -4772,12 +4810,14 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {SND_PCI_QUIRK (0x103c ,0x2280 ,"HP" ,ALC269_FIXUP_HP_MUTE_LED_MIC1 ),SND_PCI_QUIRK (0x103c ,0x2281 ,"HP" ,ALC269_FIXUP_HP_MUTE_LED_MIC1 ),SND_PCI_QUIRK (0x103c ,0x2282 ,"HP" ,ALC269_FIXUP_HP_MUTE_LED_MIC1 ), -SND_PCI_QUIRK (0x103c ,0x2289 ,"HP" ,ALC269_FIXUP_HP_MUTE_LED_MIC1 ), +SND_PCI_QUIRK (0x103c ,0x2289 ,"HP" ,ALC290_FIXUP_HP_DEPOP ),SND_PCI_QUIRK (0x103c ,0x228a ,"HP" ,ALC269_FIXUP_HP_MUTE_LED_MIC1 ),SND_PCI_QUIRK (0x103c ,0x228b ,"HP" ,ALC269_FIXUP_HP_MUTE_LED_MIC1 ), -SND_PCI_QUIRK (0x103c ,0x228c ,"HP" ,ALC269_FIXUP_HP_MUTE_LED_MIC1 ), +SND_PCI_QUIRK (0x103c ,0x228c ,"HP" ,ALC290_FIXUP_HP_DEPOP ),SND_PCI_QUIRK (0x103c ,0x228d ,"HP" ,ALC269_FIXUP_HP_MUTE_LED_MIC1 ),SND_PCI_QUIRK (0x103c ,0x228e ,"HP" ,ALC269_FIXUP_HP_MUTE_LED_MIC1 ), +SND_PCI_QUIRK (0x103c ,0x228f ,"HP" ,ALC290_FIXUP_HP_DEPOP ), +SND_PCI_QUIRK (0x103c ,0x22a8 ,"HP" ,ALC290_FIXUP_HP_DEPOP ),SND_PCI_QUIRK (0x103c ,0x22c5 ,"HP" ,ALC269_FIXUP_HP_MUTE_LED_MIC1 ),SND_PCI_QUIRK (0x103c ,0x22c6 ,"HP" ,ALC269_FIXUP_HP_MUTE_LED_MIC1 ), SND_PCI_QUIRK(0x103c, 0x22c7, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
At Tue, 20 May 2014 15:15:49 +0800,
Quoted 6 lines · Kailang
Hi Takashi,
HP machine had pop noise via speaker.
If EAPD on or off, speaker will have pop noise. So, they want to set eapd to follow with stream on or off.
I can apply this as is, but still I wonder whether this results in other problems. Doing EAPD on/off there means that it happens far more often. For example, what happens if you do like below?
while true; do
echo -n > /dev/snd/pcmC0D0p
done
And, what if the device is resumed from power-saving by an audio playback? Immediately after the power up, it'll start the streaming, so it'll turn on EAPD.
That said, isn't it just a need for some delay before EAPD on/off?
thanks,
Takashi
Quoted 7 lines
Many Thanks.
BR,
Kailang
[2 0000-set-eapd-follow-stream-on-off.patch <application/octet-stream (quoted-printable)>]
Quoted 18 lines
At Tue, 20 May 2014 15:15:49 +0800,
Quoted 6 lines · Kailang
Hi Takashi,
HP machine had pop noise via speaker.
If EAPD on or off, speaker will have pop noise. So, they want to set eapd to follow with stream on or off.I can apply this as is, but still I wonder whether this results in other problems. Doing EAPD on/off there means that it happens far more often. For example, what happens if you do like below?
while true; do
echo -n >/dev/snd/pcmC0D0p
done
Quoted 5 lines
And, what if the device is resumed from power-saving by an audio playback? Immediately after the power up, it'll start the streaming, so it'll turn on EAPD.
That said, isn't it just a need for some delay before EAPD on/off?
No, eapd on or off will cause pop noise.
Our customer just want to do eapd on when stream is open.
The pop noise will not clear. Because music gain was biger than pop noise.
Quoted 14 lines
thanks,
Takashi
Quoted 7 lines
Many Thanks.
BR,
Kailang
[2 0000-set-eapd-follow-stream-on-off.patch <application/octet-stream (quoted-printable)>]------Please consider the environment before printing this e-mail.
At Tue, 20 May 2014 16:52:43 +0800,
Quoted 19 lines · Kailang
Quoted 19 lines
At Tue, 20 May 2014 15:15:49 +0800,
Quoted 6 lines · Kailang
Hi Takashi,
HP machine had pop noise via speaker.
If EAPD on or off, speaker will have pop noise. So, they want to set eapd to follow with stream on or off.I can apply this as is, but still I wonder whether this results in other problems. Doing EAPD on/off there means that it happens far more often. For example, what happens if you do like below?
while true; do
echo -n >/dev/snd/pcmC0D0p
done
Quoted 7 lines
Quoted 5 lines
And, what if the device is resumed from power-saving by an audio playback? Immediately after the power up, it'll start the streaming, so it'll turn on EAPD.
That said, isn't it just a need for some delay before EAPD on/off?
No, eapd on or off will cause pop noise.
Does it do always?
Quoted 2 lines
Our customer just want to do eapd on when stream is open.
The pop noise will not clear. Because music gain was biger than pop noise.
Opening a stream doesn't mean that it follows the loud sound immediately. The script above wouldn't produce any sound but just does open/close the stream. Did you try that?
Takashi
Quoted 26 lines
At Tue, 20 May 2014 16:52:43 +0800,
Quoted 23 lines · Kailang
Quoted 23 lines
At Tue, 20 May 2014 15:15:49 +0800,
Quoted 6 lines · Kailang
Hi Takashi,
HP machine had pop noise via speaker.
If EAPD on or off, speaker will have pop noise. So, they want to set eapd to follow with stream on or off.I can apply this as is, but still I wonder whether this results in other problems. Doing EAPD on/off there means that it happens far more often. For example, what happens if you do like below?
while true; do
echo -n >/dev/snd/pcmC0D0p
doneAnd, what if the device is resumed from power-saving by an audio playback? Immediately after the power up, it'll start the streaming, so it'll turn on EAPD.
Quoted 5 lines
Quoted 3 lines
Quoted 1 line
That said, isn't it just a need for some delay before EAPD on/off?
No, eapd on or off will cause pop noise.
Does it do always?
No, pop noise just one pop sound. It can not remove by software. But this machine need to do this always.
Quoted 12 lines
Quoted 3 lines
Our customer just want to do eapd on when stream is open.
The pop noise will not clear. Because music gain was biger than pop noise.Opening a stream doesn't mean that it follows the loud sound immediately. The script above wouldn't produce any sound but just does open/close the stream. Did you try that?
Takashi
------Please consider the environment before printing this e-mail.
At Tue, 20 May 2014 17:20:44 +0800,
Quoted 27 lines · Kailang
Quoted 27 lines
At Tue, 20 May 2014 16:52:43 +0800,
Quoted 23 lines · Kailang
Quoted 23 lines
At Tue, 20 May 2014 15:15:49 +0800,
Quoted 6 lines · Kailang
Hi Takashi,
HP machine had pop noise via speaker.
If EAPD on or off, speaker will have pop noise. So, they want to set eapd to follow with stream on or off.I can apply this as is, but still I wonder whether this results in other problems. Doing EAPD on/off there means that it happens far more often. For example, what happens if you do like below?
while true; do
echo -n >/dev/snd/pcmC0D0p
doneAnd, what if the device is resumed from power-saving by an audio playback? Immediately after the power up, it'll start the streaming, so it'll turn on EAPD.
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
Quoted 1 line
That said, isn't it just a need for some delay before EAPD on/off?
No, eapd on or off will cause pop noise.
Does it do always?
No, pop noise just one pop sound. It can not remove by software. But this machine need to do this always.
So, doing EAPD on/off often is rather worse. It's what your patch does.
Once again: did you try the script above? If the pop noise always happens, the operation like above is the worst scenario.
Then, let's think again how to *reduce* it. We need one EAPD on at least after each power up. But it's needed only when you actually plays a stream. That is, we need only enable EAPD at playback stream open, but leave EAPD as is at close.
Takashi
Quoted 13 lines
Quoted 12 lines
Quoted 3 lines
Our customer just want to do eapd on when stream is open. The pop noise will not clear. Because music gain was biger than pop noise.
Opening a stream doesn't mean that it follows the loud sound immediately. The script above wouldn't produce any sound but just does open/close the stream. Did you try that?
Takashi
------Please consider the environment before printing this e-mail.
Quoted 33 lines
At Tue, 20 May 2014 17:20:44 +0800,
Quoted 31 lines · Kailang
Quoted 31 lines
At Tue, 20 May 2014 16:52:43 +0800,
Quoted 26 lines · Kailang
Quoted 19 lines
At Tue, 20 May 2014 15:15:49 +0800,
Quoted 6 lines · Kailang
Hi Takashi,
HP machine had pop noise via speaker.
If EAPD on or off, speaker will have pop noise. So, they want to set eapd to follow with stream on or off.I can apply this as is, but still I wonder whether this results in other problems. Doing EAPD on/off there means that it happens far more often. For example, what happens if you do like below?
while true; do
echo -n >/dev/snd/pcmC0D0p
doneQuoted 5 lines
And, what if the device is resumed from power-saving by an audio playback? Immediately after the power up, it'll start the streaming, so it'll turn on EAPD.
That said, isn't it just a need for some delay before EAPD on/off?
No, eapd on or off will cause pop noise.
Quoted 8 lines
Quoted 3 lines
Quoted 1 line
Does it do always?
No, pop noise just one pop sound. It can not remove by software. But this machine need to do this always.
So, doing EAPD on/off often is rather worse. It's what your patch does.
Once again: did you try the script above? If the pop noise always
I had try it on my develop machine. I have no HP issue machine on my site.
Quoted 7 lines
happens, the operation like above is the worst scenario.
Then, let's think again how to *reduce* it. We need one EAPD on at least after each power up. But it's needed only when you actually plays a stream. That is, we need only enable EAPD at playback stream open, but leave EAPD as is at close.
[we need only enable EAPD at playback stream open, but leave EAPD as is at close.] Yes.
So, I need to create eapd low in alc269_shutup. Right?
Quoted 16 lines
Takashi
Quoted 13 lines
Quoted 12 lines
Quoted 3 lines
Our customer just want to do eapd on when stream is open. The pop noise will not clear. Because music gain was biger than pop noise.
Opening a stream doesn't mean that it follows the loud sound immediately. The script above wouldn't produce any sound but just does open/close the stream. Did you try that?
Takashi
------Please consider the environment before printing this e-mail.
At Tue, 20 May 2014 18:05:42 +0800,
Quoted 54 lines · Kailang
Quoted 35 lines
At Tue, 20 May 2014 17:20:44 +0800,
Quoted 32 lines · Kailang
Quoted 32 lines
At Tue, 20 May 2014 16:52:43 +0800,
Quoted 27 lines · Kailang
Quoted 19 lines
At Tue, 20 May 2014 15:15:49 +0800,
Quoted 6 lines · Kailang
Hi Takashi,
HP machine had pop noise via speaker.
If EAPD on or off, speaker will have pop noise. So, they want to set eapd to follow with stream on or off.I can apply this as is, but still I wonder whether this results in other problems. Doing EAPD on/off there means that it happens far more often. For example, what happens if you do like below?
while true; do
echo -n >/dev/snd/pcmC0D0p
doneQuoted 6 lines
And, what if the device is resumed from power-saving by an audio playback? Immediately after the power up, it'll start the streaming,
so it'll turn on EAPD.That said, isn't it just a need for some delay before EAPD on/off?
No, eapd on or off will cause pop noise.
Quoted 8 lines
Quoted 3 lines
Quoted 1 line
Does it do always?
No, pop noise just one pop sound. It can not remove by software. But this machine need to do this always.
So, doing EAPD on/off often is rather worse. It's what your patch does.
Once again: did you try the script above? If the pop noise always
I had try it on my develop machine. I have no HP issue machine on my site.
Quoted 7 lines
happens, the operation like above is the worst scenario.
Then, let's think again how to *reduce* it. We need one EAPD on at least after each power up. But it's needed only when you actually plays a stream. That is, we need only enable EAPD at playback stream open, but leave EAPD as is at close.
Quoted 4 lines
[we need only enable EAPD at playback stream open, but leave EAPD as is at close.]
Yes.
So, I need to create eapd low inalc269_shutup. Right?
Better to create own shutup callback (you can call alc269_shutup() from there, too) and set it to spec->shutup in the fixup. The pincfg cleanup isn't often needed or may have bad effect. You should test with real machines what are needed and what are not.
Takashi
Quoted 18 lines
Quoted 17 lines
Takashi
Quoted 13 lines
Quoted 12 lines
Quoted 3 lines
Our customer just want to do eapd on when stream is open. The pop noise will not clear. Because music gain was biger than pop noise.
Opening a stream doesn't mean that it follows the loud sound immediately. The script above wouldn't produce any sound but just does open/close the stream. Did you try that?
Takashi
------Please consider the environment before printing this e-mail.
Quoted 62 lines
At Tue, 20 May 2014 18:05:42 +0800,
Quoted 54 lines · Kailang
Quoted 35 lines
At Tue, 20 May 2014 17:20:44 +0800,
Quoted 32 lines · Kailang
Quoted 32 lines
At Tue, 20 May 2014 16:52:43 +0800,
Quoted 27 lines · Kailang
Quoted 19 lines
At Tue, 20 May 2014 15:15:49 +0800,
Quoted 6 lines · Kailang
Hi Takashi,
HP machine had pop noise via speaker.
If EAPD on or off, speaker will have pop noise. So, they want to set eapd to follow with stream on or off.I can apply this as is, but still I wonder whether this results in other problems. Doing EAPD on/off there means that it happens far more often. For example, what happens if you do like below?
while true; do
echo -n >/dev/snd/pcmC0D0p
doneQuoted 6 lines
And, what if the device is resumed from power-saving by an audio playback? Immediately after the power up, it'll start the streaming,
so it'll turn on EAPD.That said, isn't it just a need for some delay before EAPD on/off?
No, eapd on or off will cause pop noise.
Quoted 8 lines
Quoted 3 lines
Quoted 1 line
Does it do always?
No, pop noise just one pop sound. It can not remove by software. But this machine need to do this always.
So, doing EAPD on/off often is rather worse. It's what your patch does.
Once again: did you try the script above? If the pop noise always
I had try it on my develop machine. I have no HP issue machine on my site.
Quoted 7 lines
happens, the operation like above is the worst scenario.
Then, let's think again how to *reduce* it. We need one EAPD on at least after each power up. But it's needed only when you actually plays a stream. That is, we need only enable EAPD at playback stream open, but leave EAPD as is at close.
Quoted 4 lines
[we need only enable EAPD at playback stream open, but leave EAPD as is at close.]
Yes.
So, I need to create eapd low inalc269_shutup. Right?
Quoted 4 lines
Better to create own shutup callback (you can call
alc269_shutup()from there, too) and set it tospec->shutupin the fixup. The pincfg cleanup isn't often needed or may have bad effect. You should test with real machines what are needed and what are not.
static void alc290_fixup_pop_noise(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{
struct alc_spec *spec = codec->spec;
if (action == HDA_FIXUP_ACT_PRE_PROBE) {
spec->gen.pcm_playback_hook = ALC290_playback_pcm_hook;
}
if (action == HDA_FIXUP_ACT_INIT) {
set_eapd(codec, 0x14, false);
}
}
Could I modify as upper code?
To set eapd low in HDA_FIXUP_ACT_INIT state.
If system resume, it will initial eapd to low.
To write eapd to same value, it will have no pop noise.
It will keep always low for eapd, only stream open and close have change state for eapd.
Quoted 22 lines
Takashi
Quoted 18 lines
Quoted 17 lines
Takashi
Quoted 13 lines
Quoted 12 lines
Quoted 3 lines
Our customer just want to do eapd on when stream is open. The pop noise will not clear. Because music gain was biger than pop noise.
Opening a stream doesn't mean that it follows the loud sound immediately. The script above wouldn't produce any sound but just does open/close the stream. Did you try that?
Takashi
------Please consider the environment before printing this e-mail.
At Wed, 21 May 2014 13:58:14 +0800,
Quoted 86 lines · Kailang
Quoted 68 lines
At Tue, 20 May 2014 18:05:42 +0800,
Quoted 58 lines · Kailang
Quoted 38 lines
At Tue, 20 May 2014 17:20:44 +0800,
Quoted 35 lines · Kailang
Quoted 35 lines
At Tue, 20 May 2014 16:52:43 +0800,
Quoted 30 lines · Kailang
Quoted 21 lines
At Tue, 20 May 2014 15:15:49 +0800,
Quoted 6 lines · Kailang
Hi Takashi,
HP machine had pop noise via speaker.
If EAPD on or off, speaker will have pop noise. So, they want to set eapd to follow with stream on or off.I can apply this as is, but still I wonder whether this results in
other problems. Doing EAPD on/off there means that it happens far
more often. For example, what happens if you do like below?while true; do
echo -n >/dev/snd/pcmC0D0p
doneQuoted 7 lines
And, what if the device is resumed from power-saving by an audio playback? Immediately after the power up, it'll start the streaming,
so it'll turn on EAPD.That said, isn't it just a need for some delay before EAPD on/off?
No, eapd on or off will cause pop noise.
Quoted 8 lines
Quoted 3 lines
Quoted 1 line
Does it do always?
No, pop noise just one pop sound. It can not remove by software. But this machine need to do this always.
So, doing EAPD on/off often is rather worse. It's what your patch does.
Once again: did you try the script above? If the pop noise always
I had try it on my develop machine. I have no HP issue machine on my site.
Quoted 7 lines
happens, the operation like above is the worst scenario.
Then, let's think again how to *reduce* it. We need one EAPD on at least after each power up. But it's needed only when you actually plays a stream. That is, we need only enable EAPD at playback stream open, but leave EAPD as is at close.
Quoted 5 lines
[we need only enable EAPD at playback stream open, but leave EAPD as is at
close.]
Yes.
So, I need to create eapd low inalc269_shutup. Right?Quoted 4 lines
Better to create own shutup callback (you can call
alc269_shutup()from there, too) and set it tospec->shutupin the fixup. The pincfg cleanup isn't often needed or may have bad effect. You should test with real machines what are needed and what are not.static void alc290_fixup_pop_noise(struct
hda_codec*codec,
const structhda_fixup*fix, int action)
{
structalc_spec*spec =codec->spec;if (action ==
HDA_FIXUP_ACT_PRE_PROBE) {
spec->gen.pcm_playback_hook=ALC290_playback_pcm_hook;
}
if (action ==HDA_FIXUP_ACT_INIT) {
set_eapd(codec, 0x14, false);
}
}
Quoted 6 lines
Could I modify as upper code?
To set eapd low inHDA_FIXUP_ACT_INITstate.
If system resume, it will initial eapd to low.
To write eapd to same value, it will have no pop noise.
It will keep always low for eapd, only stream open and close have change state for eapd.
Yes, it looks OK.
Takashi
Quoted 24 lines
Quoted 23 lines
Takashi
Quoted 18 lines
Quoted 17 lines
Takashi
Quoted 13 lines
Quoted 12 lines
Quoted 3 lines
Our customer just want to do eapd on when stream is open. The pop noise will not clear. Because music gain was biger than pop noise.
Opening a stream doesn't mean that it follows the loud sound immediately. The script above wouldn't produce any sound but just does open/close the stream. Did you try that?
Takashi
------Please consider the environment before printing this e-mail.
Hi Takashi,
Attach is the update patch.
Many thanks.
BR,
Kailang
Quoted 119 lines
At Wed, 21 May 2014 13:58:14 +0800,
Quoted 86 lines · Kailang
Quoted 68 lines
At Tue, 20 May 2014 18:05:42 +0800,
Quoted 58 lines · Kailang
Quoted 38 lines
At Tue, 20 May 2014 17:20:44 +0800,
Quoted 35 lines · Kailang
Quoted 35 lines
At Tue, 20 May 2014 16:52:43 +0800,
Quoted 30 lines · Kailang
Quoted 21 lines
At Tue, 20 May 2014 15:15:49 +0800,
Quoted 6 lines · Kailang
Hi Takashi,
HP machine had pop noise via speaker.
If EAPD on or off, speaker will have pop noise. So, they want to set eapd to follow with stream on or off.I can apply this as is, but still I wonder whether this results in
other problems. Doing EAPD on/off there means that it happens far
more often. For example, what happens if you do like below?while true; do
echo -n >/dev/snd/pcmC0D0p
doneQuoted 7 lines
And, what if the device is resumed from power-saving by an audio playback? Immediately after the power up, it'll start the streaming,
so it'll turn on EAPD.That said, isn't it just a need for some delay before EAPD on/off?
No, eapd on or off will cause pop noise.
Quoted 8 lines
Quoted 3 lines
Quoted 1 line
Does it do always?
No, pop noise just one pop sound. It can not remove by software. But this machine need to do this always.
So, doing EAPD on/off often is rather worse. It's what your patch does.
Once again: did you try the script above? If the pop noise always
I had try it on my develop machine. I have no HP issue machine on my site.
Quoted 7 lines
happens, the operation like above is the worst scenario.
Then, let's think again how to *reduce* it. We need one EAPD on at least after each power up. But it's needed only when you actually plays a stream. That is, we need only enable EAPD at playback stream open, but leave EAPD as is at close.
Quoted 5 lines
[we need only enable EAPD at playback stream open, but leave EAPD as is at
close.]
Yes.
So, I need to create eapd low inalc269_shutup. Right?Quoted 4 lines
Better to create own shutup callback (you can call
alc269_shutup()from there, too) and set it tospec->shutupin the fixup. The pincfg cleanup isn't often needed or may have bad effect. You should test with real machines what are needed and what are not.static void alc290_fixup_pop_noise(struct
hda_codec*codec,
const structhda_fixup*fix, int action)
{
structalc_spec*spec =codec->spec;if (action ==
HDA_FIXUP_ACT_PRE_PROBE) {
spec->gen.pcm_playback_hook=ALC290_playback_pcm_hook;
}
if (action ==HDA_FIXUP_ACT_INIT) {
set_eapd(codec, 0x14, false);
}
}Quoted 6 lines
Could I modify as upper code?
To set eapd low inHDA_FIXUP_ACT_INITstate.
If system resume, it will initial eapd to low.
To write eapd to same value, it will have no pop noise.
It will keep always low for eapd, only stream open and close have change state for eapd.Yes, it looks OK.
Takashi
Quoted 18 lines
Quoted 18 lines
Takashi
Quoted 13 lines
Quoted 13 lines
Takashi
Quoted 9 lines
Quoted 9 lines
Quoted 3 lines
Our customer just want to do eapd on when stream is open. The pop noise will not clear. Because music gain was biger than pop noise.
Opening a stream doesn't mean that it follows the loud sound immediately. The script above wouldn't produce any sound but just does open/close the stream. Did you try that?
Quoted 8 lines
Quoted 7 lines
Quoted 6 lines
Quoted 6 lines
Quoted 5 lines
Quoted 5 lines
Quoted 4 lines
Takashi
------Please consider the environment before printing this e-mail.
From
71a093ba3198666c4500b30938e080bd887647cbMon Sep 17 00:00:00 2001
From: Kailang Yang <[email protected]>
Date: Wed, 21 May 2014 14:25:08 +0800
Subject: [PATCH] ALSA: hda/realtek - Set EAPD to follow stream on or off
HP machine has pop noise via speaker. Set EAPD on when system open stream. Set EAPD off when system close stream.
sound/pci/hda/patch_realtek.c +44 -2
@@ -4175,6 +4175,39 @@ static void alc290_fixup_mono_speakers(struct hda_codec *codec, } } +/* +* ALC290 PCM hooks +*/ +static void ALC290_playback_pcm_hook (struct hda_pcm_stream *hinfo, +struct hda_codec *codec, +struct snd_pcm_substream *substream, +int action) +{ +switch (action) { +case HDA_GEN_PCM_ACT_OPEN : +set_eapd (codec,0x14 , true); +break ; +case HDA_GEN_PCM_ACT_CLOSE : +set_eapd (codec,0x14 , false); +break ; + } +} + +static void alc290_fixup_pop_noise (struct hda_codec *codec, +const struct hda_fixup *fix,int action) +{ +struct alc_spec *spec = codec->spec; + +switch (action) { +case HDA_FIXUP_ACT_PRE_PROBE : + spec->gen.pcm_playback_hook = ALC290_playback_pcm_hook; +break ; +case HDA_FIXUP_ACT_INIT : +set_eapd (codec,0x14 , false); +break ; + } +} +/* for hda_fixup_thinkpad_acpi() */ #include "thinkpad_helper.c"
@@ -4237,6 +4270,7 @@ enum {ALC255_FIXUP_HEADSET_MODE_NO_HP_MIC ,ALC293_FIXUP_DELL1_MIC_NO_PRESENCE ,ALC292_FIXUP_TPT440_DOCK , + ALC290_FIXUP_HP_DEPOP_WITH_MUTE_LED, }; static const struct hda_fixup alc269_fixups[] = {
@@ -4650,6 +4684,12 @@ static const struct hda_fixup alc269_fixups[] = { .chained = true, .chain_id =ALC269_FIXUP_LIMIT_INT_MIC_BOOST }, + [ALC290_FIXUP_HP_DEPOP_WITH_MUTE_LED] = { + .type = HDA_FIXUP_FUNC, + .v.func = alc290_fixup_pop_noise, + .chained = true, + .chain_id = ALC269_FIXUP_HP_MUTE_LED_MIC1, + }, };static const struct snd_pci_quirk alc269_fixup_tbl[] = {
@@ -4772,12 +4812,14 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {SND_PCI_QUIRK (0x103c ,0x2280 ,"HP" ,ALC269_FIXUP_HP_MUTE_LED_MIC1 ),SND_PCI_QUIRK (0x103c ,0x2281 ,"HP" ,ALC269_FIXUP_HP_MUTE_LED_MIC1 ),SND_PCI_QUIRK (0x103c ,0x2282 ,"HP" ,ALC269_FIXUP_HP_MUTE_LED_MIC1 ), -SND_PCI_QUIRK (0x103c ,0x2289 ,"HP" ,ALC269_FIXUP_HP_MUTE_LED_MIC1 ), +SND_PCI_QUIRK (0x103c ,0x2289 ,"HP" ,ALC290_FIXUP_HP_DEPOP_WITH_MUTE_LED ),SND_PCI_QUIRK (0x103c ,0x228a ,"HP" ,ALC269_FIXUP_HP_MUTE_LED_MIC1 ),SND_PCI_QUIRK (0x103c ,0x228b ,"HP" ,ALC269_FIXUP_HP_MUTE_LED_MIC1 ), -SND_PCI_QUIRK (0x103c ,0x228c ,"HP" ,ALC269_FIXUP_HP_MUTE_LED_MIC1 ), +SND_PCI_QUIRK (0x103c ,0x228c ,"HP" ,ALC290_FIXUP_HP_DEPOP_WITH_MUTE_LED ),SND_PCI_QUIRK (0x103c ,0x228d ,"HP" ,ALC269_FIXUP_HP_MUTE_LED_MIC1 ),SND_PCI_QUIRK (0x103c ,0x228e ,"HP" ,ALC269_FIXUP_HP_MUTE_LED_MIC1 ), +SND_PCI_QUIRK (0x103c ,0x228f ,"HP" ,ALC290_FIXUP_HP_DEPOP_WITH_MUTE_LED ), +SND_PCI_QUIRK (0x103c ,0x22a8 ,"HP" ,ALC290_FIXUP_HP_DEPOP_WITH_MUTE_LED ),SND_PCI_QUIRK (0x103c ,0x22c5 ,"HP" ,ALC269_FIXUP_HP_MUTE_LED_MIC1 ),SND_PCI_QUIRK (0x103c ,0x22c6 ,"HP" ,ALC269_FIXUP_HP_MUTE_LED_MIC1 ), SND_PCI_QUIRK(0x103c, 0x22c7, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
At Wed, 21 May 2014 14:28:12 +0800,
Quoted 4 lines · Kailang
Hi Takashi,
Attach is the update patch.
Keep the function in lower letters.
Also, update the patch description as well (and better to put more words).
thanks,
Takashi
Quoted 140 lines
Many thanks.
BR,
KailangQuoted 99 lines
At Wed, 21 May 2014 13:58:14 +0800,
Quoted 90 lines · Kailang
Quoted 72 lines
At Tue, 20 May 2014 18:05:42 +0800,
Quoted 61 lines · Kailang
Quoted 40 lines
At Tue, 20 May 2014 17:20:44 +0800,
Quoted 37 lines · Kailang
Quoted 37 lines
At Tue, 20 May 2014 16:52:43 +0800,
Quoted 32 lines · Kailang
Quoted 22 lines
At Tue, 20 May 2014 15:15:49 +0800,
Quoted 6 lines · Kailang
Hi Takashi,
HP machine had pop noise via speaker.
If EAPD on or off, speaker will have pop noise. So, they want to set eapd to follow with stream on or off.I can apply this as is, but still I wonder whether this results
in
other problems. Doing EAPD on/off there means that it happens far
more often. For example, what happens if you do like below?while true; do
echo -n >/dev/snd/pcmC0D0p
doneQuoted 8 lines
And, what if the device is resumed from power-saving by an audio
playback? Immediately after the power up, it'll start the streaming,
so it'll turn on EAPD.That said, isn't it just a need for some delay before EAPD on/off?
No, eapd on or off will cause pop noise.
Quoted 8 lines
Quoted 3 lines
Quoted 1 line
Does it do always?
No, pop noise just one pop sound. It can not remove by software. But this machine need to do this always.
So, doing EAPD on/off often is rather worse. It's what your patch does.
Once again: did you try the script above? If the pop noise always
I had try it on my develop machine. I have no HP issue machine on my site.
Quoted 8 lines
happens, the operation like above is the worst scenario.
Then, let's think again how to *reduce* it. We need one EAPD on at least after each power up. But it's needed only when you actually plays a stream. That is, we need only enable EAPD at playback stream
open, but leave EAPD as is at close.Quoted 6 lines
[we need only enable EAPD at playback stream open, but leave EAPD as is
at
close.]
Yes.
So, I need to create eapd low inalc269_shutup. Right?Quoted 4 lines
Better to create own shutup callback (you can call
alc269_shutup()from there, too) and set it tospec->shutupin the fixup. The pincfg cleanup isn't often needed or may have bad effect. You should test with real machines what are needed and what are not.static void alc290_fixup_pop_noise(struct
hda_codec*codec,
const structhda_fixup*fix, int action)
{
structalc_spec*spec =codec->spec;if (action ==
HDA_FIXUP_ACT_PRE_PROBE) {
spec->gen.pcm_playback_hook=ALC290_playback_pcm_hook;
}
if (action ==HDA_FIXUP_ACT_INIT) {
set_eapd(codec, 0x14, false);
}
}Quoted 6 lines
Could I modify as upper code?
To set eapd low inHDA_FIXUP_ACT_INITstate.
If system resume, it will initial eapd to low.
To write eapd to same value, it will have no pop noise.
It will keep always low for eapd, only stream open and close have change state for eapd.Quoted 33 lines
Yes, it looks OK.
Takashi
Quoted 27 lines
Quoted 26 lines
Takashi
Quoted 21 lines
Quoted 20 lines
Takashi
Quoted 16 lines
Quoted 15 lines
Quoted 4 lines
Our customer just want to do eapd on when stream is open. The pop noise will not clear. Because music gain was biger than pop
noise.Opening a stream doesn't mean that it follows the loud sound immediately. The script above wouldn't produce any sound but just
does open/close the stream. Did you try that?Takashi
------Please consider the environment before printing this e-mail.
[2 0001-set-eapd-follow-stream-on-off.patch <application/octet-stream (quoted-printable)>]
Quoted 11 lines
At Wed, 21 May 2014 14:28:12 +0800,
Quoted 4 lines · Kailang
Hi Takashi,
Attach is the update patch.
Keep the function in lower letters.
Also, update the patch description as well (and better to put more words).
Update as attach.
Thanks.
Quoted 144 lines
thanks,
Takashi
Quoted 138 lines
Many thanks.
BR,
KailangQuoted 132 lines
At Wed, 21 May 2014 13:58:14 +0800,
Quoted 90 lines · Kailang
Quoted 72 lines
At Tue, 20 May 2014 18:05:42 +0800,
Quoted 61 lines · Kailang
Quoted 40 lines
At Tue, 20 May 2014 17:20:44 +0800,
Quoted 37 lines · Kailang
Quoted 37 lines
At Tue, 20 May 2014 16:52:43 +0800,
Quoted 32 lines · Kailang
Quoted 22 lines
At Tue, 20 May 2014 15:15:49 +0800,
Quoted 6 lines · Kailang
Hi Takashi,
HP machine had pop noise via speaker.
If EAPD on or off, speaker will have pop noise. So, they want to set eapd to follow with stream on or off.I can apply this as is, but still I wonder whether this results
in
other problems. Doing EAPD on/off there means that it happens far
more often. For example, what happens if you do like below?while true; do
echo -n >/dev/snd/pcmC0D0p
doneQuoted 8 lines
And, what if the device is resumed from power-saving by an audio
playback? Immediately after the power up, it'll start the streaming,
so it'll turn on EAPD.That said, isn't it just a need for some delay before EAPD on/off?
No, eapd on or off will cause pop noise.
Quoted 8 lines
Quoted 3 lines
Quoted 1 line
Does it do always?
No, pop noise just one pop sound. It can not remove by software. But this machine need to do this always.
So, doing EAPD on/off often is rather worse. It's what your patch does.
Once again: did you try the script above? If the pop noise always
I had try it on my develop machine. I have no HP issue machine on my site.
Quoted 8 lines
happens, the operation like above is the worst scenario.
Then, let's think again how to *reduce* it. We need one EAPD on at least after each power up. But it's needed only when you actually plays a stream. That is, we need only enable EAPD at playback stream
open, but leave EAPD as is at close.Quoted 6 lines
[we need only enable EAPD at playback stream open, but leave EAPD as is
at
close.]
Yes.
So, I need to create eapd low inalc269_shutup. Right?Quoted 4 lines
Better to create own shutup callback (you can call
alc269_shutup()from there, too) and set it tospec->shutupin the fixup. The pincfg cleanup isn't often needed or may have bad effect. You should test with real machines what are needed and what are not.static void alc290_fixup_pop_noise(struct
hda_codec*codec,
const structhda_fixup*fix, int action)
{
structalc_spec*spec =codec->spec;if (action ==
HDA_FIXUP_ACT_PRE_PROBE) {
spec->gen.pcm_playback_hook=ALC290_playback_pcm_hook;
}
if (action ==HDA_FIXUP_ACT_INIT) {
set_eapd(codec, 0x14, false);
}
}Quoted 6 lines
Could I modify as upper code?
To set eapd low inHDA_FIXUP_ACT_INITstate.
If system resume, it will initial eapd to low.
To write eapd to same value, it will have no pop noise.
It will keep always low for eapd, only stream open and close have change state for eapd.Yes, it looks OK.
Takashi
Quoted 27 lines
Quoted 26 lines
Takashi
Quoted 21 lines
Quoted 20 lines
Takashi
Quoted 16 lines
Quoted 15 lines
Quoted 4 lines
Our customer just want to do eapd on when stream is open. The pop noise will not clear. Because music gain was biger than pop
noise.Opening a stream doesn't mean that it follows the loud sound immediately. The script above wouldn't produce any sound but just
does open/close the stream. Did you try that?Takashi
------Please consider the environment before printing this e-mail.
Quoted 5 lines
Quoted 2 lines
[2 0001-set-eapd-follow-stream-on-off.patch <application/octet-stream (quoted-printable)>]
------Please consider the environment before printing this e-mail. From
71a093ba3198666c4500b30938e080bd887647cbMon Sep 17 00:00:00 2001
From: Kailang Yang <[email protected]>
Date: Wed, 21 May 2014 14:25:08 +0800
Subject: [PATCH] ALSA: hda/realtek - Set EAPD to follow stream on or off
HP machine has pop noise via speaker. To change state for EAPD will show the pop noise. This patch will keep EAPD always low. Only stream open or close will change state for EAPD.
sound/pci/hda/patch_realtek.c +44 -2
@@ -4175,6 +4175,39 @@ static void alc290_fixup_mono_speakers(struct hda_codec *codec, } } +/* +* ALC290 PCM hooks +*/ +static void alc290_playback_pcm_hook (struct hda_pcm_stream *hinfo, +struct hda_codec *codec, +struct snd_pcm_substream *substream, +int action) +{ +switch (action) { +case HDA_GEN_PCM_ACT_OPEN : +set_eapd (codec,0x14 , true); +break ; +case HDA_GEN_PCM_ACT_CLOSE : +set_eapd (codec,0x14 , false); +break ; + } +} + +static void alc290_fixup_pop_noise (struct hda_codec *codec, +const struct hda_fixup *fix,int action) +{ +struct alc_spec *spec = codec->spec; + +switch (action) { +case HDA_FIXUP_ACT_PRE_PROBE : + spec->gen.pcm_playback_hook = alc290_playback_pcm_hook; +break ; +case HDA_FIXUP_ACT_INIT : +set_eapd (codec,0x14 , false); +break ; + } +} +/* for hda_fixup_thinkpad_acpi() */ #include "thinkpad_helper.c"
@@ -4237,6 +4270,7 @@ enum {ALC255_FIXUP_HEADSET_MODE_NO_HP_MIC ,ALC293_FIXUP_DELL1_MIC_NO_PRESENCE ,ALC292_FIXUP_TPT440_DOCK , + ALC290_FIXUP_HP_DEPOP_WITH_MUTE_LED, }; static const struct hda_fixup alc269_fixups[] = {
@@ -4650,6 +4684,12 @@ static const struct hda_fixup alc269_fixups[] = { .chained = true, .chain_id =ALC269_FIXUP_LIMIT_INT_MIC_BOOST }, + [ALC290_FIXUP_HP_DEPOP_WITH_MUTE_LED] = { + .type = HDA_FIXUP_FUNC, + .v.func = alc290_fixup_pop_noise, + .chained = true, + .chain_id = ALC269_FIXUP_HP_MUTE_LED_MIC1, + }, };static const struct snd_pci_quirk alc269_fixup_tbl[] = {
@@ -4772,12 +4812,14 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {SND_PCI_QUIRK (0x103c ,0x2280 ,"HP" ,ALC269_FIXUP_HP_MUTE_LED_MIC1 ),SND_PCI_QUIRK (0x103c ,0x2281 ,"HP" ,ALC269_FIXUP_HP_MUTE_LED_MIC1 ),SND_PCI_QUIRK (0x103c ,0x2282 ,"HP" ,ALC269_FIXUP_HP_MUTE_LED_MIC1 ), -SND_PCI_QUIRK (0x103c ,0x2289 ,"HP" ,ALC269_FIXUP_HP_MUTE_LED_MIC1 ), +SND_PCI_QUIRK (0x103c ,0x2289 ,"HP" ,ALC290_FIXUP_HP_DEPOP_WITH_MUTE_LED ),SND_PCI_QUIRK (0x103c ,0x228a ,"HP" ,ALC269_FIXUP_HP_MUTE_LED_MIC1 ),SND_PCI_QUIRK (0x103c ,0x228b ,"HP" ,ALC269_FIXUP_HP_MUTE_LED_MIC1 ), -SND_PCI_QUIRK (0x103c ,0x228c ,"HP" ,ALC269_FIXUP_HP_MUTE_LED_MIC1 ), +SND_PCI_QUIRK (0x103c ,0x228c ,"HP" ,ALC290_FIXUP_HP_DEPOP_WITH_MUTE_LED ),SND_PCI_QUIRK (0x103c ,0x228d ,"HP" ,ALC269_FIXUP_HP_MUTE_LED_MIC1 ),SND_PCI_QUIRK (0x103c ,0x228e ,"HP" ,ALC269_FIXUP_HP_MUTE_LED_MIC1 ), +SND_PCI_QUIRK (0x103c ,0x228f ,"HP" ,ALC290_FIXUP_HP_DEPOP_WITH_MUTE_LED ), +SND_PCI_QUIRK (0x103c ,0x22a8 ,"HP" ,ALC290_FIXUP_HP_DEPOP_WITH_MUTE_LED ),SND_PCI_QUIRK (0x103c ,0x22c5 ,"HP" ,ALC269_FIXUP_HP_MUTE_LED_MIC1 ),SND_PCI_QUIRK (0x103c ,0x22c6 ,"HP" ,ALC269_FIXUP_HP_MUTE_LED_MIC1 ), SND_PCI_QUIRK(0x103c, 0x22c7, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
At Wed, 21 May 2014 17:24:16 +0800,
Quoted 8 lines · Kailang
Quoted 8 lines
At Wed, 21 May 2014 14:28:12 +0800,
Quoted 4 lines · Kailang
Hi Takashi,
Attach is the update patch.
Quoted 7 lines
Quoted 4 lines
Keep the function in lower letters.
Also, update the patch description as well (and better to put more words).
Update as attach.
Thanks.
Well, do you really want to turn off EAPD at closing the stream? As I repeatedly explained, this results in more frequent EAPD on/off, i.e. more pop noises.
Takashi
Quoted 163 lines
Quoted 156 lines
thanks,
Takashi
Quoted 149 lines
Many thanks.
BR,
KailangQuoted 143 lines
At Wed, 21 May 2014 13:58:14 +0800,
Quoted 99 lines · Kailang
Quoted 80 lines
At Tue, 20 May 2014 18:05:42 +0800,
Quoted 68 lines · Kailang
Quoted 46 lines
At Tue, 20 May 2014 17:20:44 +0800,
Quoted 34 lines · Kailang
Quoted 34 lines
At Tue, 20 May 2014 16:52:43 +0800,
Quoted 30 lines · Kailang
Quoted 30 lines
At Tue, 20 May 2014 15:15:49 +0800,
Quoted 6 lines · Kailang
Hi Takashi,
HP machine had pop noise via speaker.
If EAPD on or off, speaker will have pop noise.
So, they want to set eapd to follow with stream on or off.I can apply this as is, but still I wonder whether this results
in
other problems. Doing EAPD on/off there means that it happens
far
more often. For example, what happens if you do like below?while true; do
echo -n >/dev/snd/pcmC0D0p
doneAnd, what if the device is resumed from power-saving by an audio
playback? Immediately after the power up, it'll start the streaming,
so it'll turn on EAPD.Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
Quoted 2 lines
That said, isn't it just a need for some delay before EAPD on/off?
No, eapd on or off will cause pop noise.
Does it do always?
No, pop noise just one pop sound. It can not remove by software. But this machine need to do this always.
Quoted 6 lines
So, doing EAPD on/off often is rather worse. It's what your patch
does.Once again: did you try the script above? If the pop noise always
I had try it on my develop machine. I have no HP issue machine on my
site.Quoted 10 lines
happens, the operation like above is the worst scenario.
Then, let's think again how to *reduce* it. We need one EAPD on at
least after each power up. But it's needed only when you actually
plays a stream. That is, we need only enable EAPD at playback stream
open, but leave EAPD as is at close.Quoted 7 lines
[we need only enable EAPD at playback stream open, but leave EAPD as
is
at
close.]
Yes.
So, I need to create eapd low inalc269_shutup. Right?Quoted 5 lines
Better to create own shutup callback (you can call
alc269_shutup()from there, too) and set it tospec->shutupin the fixup. The pincfg
cleanup isn't often needed or may have bad effect. You should test with real machines what are needed and what are not.static void alc290_fixup_pop_noise(struct
hda_codec*codec,
const structhda_fixup*fix, int action)
{
structalc_spec*spec =codec->spec;if (action ==
HDA_FIXUP_ACT_PRE_PROBE) {
spec->gen.pcm_playback_hook=ALC290_playback_pcm_hook;
}
if (action ==HDA_FIXUP_ACT_INIT) {
set_eapd(codec, 0x14, false);
}
}Quoted 7 lines
Could I modify as upper code?
To set eapd low inHDA_FIXUP_ACT_INITstate.
If system resume, it will initial eapd to low.
To write eapd to same value, it will have no pop noise. It will keep always low for eapd, only stream open and close have change
state for eapd.Yes, it looks OK.
Takashi
Quoted 28 lines
Quoted 27 lines
Takashi
Quoted 22 lines
Quoted 21 lines
Takashi
Quoted 17 lines
Quoted 16 lines
Quoted 5 lines
Our customer just want to do eapd on when stream is open. The pop noise will not clear. Because music gain was biger than
pop
noise.Opening a stream doesn't mean that it follows the loud sound immediately. The script above wouldn't produce any sound but just
does open/close the stream. Did you try that?Takashi
------Please consider the environment before printing this e-mail.
Quoted 5 lines
Quoted 3 lines
[2 0001-set-eapd-follow-stream-on-off.patch <application/octet-stream (quoted-printable)>]
------Please consider the environment before printing this e-mail.
[2 0002-set-eapd-follow-stream-on-off.patch <application/octet-stream (quoted-printable)>]
Quoted 14 lines
At Wed, 21 May 2014 17:24:16 +0800,
Quoted 10 lines · Kailang
Quoted 10 lines
At Wed, 21 May 2014 14:28:12 +0800,
Quoted 4 lines · Kailang
Hi Takashi,
Attach is the update patch.
Keep the function in lower letters.
Quoted 7 lines
Quoted 5 lines
Quoted 2 lines
Also, update the patch description as well (and better to put more words).
Update as attach.
Thanks.Well, do you really want to turn off EAPD at closing the stream?
Yes.
Quoted 3 lines
As I repeatedly explained, this results in more frequent EAPD on/off, i.e. more pop noises.
I have sent the patch for HP.
I will wait for feedback from customer.
If it is solve the issue, I will advise you.
Our AE says, windows use this method. HP is agree this usage.
Quoted 166 lines
Takashi
Quoted 163 lines
Quoted 156 lines
thanks,
Takashi
Quoted 149 lines
Many thanks.
BR,
KailangQuoted 143 lines
At Wed, 21 May 2014 13:58:14 +0800,
Quoted 99 lines · Kailang
Quoted 80 lines
At Tue, 20 May 2014 18:05:42 +0800,
Quoted 68 lines · Kailang
Quoted 46 lines
At Tue, 20 May 2014 17:20:44 +0800,
Quoted 34 lines · Kailang
Quoted 34 lines
At Tue, 20 May 2014 16:52:43 +0800,
Quoted 30 lines · Kailang
Quoted 30 lines
At Tue, 20 May 2014 15:15:49 +0800,
Kailang wrote:Hi Takashi,
HP machine had pop noise via speaker.
If EAPD on or off, speaker will have pop noise.
So, they want to set eapd to follow with stream on or off.I can apply this as is, but still I wonder whether this
results
in
other problems. Doing EAPD on/off there means that it
happens
far
more often. For example, what happens if you do like
below?while true; do
echo -n > /dev/snd/pcmC0D0p
doneAnd, what if the device is resumed from power-saving by an
audio
playback? Immediately after the power up, it'll start the
streaming,
so it'll turn on EAPD.Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
Quoted 2 lines
That said, isn't it just a need for some delay before EAPD
on/off?No, eapd on or off will cause pop noise.
Does it do always?
No, pop noise just one pop sound. It can not remove by software. But this machine need to do this always.
Quoted 6 lines
So, doing EAPD on/off often is rather worse. It's what your patch
does.Once again: did you try the script above? If the pop noise always
I had try it on my develop machine. I have no HP issue machine on my
site.Quoted 10 lines
happens, the operation like above is the worst scenario.
Then, let's think again how to *reduce* it. We need one EAPD on at
least after each power up. But it's needed only when you actually
plays a stream. That is, we need only enable EAPD at playback stream
open, but leave EAPD as is at close.Quoted 7 lines
[we need only enable EAPD at playback stream open, but leave EAPD as
is
at
close.]
Yes.
So, I need to create eapd low inalc269_shutup. Right?Quoted 5 lines
Better to create own shutup callback (you can call
alc269_shutup()from there, too) and set it tospec->shutupin the fixup. The pincfg
cleanup isn't often needed or may have bad effect. You should test with real machines what are needed and what are not.static void alc290_fixup_pop_noise(struct
hda_codec*codec,
const structhda_fixup*fix, int action)
{
structalc_spec*spec =codec->spec;if (action ==
HDA_FIXUP_ACT_PRE_PROBE) {
spec->gen.pcm_playback_hook=ALC290_playback_pcm_hook;
}
if (action ==HDA_FIXUP_ACT_INIT) {
set_eapd(codec, 0x14, false);
}
}Quoted 7 lines
Could I modify as upper code?
To set eapd low inHDA_FIXUP_ACT_INITstate.
If system resume, it will initial eapd to low.
To write eapd to same value, it will have no pop noise. It will keep always low for eapd, only stream open and close have change
state for eapd.Yes, it looks OK.
Takashi
Quoted 28 lines
Quoted 27 lines
Takashi
Quoted 22 lines
Quoted 21 lines
Takashi
Quoted 17 lines
Quoted 16 lines
Quoted 5 lines
Our customer just want to do eapd on when stream is open. The pop noise will not clear. Because music gain was biger than
pop
noise.Opening a stream doesn't mean that it follows the loud sound immediately. The script above wouldn't produce any sound but just
does open/close the stream. Did you try that?Takashi
------Please consider the environment before printing this e-mail.
Quoted 5 lines
Quoted 3 lines
[2 0001-set-eapd-follow-stream-on-off.patch <application/octet-stream (quoted-printable)>]
------Please consider the environment before printing this e-mail.
[2 0002-set-eapd-follow-stream-on-off.patch <application/octet-stream (quoted-printable)>]
At Thu, 22 May 2014 14:26:04 +0800,
Quoted 23 lines · Kailang
Quoted 15 lines
At Wed, 21 May 2014 17:24:16 +0800,
Quoted 10 lines · Kailang
Quoted 10 lines
At Wed, 21 May 2014 14:28:12 +0800,
Quoted 4 lines · Kailang
Hi Takashi,
Attach is the update patch.
Keep the function in lower letters.
Quoted 7 lines
Quoted 5 lines
Quoted 2 lines
Also, update the patch description as well (and better to put more words).
Update as attach.
Thanks.Well, do you really want to turn off EAPD at closing the stream?
Quoted 8 lines
Yes.
Quoted 3 lines
As I repeatedly explained, this results in more frequent EAPD on/off, i.e. more pop noises.
I have sent the patch for HP.
I will wait for feedback from customer.
Did you send the test script, too?
Quoted 3 lines
If it is solve the issue, I will advise you.
Our AE says, windows use this method. HP is agree this usage.
Windows does this likely because of possible power saving, not because of pop noises.
I'm fine to take the patch, but only when I'm convinced why it really fixes the pop noise problem in the scenario below:
- playing a silent stream
- frequent open / close a stream
Takashi
Quoted 181 lines
Quoted 180 lines
Takashi
Quoted 176 lines
Quoted 168 lines
thanks,
Takashi
Quoted 161 lines
Many thanks.
BR,
KailangQuoted 155 lines
At Wed, 21 May 2014 13:58:14 +0800,
Quoted 109 lines · Kailang
Quoted 88 lines
At Tue, 20 May 2014 18:05:42 +0800,
Quoted 75 lines · Kailang
Quoted 51 lines
At Tue, 20 May 2014 17:20:44 +0800,
Quoted 41 lines · Kailang
Quoted 41 lines
At Tue, 20 May 2014 16:52:43 +0800,
Quoted 37 lines · Kailang
At Tue, 20 May 2014 15:15:49 +0800,
Kailang wrote:Hi Takashi,
HP machine had pop noise via speaker.
If EAPD on or off, speaker will have pop noise.
So, they want to set eapd to follow with stream on or
off.I can apply this as is, but still I wonder whether this
results
in
other problems. Doing EAPD on/off there means that it
happens
far
more often. For example, what happens if you do like
below?while true; do
echo -n > /dev/snd/pcmC0D0p
doneAnd, what if the device is resumed from power-saving by
an
audio
playback? Immediately after the power up, it'll start
the
streaming,
so it'll turn on EAPD.That said, isn't it just a need for some delay before
EAPD
on/off?Quoted 6 lines
Quoted 3 lines
Quoted 1 line
No, eapd on or off will cause pop noise.
Does it do always?
No, pop noise just one pop sound. It can not remove by software.
But this machine need to do this always.Quoted 6 lines
So, doing EAPD on/off often is rather worse. It's what your patch
does.Once again: did you try the script above? If the pop noise always
I had try it on my develop machine. I have no HP issue machine on
my
site.Quoted 11 lines
happens, the operation like above is the worst scenario.
Then, let's think again how to *reduce* it. We need one EAPD on
at
least after each power up. But it's needed only when you actually
plays a stream. That is, we need only enable EAPD at playback stream
open, but leave EAPD as is at close.Quoted 8 lines
[we need only enable EAPD at playback stream open, but leave EAPD
as
is
at
close.]
Yes.
So, I need to create eapd low inalc269_shutup. Right?Quoted 7 lines
Better to create own shutup callback (you can call
alc269_shutup()
from there, too) and set it tospec->shutupin the fixup. The pincfg
cleanup isn't often needed or may have bad effect. You should test
with real machines what are needed and what are not.static void alc290_fixup_pop_noise(struct
hda_codec*codec,
const structhda_fixup*fix, int action)
{
structalc_spec*spec =codec->spec;if (action ==
HDA_FIXUP_ACT_PRE_PROBE) {
spec->gen.pcm_playback_hook=ALC290_playback_pcm_hook;
}
if (action ==HDA_FIXUP_ACT_INIT) {
set_eapd(codec, 0x14, false);
}
}Quoted 7 lines
Could I modify as upper code?
To set eapd low inHDA_FIXUP_ACT_INITstate.
If system resume, it will initial eapd to low.
To write eapd to same value, it will have no pop noise. It will keep always low for eapd, only stream open and close have change
state for eapd.Yes, it looks OK.
Takashi
Quoted 30 lines
Quoted 29 lines
Takashi
Quoted 24 lines
Quoted 23 lines
Takashi
Quoted 19 lines
Quoted 18 lines
Quoted 5 lines
Our customer just want to do eapd on when stream is open.
The pop noise will not clear. Because music gain was biger
than
pop
noise.Opening a stream doesn't mean that it follows the loud sound
immediately. The script above wouldn't produce any sound but
just
does open/close the stream. Did you try that?Takashi
------Please consider the environment before printing this e-mail.
Quoted 5 lines
Quoted 3 lines
[2 0001-set-eapd-follow-stream-on-off.patch <application/octet-stream (quoted-printable)>]
------Please consider the environment before printing this e-mail.
[2 0002-set-eapd-follow-stream-on-off.patch <application/octet-stream (quoted-printable)>]
Quoted 29 lines
At Thu, 22 May 2014 14:26:04 +0800,
Quoted 25 lines · Kailang
Quoted 15 lines
At Wed, 21 May 2014 17:24:16 +0800,
Quoted 10 lines · Kailang
Quoted 10 lines
At Wed, 21 May 2014 14:28:12 +0800,
Quoted 4 lines · Kailang
Hi Takashi,
Attach is the update patch.
Keep the function in lower letters.
Quoted 7 lines
Quoted 5 lines
Quoted 2 lines
Also, update the patch description as well (and better to put more words).
Update as attach.
Thanks.Well, do you really want to turn off EAPD at closing the stream?
Yes.
Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
As I repeatedly explained, this results in more frequent EAPD on/off, i.e. more pop noises.
I have sent the patch for HP.
I will wait for feedback from customer.Did you send the test script, too?
No.
Quoted 5 lines
Quoted 4 lines
If it is solve the issue, I will advise you.
Our AE says, windows use this method. HP is agree this usage.
Quoted 8 lines
Windows does this likely because of possible power saving, not because of pop noises.
I'm fine to take the patch, but only when I'm convinced why it really fixes the pop noise problem in the scenario below:
- playing a silent stream
- frequent open / close a stream
You are right. It is the key points. But I think first stream will show pop noise. It was hard to remove. Keep EAPD to high after first stream start maybe a good idea.
Thanks.
I think to request the machine is better.
I will let our AE to request the machine.
Quoted 186 lines
Takashi
Quoted 182 lines
Quoted 181 lines
Takashi
Quoted 177 lines
Quoted 169 lines
thanks,
Takashi
Quoted 162 lines
Many thanks.
BR,
KailangQuoted 156 lines
At Wed, 21 May 2014 13:58:14 +0800,
Quoted 109 lines · Kailang
Quoted 88 lines
At Tue, 20 May 2014 18:05:42 +0800,
Quoted 75 lines · Kailang
Quoted 51 lines
At Tue, 20 May 2014 17:20:44 +0800,
Quoted 41 lines · Kailang
Quoted 41 lines
At Tue, 20 May 2014 16:52:43 +0800,
Kailang wrote:At Tue, 20 May 2014 15:15:49 +0800,
Kailang wrote:Hi Takashi,
HP machine had pop noise via speaker.
If EAPD on or off, speaker will have pop noise.
So, they want to set eapd to follow with stream on or
off.I can apply this as is, but still I wonder whether this
results
in
other problems. Doing EAPD on/off there means that it
happens
far
more often. For example, what happens if you do like
below?while true; do
echo -n > /dev/snd/pcmC0D0p
doneAnd, what if the device is resumed from power-saving by
an
audio
playback? Immediately after the power up, it'll start
the
streaming,
so it'll turn on EAPD.That said, isn't it just a need for some delay before
EAPD
on/off?Quoted 6 lines
Quoted 3 lines
No, eapd on or off will cause pop noise.
Does it do always?
No, pop noise just one pop sound. It can not remove by software.
But this machine need to do this always.Quoted 6 lines
So, doing EAPD on/off often is rather worse. It's what your patch
does.Once again: did you try the script above? If the pop noise always
I had try it on my develop machine. I have no HP issue machine on
my
site.Quoted 11 lines
happens, the operation like above is the worst scenario.
Then, let's think again how to *reduce* it. We need one EAPD on
at
least after each power up. But it's needed only when you actually
plays a stream. That is, we need only enable EAPD at playback stream
open, but leave EAPD as is at close.Quoted 8 lines
[we need only enable EAPD at playback stream open, but leave EAPD
as
is
at
close.]
Yes.
So, I need to create eapd low inalc269_shutup. Right?Quoted 7 lines
Better to create own shutup callback (you can call
alc269_shutup()
from there, too) and set it tospec->shutupin the fixup. The pincfg
cleanup isn't often needed or may have bad effect. You should test
with real machines what are needed and what are not.static void alc290_fixup_pop_noise(struct
hda_codec*codec,
const structhda_fixup*fix, int action)
{
structalc_spec*spec =codec->spec;if (action ==
HDA_FIXUP_ACT_PRE_PROBE) {
spec->gen.pcm_playback_hook=ALC290_playback_pcm_hook;
}
if (action ==HDA_FIXUP_ACT_INIT) {
set_eapd(codec, 0x14, false);
}
}Quoted 7 lines
Could I modify as upper code?
To set eapd low inHDA_FIXUP_ACT_INITstate.
If system resume, it will initial eapd to low.
To write eapd to same value, it will have no pop noise. It will keep always low for eapd, only stream open and close have change
state for eapd.Yes, it looks OK.
Takashi
Quoted 31 lines
Quoted 30 lines
Takashi
Quoted 25 lines
Quoted 24 lines
Takashi
Quoted 20 lines
Quoted 19 lines
Our customer just want to do eapd on when stream is open.
The pop noise will not clear. Because music gain was biger
than
pop
noise.Opening a stream doesn't mean that it follows the loud
sound
immediately. The script above wouldn't produce any sound
but
just
does open/close the stream. Did you try that?Takashi
------Please consider the environment before printing
this
e-mail.Quoted 5 lines
Quoted 3 lines
[2 0001-set-eapd-follow-stream-on-off.patch <application/octet-stream (quoted-printable)>]
------Please consider the environment before printing this e-mail.
[2 0002-set-eapd-follow-stream-on-off.patch <application/octet-stream (quoted-printable)>]
Add support headset mode for alc233
In reply to Takashi IwaiHi Takashi,
Attach is support headset mode for alc233 patch.
BR,
Kailang
Quoted 1 line
From
f84879b9898a582319b15076562f1758028e1263Mon Sep 17 00:00:00 2001
From: Kailang Yang <[email protected]>
Date: Wed, 21 May 2014 16:49:48 +0800
Subject: [PATCH] ALSA: hda/realtek - Add support headset mode for ALC233
sound/pci/hda/patch_realtek.c +6 -0
@@ -3525,6 +3525,7 @@ static void alc_headset_mode_unplugged(struct hda_codec *codec)/* Direct Drive HP Amp control */ alc_write_coefex_idx (codec,0x57 ,0x03 ,0x8aa6 );break ; +case 0x10ec0233 :case 0x10ec0283 :alc_write_coef_idx (codec,0x1b ,0x0c0b );alc_write_coef_idx (codec,0x45 ,0xc429 );
@@ -3596,6 +3597,7 @@ static void alc_headset_mode_mic_in(struct hda_codec *codec, hda_nid_t hp_pin,alc_write_coef_idx (codec,0x06 ,0x6100 );snd_hda_set_pin_ctl_cache (codec, mic_pin,PIN_VREF50 );break ; +case 0x10ec0233 :case 0x10ec0283 :alc_write_coef_idx (codec,0x45 ,0xc429 );snd_hda_set_pin_ctl_cache (codec, hp_pin,0 );
@@ -3667,6 +3669,7 @@ static void alc_headset_mode_default(struct hda_codec *codec)alc_write_coefex_idx (codec,0x57 ,0x03 ,0x8ea6 );alc_write_coef_idx (codec,0x49 ,0x0049 );break ; +case 0x10ec0233 :case 0x10ec0283 :alc_write_coef_idx (codec,0x06 ,0x2100 );alc_write_coef_idx (codec,0x32 ,0x4ea3 );
@@ -3721,6 +3724,7 @@ static void alc_headset_mode_ctia(struct hda_codec *codec)alc_write_coef_idx (codec,0x1b ,0x0c2b );alc_write_coefex_idx (codec,0x57 ,0x03 ,0x8ea6 );break ; +case 0x10ec0233 :case 0x10ec0283 :alc_write_coef_idx (codec,0x45 ,0xd429 );alc_write_coef_idx (codec,0x1b ,0x0c2b );
@@ -3773,6 +3777,7 @@ static void alc_headset_mode_omtp(struct hda_codec *codec)alc_write_coef_idx (codec,0x1b ,0x0c2b );alc_write_coefex_idx (codec,0x57 ,0x03 ,0x8ea6 );break ; +case 0x10ec0233 :case 0x10ec0283 :alc_write_coef_idx (codec,0x45 ,0xe429 );alc_write_coef_idx (codec,0x1b ,0x0c2b );
@@ -3829,6 +3834,7 @@ static void alc_determine_headset_type(struct hda_codec *codec) val =alc_read_coef_idx (codec,0x46 ); is_ctia = (val &0x0070 ) ==0x0070 ;break ; +case 0x10ec0233 :case 0x10ec0283 :alc_write_coef_idx (codec,0x45 ,0xd029 );msleep (300 );
Takashi Iwai
AppliedRe: Add support headset mode for alc233
At Wed, 21 May 2014 16:55:14 +0800,
Quoted 4 lines · Kailang
Hi Takashi,
Attach is support headset mode for alc233 patch.
Thanks, applied.
Takashi
Quoted 5 lines
BR,
Kailang
[2 0000-add-support-headset-mode-for-alc233.patch <application/octet-stream (quoted-printable)>]