Skip to content

Commit 630fbc6

Browse files
KailangYangtiwai
authored andcommitted
ALSA: hda/realtek - fixed speaker no sound
If it play a 5s above silence media stream, it will cause silence detection trigger. Speaker will make no sound when you use another app to play a stream. Add this patch will solve this issue. GPIO2: Mute Hotkey GPIO3: Mic Mute LED Enable this will turn on hotkey and LED support. Signed-off-by: Kailang Yang <kailang@realtek.com> Link: https://lore.kernel.org/f4929e137a7949238cc043d861a4d9f8@realtek.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
1 parent 64e0924 commit 630fbc6

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

sound/hda/codecs/realtek/alc269.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3383,11 +3383,22 @@ static void alc287_alc1318_playback_pcm_hook(struct hda_pcm_stream *hinfo,
33833383
struct snd_pcm_substream *substream,
33843384
int action)
33853385
{
3386+
static const struct coef_fw dis_coefs[] = {
3387+
WRITE_COEF(0x24, 0x0013), WRITE_COEF(0x25, 0x0000), WRITE_COEF(0x26, 0xC203),
3388+
WRITE_COEF(0x28, 0x0004), WRITE_COEF(0x29, 0xb023),
3389+
}; /* Disable AMP silence detection */
3390+
static const struct coef_fw en_coefs[] = {
3391+
WRITE_COEF(0x24, 0x0013), WRITE_COEF(0x25, 0x0000), WRITE_COEF(0x26, 0xC203),
3392+
WRITE_COEF(0x28, 0x0084), WRITE_COEF(0x29, 0xb023),
3393+
}; /* Enable AMP silence detection */
3394+
33863395
switch (action) {
33873396
case HDA_GEN_PCM_ACT_OPEN:
3397+
alc_process_coef_fw(codec, dis_coefs);
33883398
alc_write_coefex_idx(codec, 0x5a, 0x00, 0x954f); /* write gpio3 to high */
33893399
break;
33903400
case HDA_GEN_PCM_ACT_CLOSE:
3401+
alc_process_coef_fw(codec, en_coefs);
33913402
alc_write_coefex_idx(codec, 0x5a, 0x00, 0x554f); /* write gpio3 as default value */
33923403
break;
33933404
}

0 commit comments

Comments
 (0)