]> asedeno.scripts.mit.edu Git - linux.git/commit
ALSA: x86: Handle reset at prepare callback
authorTakashi Iwai <tiwai@suse.de>
Sat, 11 Feb 2017 07:21:56 +0000 (08:21 +0100)
committerTakashi Iwai <tiwai@suse.de>
Mon, 13 Feb 2017 13:48:43 +0000 (14:48 +0100)
commite2acecf2c88370f9d7252e7a05cd7b6d43aed720
tree649d2dfe02f2d5d59b1723158a4b934b1a7689e8
parent3fe2cf7eb21ada0a9683b26c1ae309e7f5e90131
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>
sound/x86/intel_hdmi_audio.c
sound/x86/intel_hdmi_audio.h