}
EXPORT_SYMBOL_HDA(snd_hda_sequence_write_cache);
+/**
+ * snd_hda_codec_flush_cache - Execute all pending (cached) amps / verbs
+ * @codec: HD-audio codec
+ */
+void snd_hda_codec_flush_cache(struct hda_codec *codec)
+{
+ snd_hda_codec_resume_amp(codec);
+ snd_hda_codec_resume_cache(codec);
+}
+EXPORT_SYMBOL_HDA(snd_hda_codec_flush_cache);
+
void snd_hda_codec_set_power_to_all(struct hda_codec *codec, hda_nid_t fg,
unsigned int power_state,
bool eapd_workaround)
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)
+/* both for cmd & amp caches */
+void snd_hda_codec_flush_cache(struct hda_codec *codec);
/* the struct for codec->pin_configs */
struct hda_pincfg {
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;
/* 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);
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,
(dir == HDA_OUTPUT ? AC_AMP_SET_OUTPUT : AC_AMP_SET_INPUT);
/* flush all cached amps at first */
- snd_hda_codec_flush_amp_cache(codec);
+ snd_hda_codec_flush_cache(codec);
/* we care only right channel */
val = snd_hda_codec_amp_read(codec, nid, 1, dir, 0);