diff options
author | Takashi Sakamoto <o-takashi@sakamocchi.jp> | 2019-06-12 17:44:08 +0900 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2019-06-12 15:26:49 +0200 |
commit | 1dc5921082d48dc53e48e88ae2f9a24b9737307d (patch) | |
tree | f486dc00ac94d3ad18d83d53f232922876c0fd45 /sound/firewire/fireworks/fireworks_pcm.c | |
parent | 33e41a5ce59ad34c822228d3811ba3785f1a97a2 (diff) |
ALSA: fireworks: unify substream counter
This commit is a part of preparation to perform allocation/release
of isochronous resources in pcm.hw_params/hw_free callbacks.
It's inconvenient to handle two isochronous context separately
each other. This commit unifies the counters to handle the two
at the same time.
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/firewire/fireworks/fireworks_pcm.c')
-rw-r--r-- | sound/firewire/fireworks/fireworks_pcm.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sound/firewire/fireworks/fireworks_pcm.c b/sound/firewire/fireworks/fireworks_pcm.c index aed566d82726..a66f6a381dac 100644 --- a/sound/firewire/fireworks/fireworks_pcm.c +++ b/sound/firewire/fireworks/fireworks_pcm.c @@ -232,7 +232,7 @@ static int pcm_capture_hw_params(struct snd_pcm_substream *substream, if (substream->runtime->status->state == SNDRV_PCM_STATE_OPEN) { mutex_lock(&efw->mutex); - efw->capture_substreams++; + ++efw->substreams_counter; mutex_unlock(&efw->mutex); } @@ -251,7 +251,7 @@ static int pcm_playback_hw_params(struct snd_pcm_substream *substream, if (substream->runtime->status->state == SNDRV_PCM_STATE_OPEN) { mutex_lock(&efw->mutex); - efw->playback_substreams++; + ++efw->substreams_counter; mutex_unlock(&efw->mutex); } @@ -264,7 +264,7 @@ static int pcm_capture_hw_free(struct snd_pcm_substream *substream) if (substream->runtime->status->state != SNDRV_PCM_STATE_OPEN) { mutex_lock(&efw->mutex); - efw->capture_substreams--; + --efw->substreams_counter; mutex_unlock(&efw->mutex); } @@ -278,7 +278,7 @@ static int pcm_playback_hw_free(struct snd_pcm_substream *substream) if (substream->runtime->status->state != SNDRV_PCM_STATE_OPEN) { mutex_lock(&efw->mutex); - efw->playback_substreams--; + --efw->substreams_counter; mutex_unlock(&efw->mutex); } |