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-pcm.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-pcm.c')
-rw-r--r-- | sound/firewire/motu/motu-pcm.c | 8 |
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); |