Skip to content

Commit

Permalink
ALSA: dice: avoid superflous write at bus reset
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Clemens Ladisch committed Oct 20, 2013
1 parent 1b70485 commit eadce07
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions sound/firewire/dice.c
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit eadce07

Please sign in to comment.