diff options
author | Takashi Sakamoto <o-takashi@sakamocchi.jp> | 2019-06-17 11:15:01 +0300 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2019-06-18 09:45:26 +0300 |
commit | 18f26034be2711254adfa8923dfd263b50d4018a (patch) | |
tree | e6a2e0a58d406ec4d9776aeb0ac9d9b4a21716f7 /sound/firewire/motu/motu-midi.c | |
parent | 7bc93821a70adc621df443c8b7a4745023c36e7c (diff) | |
download | linux-18f26034be2711254adfa8923dfd263b50d4018a.tar.xz |
ALSA: firewire-motu: unify the count of subscriber for packet streaming
Two counters are used to maintain isochronous packet streaming for both
directions. However, like the other drivers, they can be replaced with
one counter. This commit unifies them.
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/firewire/motu/motu-midi.c')
-rw-r--r-- | sound/firewire/motu/motu-midi.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sound/firewire/motu/motu-midi.c b/sound/firewire/motu/motu-midi.c index e55cab6d79c7..b2d339a8ef3f 100644 --- a/sound/firewire/motu/motu-midi.c +++ b/sound/firewire/motu/motu-midi.c @@ -18,7 +18,7 @@ static int midi_capture_open(struct snd_rawmidi_substream *substream) mutex_lock(&motu->mutex); - motu->capture_substreams++; + motu->substreams_counter++; err = snd_motu_stream_start_duplex(motu, 0); mutex_unlock(&motu->mutex); @@ -40,7 +40,7 @@ static int midi_playback_open(struct snd_rawmidi_substream *substream) mutex_lock(&motu->mutex); - motu->playback_substreams++; + motu->substreams_counter++; err = snd_motu_stream_start_duplex(motu, 0); mutex_unlock(&motu->mutex); @@ -57,7 +57,7 @@ static int midi_capture_close(struct snd_rawmidi_substream *substream) mutex_lock(&motu->mutex); - motu->capture_substreams--; + motu->substreams_counter--; snd_motu_stream_stop_duplex(motu); mutex_unlock(&motu->mutex); @@ -72,7 +72,7 @@ static int midi_playback_close(struct snd_rawmidi_substream *substream) mutex_lock(&motu->mutex); - motu->playback_substreams--; + motu->substreams_counter--; snd_motu_stream_stop_duplex(motu); mutex_unlock(&motu->mutex); |