• Trent Piepho's avatar
    [ALSA] ad1848: simplify MCE down code · fe1b5e87
    Trent Piepho authored
    The polling loop to check for ACI to go down was more convoluted than it
    needed to be.  New loop should be more efficient and it is a lot simpler.  The
    old loop checked for a timeout before checking for ACI down, which could
    result in an erroneous timeout.  It's only a failure if the timeout expires
    _and_ ACI is still high.  There is nothing wrong with the timeout expiring
    while the task is sleeping if ACI went low.
    A polling loop to check for the device to leaving INIT mode is removed.  The
    device must have already left init for the previous ACI loop to have finished.
    Acked-by: default avatarRene Herman <rene.herman@gmail.com>
    Signed-off-by: default avatarTrent Piepho <xyzzy@speakeasy.org>
    Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
    Signed-off-by: default avatarJaroslav Kysela <perex@suse.cz>
    fe1b5e87
ad1848_lib.c 37.9 KB