summaryrefslogtreecommitdiffstats
path: root/sound/firewire/dice.c
diff options
context:
space:
mode:
authorClemens Ladisch <clemens@ladisch.de>2011-09-04 22:17:45 +0200
committerClemens Ladisch <clemens@ladisch.de>2013-10-20 22:07:57 +0200
commiteadce07faa8e71d8a0fc7501a5167fb999200225 (patch)
tree85c4eec811cd5e772def1d744ca6d41f134d101c /sound/firewire/dice.c
parent1b70485f135a39d5f2d8c392a16817456fa3a5cd (diff)
downloadblackbird-op-linux-eadce07faa8e71d8a0fc7501a5167fb999200225.tar.gz
blackbird-op-linux-eadce07faa8e71d8a0fc7501a5167fb999200225.zip
ALSA: dice: avoid superflous write at bus reset
When a bus reset happens, the enable register is automatically cleared, so we do not need to clear it manually when stopping the stream. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Diffstat (limited to 'sound/firewire/dice.c')
-rw-r--r--sound/firewire/dice.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sound/firewire/dice.c b/sound/firewire/dice.c
index 59d5ca4438b2..cfa98a83acb2 100644
--- a/sound/firewire/dice.c
+++ b/sound/firewire/dice.c
@@ -246,6 +246,9 @@ static void dice_enable_clear(struct dice *dice)
{
__be32 value;
+ if (!dice->global_enabled)
+ return;
+
value = 0;
snd_fw_transaction(dice->unit, TCODE_WRITE_QUADLET_REQUEST,
global_address(dice, GLOBAL_ENABLE),
@@ -1009,6 +1012,8 @@ static void dice_bus_reset(struct fw_unit *unit)
* manner.
*/
amdtp_out_stream_pcm_abort(&dice->stream);
+
+ dice->global_enabled = false;
dice_stream_stop_packets(dice);
dice_owner_update(dice);
OpenPOWER on IntegriCloud