staging: bcm2835-audio: Fix incorrect draining handling
authorTakashi Iwai <tiwai@suse.de>
Tue, 4 Sep 2018 15:58:38 +0000 (17:58 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 10 Sep 2018 09:14:58 +0000 (11:14 +0200)
commitbf1ad3e007e26df838e839bba97c3396ee91f51d
tree2067ff1db78685c1249533a14475821e86b7520d
parentc5e7824b578639b244bdb3f96f4d3fcbfb2300ca
staging: bcm2835-audio: Fix incorrect draining handling

The handling of SNDRV_PCM_TRIGGER_STOP at the trigger callback is
incorrect: when the STOP is issued, the driver is supposed to drop the
stream immediately.  Meanwhile bcm2835 driver checks the DRAINING
state and tries to issue some different command.

This patch straightens things a bit, dropping the incorrect state
checks.  The draining behavior would be still not perfect at this
point, but will be improved in a later patch.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Tested-by: Stefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c