diff options
author | Takashi Sakamoto <o-takashi@sakamocchi.jp> | 2019-06-12 17:44:19 +0900 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2019-06-12 15:26:57 +0200 |
commit | 779f0dba0b99f32276315ba40e812648b6ceed34 (patch) | |
tree | f52e43d94fc1105d9704b14bcf810dfdbed5302a /sound/firewire/oxfw/oxfw.c | |
parent | e34244dd2266773f699977c831b60a44fc3a164b (diff) | |
download | blackbird-op-linux-779f0dba0b99f32276315ba40e812648b6ceed34.tar.gz blackbird-op-linux-779f0dba0b99f32276315ba40e812648b6ceed34.zip |
ALSA: oxfw: rename helper functions for duplex streams
In former commits, ALSA oxfw driver handles two isochronous contexts
at the same time, except for some devices which supports one endpoint
of isochronous packet stream.
This commit renames some helper functions so that they handles duplex
streams.
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/firewire/oxfw/oxfw.c')
-rw-r--r-- | sound/firewire/oxfw/oxfw.c | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/sound/firewire/oxfw/oxfw.c b/sound/firewire/oxfw/oxfw.c index 3d27f3378d5d..2de26a9987f8 100644 --- a/sound/firewire/oxfw/oxfw.c +++ b/sound/firewire/oxfw/oxfw.c @@ -118,9 +118,7 @@ static void oxfw_card_free(struct snd_card *card) { struct snd_oxfw *oxfw = card->private_data; - snd_oxfw_stream_destroy_simplex(oxfw, &oxfw->rx_stream); - if (oxfw->has_output) - snd_oxfw_stream_destroy_simplex(oxfw, &oxfw->tx_stream); + snd_oxfw_stream_destroy_duplex(oxfw); } static int detect_quirks(struct snd_oxfw *oxfw) @@ -211,14 +209,9 @@ static void do_registration(struct work_struct *work) if (err < 0) goto error; - err = snd_oxfw_stream_init_simplex(oxfw, &oxfw->rx_stream); + err = snd_oxfw_stream_init_duplex(oxfw); if (err < 0) goto error; - if (oxfw->has_output) { - err = snd_oxfw_stream_init_simplex(oxfw, &oxfw->tx_stream); - if (err < 0) - goto error; - } err = snd_oxfw_create_pcm(oxfw); if (err < 0) @@ -285,11 +278,7 @@ static void oxfw_bus_reset(struct fw_unit *unit) if (oxfw->registered) { mutex_lock(&oxfw->mutex); - - snd_oxfw_stream_update_simplex(oxfw, &oxfw->rx_stream); - if (oxfw->has_output) - snd_oxfw_stream_update_simplex(oxfw, &oxfw->tx_stream); - + snd_oxfw_stream_update_duplex(oxfw); mutex_unlock(&oxfw->mutex); if (oxfw->entry->vendor_id == OUI_STANTON) |