Lines Matching refs:oxfw
12 struct snd_oxfw *oxfw = substream->rmidi->private_data; in midi_capture_open() local
15 err = snd_oxfw_stream_lock_try(oxfw); in midi_capture_open()
19 mutex_lock(&oxfw->mutex); in midi_capture_open()
21 err = snd_oxfw_stream_reserve_duplex(oxfw, &oxfw->tx_stream, 0, 0, 0, 0); in midi_capture_open()
23 ++oxfw->substreams_count; in midi_capture_open()
24 err = snd_oxfw_stream_start_duplex(oxfw); in midi_capture_open()
26 --oxfw->substreams_count; in midi_capture_open()
29 mutex_unlock(&oxfw->mutex); in midi_capture_open()
32 snd_oxfw_stream_lock_release(oxfw); in midi_capture_open()
39 struct snd_oxfw *oxfw = substream->rmidi->private_data; in midi_playback_open() local
42 err = snd_oxfw_stream_lock_try(oxfw); in midi_playback_open()
46 mutex_lock(&oxfw->mutex); in midi_playback_open()
48 err = snd_oxfw_stream_reserve_duplex(oxfw, &oxfw->rx_stream, 0, 0, 0, 0); in midi_playback_open()
50 ++oxfw->substreams_count; in midi_playback_open()
51 err = snd_oxfw_stream_start_duplex(oxfw); in midi_playback_open()
54 mutex_unlock(&oxfw->mutex); in midi_playback_open()
57 snd_oxfw_stream_lock_release(oxfw); in midi_playback_open()
64 struct snd_oxfw *oxfw = substream->rmidi->private_data; in midi_capture_close() local
66 mutex_lock(&oxfw->mutex); in midi_capture_close()
68 --oxfw->substreams_count; in midi_capture_close()
69 snd_oxfw_stream_stop_duplex(oxfw); in midi_capture_close()
71 mutex_unlock(&oxfw->mutex); in midi_capture_close()
73 snd_oxfw_stream_lock_release(oxfw); in midi_capture_close()
79 struct snd_oxfw *oxfw = substream->rmidi->private_data; in midi_playback_close() local
81 mutex_lock(&oxfw->mutex); in midi_playback_close()
83 --oxfw->substreams_count; in midi_playback_close()
84 snd_oxfw_stream_stop_duplex(oxfw); in midi_playback_close()
86 mutex_unlock(&oxfw->mutex); in midi_playback_close()
88 snd_oxfw_stream_lock_release(oxfw); in midi_playback_close()
94 struct snd_oxfw *oxfw = substrm->rmidi->private_data; in midi_capture_trigger() local
97 spin_lock_irqsave(&oxfw->lock, flags); in midi_capture_trigger()
100 amdtp_am824_midi_trigger(&oxfw->tx_stream, in midi_capture_trigger()
103 amdtp_am824_midi_trigger(&oxfw->tx_stream, in midi_capture_trigger()
106 spin_unlock_irqrestore(&oxfw->lock, flags); in midi_capture_trigger()
111 struct snd_oxfw *oxfw = substrm->rmidi->private_data; in midi_playback_trigger() local
114 spin_lock_irqsave(&oxfw->lock, flags); in midi_playback_trigger()
117 amdtp_am824_midi_trigger(&oxfw->rx_stream, in midi_playback_trigger()
120 amdtp_am824_midi_trigger(&oxfw->rx_stream, in midi_playback_trigger()
123 spin_unlock_irqrestore(&oxfw->lock, flags); in midi_playback_trigger()
126 static void set_midi_substream_names(struct snd_oxfw *oxfw, in set_midi_substream_names() argument
134 oxfw->card->shortname, subs->number + 1); in set_midi_substream_names()
138 int snd_oxfw_create_midi(struct snd_oxfw *oxfw) in snd_oxfw_create_midi() argument
154 if (oxfw->midi_input_ports == 0 && oxfw->midi_output_ports == 0) in snd_oxfw_create_midi()
158 err = snd_rawmidi_new(oxfw->card, oxfw->card->driver, 0, in snd_oxfw_create_midi()
159 oxfw->midi_output_ports, oxfw->midi_input_ports, in snd_oxfw_create_midi()
165 "%s MIDI", oxfw->card->shortname); in snd_oxfw_create_midi()
166 rmidi->private_data = oxfw; in snd_oxfw_create_midi()
168 if (oxfw->midi_input_ports > 0) { in snd_oxfw_create_midi()
176 set_midi_substream_names(oxfw, str); in snd_oxfw_create_midi()
179 if (oxfw->midi_output_ports > 0) { in snd_oxfw_create_midi()
187 set_midi_substream_names(oxfw, str); in snd_oxfw_create_midi()
190 if ((oxfw->midi_output_ports > 0) && (oxfw->midi_input_ports > 0)) in snd_oxfw_create_midi()