Lines Matching refs:bebob

12 	struct snd_bebob *bebob = substream->rmidi->private_data;  in midi_open()  local
15 err = snd_bebob_stream_lock_try(bebob); in midi_open()
19 mutex_lock(&bebob->mutex); in midi_open()
20 err = snd_bebob_stream_reserve_duplex(bebob, 0, 0, 0); in midi_open()
22 ++bebob->substreams_counter; in midi_open()
23 err = snd_bebob_stream_start_duplex(bebob); in midi_open()
25 --bebob->substreams_counter; in midi_open()
27 mutex_unlock(&bebob->mutex); in midi_open()
29 snd_bebob_stream_lock_release(bebob); in midi_open()
36 struct snd_bebob *bebob = substream->rmidi->private_data; in midi_close() local
38 mutex_lock(&bebob->mutex); in midi_close()
39 bebob->substreams_counter--; in midi_close()
40 snd_bebob_stream_stop_duplex(bebob); in midi_close()
41 mutex_unlock(&bebob->mutex); in midi_close()
43 snd_bebob_stream_lock_release(bebob); in midi_close()
49 struct snd_bebob *bebob = substrm->rmidi->private_data; in midi_capture_trigger() local
52 spin_lock_irqsave(&bebob->lock, flags); in midi_capture_trigger()
55 amdtp_am824_midi_trigger(&bebob->tx_stream, in midi_capture_trigger()
58 amdtp_am824_midi_trigger(&bebob->tx_stream, in midi_capture_trigger()
61 spin_unlock_irqrestore(&bebob->lock, flags); in midi_capture_trigger()
66 struct snd_bebob *bebob = substrm->rmidi->private_data; in midi_playback_trigger() local
69 spin_lock_irqsave(&bebob->lock, flags); in midi_playback_trigger()
72 amdtp_am824_midi_trigger(&bebob->rx_stream, in midi_playback_trigger()
75 amdtp_am824_midi_trigger(&bebob->rx_stream, in midi_playback_trigger()
78 spin_unlock_irqrestore(&bebob->lock, flags); in midi_playback_trigger()
81 static void set_midi_substream_names(struct snd_bebob *bebob, in set_midi_substream_names() argument
89 bebob->card->shortname, subs->number + 1); in set_midi_substream_names()
93 int snd_bebob_create_midi_devices(struct snd_bebob *bebob) in snd_bebob_create_midi_devices() argument
110 err = snd_rawmidi_new(bebob->card, bebob->card->driver, 0, in snd_bebob_create_midi_devices()
111 bebob->midi_output_ports, bebob->midi_input_ports, in snd_bebob_create_midi_devices()
117 "%s MIDI", bebob->card->shortname); in snd_bebob_create_midi_devices()
118 rmidi->private_data = bebob; in snd_bebob_create_midi_devices()
120 if (bebob->midi_input_ports > 0) { in snd_bebob_create_midi_devices()
128 set_midi_substream_names(bebob, str); in snd_bebob_create_midi_devices()
131 if (bebob->midi_output_ports > 0) { in snd_bebob_create_midi_devices()
139 set_midi_substream_names(bebob, str); in snd_bebob_create_midi_devices()
142 if ((bebob->midi_output_ports > 0) && (bebob->midi_input_ports > 0)) in snd_bebob_create_midi_devices()