diff options
author | Takashi Iwai <tiwai@suse.de> | 2010-03-30 12:03:44 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2010-03-30 12:03:44 -0400 |
commit | a68d5a5419d2a15161488b20f740115068e7b666 (patch) | |
tree | 75249110bd358f068835ad87d1f47f99f4962038 /sound/pci/hda/patch_realtek.c | |
parent | ad35879aa192e783db2d41c196f48f3fc059ce22 (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/patch_realtek.c')
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 9a361c2c7336..8ae48061e8c7 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -14012,8 +14012,9 @@ static int alc269_mic2_mute_check_ps(struct hda_codec *codec, hda_nid_t nid) | |||
14012 | else | 14012 | else |
14013 | pinval = 0x20; | 14013 | pinval = 0x20; |
14014 | /* mic2 vref pin is used for mute LED control */ | 14014 | /* mic2 vref pin is used for mute LED control */ |
14015 | snd_hda_codec_write(codec, 0x19, 0, | 14015 | snd_hda_codec_update_cache(codec, 0x19, 0, |
14016 | AC_VERB_SET_PIN_WIDGET_CONTROL, pinval); | 14016 | AC_VERB_SET_PIN_WIDGET_CONTROL, |
14017 | pinval); | ||
14017 | } | 14018 | } |
14018 | return alc_check_power_status(codec, nid); | 14019 | return alc_check_power_status(codec, nid); |
14019 | } | 14020 | } |