Lines Matching defs:oxfw

8 #include "oxfw.h"
12 struct snd_oxfw *oxfw = substream->rmidi->private_data;
15 err = snd_oxfw_stream_lock_try(oxfw);
19 scoped_guard(mutex, &oxfw->mutex) {
20 err = snd_oxfw_stream_reserve_duplex(oxfw, &oxfw->tx_stream, 0, 0, 0, 0);
22 ++oxfw->substreams_count;
23 err = snd_oxfw_stream_start_duplex(oxfw);
25 --oxfw->substreams_count;
30 snd_oxfw_stream_lock_release(oxfw);
37 struct snd_oxfw *oxfw = substream->rmidi->private_data;
40 err = snd_oxfw_stream_lock_try(oxfw);
44 scoped_guard(mutex, &oxfw->mutex) {
45 err = snd_oxfw_stream_reserve_duplex(oxfw, &oxfw->rx_stream, 0, 0, 0, 0);
47 ++oxfw->substreams_count;
48 err = snd_oxfw_stream_start_duplex(oxfw);
53 snd_oxfw_stream_lock_release(oxfw);
60 struct snd_oxfw *oxfw = substream->rmidi->private_data;
62 scoped_guard(mutex, &oxfw->mutex) {
63 --oxfw->substreams_count;
64 snd_oxfw_stream_stop_duplex(oxfw);
67 snd_oxfw_stream_lock_release(oxfw);
73 struct snd_oxfw *oxfw = substream->rmidi->private_data;
75 scoped_guard(mutex, &oxfw->mutex) {
76 --oxfw->substreams_count;
77 snd_oxfw_stream_stop_duplex(oxfw);
80 snd_oxfw_stream_lock_release(oxfw);
86 struct snd_oxfw *oxfw = substrm->rmidi->private_data;
88 guard(spinlock_irqsave)(&oxfw->lock);
91 amdtp_am824_midi_trigger(&oxfw->tx_stream,
94 amdtp_am824_midi_trigger(&oxfw->tx_stream,
100 struct snd_oxfw *oxfw = substrm->rmidi->private_data;
102 guard(spinlock_irqsave)(&oxfw->lock);
105 amdtp_am824_midi_trigger(&oxfw->rx_stream,
108 amdtp_am824_midi_trigger(&oxfw->rx_stream,
112 static void set_midi_substream_names(struct snd_oxfw *oxfw,
120 oxfw->card->shortname, subs->number + 1);
124 int snd_oxfw_create_midi(struct snd_oxfw *oxfw)
140 if (oxfw->midi_input_ports == 0 && oxfw->midi_output_ports == 0)
144 err = snd_rawmidi_new(oxfw->card, oxfw->card->driver, 0,
145 oxfw->midi_output_ports, oxfw->midi_input_ports,
151 "%s MIDI", oxfw->card->shortname);
152 rmidi->private_data = oxfw;
154 if (oxfw->midi_input_ports > 0) {
162 set_midi_substream_names(oxfw, str);
165 if (oxfw->midi_output_ports > 0) {
173 set_midi_substream_names(oxfw, str);
176 if ((oxfw->midi_output_ports > 0) && (oxfw->midi_input_ports > 0))