summaryrefslogtreecommitdiff
path: root/sound/x86/intel_hdmi_audio.h
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2017-02-11 10:21:56 +0300
committerTakashi Iwai <tiwai@suse.de>2017-02-13 16:48:43 +0300
commite2acecf2c88370f9d7252e7a05cd7b6d43aed720 (patch)
tree649d2dfe02f2d5d59b1723158a4b934b1a7689e8 /sound/x86/intel_hdmi_audio.h
parent3fe2cf7eb21ada0a9683b26c1ae309e7f5e90131 (diff)
downloadlinux-e2acecf2c88370f9d7252e7a05cd7b6d43aed720.tar.xz
ALSA: x86: Handle reset at prepare callback
Currently the driver handles some reset procedure at the trigger STOP and the underrun functions, where both are executed in the interrupt context. Especially the underrun function has a sync-loop to clear the UNDERRUN status bit, and this is supposed to be one of plausible causes of GPU hangup. Since the job to be done in the interrupt handler should be minimum, we move the reset function out of trigger and underrun, and push it into the prepare (and hw_free) callbacks instead. Here a new flag, need_reset, is introduced to indicate the requirement of the reset procedure. This is for avoiding the multiple resets when PCM prepare is called sequentially. Also in the UNDERRUN bit-clear sync loop, take a longer pause to be in the safer side. Taking a longer delay is no longer a problem now because we're running in the normal context. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/x86/intel_hdmi_audio.h')
-rw-r--r--sound/x86/intel_hdmi_audio.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/sound/x86/intel_hdmi_audio.h b/sound/x86/intel_hdmi_audio.h
index a96728a4e7bc..8b9e184fef44 100644
--- a/sound/x86/intel_hdmi_audio.h
+++ b/sound/x86/intel_hdmi_audio.h
@@ -130,6 +130,7 @@ struct snd_intelhad {
union aud_cfg aud_config; /* AUD_CONFIG reg value cache */
struct work_struct hdmi_audio_wq;
struct mutex mutex; /* for protecting chmap and eld */
+ bool need_reset;
};
#endif /* _INTEL_HDMI_AUDIO_ */