summaryrefslogtreecommitdiff
path: root/sound/firewire/motu/motu-pcm.c
diff options
context:
space:
mode:
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>2019-06-17 17:15:01 +0900
committerTakashi Iwai <tiwai@suse.de>2019-06-18 08:45:26 +0200
commit18f26034be2711254adfa8923dfd263b50d4018a (patch)
treee6a2e0a58d406ec4d9776aeb0ac9d9b4a21716f7 /sound/firewire/motu/motu-pcm.c
parent7bc93821a70adc621df443c8b7a4745023c36e7c (diff)
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-pcm.c')
-rw-r--r--sound/firewire/motu/motu-pcm.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sound/firewire/motu/motu-pcm.c b/sound/firewire/motu/motu-pcm.c
index ab69d7e6ac05..b0e5ebf05bec 100644
--- a/sound/firewire/motu/motu-pcm.c
+++ b/sound/firewire/motu/motu-pcm.c
@@ -203,7 +203,7 @@ static int capture_hw_params(struct snd_pcm_substream *substream,
if (substream->runtime->status->state == SNDRV_PCM_STATE_OPEN) {
mutex_lock(&motu->mutex);
- motu->capture_substreams++;
+ motu->substreams_counter++;
mutex_unlock(&motu->mutex);
}
@@ -222,7 +222,7 @@ static int playback_hw_params(struct snd_pcm_substream *substream,
if (substream->runtime->status->state == SNDRV_PCM_STATE_OPEN) {
mutex_lock(&motu->mutex);
- motu->playback_substreams++;
+ motu->substreams_counter++;
mutex_unlock(&motu->mutex);
}
@@ -236,7 +236,7 @@ static int capture_hw_free(struct snd_pcm_substream *substream)
mutex_lock(&motu->mutex);
if (substream->runtime->status->state != SNDRV_PCM_STATE_OPEN)
- motu->capture_substreams--;
+ motu->substreams_counter--;
snd_motu_stream_stop_duplex(motu);
@@ -252,7 +252,7 @@ static int playback_hw_free(struct snd_pcm_substream *substream)
mutex_lock(&motu->mutex);
if (substream->runtime->status->state != SNDRV_PCM_STATE_OPEN)
- motu->playback_substreams--;
+ motu->substreams_counter--;
snd_motu_stream_stop_duplex(motu);