[alsa-devel] [PATCH 059/112] ALSA: hda - Add snd_hda_codec_flush_*_cache() aliases

Takashi Iwai tiwai at suse.de
Tue Jan 8 12:38:52 CET 2013


It makes easier to understand although these are identical with
snd_hda_codec_resume_*() functions.

Signed-off-by: Takashi Iwai <tiwai at suse.de>
---
 sound/pci/hda/hda_codec.h     | 4 ++++
 sound/pci/hda/hda_local.h     | 4 ++++
 sound/pci/hda/patch_realtek.c | 2 +-
 3 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/sound/pci/hda/hda_codec.h b/sound/pci/hda/hda_codec.h
index a1cb28f..2d9a51c 100644
--- a/sound/pci/hda/hda_codec.h
+++ b/sound/pci/hda/hda_codec.h
@@ -970,6 +970,10 @@ int snd_hda_codec_update_cache(struct hda_codec *codec, hda_nid_t nid,
 			      int direct, unsigned int verb, unsigned int parm);
 void snd_hda_codec_resume_cache(struct hda_codec *codec);
 
+/* it's alias but a bit clearer meaning */
+#define snd_hda_codec_flush_cmd_cache(codec) \
+	snd_hda_codec_resume_cache(codec)
+
 /* the struct for codec->pin_configs */
 struct hda_pincfg {
 	hda_nid_t nid;
diff --git a/sound/pci/hda/hda_local.h b/sound/pci/hda/hda_local.h
index de12dcc..fec0e2d 100644
--- a/sound/pci/hda/hda_local.h
+++ b/sound/pci/hda/hda_local.h
@@ -139,6 +139,10 @@ int snd_hda_codec_amp_init_stereo(struct hda_codec *codec, hda_nid_t nid,
 				  int dir, int idx, int mask, int val);
 void snd_hda_codec_resume_amp(struct hda_codec *codec);
 
+/* it's alias but a bit clearer meaning */
+#define snd_hda_codec_flush_amp_cache(codec) \
+	snd_hda_codec_resume_amp(codec)
+
 void snd_hda_set_vmaster_tlv(struct hda_codec *codec, hda_nid_t nid, int dir,
 			     unsigned int *tlv);
 struct snd_kcontrol *snd_hda_find_mixer_ctl(struct hda_codec *codec,
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 20e657b..0b32729 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -634,7 +634,7 @@ static void alc_inv_dmic_sync_adc(struct hda_codec *codec, int adc_idx)
 		(dir == HDA_OUTPUT ? AC_AMP_SET_OUTPUT : AC_AMP_SET_INPUT);
 
 	/* flush all cached amps at first */
-	snd_hda_codec_resume_amp(codec);
+	snd_hda_codec_flush_amp_cache(codec);
 
 	/* we care only right channel */
 	val = snd_hda_codec_amp_read(codec, nid, 1, dir, 0);
-- 
1.8.0.1



More information about the Alsa-devel mailing list