struct amdtp_stream rx_stream;
struct cmp_connection out_conn;
struct cmp_connection in_conn;
- atomic_t substreams_counter;
+ unsigned int substreams_counter;
struct snd_bebob_stream_formation
tx_stream_formations[SND_BEBOB_STRM_FMT_ENTRIES];
goto end;
mutex_lock(&bebob->mutex);
- atomic_inc(&bebob->substreams_counter);
+ bebob->substreams_counter++;
err = snd_bebob_stream_start_duplex(bebob, 0);
mutex_unlock(&bebob->mutex);
if (err < 0)
goto end;
mutex_lock(&bebob->mutex);
- atomic_inc(&bebob->substreams_counter);
+ bebob->substreams_counter++;
err = snd_bebob_stream_start_duplex(bebob, 0);
mutex_unlock(&bebob->mutex);
if (err < 0)
struct snd_bebob *bebob = substream->rmidi->private_data;
mutex_lock(&bebob->mutex);
- atomic_dec(&bebob->substreams_counter);
+ bebob->substreams_counter--;
snd_bebob_stream_stop_duplex(bebob);
mutex_unlock(&bebob->mutex);
struct snd_bebob *bebob = substream->rmidi->private_data;
mutex_lock(&bebob->mutex);
- atomic_dec(&bebob->substreams_counter);
+ bebob->substreams_counter--;
snd_bebob_stream_stop_duplex(bebob);
mutex_unlock(&bebob->mutex);
if (substream->runtime->status->state == SNDRV_PCM_STATE_OPEN) {
mutex_lock(&bebob->mutex);
- atomic_inc(&bebob->substreams_counter);
+ bebob->substreams_counter++;
mutex_unlock(&bebob->mutex);
}
if (substream->runtime->status->state == SNDRV_PCM_STATE_OPEN) {
mutex_lock(&bebob->mutex);
- atomic_inc(&bebob->substreams_counter);
+ bebob->substreams_counter++;
mutex_unlock(&bebob->mutex);
}
if (substream->runtime->status->state != SNDRV_PCM_STATE_OPEN) {
mutex_lock(&bebob->mutex);
- atomic_dec(&bebob->substreams_counter);
+ bebob->substreams_counter--;
mutex_unlock(&bebob->mutex);
}
if (substream->runtime->status->state != SNDRV_PCM_STATE_OPEN) {
mutex_lock(&bebob->mutex);
- atomic_dec(&bebob->substreams_counter);
+ bebob->substreams_counter--;
mutex_unlock(&bebob->mutex);
}
int err = 0;
/* Need no substreams */
- if (atomic_read(&bebob->substreams_counter) == 0)
+ if (bebob->substreams_counter == 0)
goto end;
err = get_sync_mode(bebob, &sync_mode);
master = &bebob->tx_stream;
}
- if (atomic_read(&bebob->substreams_counter) == 0) {
+ if (bebob->substreams_counter == 0) {
amdtp_stream_pcm_abort(master);
amdtp_stream_stop(master);