summaryrefslogtreecommitdiff
path: root/sound/pci/hda/hda_generic.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2013-01-22 18:24:30 +0400
committerTakashi Iwai <tiwai@suse.de>2013-01-22 18:25:25 +0400
commitdc870f38e9faf7dd89355aae2252126688a1a372 (patch)
treedf231e38831d3f38ddeba4148934a7b0c047614a /sound/pci/hda/hda_generic.c
parenta836dbf685fa58c7db6cd56ad4559b2e6c02c8d9 (diff)
downloadlinux-dc870f38e9faf7dd89355aae2252126688a1a372.tar.xz
ALSA: hda - Combine snd_hda_codec_flush_*_cache() to a single function
Since both snd_hda_codec_flush_amp_cache() and snd_hda_codec_flush_cmd_cache() are called usually at the same time, we can simply combine them to a single function, snd_hda_codec_flush_cache(). Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/hda_generic.c')
-rw-r--r--sound/pci/hda/hda_generic.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/sound/pci/hda/hda_generic.c b/sound/pci/hda/hda_generic.c
index b301952dc081..758dcc1a07b0 100644
--- a/sound/pci/hda/hda_generic.c
+++ b/sound/pci/hda/hda_generic.c
@@ -2839,8 +2839,7 @@ static int cap_put_caller(struct snd_kcontrol *kcontrol,
error:
codec->cached_write = 0;
mutex_unlock(&codec->control_mutex);
- snd_hda_codec_flush_amp_cache(codec); /* flush the updates */
- snd_hda_codec_flush_cmd_cache(codec);
+ snd_hda_codec_flush_cache(codec); /* flush the updates */
if (err >= 0 && spec->cap_sync_hook)
spec->cap_sync_hook(codec, ucontrol);
return err;
@@ -4773,8 +4772,7 @@ int snd_hda_gen_init(struct hda_codec *codec)
/* call init functions of standard auto-mute helpers */
update_automute_all(codec);
- snd_hda_codec_flush_amp_cache(codec);
- snd_hda_codec_flush_cmd_cache(codec);
+ snd_hda_codec_flush_cache(codec);
if (spec->vmaster_mute.sw_kctl && spec->vmaster_mute.hook)
snd_hda_sync_vmaster_hook(&spec->vmaster_mute);