Lines Matching refs:efw
12 struct snd_efw *efw = substream->rmidi->private_data; in midi_open() local
15 err = snd_efw_stream_lock_try(efw); in midi_open()
19 mutex_lock(&efw->mutex); in midi_open()
20 err = snd_efw_stream_reserve_duplex(efw, 0, 0, 0); in midi_open()
22 ++efw->substreams_counter; in midi_open()
23 err = snd_efw_stream_start_duplex(efw); in midi_open()
25 --efw->substreams_counter; in midi_open()
27 mutex_unlock(&efw->mutex); in midi_open()
29 snd_efw_stream_lock_release(efw); in midi_open()
36 struct snd_efw *efw = substream->rmidi->private_data; in midi_close() local
38 mutex_lock(&efw->mutex); in midi_close()
39 --efw->substreams_counter; in midi_close()
40 snd_efw_stream_stop_duplex(efw); in midi_close()
41 mutex_unlock(&efw->mutex); in midi_close()
43 snd_efw_stream_lock_release(efw); in midi_close()
49 struct snd_efw *efw = substrm->rmidi->private_data; in midi_capture_trigger() local
52 spin_lock_irqsave(&efw->lock, flags); in midi_capture_trigger()
55 amdtp_am824_midi_trigger(&efw->tx_stream, in midi_capture_trigger()
58 amdtp_am824_midi_trigger(&efw->tx_stream, in midi_capture_trigger()
61 spin_unlock_irqrestore(&efw->lock, flags); in midi_capture_trigger()
66 struct snd_efw *efw = substrm->rmidi->private_data; in midi_playback_trigger() local
69 spin_lock_irqsave(&efw->lock, flags); in midi_playback_trigger()
72 amdtp_am824_midi_trigger(&efw->rx_stream, in midi_playback_trigger()
75 amdtp_am824_midi_trigger(&efw->rx_stream, in midi_playback_trigger()
78 spin_unlock_irqrestore(&efw->lock, flags); in midi_playback_trigger()
81 static void set_midi_substream_names(struct snd_efw *efw, in set_midi_substream_names() argument
88 "%s MIDI %d", efw->card->shortname, subs->number + 1); in set_midi_substream_names()
92 int snd_efw_create_midi_devices(struct snd_efw *efw) in snd_efw_create_midi_devices() argument
109 err = snd_rawmidi_new(efw->card, efw->card->driver, 0, in snd_efw_create_midi_devices()
110 efw->midi_out_ports, efw->midi_in_ports, in snd_efw_create_midi_devices()
116 "%s MIDI", efw->card->shortname); in snd_efw_create_midi_devices()
117 rmidi->private_data = efw; in snd_efw_create_midi_devices()
119 if (efw->midi_in_ports > 0) { in snd_efw_create_midi_devices()
127 set_midi_substream_names(efw, str); in snd_efw_create_midi_devices()
130 if (efw->midi_out_ports > 0) { in snd_efw_create_midi_devices()
138 set_midi_substream_names(efw, str); in snd_efw_create_midi_devices()
141 if ((efw->midi_out_ports > 0) && (efw->midi_in_ports > 0)) in snd_efw_create_midi_devices()