Skip to content

Commit ac25916

Browse files
KailangYanggregkh
authored andcommitted
ALSA: hda/realtek - fixed speaker no sound update
[ Upstream commit 46c862f ] Fixed speaker has pop noise on Lenovo Thinkpad X11 Carbon Gen 12. Fixes: 630fbc6 ("ALSA: hda/realtek - fixed speaker no sound") Reported-and-tested-by: Jeremy Bethmont <jeremy.bethmont@gmail.com> Closes: https://lore.kernel.org/CAC88DfsHrhyhy0Pn1O-z9egBvMYu=6NYgcvcC6KCgwh_-Ldkxg@mail.gmail.com Signed-off-by: Kailang Yang <kailang@realtek.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 4573698 commit ac25916

1 file changed

Lines changed: 5 additions & 11 deletions

File tree

sound/hda/codecs/realtek/alc269.c

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3615,22 +3615,11 @@ static void alc287_alc1318_playback_pcm_hook(struct hda_pcm_stream *hinfo,
36153615
struct snd_pcm_substream *substream,
36163616
int action)
36173617
{
3618-
static const struct coef_fw dis_coefs[] = {
3619-
WRITE_COEF(0x24, 0x0013), WRITE_COEF(0x25, 0x0000), WRITE_COEF(0x26, 0xC203),
3620-
WRITE_COEF(0x28, 0x0004), WRITE_COEF(0x29, 0xb023),
3621-
}; /* Disable AMP silence detection */
3622-
static const struct coef_fw en_coefs[] = {
3623-
WRITE_COEF(0x24, 0x0013), WRITE_COEF(0x25, 0x0000), WRITE_COEF(0x26, 0xC203),
3624-
WRITE_COEF(0x28, 0x0084), WRITE_COEF(0x29, 0xb023),
3625-
}; /* Enable AMP silence detection */
3626-
36273618
switch (action) {
36283619
case HDA_GEN_PCM_ACT_OPEN:
3629-
alc_process_coef_fw(codec, dis_coefs);
36303620
alc_write_coefex_idx(codec, 0x5a, 0x00, 0x954f); /* write gpio3 to high */
36313621
break;
36323622
case HDA_GEN_PCM_ACT_CLOSE:
3633-
alc_process_coef_fw(codec, en_coefs);
36343623
alc_write_coefex_idx(codec, 0x5a, 0x00, 0x554f); /* write gpio3 as default value */
36353624
break;
36363625
}
@@ -3653,10 +3642,15 @@ static void alc287_fixup_lenovo_thinkpad_with_alc1318(struct hda_codec *codec,
36533642
WRITE_COEF(0x24, 0x0013), WRITE_COEF(0x25, 0x0000), WRITE_COEF(0x26, 0xC301),
36543643
WRITE_COEF(0x28, 0x0001), WRITE_COEF(0x29, 0xb023),
36553644
};
3645+
static const struct coef_fw dis_coefs[] = {
3646+
WRITE_COEF(0x24, 0x0013), WRITE_COEF(0x25, 0x0000), WRITE_COEF(0x26, 0xC203),
3647+
WRITE_COEF(0x28, 0x0004), WRITE_COEF(0x29, 0xb023),
3648+
}; /* Disable AMP silence detection */
36563649

36573650
if (action != HDA_FIXUP_ACT_PRE_PROBE)
36583651
return;
36593652
alc_update_coef_idx(codec, 0x10, 1<<11, 1<<11);
3653+
alc_process_coef_fw(codec, dis_coefs);
36603654
alc_process_coef_fw(codec, coefs);
36613655
spec->power_hook = alc287_s4_power_gpio3_default;
36623656
spec->gen.pcm_playback_hook = alc287_alc1318_playback_pcm_hook;

0 commit comments

Comments
 (0)