Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a836dbf6 authored by Takashi Iwai's avatar Takashi Iwai
Browse files

ALSA: hda - Fix missing call of cmd flush in capture volume put callback



The capture volume put callback may call the node selection change,
and its actual call won't be triggered unless flushed.  In general,
we always need to call both snd_hda_codec_flush_amp_cache() and
snd_hda_codec_flush_cmd_cache() at the same place...

Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 4bd01e93
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -2840,6 +2840,7 @@ static int cap_put_caller(struct snd_kcontrol *kcontrol,
	codec->cached_write = 0;
	codec->cached_write = 0;
	mutex_unlock(&codec->control_mutex);
	mutex_unlock(&codec->control_mutex);
	snd_hda_codec_flush_amp_cache(codec); /* flush the updates */
	snd_hda_codec_flush_amp_cache(codec); /* flush the updates */
	snd_hda_codec_flush_cmd_cache(codec);
	if (err >= 0 && spec->cap_sync_hook)
	if (err >= 0 && spec->cap_sync_hook)
		spec->cap_sync_hook(codec, ucontrol);
		spec->cap_sync_hook(codec, ucontrol);
	return err;
	return err;