diff options
author | Takashi Iwai <tiwai@suse.de> | 2012-12-20 05:33:20 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2013-01-12 02:33:57 -0500 |
commit | c4f3ebed3c5bc59c88eb2ccda825a12686b58341 (patch) | |
tree | 97205db06f0ca8597edf3443d4d400116caec02d | |
parent | 3bcce5c0d931bf623adc5974200e4d7636b10bef (diff) |
ALSA: hda - Flush dirty amp caches before writing inv_dmic fix
The inverted dmic fix overwrites the right channel amp value, but it
would work only when the amp values have been already actually
written. Put snd_hda_codec_resume_amp() before the amp write for
flushing caches.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 896bc2cc9293..caf6fa5e6a70 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -633,6 +633,9 @@ static void alc_inv_dmic_sync_adc(struct hda_codec *codec, int adc_idx) | |||
633 | parm = AC_AMP_SET_RIGHT | | 633 | parm = AC_AMP_SET_RIGHT | |
634 | (dir == HDA_OUTPUT ? AC_AMP_SET_OUTPUT : AC_AMP_SET_INPUT); | 634 | (dir == HDA_OUTPUT ? AC_AMP_SET_OUTPUT : AC_AMP_SET_INPUT); |
635 | 635 | ||
636 | /* flush all cached amps at first */ | ||
637 | snd_hda_codec_resume_amp(codec); | ||
638 | |||
636 | /* we care only right channel */ | 639 | /* we care only right channel */ |
637 | val = snd_hda_codec_amp_read(codec, nid, 1, dir, 0); | 640 | val = snd_hda_codec_amp_read(codec, nid, 1, dir, 0); |
638 | if (val & 0x80) /* if already muted, we don't need to touch */ | 641 | if (val & 0x80) /* if already muted, we don't need to touch */ |