aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/hda_codec.h
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2010-03-30 12:03:44 -0400
committerTakashi Iwai <tiwai@suse.de>2010-03-30 12:03:44 -0400
commita68d5a5419d2a15161488b20f740115068e7b666 (patch)
tree75249110bd358f068835ad87d1f47f99f4962038 /sound/pci/hda/hda_codec.h
parentad35879aa192e783db2d41c196f48f3fc059ce22 (diff)
ALSA: hda - introduce snd_hda_codec_update_cache()
Add a new helper, snd_hda_codec_update_cache(), for reducing the unneeded verbs. This function checks the cached value and skips if it's identical with the given one. Otherwise it works like snd_hda_codec_write_cache(). The alc269 code uses this function as an example. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/hda_codec.h')
-rw-r--r--sound/pci/hda/hda_codec.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/sound/pci/hda/hda_codec.h b/sound/pci/hda/hda_codec.h
index b75da47571e6..49e939e7e5cd 100644
--- a/sound/pci/hda/hda_codec.h
+++ b/sound/pci/hda/hda_codec.h
@@ -885,9 +885,12 @@ int snd_hda_codec_write_cache(struct hda_codec *codec, hda_nid_t nid,
885 int direct, unsigned int verb, unsigned int parm); 885 int direct, unsigned int verb, unsigned int parm);
886void snd_hda_sequence_write_cache(struct hda_codec *codec, 886void snd_hda_sequence_write_cache(struct hda_codec *codec,
887 const struct hda_verb *seq); 887 const struct hda_verb *seq);
888int snd_hda_codec_update_cache(struct hda_codec *codec, hda_nid_t nid,
889 int direct, unsigned int verb, unsigned int parm);
888void snd_hda_codec_resume_cache(struct hda_codec *codec); 890void snd_hda_codec_resume_cache(struct hda_codec *codec);
889#else 891#else
890#define snd_hda_codec_write_cache snd_hda_codec_write 892#define snd_hda_codec_write_cache snd_hda_codec_write
893#define snd_hda_codec_update_cache snd_hda_codec_write
891#define snd_hda_sequence_write_cache snd_hda_sequence_write 894#define snd_hda_sequence_write_cache snd_hda_sequence_write
892#endif 895#endif
893 896