• Home
  • Raw
  • Download

Lines Matching refs:devc

36 	sb_devc *devc = midi_devs[dev]->devc;  in sb_midi_open()  local
39 if (devc == NULL) in sb_midi_open()
42 spin_lock_irqsave(&devc->lock, flags); in sb_midi_open()
43 if (devc->opened) in sb_midi_open()
45 spin_unlock_irqrestore(&devc->lock, flags); in sb_midi_open()
48 devc->opened = 1; in sb_midi_open()
49 spin_unlock_irqrestore(&devc->lock, flags); in sb_midi_open()
51 devc->irq_mode = IMODE_MIDI; in sb_midi_open()
52 devc->midi_broken = 0; in sb_midi_open()
54 sb_dsp_reset(devc); in sb_midi_open()
56 if (!sb_dsp_command(devc, 0x35)) /* Start MIDI UART mode */ in sb_midi_open()
58 devc->opened = 0; in sb_midi_open()
61 devc->intr_active = 1; in sb_midi_open()
65 devc->input_opened = 1; in sb_midi_open()
66 devc->midi_input_intr = input; in sb_midi_open()
73 sb_devc *devc = midi_devs[dev]->devc; in sb_midi_close() local
76 if (devc == NULL) in sb_midi_close()
79 spin_lock_irqsave(&devc->lock, flags); in sb_midi_close()
80 sb_dsp_reset(devc); in sb_midi_close()
81 devc->intr_active = 0; in sb_midi_close()
82 devc->input_opened = 0; in sb_midi_close()
83 devc->opened = 0; in sb_midi_close()
84 spin_unlock_irqrestore(&devc->lock, flags); in sb_midi_close()
89 sb_devc *devc = midi_devs[dev]->devc; in sb_midi_out() local
91 if (devc == NULL) in sb_midi_out()
94 if (devc->midi_broken) in sb_midi_out()
97 if (!sb_dsp_command(devc, midi_byte)) in sb_midi_out()
99 devc->midi_broken = 1; in sb_midi_out()
112 sb_devc *devc = midi_devs[dev]->devc; in sb_midi_end_read() local
114 if (devc == NULL) in sb_midi_end_read()
117 sb_dsp_reset(devc); in sb_midi_end_read()
118 devc->intr_active = 0; in sb_midi_end_read()
127 void sb_midi_interrupt(sb_devc * devc) in sb_midi_interrupt() argument
132 if (devc == NULL) in sb_midi_interrupt()
135 spin_lock_irqsave(&devc->lock, flags); in sb_midi_interrupt()
138 if (devc->input_opened) in sb_midi_interrupt()
139 devc->midi_input_intr(devc->my_mididev, data); in sb_midi_interrupt()
141 spin_unlock_irqrestore(&devc->lock, flags); in sb_midi_interrupt()
162 void sb_dsp_midi_init(sb_devc * devc, struct module *owner) in sb_dsp_midi_init() argument
166 if (devc->model < 2) /* No MIDI support for SB 1.x */ in sb_dsp_midi_init()
176 std_midi_synth.midi_dev = devc->my_mididev = dev; in sb_dsp_midi_init()
190 midi_devs[dev]->devc = devc; in sb_dsp_midi_init()