mutex_lock(&oxfw->mutex);
- oxfw->capture_substreams++;
+ ++oxfw->substreams_count;
err = snd_oxfw_stream_start_duplex(oxfw, &oxfw->tx_stream, 0, 0);
mutex_unlock(&oxfw->mutex);
mutex_lock(&oxfw->mutex);
- oxfw->playback_substreams++;
+ ++oxfw->substreams_count;
err = snd_oxfw_stream_start_duplex(oxfw, &oxfw->rx_stream, 0, 0);
mutex_unlock(&oxfw->mutex);
mutex_lock(&oxfw->mutex);
- oxfw->capture_substreams--;
+ --oxfw->substreams_count;
snd_oxfw_stream_stop_duplex(oxfw);
mutex_unlock(&oxfw->mutex);
mutex_lock(&oxfw->mutex);
- oxfw->playback_substreams--;
+ --oxfw->substreams_count;
snd_oxfw_stream_stop_duplex(oxfw);
mutex_unlock(&oxfw->mutex);
if (substream->runtime->status->state == SNDRV_PCM_STATE_OPEN) {
mutex_lock(&oxfw->mutex);
- oxfw->capture_substreams++;
+ ++oxfw->substreams_count;
mutex_unlock(&oxfw->mutex);
}
if (substream->runtime->status->state == SNDRV_PCM_STATE_OPEN) {
mutex_lock(&oxfw->mutex);
- oxfw->playback_substreams++;
+ ++oxfw->substreams_count;
mutex_unlock(&oxfw->mutex);
}
mutex_lock(&oxfw->mutex);
if (substream->runtime->status->state != SNDRV_PCM_STATE_OPEN)
- oxfw->capture_substreams--;
+ --oxfw->substreams_count;
snd_oxfw_stream_stop_duplex(oxfw);
mutex_lock(&oxfw->mutex);
if (substream->runtime->status->state != SNDRV_PCM_STATE_OPEN)
- oxfw->playback_substreams--;
+ --oxfw->substreams_count;
snd_oxfw_stream_stop_duplex(oxfw);
enum avc_general_plug_dir dir;
int err = 0;
- if (oxfw->capture_substreams == 0 && oxfw->playback_substreams == 0)
+ if (oxfw->substreams_count == 0)
return -EIO;
// Considering JACK/FFADO streaming:
void snd_oxfw_stream_stop_duplex(struct snd_oxfw *oxfw)
{
- if (oxfw->capture_substreams == 0 && oxfw->playback_substreams == 0) {
+ if (oxfw->substreams_count == 0) {
amdtp_stream_stop(&oxfw->rx_stream);
cmp_connection_break(&oxfw->in_conn);
struct cmp_connection in_conn;
struct amdtp_stream tx_stream;
struct amdtp_stream rx_stream;
- unsigned int capture_substreams;
- unsigned int playback_substreams;
+ unsigned int substreams_count;
unsigned int midi_input_ports;
unsigned int midi_output_ports;