midi 1531 drivers/spi/spi-stm32.c u32 midi = min((u32)DIV_ROUND_UP(spi->cur_midi, sck_period_ns), midi 1536 drivers/spi/spi-stm32.c sck_period_ns, midi, midi * sck_period_ns); midi 1537 drivers/spi/spi-stm32.c cfg2_setb |= (midi << STM32H7_SPI_CFG2_MIDI_SHIFT) & midi 110 drivers/usb/gadget/function/f_midi.c static void f_midi_transmit(struct f_midi *midi); midi 243 drivers/usb/gadget/function/f_midi.c struct f_midi *midi = ep->driver_data; midi 244 drivers/usb/gadget/function/f_midi.c struct snd_rawmidi_substream *substream = midi->out_substream[cable]; midi 250 drivers/usb/gadget/function/f_midi.c if (!test_bit(cable, &midi->out_triggered)) midi 272 drivers/usb/gadget/function/f_midi.c struct f_midi *midi = ep->driver_data; midi 273 drivers/usb/gadget/function/f_midi.c struct usb_composite_dev *cdev = midi->func.config->cdev; midi 278 drivers/usb/gadget/function/f_midi.c if (ep == midi->out_ep) { midi 281 drivers/usb/gadget/function/f_midi.c } else if (ep == midi->in_ep) { midi 285 drivers/usb/gadget/function/f_midi.c f_midi_transmit(midi); midi 296 drivers/usb/gadget/function/f_midi.c if (ep == midi->out_ep) { midi 324 drivers/usb/gadget/function/f_midi.c static void f_midi_drop_out_substreams(struct f_midi *midi) midi 328 drivers/usb/gadget/function/f_midi.c for (i = 0; i < midi->in_ports; i++) { midi 329 drivers/usb/gadget/function/f_midi.c struct gmidi_in_port *port = midi->in_ports_array + i; midi 337 drivers/usb/gadget/function/f_midi.c static int f_midi_start_ep(struct f_midi *midi, midi 346 drivers/usb/gadget/function/f_midi.c err = config_ep_by_speed(midi->gadget, f, ep); midi 358 drivers/usb/gadget/function/f_midi.c ep->driver_data = midi; midi 365 drivers/usb/gadget/function/f_midi.c struct f_midi *midi = func_to_midi(f); midi 370 drivers/usb/gadget/function/f_midi.c if (intf != midi->ms_id) midi 373 drivers/usb/gadget/function/f_midi.c err = f_midi_start_ep(midi, f, midi->in_ep); midi 377 drivers/usb/gadget/function/f_midi.c err = f_midi_start_ep(midi, f, midi->out_ep); midi 382 drivers/usb/gadget/function/f_midi.c while (kfifo_avail(&midi->in_req_fifo)) { midi 384 drivers/usb/gadget/function/f_midi.c midi_alloc_ep_req(midi->in_ep, midi->buflen); midi 392 drivers/usb/gadget/function/f_midi.c kfifo_put(&midi->in_req_fifo, req); midi 396 drivers/usb/gadget/function/f_midi.c for (i = 0; i < midi->qlen && err == 0; i++) { midi 398 drivers/usb/gadget/function/f_midi.c midi_alloc_ep_req(midi->out_ep, midi->buflen); midi 404 drivers/usb/gadget/function/f_midi.c err = usb_ep_queue(midi->out_ep, req, GFP_ATOMIC); midi 406 drivers/usb/gadget/function/f_midi.c ERROR(midi, "%s: couldn't enqueue request: %d\n", midi 407 drivers/usb/gadget/function/f_midi.c midi->out_ep->name, err); midi 409 drivers/usb/gadget/function/f_midi.c free_ep_req(midi->out_ep, req); midi 419 drivers/usb/gadget/function/f_midi.c struct f_midi *midi = func_to_midi(f); midi 429 drivers/usb/gadget/function/f_midi.c usb_ep_disable(midi->in_ep); midi 430 drivers/usb/gadget/function/f_midi.c usb_ep_disable(midi->out_ep); midi 433 drivers/usb/gadget/function/f_midi.c while (kfifo_get(&midi->in_req_fifo, &req)) midi 434 drivers/usb/gadget/function/f_midi.c free_ep_req(midi->in_ep, req); midi 436 drivers/usb/gadget/function/f_midi.c f_midi_drop_out_substreams(midi); midi 606 drivers/usb/gadget/function/f_midi.c static int f_midi_do_transmit(struct f_midi *midi, struct usb_ep *ep) midi 617 drivers/usb/gadget/function/f_midi.c len = kfifo_peek(&midi->in_req_fifo, &req); midi 619 drivers/usb/gadget/function/f_midi.c ERROR(midi, "%s: Couldn't get usb request\n", __func__); midi 632 drivers/usb/gadget/function/f_midi.c for (i = midi->in_last_port; i < midi->in_ports; ++i) { midi 633 drivers/usb/gadget/function/f_midi.c struct gmidi_in_port *port = midi->in_ports_array + i; midi 639 drivers/usb/gadget/function/f_midi.c while (req->length + 3 < midi->buflen) { midi 653 drivers/usb/gadget/function/f_midi.c midi->in_last_port = active ? i : 0; midi 660 drivers/usb/gadget/function/f_midi.c ERROR(midi, "%s failed to queue req: %d\n", midi 661 drivers/usb/gadget/function/f_midi.c midi->in_ep->name, err); midi 665 drivers/usb/gadget/function/f_midi.c kfifo_skip(&midi->in_req_fifo); midi 666 drivers/usb/gadget/function/f_midi.c kfifo_put(&midi->in_req_fifo, req); midi 673 drivers/usb/gadget/function/f_midi.c static void f_midi_transmit(struct f_midi *midi) midi 675 drivers/usb/gadget/function/f_midi.c struct usb_ep *ep = midi->in_ep; midi 683 drivers/usb/gadget/function/f_midi.c spin_lock_irqsave(&midi->transmit_lock, flags); midi 686 drivers/usb/gadget/function/f_midi.c ret = f_midi_do_transmit(midi, ep); midi 688 drivers/usb/gadget/function/f_midi.c spin_unlock_irqrestore(&midi->transmit_lock, flags); midi 693 drivers/usb/gadget/function/f_midi.c spin_unlock_irqrestore(&midi->transmit_lock, flags); midi 698 drivers/usb/gadget/function/f_midi.c f_midi_drop_out_substreams(midi); midi 703 drivers/usb/gadget/function/f_midi.c struct f_midi *midi = (struct f_midi *) data; midi 704 drivers/usb/gadget/function/f_midi.c f_midi_transmit(midi); midi 709 drivers/usb/gadget/function/f_midi.c struct f_midi *midi = substream->rmidi->private_data; midi 712 drivers/usb/gadget/function/f_midi.c if (substream->number >= midi->in_ports) midi 715 drivers/usb/gadget/function/f_midi.c VDBG(midi, "%s()\n", __func__); midi 716 drivers/usb/gadget/function/f_midi.c port = midi->in_ports_array + substream->number; midi 724 drivers/usb/gadget/function/f_midi.c struct f_midi *midi = substream->rmidi->private_data; midi 726 drivers/usb/gadget/function/f_midi.c VDBG(midi, "%s()\n", __func__); midi 732 drivers/usb/gadget/function/f_midi.c struct f_midi *midi = substream->rmidi->private_data; midi 734 drivers/usb/gadget/function/f_midi.c if (substream->number >= midi->in_ports) midi 737 drivers/usb/gadget/function/f_midi.c VDBG(midi, "%s() %d\n", __func__, up); midi 738 drivers/usb/gadget/function/f_midi.c midi->in_ports_array[substream->number].active = up; midi 740 drivers/usb/gadget/function/f_midi.c tasklet_hi_schedule(&midi->tasklet); midi 745 drivers/usb/gadget/function/f_midi.c struct f_midi *midi = substream->rmidi->private_data; midi 750 drivers/usb/gadget/function/f_midi.c VDBG(midi, "%s()\n", __func__); midi 751 drivers/usb/gadget/function/f_midi.c midi->out_substream[substream->number] = substream; midi 757 drivers/usb/gadget/function/f_midi.c struct f_midi *midi = substream->rmidi->private_data; midi 759 drivers/usb/gadget/function/f_midi.c VDBG(midi, "%s()\n", __func__); midi 765 drivers/usb/gadget/function/f_midi.c struct f_midi *midi = substream->rmidi->private_data; midi 767 drivers/usb/gadget/function/f_midi.c VDBG(midi, "%s()\n", __func__); midi 770 drivers/usb/gadget/function/f_midi.c set_bit(substream->number, &midi->out_triggered); midi 772 drivers/usb/gadget/function/f_midi.c clear_bit(substream->number, &midi->out_triggered); midi 787 drivers/usb/gadget/function/f_midi.c static inline void f_midi_unregister_card(struct f_midi *midi) midi 789 drivers/usb/gadget/function/f_midi.c if (midi->card) { midi 790 drivers/usb/gadget/function/f_midi.c snd_card_free(midi->card); midi 791 drivers/usb/gadget/function/f_midi.c midi->card = NULL; midi 796 drivers/usb/gadget/function/f_midi.c static int f_midi_register_card(struct f_midi *midi) midi 805 drivers/usb/gadget/function/f_midi.c err = snd_card_new(&midi->gadget->dev, midi->index, midi->id, midi 808 drivers/usb/gadget/function/f_midi.c ERROR(midi, "snd_card_new() failed\n"); midi 811 drivers/usb/gadget/function/f_midi.c midi->card = card; midi 813 drivers/usb/gadget/function/f_midi.c err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, midi, &ops); midi 815 drivers/usb/gadget/function/f_midi.c ERROR(midi, "snd_device_new() failed: error %d\n", err); midi 826 drivers/usb/gadget/function/f_midi.c midi->out_ports, midi->in_ports, &rmidi); midi 828 drivers/usb/gadget/function/f_midi.c ERROR(midi, "snd_rawmidi_new() failed: error %d\n", err); midi 831 drivers/usb/gadget/function/f_midi.c midi->rmidi = rmidi; midi 832 drivers/usb/gadget/function/f_midi.c midi->in_last_port = 0; midi 837 drivers/usb/gadget/function/f_midi.c rmidi->private_data = midi; midi 839 drivers/usb/gadget/function/f_midi.c midi->free_ref++; midi 851 drivers/usb/gadget/function/f_midi.c ERROR(midi, "snd_card_register() failed\n"); midi 855 drivers/usb/gadget/function/f_midi.c VDBG(midi, "%s() finished ok\n", __func__); midi 859 drivers/usb/gadget/function/f_midi.c f_midi_unregister_card(midi); midi 873 drivers/usb/gadget/function/f_midi.c struct f_midi *midi = func_to_midi(f); midi 877 drivers/usb/gadget/function/f_midi.c midi->gadget = cdev->gadget; midi 878 drivers/usb/gadget/function/f_midi.c tasklet_init(&midi->tasklet, f_midi_in_tasklet, (unsigned long) midi); midi 879 drivers/usb/gadget/function/f_midi.c status = f_midi_register_card(midi); midi 903 drivers/usb/gadget/function/f_midi.c midi->ms_id = status; midi 908 drivers/usb/gadget/function/f_midi.c midi->in_ep = usb_ep_autoconfig(cdev->gadget, &bulk_in_desc); midi 909 drivers/usb/gadget/function/f_midi.c if (!midi->in_ep) midi 912 drivers/usb/gadget/function/f_midi.c midi->out_ep = usb_ep_autoconfig(cdev->gadget, &bulk_out_desc); midi 913 drivers/usb/gadget/function/f_midi.c if (!midi->out_ep) midi 937 drivers/usb/gadget/function/f_midi.c + (midi->in_ports + midi->out_ports) * midi 944 drivers/usb/gadget/function/f_midi.c for (n = 0; n < midi->in_ports; n++) { midi 972 drivers/usb/gadget/function/f_midi.c for (n = 0; n < midi->out_ports; n++) { midi 1000 drivers/usb/gadget/function/f_midi.c ms_out_desc.bLength = USB_DT_MS_ENDPOINT_SIZE(midi->in_ports); midi 1001 drivers/usb/gadget/function/f_midi.c ms_out_desc.bNumEmbMIDIJack = midi->in_ports; midi 1003 drivers/usb/gadget/function/f_midi.c ms_in_desc.bLength = USB_DT_MS_ENDPOINT_SIZE(midi->out_ports); midi 1004 drivers/usb/gadget/function/f_midi.c ms_in_desc.bNumEmbMIDIJack = midi->out_ports; midi 1061 drivers/usb/gadget/function/f_midi.c f_midi_unregister_card(midi); midi 1245 drivers/usb/gadget/function/f_midi.c struct f_midi *midi; midi 1249 drivers/usb/gadget/function/f_midi.c midi = func_to_midi(f); midi 1252 drivers/usb/gadget/function/f_midi.c if (!--midi->free_ref) { midi 1253 drivers/usb/gadget/function/f_midi.c kfree(midi->id); midi 1254 drivers/usb/gadget/function/f_midi.c kfifo_free(&midi->in_req_fifo); midi 1255 drivers/usb/gadget/function/f_midi.c kfree(midi); midi 1272 drivers/usb/gadget/function/f_midi.c struct f_midi *midi = func_to_midi(f); midi 1280 drivers/usb/gadget/function/f_midi.c card = midi->card; midi 1281 drivers/usb/gadget/function/f_midi.c midi->card = NULL; midi 1290 drivers/usb/gadget/function/f_midi.c struct f_midi *midi = NULL; midi 1304 drivers/usb/gadget/function/f_midi.c midi = kzalloc(struct_size(midi, in_ports_array, opts->in_ports), midi 1306 drivers/usb/gadget/function/f_midi.c if (!midi) { midi 1312 drivers/usb/gadget/function/f_midi.c midi->in_ports_array[i].cable = i; midi 1315 drivers/usb/gadget/function/f_midi.c midi->id = kstrdup(opts->id, GFP_KERNEL); midi 1316 drivers/usb/gadget/function/f_midi.c if (opts->id && !midi->id) { midi 1320 drivers/usb/gadget/function/f_midi.c midi->in_ports = opts->in_ports; midi 1321 drivers/usb/gadget/function/f_midi.c midi->out_ports = opts->out_ports; midi 1322 drivers/usb/gadget/function/f_midi.c midi->index = opts->index; midi 1323 drivers/usb/gadget/function/f_midi.c midi->buflen = opts->buflen; midi 1324 drivers/usb/gadget/function/f_midi.c midi->qlen = opts->qlen; midi 1325 drivers/usb/gadget/function/f_midi.c midi->in_last_port = 0; midi 1326 drivers/usb/gadget/function/f_midi.c midi->free_ref = 1; midi 1328 drivers/usb/gadget/function/f_midi.c status = kfifo_alloc(&midi->in_req_fifo, midi->qlen, GFP_KERNEL); midi 1332 drivers/usb/gadget/function/f_midi.c spin_lock_init(&midi->transmit_lock); midi 1337 drivers/usb/gadget/function/f_midi.c midi->func.name = "gmidi function"; midi 1338 drivers/usb/gadget/function/f_midi.c midi->func.bind = f_midi_bind; midi 1339 drivers/usb/gadget/function/f_midi.c midi->func.unbind = f_midi_unbind; midi 1340 drivers/usb/gadget/function/f_midi.c midi->func.set_alt = f_midi_set_alt; midi 1341 drivers/usb/gadget/function/f_midi.c midi->func.disable = f_midi_disable; midi 1342 drivers/usb/gadget/function/f_midi.c midi->func.free_func = f_midi_free; midi 1344 drivers/usb/gadget/function/f_midi.c return &midi->func; midi 1348 drivers/usb/gadget/function/f_midi.c kfree(midi); midi 1352 drivers/usb/gadget/function/f_midi.c DECLARE_USB_FUNCTION_INIT(midi, f_midi_alloc_inst, f_midi_alloc); midi 1494 include/sound/emu10k1.h midi: 1; midi 1771 include/sound/emu10k1.h struct snd_emu10k1_midi midi; midi 239 include/sound/gus.h midi: 1; midi 98 include/sound/snd_wavefront.h snd_wavefront_midi_t midi; /* ICS2115 MIDI interface */ midi 66 sound/drivers/virmidi.c struct snd_rawmidi *midi[MAX_MIDI_DEVICES]; midi 100 sound/drivers/virmidi.c vmidi->midi[idx] = rmidi; midi 31 sound/firewire/amdtp-am824.c struct snd_rawmidi_substream *midi[AM824_MAX_CHANNELS_FOR_MIDI * 8]; midi 254 sound/firewire/amdtp-am824.c struct snd_rawmidi_substream *midi) midi 259 sound/firewire/amdtp-am824.c WRITE_ONCE(p->midi[port], midi); midi 309 sound/firewire/amdtp-am824.c p->midi[port] != NULL && midi 310 sound/firewire/amdtp-am824.c snd_rawmidi_transmit(p->midi[port], &b[1], 1) == 1) { midi 341 sound/firewire/amdtp-am824.c if ((1 <= len) && (len <= 3) && (p->midi[port])) midi 342 sound/firewire/amdtp-am824.c snd_rawmidi_receive(p->midi[port], b + 1, len); midi 45 sound/firewire/amdtp-am824.h struct snd_rawmidi_substream *midi); midi 46 sound/firewire/bebob/bebob.h unsigned int midi; midi 248 sound/firewire/bebob/bebob_maudio.c bebob->tx_stream_formations[i + 1].midi = 1; midi 252 sound/firewire/bebob/bebob_maudio.c bebob->rx_stream_formations[i + 1].midi = 1; midi 117 sound/firewire/bebob/bebob_proc.c formation[i].pcm, formation[i].midi); midi 126 sound/firewire/bebob/bebob_proc.c formation[i].pcm, formation[i].midi); midi 258 sound/firewire/bebob/bebob_stream.c unsigned int pcm, midi, location; midi 290 sound/firewire/bebob/bebob_stream.c midi = 0; midi 337 sound/firewire/bebob/bebob_stream.c if ((midi > 0) && (stm_pos != midi)) { midi 342 sound/firewire/bebob/bebob_stream.c midi = stm_pos; midi 370 sound/firewire/bebob/bebob_stream.c midi += channels; midi 550 sound/firewire/bebob/bebob_stream.c formation->midi, false); midi 750 sound/firewire/bebob/bebob_stream.c formation[i].midi += channels; midi 776 sound/firewire/bebob/bebob_stream.c formation[i].midi > AM824_MAX_CHANNELS_FOR_MIDI) midi 47 sound/firewire/digi00x/amdtp-dot.c struct snd_rawmidi_substream *midi[MAX_MIDI_PORTS]; midi 263 sound/firewire/digi00x/amdtp-dot.c p->midi[port] != NULL) midi 264 sound/firewire/digi00x/amdtp-dot.c len = snd_rawmidi_transmit(p->midi[port], b + 1, 2); midi 314 sound/firewire/digi00x/amdtp-dot.c if (port < MAX_MIDI_PORTS && p->midi[port]) midi 315 sound/firewire/digi00x/amdtp-dot.c snd_rawmidi_receive(p->midi[port], b + 1, len); midi 336 sound/firewire/digi00x/amdtp-dot.c struct snd_rawmidi_substream *midi) midi 341 sound/firewire/digi00x/amdtp-dot.c WRITE_ONCE(p->midi[port], midi); midi 126 sound/firewire/digi00x/digi00x.h struct snd_rawmidi_substream *midi); midi 37 sound/firewire/motu/amdtp-motu.c struct snd_rawmidi_substream *midi; midi 230 sound/firewire/motu/amdtp-motu.c struct snd_rawmidi_substream *midi) midi 235 sound/firewire/motu/amdtp-motu.c WRITE_ONCE(p->midi, midi); midi 242 sound/firewire/motu/amdtp-motu.c struct snd_rawmidi_substream *midi = READ_ONCE(p->midi); midi 249 sound/firewire/motu/amdtp-motu.c if (midi && p->midi_db_count == 0 && midi 250 sound/firewire/motu/amdtp-motu.c snd_rawmidi_transmit(midi, b + p->midi_byte_offset, 1) == 1) { midi 268 sound/firewire/motu/amdtp-motu.c struct snd_rawmidi_substream *midi; midi 274 sound/firewire/motu/amdtp-motu.c midi = READ_ONCE(p->midi); midi 276 sound/firewire/motu/amdtp-motu.c if (midi && (b[p->midi_flag_offset] & 0x01)) midi 277 sound/firewire/motu/amdtp-motu.c snd_rawmidi_receive(midi, b + p->midi_byte_offset, 1); midi 144 sound/firewire/motu/motu.h struct snd_rawmidi_substream *midi); midi 43 sound/firewire/oxfw/oxfw-proc.c formation.rate, formation.pcm, formation.midi); midi 73 sound/firewire/oxfw/oxfw-proc.c formation.rate, formation.pcm, formation.midi); midi 227 sound/firewire/oxfw/oxfw-stream.c fmt.midi == formation.midi) midi 238 sound/firewire/oxfw/oxfw-stream.c formation.midi * 8, false); midi 530 sound/firewire/oxfw/oxfw-stream.c formation->midi = channels; midi 562 sound/firewire/oxfw/oxfw-stream.c formation->midi > AM824_MAX_CHANNELS_FOR_MIDI) midi 739 sound/firewire/oxfw/oxfw-stream.c if (formation.midi > 0) midi 761 sound/firewire/oxfw/oxfw-stream.c if (formation.midi > 0) midi 115 sound/firewire/oxfw/oxfw.h unsigned int midi; midi 235 sound/isa/gus/gus_reset.c pvoice->midi = 1; midi 265 sound/isa/gus/gus_reset.c if (pvoice->midi && !pvoice->client) { midi 56 sound/isa/gus/interwave.c static int midi[SNDRV_CARDS]; midi 94 sound/isa/gus/interwave.c module_param_array(midi, int, NULL, 0444); midi 95 sound/isa/gus/interwave.c MODULE_PARM_DESC(midi, "MIDI UART enable for InterWave driver."); midi 727 sound/isa/gus/interwave.c gus->uart_enable = midi[dev]; midi 284 sound/isa/wavefront/wavefront.c acard->wavefront.midi.base = port; midi 340 sound/isa/wavefront/wavefront.c spin_lock_init(&acard->wavefront.midi.open); midi 341 sound/isa/wavefront/wavefront.c spin_lock_init(&acard->wavefront.midi.virtual); midi 55 sound/isa/wavefront/wavefront_midi.c wf_mpu_status (snd_wavefront_midi_t *midi) midi 58 sound/isa/wavefront/wavefront_midi.c return inb (midi->mpu_status_port); midi 62 sound/isa/wavefront/wavefront_midi.c input_avail (snd_wavefront_midi_t *midi) midi 65 sound/isa/wavefront/wavefront_midi.c return !(wf_mpu_status(midi) & INPUT_AVAIL); midi 69 sound/isa/wavefront/wavefront_midi.c output_ready (snd_wavefront_midi_t *midi) midi 72 sound/isa/wavefront/wavefront_midi.c return !(wf_mpu_status(midi) & OUTPUT_READY); midi 76 sound/isa/wavefront/wavefront_midi.c read_data (snd_wavefront_midi_t *midi) midi 79 sound/isa/wavefront/wavefront_midi.c return inb (midi->mpu_data_port); midi 83 sound/isa/wavefront/wavefront_midi.c write_data (snd_wavefront_midi_t *midi, unsigned char byte) midi 86 sound/isa/wavefront/wavefront_midi.c outb (byte, midi->mpu_data_port); midi 109 sound/isa/wavefront/wavefront_midi.c return &acard->wavefront.midi; midi 114 sound/isa/wavefront/wavefront_midi.c snd_wavefront_midi_t *midi = &card->wavefront.midi; midi 132 sound/isa/wavefront/wavefront_midi.c if (midi->substream_output[midi->output_mpu] == NULL) { midi 141 sound/isa/wavefront/wavefront_midi.c if (output_ready (midi)) midi 145 sound/isa/wavefront/wavefront_midi.c spin_lock_irqsave (&midi->virtual, flags); midi 146 sound/isa/wavefront/wavefront_midi.c if ((midi->mode[midi->output_mpu] & MPU401_MODE_OUTPUT) == 0) { midi 147 sound/isa/wavefront/wavefront_midi.c spin_unlock_irqrestore (&midi->virtual, flags); midi 150 sound/isa/wavefront/wavefront_midi.c if (output_ready (midi)) { midi 151 sound/isa/wavefront/wavefront_midi.c if (snd_rawmidi_transmit(midi->substream_output[midi->output_mpu], &midi_byte, 1) == 1) { midi 152 sound/isa/wavefront/wavefront_midi.c if (!midi->isvirtual || midi 155 sound/isa/wavefront/wavefront_midi.c write_data(midi, midi_byte); midi 158 sound/isa/wavefront/wavefront_midi.c if (midi->istimer) { midi 159 sound/isa/wavefront/wavefront_midi.c if (--midi->istimer <= 0) midi 160 sound/isa/wavefront/wavefront_midi.c del_timer(&midi->timer); midi 162 sound/isa/wavefront/wavefront_midi.c midi->mode[midi->output_mpu] &= ~MPU401_MODE_OUTPUT_TRIGGER; midi 163 sound/isa/wavefront/wavefront_midi.c spin_unlock_irqrestore (&midi->virtual, flags); midi 167 sound/isa/wavefront/wavefront_midi.c spin_unlock_irqrestore (&midi->virtual, flags); midi 170 sound/isa/wavefront/wavefront_midi.c spin_unlock_irqrestore (&midi->virtual, flags); midi 175 sound/isa/wavefront/wavefront_midi.c if (midi->substream_output[!midi->output_mpu] == NULL) { midi 184 sound/isa/wavefront/wavefront_midi.c if (output_ready (midi)) midi 188 sound/isa/wavefront/wavefront_midi.c spin_lock_irqsave (&midi->virtual, flags); midi 189 sound/isa/wavefront/wavefront_midi.c if (!midi->isvirtual) midi 191 sound/isa/wavefront/wavefront_midi.c mpu = midi->output_mpu ^ mask; midi 193 sound/isa/wavefront/wavefront_midi.c if ((midi->mode[mpu] & MPU401_MODE_OUTPUT) == 0) { midi 194 sound/isa/wavefront/wavefront_midi.c spin_unlock_irqrestore (&midi->virtual, flags); midi 197 sound/isa/wavefront/wavefront_midi.c if (snd_rawmidi_transmit_empty(midi->substream_output[mpu])) midi 199 sound/isa/wavefront/wavefront_midi.c if (output_ready (midi)) { midi 200 sound/isa/wavefront/wavefront_midi.c if (mpu != midi->output_mpu) { midi 201 sound/isa/wavefront/wavefront_midi.c write_data(midi, mpu == internal_mpu ? midi 204 sound/isa/wavefront/wavefront_midi.c midi->output_mpu = mpu; midi 205 sound/isa/wavefront/wavefront_midi.c } else if (snd_rawmidi_transmit(midi->substream_output[mpu], &midi_byte, 1) == 1) { midi 206 sound/isa/wavefront/wavefront_midi.c if (!midi->isvirtual || midi 209 sound/isa/wavefront/wavefront_midi.c write_data(midi, midi_byte); midi 213 sound/isa/wavefront/wavefront_midi.c if (midi->istimer) { midi 214 sound/isa/wavefront/wavefront_midi.c if (--midi->istimer <= 0) midi 215 sound/isa/wavefront/wavefront_midi.c del_timer(&midi->timer); midi 217 sound/isa/wavefront/wavefront_midi.c midi->mode[mpu] &= ~MPU401_MODE_OUTPUT_TRIGGER; midi 218 sound/isa/wavefront/wavefront_midi.c spin_unlock_irqrestore (&midi->virtual, flags); midi 222 sound/isa/wavefront/wavefront_midi.c spin_unlock_irqrestore (&midi->virtual, flags); midi 225 sound/isa/wavefront/wavefront_midi.c spin_unlock_irqrestore (&midi->virtual, flags); midi 232 sound/isa/wavefront/wavefront_midi.c snd_wavefront_midi_t *midi; midi 242 sound/isa/wavefront/wavefront_midi.c if ((midi = get_wavefront_midi (substream)) == NULL) midi 245 sound/isa/wavefront/wavefront_midi.c spin_lock_irqsave (&midi->open, flags); midi 246 sound/isa/wavefront/wavefront_midi.c midi->mode[mpu] |= MPU401_MODE_INPUT; midi 247 sound/isa/wavefront/wavefront_midi.c midi->substream_input[mpu] = substream; midi 248 sound/isa/wavefront/wavefront_midi.c spin_unlock_irqrestore (&midi->open, flags); midi 256 sound/isa/wavefront/wavefront_midi.c snd_wavefront_midi_t *midi; midi 266 sound/isa/wavefront/wavefront_midi.c if ((midi = get_wavefront_midi (substream)) == NULL) midi 269 sound/isa/wavefront/wavefront_midi.c spin_lock_irqsave (&midi->open, flags); midi 270 sound/isa/wavefront/wavefront_midi.c midi->mode[mpu] |= MPU401_MODE_OUTPUT; midi 271 sound/isa/wavefront/wavefront_midi.c midi->substream_output[mpu] = substream; midi 272 sound/isa/wavefront/wavefront_midi.c spin_unlock_irqrestore (&midi->open, flags); midi 280 sound/isa/wavefront/wavefront_midi.c snd_wavefront_midi_t *midi; midi 290 sound/isa/wavefront/wavefront_midi.c if ((midi = get_wavefront_midi (substream)) == NULL) midi 293 sound/isa/wavefront/wavefront_midi.c spin_lock_irqsave (&midi->open, flags); midi 294 sound/isa/wavefront/wavefront_midi.c midi->mode[mpu] &= ~MPU401_MODE_INPUT; midi 295 sound/isa/wavefront/wavefront_midi.c spin_unlock_irqrestore (&midi->open, flags); midi 303 sound/isa/wavefront/wavefront_midi.c snd_wavefront_midi_t *midi; midi 313 sound/isa/wavefront/wavefront_midi.c if ((midi = get_wavefront_midi (substream)) == NULL) midi 316 sound/isa/wavefront/wavefront_midi.c spin_lock_irqsave (&midi->open, flags); midi 317 sound/isa/wavefront/wavefront_midi.c midi->mode[mpu] &= ~MPU401_MODE_OUTPUT; midi 318 sound/isa/wavefront/wavefront_midi.c spin_unlock_irqrestore (&midi->open, flags); midi 325 sound/isa/wavefront/wavefront_midi.c snd_wavefront_midi_t *midi; midi 336 sound/isa/wavefront/wavefront_midi.c if ((midi = get_wavefront_midi (substream)) == NULL) { midi 340 sound/isa/wavefront/wavefront_midi.c spin_lock_irqsave (&midi->virtual, flags); midi 342 sound/isa/wavefront/wavefront_midi.c midi->mode[mpu] |= MPU401_MODE_INPUT_TRIGGER; midi 344 sound/isa/wavefront/wavefront_midi.c midi->mode[mpu] &= ~MPU401_MODE_INPUT_TRIGGER; midi 346 sound/isa/wavefront/wavefront_midi.c spin_unlock_irqrestore (&midi->virtual, flags); midi 351 sound/isa/wavefront/wavefront_midi.c snd_wavefront_midi_t *midi = from_timer(midi, t, timer); midi 352 sound/isa/wavefront/wavefront_midi.c snd_wavefront_card_t *card = midi->timer_card; midi 355 sound/isa/wavefront/wavefront_midi.c spin_lock_irqsave (&midi->virtual, flags); midi 356 sound/isa/wavefront/wavefront_midi.c mod_timer(&midi->timer, 1 + jiffies); midi 357 sound/isa/wavefront/wavefront_midi.c spin_unlock_irqrestore (&midi->virtual, flags); midi 364 sound/isa/wavefront/wavefront_midi.c snd_wavefront_midi_t *midi; midi 375 sound/isa/wavefront/wavefront_midi.c if ((midi = get_wavefront_midi (substream)) == NULL) { midi 379 sound/isa/wavefront/wavefront_midi.c spin_lock_irqsave (&midi->virtual, flags); midi 381 sound/isa/wavefront/wavefront_midi.c if ((midi->mode[mpu] & MPU401_MODE_OUTPUT_TRIGGER) == 0) { midi 382 sound/isa/wavefront/wavefront_midi.c if (!midi->istimer) { midi 383 sound/isa/wavefront/wavefront_midi.c timer_setup(&midi->timer, midi 386 sound/isa/wavefront/wavefront_midi.c mod_timer(&midi->timer, 1 + jiffies); midi 388 sound/isa/wavefront/wavefront_midi.c midi->istimer++; midi 389 sound/isa/wavefront/wavefront_midi.c midi->mode[mpu] |= MPU401_MODE_OUTPUT_TRIGGER; midi 392 sound/isa/wavefront/wavefront_midi.c midi->mode[mpu] &= ~MPU401_MODE_OUTPUT_TRIGGER; midi 394 sound/isa/wavefront/wavefront_midi.c spin_unlock_irqrestore (&midi->virtual, flags); midi 405 sound/isa/wavefront/wavefront_midi.c snd_wavefront_midi_t *midi; midi 411 sound/isa/wavefront/wavefront_midi.c midi = &card->wavefront.midi; midi 413 sound/isa/wavefront/wavefront_midi.c if (!input_avail (midi)) { /* not for us */ midi 418 sound/isa/wavefront/wavefront_midi.c spin_lock_irqsave (&midi->virtual, flags); midi 421 sound/isa/wavefront/wavefront_midi.c if (input_avail (midi)) { midi 422 sound/isa/wavefront/wavefront_midi.c byte = read_data (midi); midi 424 sound/isa/wavefront/wavefront_midi.c if (midi->isvirtual) { midi 426 sound/isa/wavefront/wavefront_midi.c substream = midi->substream_input[external_mpu]; midi 429 sound/isa/wavefront/wavefront_midi.c substream = midi->substream_output[internal_mpu]; midi 433 sound/isa/wavefront/wavefront_midi.c substream = midi->substream_input[internal_mpu]; midi 441 sound/isa/wavefront/wavefront_midi.c if (midi->mode[mpu] & MPU401_MODE_INPUT_TRIGGER) { midi 448 sound/isa/wavefront/wavefront_midi.c spin_unlock_irqrestore (&midi->virtual, flags); midi 459 sound/isa/wavefront/wavefront_midi.c spin_lock_irqsave (&card->wavefront.midi.virtual, flags); midi 460 sound/isa/wavefront/wavefront_midi.c card->wavefront.midi.isvirtual = 1; midi 461 sound/isa/wavefront/wavefront_midi.c card->wavefront.midi.output_mpu = internal_mpu; midi 462 sound/isa/wavefront/wavefront_midi.c card->wavefront.midi.input_mpu = internal_mpu; midi 463 sound/isa/wavefront/wavefront_midi.c spin_unlock_irqrestore (&card->wavefront.midi.virtual, flags); midi 472 sound/isa/wavefront/wavefront_midi.c spin_lock_irqsave (&card->wavefront.midi.virtual, flags); midi 475 sound/isa/wavefront/wavefront_midi.c card->wavefront.midi.isvirtual = 0; midi 476 sound/isa/wavefront/wavefront_midi.c spin_unlock_irqrestore (&card->wavefront.midi.virtual, flags); midi 486 sound/isa/wavefront/wavefront_midi.c snd_wavefront_midi_t *midi; midi 489 sound/isa/wavefront/wavefront_midi.c midi = &dev->midi; midi 497 sound/isa/wavefront/wavefront_midi.c for (i = 0; i < 30000 && !output_ready (midi); i++); midi 499 sound/isa/wavefront/wavefront_midi.c if (!output_ready (midi)) { midi 510 sound/isa/wavefront/wavefront_midi.c outb (UART_MODE_ON, midi->mpu_command_port); midi 513 sound/isa/wavefront/wavefront_midi.c if (input_avail (midi)) { midi 514 sound/isa/wavefront/wavefront_midi.c if (read_data (midi) == MPU_ACK) { midi 175 sound/pci/ali5451/ali5451.c midi :1, midi 869 sound/pci/ali5451/ali5451.c } else if (codec->synth.voices[channel].midi) { midi 693 sound/pci/ca0106/ca0106.h struct snd_ca_midi midi; midi 1317 sound/pci/ca0106/ca0106_main.c if (chip->midi.dev_id && midi 1318 sound/pci/ca0106/ca0106_main.c (status & (chip->midi.ipr_tx|chip->midi.ipr_rx))) { midi 1319 sound/pci/ca0106/ca0106_main.c if (chip->midi.interrupt) midi 1320 sound/pci/ca0106/ca0106_main.c chip->midi.interrupt(&chip->midi, status); midi 1322 sound/pci/ca0106/ca0106_main.c chip->midi.interrupt_disable(&chip->midi, chip->midi.tx_enable | chip->midi.rx_enable); midi 1739 sound/pci/ca0106/ca0106_main.c static void ca0106_midi_interrupt_enable(struct snd_ca_midi *midi, int intr) midi 1741 sound/pci/ca0106/ca0106_main.c snd_ca0106_intr_enable((struct snd_ca0106 *)(midi->dev_id), intr); midi 1744 sound/pci/ca0106/ca0106_main.c static void ca0106_midi_interrupt_disable(struct snd_ca_midi *midi, int intr) midi 1746 sound/pci/ca0106/ca0106_main.c snd_ca0106_intr_disable((struct snd_ca0106 *)(midi->dev_id), intr); midi 1749 sound/pci/ca0106/ca0106_main.c static unsigned char ca0106_midi_read(struct snd_ca_midi *midi, int idx) midi 1751 sound/pci/ca0106/ca0106_main.c return (unsigned char)snd_ca0106_ptr_read((struct snd_ca0106 *)(midi->dev_id), midi 1752 sound/pci/ca0106/ca0106_main.c midi->port + idx, 0); midi 1755 sound/pci/ca0106/ca0106_main.c static void ca0106_midi_write(struct snd_ca_midi *midi, int data, int idx) midi 1757 sound/pci/ca0106/ca0106_main.c snd_ca0106_ptr_write((struct snd_ca0106 *)(midi->dev_id), midi->port + idx, 0, data); midi 1772 sound/pci/ca0106/ca0106_main.c struct snd_ca_midi *midi; midi 1778 sound/pci/ca0106/ca0106_main.c midi = &chip->midi2; midi 1779 sound/pci/ca0106/ca0106_main.c midi->tx_enable = INTE_MIDI_TX_B; midi 1780 sound/pci/ca0106/ca0106_main.c midi->rx_enable = INTE_MIDI_RX_B; midi 1781 sound/pci/ca0106/ca0106_main.c midi->ipr_tx = IPR_MIDI_TX_B; midi 1782 sound/pci/ca0106/ca0106_main.c midi->ipr_rx = IPR_MIDI_RX_B; midi 1783 sound/pci/ca0106/ca0106_main.c midi->port = MIDI_UART_B_DATA; midi 1786 sound/pci/ca0106/ca0106_main.c midi = &chip->midi; midi 1787 sound/pci/ca0106/ca0106_main.c midi->tx_enable = INTE_MIDI_TX_A; midi 1788 sound/pci/ca0106/ca0106_main.c midi->rx_enable = INTE_MIDI_TX_B; midi 1789 sound/pci/ca0106/ca0106_main.c midi->ipr_tx = IPR_MIDI_TX_A; midi 1790 sound/pci/ca0106/ca0106_main.c midi->ipr_rx = IPR_MIDI_RX_A; midi 1791 sound/pci/ca0106/ca0106_main.c midi->port = MIDI_UART_A_DATA; midi 1794 sound/pci/ca0106/ca0106_main.c midi->reset = CA0106_MPU401_RESET; midi 1795 sound/pci/ca0106/ca0106_main.c midi->enter_uart = CA0106_MPU401_ENTER_UART; midi 1796 sound/pci/ca0106/ca0106_main.c midi->ack = CA0106_MPU401_ACK; midi 1798 sound/pci/ca0106/ca0106_main.c midi->input_avail = CA0106_MIDI_INPUT_AVAIL; midi 1799 sound/pci/ca0106/ca0106_main.c midi->output_ready = CA0106_MIDI_OUTPUT_READY; midi 1801 sound/pci/ca0106/ca0106_main.c midi->channel = channel; midi 1803 sound/pci/ca0106/ca0106_main.c midi->interrupt_enable = ca0106_midi_interrupt_enable; midi 1804 sound/pci/ca0106/ca0106_main.c midi->interrupt_disable = ca0106_midi_interrupt_disable; midi 1806 sound/pci/ca0106/ca0106_main.c midi->read = ca0106_midi_read; midi 1807 sound/pci/ca0106/ca0106_main.c midi->write = ca0106_midi_write; midi 1809 sound/pci/ca0106/ca0106_main.c midi->get_dev_id_card = ca0106_dev_id_card; midi 1810 sound/pci/ca0106/ca0106_main.c midi->get_dev_id_port = ca0106_dev_id_port; midi 1812 sound/pci/ca0106/ca0106_main.c midi->dev_id = chip; midi 1814 sound/pci/ca0106/ca0106_main.c if ((err = ca_midi_init(chip, midi, 0, name)) < 0) midi 20 sound/pci/ca0106/ca_midi.c #define ca_midi_write_data(midi, data) midi->write(midi, data, 0) midi 21 sound/pci/ca0106/ca_midi.c #define ca_midi_write_cmd(midi, data) midi->write(midi, data, 1) midi 22 sound/pci/ca0106/ca_midi.c #define ca_midi_read_data(midi) midi->read(midi, 0) midi 23 sound/pci/ca0106/ca_midi.c #define ca_midi_read_stat(midi) midi->read(midi, 1) midi 24 sound/pci/ca0106/ca_midi.c #define ca_midi_input_avail(midi) (!(ca_midi_read_stat(midi) & midi->input_avail)) midi 25 sound/pci/ca0106/ca_midi.c #define ca_midi_output_ready(midi) (!(ca_midi_read_stat(midi) & midi->output_ready)) midi 27 sound/pci/ca0106/ca_midi.c static void ca_midi_clear_rx(struct snd_ca_midi *midi) midi 30 sound/pci/ca0106/ca_midi.c for (; timeout > 0 && ca_midi_input_avail(midi); timeout--) midi 31 sound/pci/ca0106/ca_midi.c ca_midi_read_data(midi); midi 35 sound/pci/ca0106/ca_midi.c ca_midi_read_stat(midi)); midi 39 sound/pci/ca0106/ca_midi.c static void ca_midi_interrupt(struct snd_ca_midi *midi, unsigned int status) midi 43 sound/pci/ca0106/ca_midi.c if (midi->rmidi == NULL) { midi 44 sound/pci/ca0106/ca_midi.c midi->interrupt_disable(midi,midi->tx_enable | midi->rx_enable); midi 48 sound/pci/ca0106/ca_midi.c spin_lock(&midi->input_lock); midi 49 sound/pci/ca0106/ca_midi.c if ((status & midi->ipr_rx) && ca_midi_input_avail(midi)) { midi 50 sound/pci/ca0106/ca_midi.c if (!(midi->midi_mode & CA_MIDI_MODE_INPUT)) { midi 51 sound/pci/ca0106/ca_midi.c ca_midi_clear_rx(midi); midi 53 sound/pci/ca0106/ca_midi.c byte = ca_midi_read_data(midi); midi 54 sound/pci/ca0106/ca_midi.c if(midi->substream_input) midi 55 sound/pci/ca0106/ca_midi.c snd_rawmidi_receive(midi->substream_input, &byte, 1); midi 60 sound/pci/ca0106/ca_midi.c spin_unlock(&midi->input_lock); midi 62 sound/pci/ca0106/ca_midi.c spin_lock(&midi->output_lock); midi 63 sound/pci/ca0106/ca_midi.c if ((status & midi->ipr_tx) && ca_midi_output_ready(midi)) { midi 64 sound/pci/ca0106/ca_midi.c if (midi->substream_output && midi 65 sound/pci/ca0106/ca_midi.c snd_rawmidi_transmit(midi->substream_output, &byte, 1) == 1) { midi 66 sound/pci/ca0106/ca_midi.c ca_midi_write_data(midi, byte); midi 68 sound/pci/ca0106/ca_midi.c midi->interrupt_disable(midi,midi->tx_enable); midi 71 sound/pci/ca0106/ca_midi.c spin_unlock(&midi->output_lock); midi 75 sound/pci/ca0106/ca_midi.c static void ca_midi_cmd(struct snd_ca_midi *midi, unsigned char cmd, int ack) midi 80 sound/pci/ca0106/ca_midi.c spin_lock_irqsave(&midi->input_lock, flags); midi 81 sound/pci/ca0106/ca_midi.c ca_midi_write_data(midi, 0x00); midi 84 sound/pci/ca0106/ca_midi.c ca_midi_write_cmd(midi, cmd); midi 89 sound/pci/ca0106/ca_midi.c if (ca_midi_input_avail(midi)) { midi 90 sound/pci/ca0106/ca_midi.c if (ca_midi_read_data(midi) == midi->ack) midi 94 sound/pci/ca0106/ca_midi.c if (!ok && ca_midi_read_data(midi) == midi->ack) midi 99 sound/pci/ca0106/ca_midi.c spin_unlock_irqrestore(&midi->input_lock, flags); midi 103 sound/pci/ca0106/ca_midi.c midi->get_dev_id_port(midi->dev_id), midi 104 sound/pci/ca0106/ca_midi.c ca_midi_read_stat(midi), midi 105 sound/pci/ca0106/ca_midi.c ca_midi_read_data(midi)); midi 110 sound/pci/ca0106/ca_midi.c struct snd_ca_midi *midi = substream->rmidi->private_data; midi 113 sound/pci/ca0106/ca_midi.c if (snd_BUG_ON(!midi->dev_id)) midi 115 sound/pci/ca0106/ca_midi.c spin_lock_irqsave(&midi->open_lock, flags); midi 116 sound/pci/ca0106/ca_midi.c midi->midi_mode |= CA_MIDI_MODE_INPUT; midi 117 sound/pci/ca0106/ca_midi.c midi->substream_input = substream; midi 118 sound/pci/ca0106/ca_midi.c if (!(midi->midi_mode & CA_MIDI_MODE_OUTPUT)) { midi 119 sound/pci/ca0106/ca_midi.c spin_unlock_irqrestore(&midi->open_lock, flags); midi 120 sound/pci/ca0106/ca_midi.c ca_midi_cmd(midi, midi->reset, 1); midi 121 sound/pci/ca0106/ca_midi.c ca_midi_cmd(midi, midi->enter_uart, 1); midi 123 sound/pci/ca0106/ca_midi.c spin_unlock_irqrestore(&midi->open_lock, flags); midi 130 sound/pci/ca0106/ca_midi.c struct snd_ca_midi *midi = substream->rmidi->private_data; midi 133 sound/pci/ca0106/ca_midi.c if (snd_BUG_ON(!midi->dev_id)) midi 135 sound/pci/ca0106/ca_midi.c spin_lock_irqsave(&midi->open_lock, flags); midi 136 sound/pci/ca0106/ca_midi.c midi->midi_mode |= CA_MIDI_MODE_OUTPUT; midi 137 sound/pci/ca0106/ca_midi.c midi->substream_output = substream; midi 138 sound/pci/ca0106/ca_midi.c if (!(midi->midi_mode & CA_MIDI_MODE_INPUT)) { midi 139 sound/pci/ca0106/ca_midi.c spin_unlock_irqrestore(&midi->open_lock, flags); midi 140 sound/pci/ca0106/ca_midi.c ca_midi_cmd(midi, midi->reset, 1); midi 141 sound/pci/ca0106/ca_midi.c ca_midi_cmd(midi, midi->enter_uart, 1); midi 143 sound/pci/ca0106/ca_midi.c spin_unlock_irqrestore(&midi->open_lock, flags); midi 150 sound/pci/ca0106/ca_midi.c struct snd_ca_midi *midi = substream->rmidi->private_data; midi 153 sound/pci/ca0106/ca_midi.c if (snd_BUG_ON(!midi->dev_id)) midi 155 sound/pci/ca0106/ca_midi.c spin_lock_irqsave(&midi->open_lock, flags); midi 156 sound/pci/ca0106/ca_midi.c midi->interrupt_disable(midi,midi->rx_enable); midi 157 sound/pci/ca0106/ca_midi.c midi->midi_mode &= ~CA_MIDI_MODE_INPUT; midi 158 sound/pci/ca0106/ca_midi.c midi->substream_input = NULL; midi 159 sound/pci/ca0106/ca_midi.c if (!(midi->midi_mode & CA_MIDI_MODE_OUTPUT)) { midi 160 sound/pci/ca0106/ca_midi.c spin_unlock_irqrestore(&midi->open_lock, flags); midi 161 sound/pci/ca0106/ca_midi.c ca_midi_cmd(midi, midi->reset, 0); midi 163 sound/pci/ca0106/ca_midi.c spin_unlock_irqrestore(&midi->open_lock, flags); midi 170 sound/pci/ca0106/ca_midi.c struct snd_ca_midi *midi = substream->rmidi->private_data; midi 173 sound/pci/ca0106/ca_midi.c if (snd_BUG_ON(!midi->dev_id)) midi 176 sound/pci/ca0106/ca_midi.c spin_lock_irqsave(&midi->open_lock, flags); midi 178 sound/pci/ca0106/ca_midi.c midi->interrupt_disable(midi,midi->tx_enable); midi 179 sound/pci/ca0106/ca_midi.c midi->midi_mode &= ~CA_MIDI_MODE_OUTPUT; midi 180 sound/pci/ca0106/ca_midi.c midi->substream_output = NULL; midi 182 sound/pci/ca0106/ca_midi.c if (!(midi->midi_mode & CA_MIDI_MODE_INPUT)) { midi 183 sound/pci/ca0106/ca_midi.c spin_unlock_irqrestore(&midi->open_lock, flags); midi 184 sound/pci/ca0106/ca_midi.c ca_midi_cmd(midi, midi->reset, 0); midi 186 sound/pci/ca0106/ca_midi.c spin_unlock_irqrestore(&midi->open_lock, flags); midi 193 sound/pci/ca0106/ca_midi.c struct snd_ca_midi *midi = substream->rmidi->private_data; midi 195 sound/pci/ca0106/ca_midi.c if (snd_BUG_ON(!midi->dev_id)) midi 199 sound/pci/ca0106/ca_midi.c midi->interrupt_enable(midi,midi->rx_enable); midi 201 sound/pci/ca0106/ca_midi.c midi->interrupt_disable(midi, midi->rx_enable); midi 207 sound/pci/ca0106/ca_midi.c struct snd_ca_midi *midi = substream->rmidi->private_data; midi 210 sound/pci/ca0106/ca_midi.c if (snd_BUG_ON(!midi->dev_id)) midi 217 sound/pci/ca0106/ca_midi.c spin_lock_irqsave(&midi->output_lock, flags); midi 221 sound/pci/ca0106/ca_midi.c if (ca_midi_output_ready(midi)) { midi 222 sound/pci/ca0106/ca_midi.c if (!(midi->midi_mode & CA_MIDI_MODE_OUTPUT) || midi 225 sound/pci/ca0106/ca_midi.c spin_unlock_irqrestore(&midi->output_lock, flags); midi 228 sound/pci/ca0106/ca_midi.c ca_midi_write_data(midi, byte); midi 235 sound/pci/ca0106/ca_midi.c spin_unlock_irqrestore(&midi->output_lock, flags); midi 236 sound/pci/ca0106/ca_midi.c midi->interrupt_enable(midi,midi->tx_enable); midi 239 sound/pci/ca0106/ca_midi.c midi->interrupt_disable(midi,midi->tx_enable); midi 257 sound/pci/ca0106/ca_midi.c static void ca_midi_free(struct snd_ca_midi *midi) midi 259 sound/pci/ca0106/ca_midi.c midi->interrupt = NULL; midi 260 sound/pci/ca0106/ca_midi.c midi->interrupt_enable = NULL; midi 261 sound/pci/ca0106/ca_midi.c midi->interrupt_disable = NULL; midi 262 sound/pci/ca0106/ca_midi.c midi->read = NULL; midi 263 sound/pci/ca0106/ca_midi.c midi->write = NULL; midi 264 sound/pci/ca0106/ca_midi.c midi->get_dev_id_card = NULL; midi 265 sound/pci/ca0106/ca_midi.c midi->get_dev_id_port = NULL; midi 266 sound/pci/ca0106/ca_midi.c midi->rmidi = NULL; midi 274 sound/pci/ca0106/ca_midi.c int ca_midi_init(void *dev_id, struct snd_ca_midi *midi, int device, char *name) midi 279 sound/pci/ca0106/ca_midi.c if ((err = snd_rawmidi_new(midi->get_dev_id_card(midi->dev_id), name, device, 1, 1, &rmidi)) < 0) midi 282 sound/pci/ca0106/ca_midi.c midi->dev_id = dev_id; midi 283 sound/pci/ca0106/ca_midi.c midi->interrupt = ca_midi_interrupt; midi 285 sound/pci/ca0106/ca_midi.c spin_lock_init(&midi->open_lock); midi 286 sound/pci/ca0106/ca_midi.c spin_lock_init(&midi->input_lock); midi 287 sound/pci/ca0106/ca_midi.c spin_lock_init(&midi->output_lock); midi 295 sound/pci/ca0106/ca_midi.c rmidi->private_data = midi; midi 298 sound/pci/ca0106/ca_midi.c midi->rmidi = rmidi; midi 40 sound/pci/ca0106/ca_midi.h void (*interrupt)(struct snd_ca_midi *midi, unsigned int status); midi 41 sound/pci/ca0106/ca_midi.h void (*interrupt_enable)(struct snd_ca_midi *midi, int intr); midi 42 sound/pci/ca0106/ca_midi.h void (*interrupt_disable)(struct snd_ca_midi *midi, int intr); midi 44 sound/pci/ca0106/ca_midi.h unsigned char (*read)(struct snd_ca_midi *midi, int idx); midi 45 sound/pci/ca0106/ca_midi.h void (*write)(struct snd_ca_midi *midi, int data, int idx); midi 52 sound/pci/ca0106/ca_midi.h int ca_midi_init(void *card, struct snd_ca_midi *midi, int device, char *name); midi 239 sound/pci/emu10k1/emu10k1x.c struct emu10k1x_midi midi; midi 811 sound/pci/emu10k1/emu10k1x.c if (chip->midi.interrupt) midi 812 sound/pci/emu10k1/emu10k1x.c chip->midi.interrupt(chip, status); midi 1238 sound/pci/emu10k1/emu10k1x.c struct emu10k1x_midi *midi, unsigned int status) midi 1242 sound/pci/emu10k1/emu10k1x.c if (midi->rmidi == NULL) { midi 1243 sound/pci/emu10k1/emu10k1x.c snd_emu10k1x_intr_disable(emu, midi->tx_enable | midi->rx_enable); midi 1247 sound/pci/emu10k1/emu10k1x.c spin_lock(&midi->input_lock); midi 1248 sound/pci/emu10k1/emu10k1x.c if ((status & midi->ipr_rx) && mpu401_input_avail(emu, midi)) { midi 1249 sound/pci/emu10k1/emu10k1x.c if (!(midi->midi_mode & EMU10K1X_MIDI_MODE_INPUT)) { midi 1250 sound/pci/emu10k1/emu10k1x.c mpu401_clear_rx(emu, midi); midi 1252 sound/pci/emu10k1/emu10k1x.c byte = mpu401_read_data(emu, midi); midi 1253 sound/pci/emu10k1/emu10k1x.c if (midi->substream_input) midi 1254 sound/pci/emu10k1/emu10k1x.c snd_rawmidi_receive(midi->substream_input, &byte, 1); midi 1257 sound/pci/emu10k1/emu10k1x.c spin_unlock(&midi->input_lock); midi 1259 sound/pci/emu10k1/emu10k1x.c spin_lock(&midi->output_lock); midi 1260 sound/pci/emu10k1/emu10k1x.c if ((status & midi->ipr_tx) && mpu401_output_ready(emu, midi)) { midi 1261 sound/pci/emu10k1/emu10k1x.c if (midi->substream_output && midi 1262 sound/pci/emu10k1/emu10k1x.c snd_rawmidi_transmit(midi->substream_output, &byte, 1) == 1) { midi 1263 sound/pci/emu10k1/emu10k1x.c mpu401_write_data(emu, midi, byte); midi 1265 sound/pci/emu10k1/emu10k1x.c snd_emu10k1x_intr_disable(emu, midi->tx_enable); midi 1268 sound/pci/emu10k1/emu10k1x.c spin_unlock(&midi->output_lock); midi 1273 sound/pci/emu10k1/emu10k1x.c do_emu10k1x_midi_interrupt(emu, &emu->midi, status); midi 1277 sound/pci/emu10k1/emu10k1x.c struct emu10k1x_midi *midi, unsigned char cmd, int ack) midi 1282 sound/pci/emu10k1/emu10k1x.c spin_lock_irqsave(&midi->input_lock, flags); midi 1283 sound/pci/emu10k1/emu10k1x.c mpu401_write_data(emu, midi, 0x00); midi 1286 sound/pci/emu10k1/emu10k1x.c mpu401_write_cmd(emu, midi, cmd); midi 1291 sound/pci/emu10k1/emu10k1x.c if (mpu401_input_avail(emu, midi)) { midi 1292 sound/pci/emu10k1/emu10k1x.c if (mpu401_read_data(emu, midi) == MPU401_ACK) midi 1296 sound/pci/emu10k1/emu10k1x.c if (!ok && mpu401_read_data(emu, midi) == MPU401_ACK) midi 1301 sound/pci/emu10k1/emu10k1x.c spin_unlock_irqrestore(&midi->input_lock, flags); midi 1306 sound/pci/emu10k1/emu10k1x.c mpu401_read_stat(emu, midi), midi 1307 sound/pci/emu10k1/emu10k1x.c mpu401_read_data(emu, midi)); midi 1316 sound/pci/emu10k1/emu10k1x.c struct emu10k1x_midi *midi = substream->rmidi->private_data; midi 1319 sound/pci/emu10k1/emu10k1x.c emu = midi->emu; midi 1322 sound/pci/emu10k1/emu10k1x.c spin_lock_irqsave(&midi->open_lock, flags); midi 1323 sound/pci/emu10k1/emu10k1x.c midi->midi_mode |= EMU10K1X_MIDI_MODE_INPUT; midi 1324 sound/pci/emu10k1/emu10k1x.c midi->substream_input = substream; midi 1325 sound/pci/emu10k1/emu10k1x.c if (!(midi->midi_mode & EMU10K1X_MIDI_MODE_OUTPUT)) { midi 1326 sound/pci/emu10k1/emu10k1x.c spin_unlock_irqrestore(&midi->open_lock, flags); midi 1327 sound/pci/emu10k1/emu10k1x.c if (snd_emu10k1x_midi_cmd(emu, midi, MPU401_RESET, 1)) midi 1329 sound/pci/emu10k1/emu10k1x.c if (snd_emu10k1x_midi_cmd(emu, midi, MPU401_ENTER_UART, 1)) midi 1332 sound/pci/emu10k1/emu10k1x.c spin_unlock_irqrestore(&midi->open_lock, flags); midi 1343 sound/pci/emu10k1/emu10k1x.c struct emu10k1x_midi *midi = substream->rmidi->private_data; midi 1346 sound/pci/emu10k1/emu10k1x.c emu = midi->emu; midi 1349 sound/pci/emu10k1/emu10k1x.c spin_lock_irqsave(&midi->open_lock, flags); midi 1350 sound/pci/emu10k1/emu10k1x.c midi->midi_mode |= EMU10K1X_MIDI_MODE_OUTPUT; midi 1351 sound/pci/emu10k1/emu10k1x.c midi->substream_output = substream; midi 1352 sound/pci/emu10k1/emu10k1x.c if (!(midi->midi_mode & EMU10K1X_MIDI_MODE_INPUT)) { midi 1353 sound/pci/emu10k1/emu10k1x.c spin_unlock_irqrestore(&midi->open_lock, flags); midi 1354 sound/pci/emu10k1/emu10k1x.c if (snd_emu10k1x_midi_cmd(emu, midi, MPU401_RESET, 1)) midi 1356 sound/pci/emu10k1/emu10k1x.c if (snd_emu10k1x_midi_cmd(emu, midi, MPU401_ENTER_UART, 1)) midi 1359 sound/pci/emu10k1/emu10k1x.c spin_unlock_irqrestore(&midi->open_lock, flags); midi 1370 sound/pci/emu10k1/emu10k1x.c struct emu10k1x_midi *midi = substream->rmidi->private_data; midi 1374 sound/pci/emu10k1/emu10k1x.c emu = midi->emu; midi 1377 sound/pci/emu10k1/emu10k1x.c spin_lock_irqsave(&midi->open_lock, flags); midi 1378 sound/pci/emu10k1/emu10k1x.c snd_emu10k1x_intr_disable(emu, midi->rx_enable); midi 1379 sound/pci/emu10k1/emu10k1x.c midi->midi_mode &= ~EMU10K1X_MIDI_MODE_INPUT; midi 1380 sound/pci/emu10k1/emu10k1x.c midi->substream_input = NULL; midi 1381 sound/pci/emu10k1/emu10k1x.c if (!(midi->midi_mode & EMU10K1X_MIDI_MODE_OUTPUT)) { midi 1382 sound/pci/emu10k1/emu10k1x.c spin_unlock_irqrestore(&midi->open_lock, flags); midi 1383 sound/pci/emu10k1/emu10k1x.c err = snd_emu10k1x_midi_cmd(emu, midi, MPU401_RESET, 0); midi 1385 sound/pci/emu10k1/emu10k1x.c spin_unlock_irqrestore(&midi->open_lock, flags); midi 1393 sound/pci/emu10k1/emu10k1x.c struct emu10k1x_midi *midi = substream->rmidi->private_data; midi 1397 sound/pci/emu10k1/emu10k1x.c emu = midi->emu; midi 1400 sound/pci/emu10k1/emu10k1x.c spin_lock_irqsave(&midi->open_lock, flags); midi 1401 sound/pci/emu10k1/emu10k1x.c snd_emu10k1x_intr_disable(emu, midi->tx_enable); midi 1402 sound/pci/emu10k1/emu10k1x.c midi->midi_mode &= ~EMU10K1X_MIDI_MODE_OUTPUT; midi 1403 sound/pci/emu10k1/emu10k1x.c midi->substream_output = NULL; midi 1404 sound/pci/emu10k1/emu10k1x.c if (!(midi->midi_mode & EMU10K1X_MIDI_MODE_INPUT)) { midi 1405 sound/pci/emu10k1/emu10k1x.c spin_unlock_irqrestore(&midi->open_lock, flags); midi 1406 sound/pci/emu10k1/emu10k1x.c err = snd_emu10k1x_midi_cmd(emu, midi, MPU401_RESET, 0); midi 1408 sound/pci/emu10k1/emu10k1x.c spin_unlock_irqrestore(&midi->open_lock, flags); midi 1416 sound/pci/emu10k1/emu10k1x.c struct emu10k1x_midi *midi = substream->rmidi->private_data; midi 1417 sound/pci/emu10k1/emu10k1x.c emu = midi->emu; midi 1422 sound/pci/emu10k1/emu10k1x.c snd_emu10k1x_intr_enable(emu, midi->rx_enable); midi 1424 sound/pci/emu10k1/emu10k1x.c snd_emu10k1x_intr_disable(emu, midi->rx_enable); midi 1430 sound/pci/emu10k1/emu10k1x.c struct emu10k1x_midi *midi = substream->rmidi->private_data; midi 1433 sound/pci/emu10k1/emu10k1x.c emu = midi->emu; midi 1442 sound/pci/emu10k1/emu10k1x.c spin_lock_irqsave(&midi->output_lock, flags); midi 1444 sound/pci/emu10k1/emu10k1x.c if (mpu401_output_ready(emu, midi)) { midi 1445 sound/pci/emu10k1/emu10k1x.c if (!(midi->midi_mode & EMU10K1X_MIDI_MODE_OUTPUT) || midi 1448 sound/pci/emu10k1/emu10k1x.c spin_unlock_irqrestore(&midi->output_lock, flags); midi 1451 sound/pci/emu10k1/emu10k1x.c mpu401_write_data(emu, midi, byte); midi 1457 sound/pci/emu10k1/emu10k1x.c spin_unlock_irqrestore(&midi->output_lock, flags); midi 1458 sound/pci/emu10k1/emu10k1x.c snd_emu10k1x_intr_enable(emu, midi->tx_enable); midi 1460 sound/pci/emu10k1/emu10k1x.c snd_emu10k1x_intr_disable(emu, midi->tx_enable); midi 1484 sound/pci/emu10k1/emu10k1x.c struct emu10k1x_midi *midi = rmidi->private_data; midi 1485 sound/pci/emu10k1/emu10k1x.c midi->interrupt = NULL; midi 1486 sound/pci/emu10k1/emu10k1x.c midi->rmidi = NULL; midi 1490 sound/pci/emu10k1/emu10k1x.c struct emu10k1x_midi *midi, int device, midi 1498 sound/pci/emu10k1/emu10k1x.c midi->emu = emu; midi 1499 sound/pci/emu10k1/emu10k1x.c spin_lock_init(&midi->open_lock); midi 1500 sound/pci/emu10k1/emu10k1x.c spin_lock_init(&midi->input_lock); midi 1501 sound/pci/emu10k1/emu10k1x.c spin_lock_init(&midi->output_lock); midi 1508 sound/pci/emu10k1/emu10k1x.c rmidi->private_data = midi; midi 1510 sound/pci/emu10k1/emu10k1x.c midi->rmidi = rmidi; midi 1516 sound/pci/emu10k1/emu10k1x.c struct emu10k1x_midi *midi = &emu->midi; midi 1519 sound/pci/emu10k1/emu10k1x.c if ((err = emu10k1x_midi_init(emu, midi, 0, "EMU10K1X MPU-401 (UART)")) < 0) midi 1522 sound/pci/emu10k1/emu10k1x.c midi->tx_enable = INTE_MIDITXENABLE; midi 1523 sound/pci/emu10k1/emu10k1x.c midi->rx_enable = INTE_MIDIRXENABLE; midi 1524 sound/pci/emu10k1/emu10k1x.c midi->port = MUDATA; midi 1525 sound/pci/emu10k1/emu10k1x.c midi->ipr_tx = IPR_MIDITRANSBUFEMPTY; midi 1526 sound/pci/emu10k1/emu10k1x.c midi->ipr_rx = IPR_MIDIRECVBUFEMPTY; midi 1527 sound/pci/emu10k1/emu10k1x.c midi->interrupt = snd_emu10k1x_midi_interrupt; midi 62 sound/pci/emu10k1/emumpu401.c static void do_emu10k1_midi_interrupt(struct snd_emu10k1 *emu, struct snd_emu10k1_midi *midi, unsigned int status) midi 66 sound/pci/emu10k1/emumpu401.c if (midi->rmidi == NULL) { midi 67 sound/pci/emu10k1/emumpu401.c snd_emu10k1_intr_disable(emu, midi->tx_enable | midi->rx_enable); midi 71 sound/pci/emu10k1/emumpu401.c spin_lock(&midi->input_lock); midi 72 sound/pci/emu10k1/emumpu401.c if ((status & midi->ipr_rx) && mpu401_input_avail(emu, midi)) { midi 73 sound/pci/emu10k1/emumpu401.c if (!(midi->midi_mode & EMU10K1_MIDI_MODE_INPUT)) { midi 74 sound/pci/emu10k1/emumpu401.c mpu401_clear_rx(emu, midi); midi 76 sound/pci/emu10k1/emumpu401.c byte = mpu401_read_data(emu, midi); midi 77 sound/pci/emu10k1/emumpu401.c if (midi->substream_input) midi 78 sound/pci/emu10k1/emumpu401.c snd_rawmidi_receive(midi->substream_input, &byte, 1); midi 81 sound/pci/emu10k1/emumpu401.c spin_unlock(&midi->input_lock); midi 83 sound/pci/emu10k1/emumpu401.c spin_lock(&midi->output_lock); midi 84 sound/pci/emu10k1/emumpu401.c if ((status & midi->ipr_tx) && mpu401_output_ready(emu, midi)) { midi 85 sound/pci/emu10k1/emumpu401.c if (midi->substream_output && midi 86 sound/pci/emu10k1/emumpu401.c snd_rawmidi_transmit(midi->substream_output, &byte, 1) == 1) { midi 87 sound/pci/emu10k1/emumpu401.c mpu401_write_data(emu, midi, byte); midi 89 sound/pci/emu10k1/emumpu401.c snd_emu10k1_intr_disable(emu, midi->tx_enable); midi 92 sound/pci/emu10k1/emumpu401.c spin_unlock(&midi->output_lock); midi 97 sound/pci/emu10k1/emumpu401.c do_emu10k1_midi_interrupt(emu, &emu->midi, status); midi 105 sound/pci/emu10k1/emumpu401.c static int snd_emu10k1_midi_cmd(struct snd_emu10k1 * emu, struct snd_emu10k1_midi *midi, unsigned char cmd, int ack) midi 110 sound/pci/emu10k1/emumpu401.c spin_lock_irqsave(&midi->input_lock, flags); midi 111 sound/pci/emu10k1/emumpu401.c mpu401_write_data(emu, midi, 0x00); midi 114 sound/pci/emu10k1/emumpu401.c mpu401_write_cmd(emu, midi, cmd); midi 119 sound/pci/emu10k1/emumpu401.c if (mpu401_input_avail(emu, midi)) { midi 120 sound/pci/emu10k1/emumpu401.c if (mpu401_read_data(emu, midi) == MPU401_ACK) midi 124 sound/pci/emu10k1/emumpu401.c if (!ok && mpu401_read_data(emu, midi) == MPU401_ACK) midi 129 sound/pci/emu10k1/emumpu401.c spin_unlock_irqrestore(&midi->input_lock, flags); midi 134 sound/pci/emu10k1/emumpu401.c mpu401_read_stat(emu, midi), midi 135 sound/pci/emu10k1/emumpu401.c mpu401_read_data(emu, midi)); midi 144 sound/pci/emu10k1/emumpu401.c struct snd_emu10k1_midi *midi = (struct snd_emu10k1_midi *)substream->rmidi->private_data; midi 147 sound/pci/emu10k1/emumpu401.c emu = midi->emu; midi 150 sound/pci/emu10k1/emumpu401.c spin_lock_irqsave(&midi->open_lock, flags); midi 151 sound/pci/emu10k1/emumpu401.c midi->midi_mode |= EMU10K1_MIDI_MODE_INPUT; midi 152 sound/pci/emu10k1/emumpu401.c midi->substream_input = substream; midi 153 sound/pci/emu10k1/emumpu401.c if (!(midi->midi_mode & EMU10K1_MIDI_MODE_OUTPUT)) { midi 154 sound/pci/emu10k1/emumpu401.c spin_unlock_irqrestore(&midi->open_lock, flags); midi 155 sound/pci/emu10k1/emumpu401.c if (snd_emu10k1_midi_cmd(emu, midi, MPU401_RESET, 1)) midi 157 sound/pci/emu10k1/emumpu401.c if (snd_emu10k1_midi_cmd(emu, midi, MPU401_ENTER_UART, 1)) midi 160 sound/pci/emu10k1/emumpu401.c spin_unlock_irqrestore(&midi->open_lock, flags); midi 171 sound/pci/emu10k1/emumpu401.c struct snd_emu10k1_midi *midi = (struct snd_emu10k1_midi *)substream->rmidi->private_data; midi 174 sound/pci/emu10k1/emumpu401.c emu = midi->emu; midi 177 sound/pci/emu10k1/emumpu401.c spin_lock_irqsave(&midi->open_lock, flags); midi 178 sound/pci/emu10k1/emumpu401.c midi->midi_mode |= EMU10K1_MIDI_MODE_OUTPUT; midi 179 sound/pci/emu10k1/emumpu401.c midi->substream_output = substream; midi 180 sound/pci/emu10k1/emumpu401.c if (!(midi->midi_mode & EMU10K1_MIDI_MODE_INPUT)) { midi 181 sound/pci/emu10k1/emumpu401.c spin_unlock_irqrestore(&midi->open_lock, flags); midi 182 sound/pci/emu10k1/emumpu401.c if (snd_emu10k1_midi_cmd(emu, midi, MPU401_RESET, 1)) midi 184 sound/pci/emu10k1/emumpu401.c if (snd_emu10k1_midi_cmd(emu, midi, MPU401_ENTER_UART, 1)) midi 187 sound/pci/emu10k1/emumpu401.c spin_unlock_irqrestore(&midi->open_lock, flags); midi 198 sound/pci/emu10k1/emumpu401.c struct snd_emu10k1_midi *midi = (struct snd_emu10k1_midi *)substream->rmidi->private_data; midi 202 sound/pci/emu10k1/emumpu401.c emu = midi->emu; midi 205 sound/pci/emu10k1/emumpu401.c spin_lock_irqsave(&midi->open_lock, flags); midi 206 sound/pci/emu10k1/emumpu401.c snd_emu10k1_intr_disable(emu, midi->rx_enable); midi 207 sound/pci/emu10k1/emumpu401.c midi->midi_mode &= ~EMU10K1_MIDI_MODE_INPUT; midi 208 sound/pci/emu10k1/emumpu401.c midi->substream_input = NULL; midi 209 sound/pci/emu10k1/emumpu401.c if (!(midi->midi_mode & EMU10K1_MIDI_MODE_OUTPUT)) { midi 210 sound/pci/emu10k1/emumpu401.c spin_unlock_irqrestore(&midi->open_lock, flags); midi 211 sound/pci/emu10k1/emumpu401.c err = snd_emu10k1_midi_cmd(emu, midi, MPU401_RESET, 0); midi 213 sound/pci/emu10k1/emumpu401.c spin_unlock_irqrestore(&midi->open_lock, flags); midi 221 sound/pci/emu10k1/emumpu401.c struct snd_emu10k1_midi *midi = (struct snd_emu10k1_midi *)substream->rmidi->private_data; midi 225 sound/pci/emu10k1/emumpu401.c emu = midi->emu; midi 228 sound/pci/emu10k1/emumpu401.c spin_lock_irqsave(&midi->open_lock, flags); midi 229 sound/pci/emu10k1/emumpu401.c snd_emu10k1_intr_disable(emu, midi->tx_enable); midi 230 sound/pci/emu10k1/emumpu401.c midi->midi_mode &= ~EMU10K1_MIDI_MODE_OUTPUT; midi 231 sound/pci/emu10k1/emumpu401.c midi->substream_output = NULL; midi 232 sound/pci/emu10k1/emumpu401.c if (!(midi->midi_mode & EMU10K1_MIDI_MODE_INPUT)) { midi 233 sound/pci/emu10k1/emumpu401.c spin_unlock_irqrestore(&midi->open_lock, flags); midi 234 sound/pci/emu10k1/emumpu401.c err = snd_emu10k1_midi_cmd(emu, midi, MPU401_RESET, 0); midi 236 sound/pci/emu10k1/emumpu401.c spin_unlock_irqrestore(&midi->open_lock, flags); midi 244 sound/pci/emu10k1/emumpu401.c struct snd_emu10k1_midi *midi = (struct snd_emu10k1_midi *)substream->rmidi->private_data; midi 245 sound/pci/emu10k1/emumpu401.c emu = midi->emu; midi 250 sound/pci/emu10k1/emumpu401.c snd_emu10k1_intr_enable(emu, midi->rx_enable); midi 252 sound/pci/emu10k1/emumpu401.c snd_emu10k1_intr_disable(emu, midi->rx_enable); midi 258 sound/pci/emu10k1/emumpu401.c struct snd_emu10k1_midi *midi = (struct snd_emu10k1_midi *)substream->rmidi->private_data; midi 261 sound/pci/emu10k1/emumpu401.c emu = midi->emu; midi 270 sound/pci/emu10k1/emumpu401.c spin_lock_irqsave(&midi->output_lock, flags); midi 272 sound/pci/emu10k1/emumpu401.c if (mpu401_output_ready(emu, midi)) { midi 273 sound/pci/emu10k1/emumpu401.c if (!(midi->midi_mode & EMU10K1_MIDI_MODE_OUTPUT) || midi 276 sound/pci/emu10k1/emumpu401.c spin_unlock_irqrestore(&midi->output_lock, flags); midi 279 sound/pci/emu10k1/emumpu401.c mpu401_write_data(emu, midi, byte); midi 285 sound/pci/emu10k1/emumpu401.c spin_unlock_irqrestore(&midi->output_lock, flags); midi 286 sound/pci/emu10k1/emumpu401.c snd_emu10k1_intr_enable(emu, midi->tx_enable); midi 288 sound/pci/emu10k1/emumpu401.c snd_emu10k1_intr_disable(emu, midi->tx_enable); midi 312 sound/pci/emu10k1/emumpu401.c struct snd_emu10k1_midi *midi = rmidi->private_data; midi 313 sound/pci/emu10k1/emumpu401.c midi->interrupt = NULL; midi 314 sound/pci/emu10k1/emumpu401.c midi->rmidi = NULL; midi 317 sound/pci/emu10k1/emumpu401.c static int emu10k1_midi_init(struct snd_emu10k1 *emu, struct snd_emu10k1_midi *midi, int device, char *name) midi 324 sound/pci/emu10k1/emumpu401.c midi->emu = emu; midi 325 sound/pci/emu10k1/emumpu401.c spin_lock_init(&midi->open_lock); midi 326 sound/pci/emu10k1/emumpu401.c spin_lock_init(&midi->input_lock); midi 327 sound/pci/emu10k1/emumpu401.c spin_lock_init(&midi->output_lock); midi 334 sound/pci/emu10k1/emumpu401.c rmidi->private_data = midi; midi 336 sound/pci/emu10k1/emumpu401.c midi->rmidi = rmidi; midi 342 sound/pci/emu10k1/emumpu401.c struct snd_emu10k1_midi *midi = &emu->midi; midi 345 sound/pci/emu10k1/emumpu401.c if ((err = emu10k1_midi_init(emu, midi, 0, "EMU10K1 MPU-401 (UART)")) < 0) midi 348 sound/pci/emu10k1/emumpu401.c midi->tx_enable = INTE_MIDITXENABLE; midi 349 sound/pci/emu10k1/emumpu401.c midi->rx_enable = INTE_MIDIRXENABLE; midi 350 sound/pci/emu10k1/emumpu401.c midi->port = MUDATA; midi 351 sound/pci/emu10k1/emumpu401.c midi->ipr_tx = IPR_MIDITRANSBUFEMPTY; midi 352 sound/pci/emu10k1/emumpu401.c midi->ipr_rx = IPR_MIDIRECVBUFEMPTY; midi 353 sound/pci/emu10k1/emumpu401.c midi->interrupt = snd_emu10k1_midi_interrupt; midi 359 sound/pci/emu10k1/emumpu401.c struct snd_emu10k1_midi *midi; midi 362 sound/pci/emu10k1/emumpu401.c midi = &emu->midi; midi 363 sound/pci/emu10k1/emumpu401.c if ((err = emu10k1_midi_init(emu, midi, 0, "Audigy MPU-401 (UART)")) < 0) midi 366 sound/pci/emu10k1/emumpu401.c midi->tx_enable = INTE_MIDITXENABLE; midi 367 sound/pci/emu10k1/emumpu401.c midi->rx_enable = INTE_MIDIRXENABLE; midi 368 sound/pci/emu10k1/emumpu401.c midi->port = A_MUDATA1; midi 369 sound/pci/emu10k1/emumpu401.c midi->ipr_tx = IPR_MIDITRANSBUFEMPTY; midi 370 sound/pci/emu10k1/emumpu401.c midi->ipr_rx = IPR_MIDIRECVBUFEMPTY; midi 371 sound/pci/emu10k1/emumpu401.c midi->interrupt = snd_emu10k1_midi_interrupt; midi 373 sound/pci/emu10k1/emumpu401.c midi = &emu->midi2; midi 374 sound/pci/emu10k1/emumpu401.c if ((err = emu10k1_midi_init(emu, midi, 1, "Audigy MPU-401 #2")) < 0) midi 377 sound/pci/emu10k1/emumpu401.c midi->tx_enable = INTE_A_MIDITXENABLE2; midi 378 sound/pci/emu10k1/emumpu401.c midi->rx_enable = INTE_A_MIDIRXENABLE2; midi 379 sound/pci/emu10k1/emumpu401.c midi->port = A_MUDATA2; midi 380 sound/pci/emu10k1/emumpu401.c midi->ipr_tx = IPR_A_MIDITRANSBUFEMPTY2; midi 381 sound/pci/emu10k1/emumpu401.c midi->ipr_rx = IPR_A_MIDIRECVBUFEMPTY2; midi 382 sound/pci/emu10k1/emumpu401.c midi->interrupt = snd_emu10k1_midi_interrupt2; midi 378 sound/pci/emu10k1/emuproc.c voice->midi); midi 107 sound/pci/emu10k1/irq.c if (emu->midi.interrupt) midi 108 sound/pci/emu10k1/irq.c emu->midi.interrupt(emu, status); midi 90 sound/pci/emu10k1/voice.c voice->midi = 1; midi 124 sound/pci/emu10k1/voice.c pvoice->use = pvoice->pcm = pvoice->synth = pvoice->midi = pvoice->efx = 0; midi 147 sound/pci/emu10k1/voice.c pvoice->use = pvoice->pcm = pvoice->synth = pvoice->midi = pvoice->efx = 0; midi 125 sound/pci/oxygen/oxygen.h struct snd_rawmidi *midi; midi 106 sound/pci/oxygen/oxygen_lib.c if (chip->midi) midi 107 sound/pci/oxygen/oxygen_lib.c snd_mpu401_uart_interrupt(0, chip->midi->private_data); midi 689 sound/pci/oxygen/oxygen_lib.c info_flags, -1, &chip->midi); midi 449 sound/pci/rme9652/hdsp.c struct hdsp_midi midi[2]; midi 1514 sound/pci/rme9652/hdsp.c hdsp->midi[id].id = id; midi 1515 sound/pci/rme9652/hdsp.c hdsp->midi[id].rmidi = NULL; midi 1516 sound/pci/rme9652/hdsp.c hdsp->midi[id].input = NULL; midi 1517 sound/pci/rme9652/hdsp.c hdsp->midi[id].output = NULL; midi 1518 sound/pci/rme9652/hdsp.c hdsp->midi[id].hdsp = hdsp; midi 1519 sound/pci/rme9652/hdsp.c hdsp->midi[id].istimer = 0; midi 1520 sound/pci/rme9652/hdsp.c hdsp->midi[id].pending = 0; midi 1521 sound/pci/rme9652/hdsp.c spin_lock_init (&hdsp->midi[id].lock); midi 1524 sound/pci/rme9652/hdsp.c if (snd_rawmidi_new (card, buf, id, 1, 1, &hdsp->midi[id].rmidi) < 0) midi 1527 sound/pci/rme9652/hdsp.c sprintf(hdsp->midi[id].rmidi->name, "HDSP MIDI %d", id+1); midi 1528 sound/pci/rme9652/hdsp.c hdsp->midi[id].rmidi->private_data = &hdsp->midi[id]; midi 1530 sound/pci/rme9652/hdsp.c snd_rawmidi_set_ops (hdsp->midi[id].rmidi, SNDRV_RAWMIDI_STREAM_OUTPUT, &snd_hdsp_midi_output); midi 1531 sound/pci/rme9652/hdsp.c snd_rawmidi_set_ops (hdsp->midi[id].rmidi, SNDRV_RAWMIDI_STREAM_INPUT, &snd_hdsp_midi_input); midi 1533 sound/pci/rme9652/hdsp.c hdsp->midi[id].rmidi->info_flags |= SNDRV_RAWMIDI_INFO_OUTPUT | midi 3802 sound/pci/rme9652/hdsp.c if (hdsp->midi[0].pending) midi 3803 sound/pci/rme9652/hdsp.c snd_hdsp_midi_input_read (&hdsp->midi[0]); midi 3804 sound/pci/rme9652/hdsp.c if (hdsp->midi[1].pending) midi 3805 sound/pci/rme9652/hdsp.c snd_hdsp_midi_input_read (&hdsp->midi[1]); midi 3849 sound/pci/rme9652/hdsp.c hdsp->midi[0].pending = 1; midi 3852 sound/pci/rme9652/hdsp.c snd_hdsp_midi_input_read (&hdsp->midi[0]); midi 3860 sound/pci/rme9652/hdsp.c hdsp->midi[1].pending = 1; midi 3863 sound/pci/rme9652/hdsp.c snd_hdsp_midi_input_read (&hdsp->midi[1]); midi 5170 sound/pci/rme9652/hdsp.c hdsp->midi[0].rmidi = NULL; midi 5171 sound/pci/rme9652/hdsp.c hdsp->midi[1].rmidi = NULL; midi 5172 sound/pci/rme9652/hdsp.c hdsp->midi[0].input = NULL; midi 5173 sound/pci/rme9652/hdsp.c hdsp->midi[1].input = NULL; midi 5174 sound/pci/rme9652/hdsp.c hdsp->midi[0].output = NULL; midi 5175 sound/pci/rme9652/hdsp.c hdsp->midi[1].output = NULL; midi 5176 sound/pci/rme9652/hdsp.c hdsp->midi[0].pending = 0; midi 5177 sound/pci/rme9652/hdsp.c hdsp->midi[1].pending = 0; midi 5178 sound/pci/rme9652/hdsp.c spin_lock_init(&hdsp->midi[0].lock); midi 5179 sound/pci/rme9652/hdsp.c spin_lock_init(&hdsp->midi[1].lock); midi 999 sound/pci/rme9652/hdspm.c struct hdspm_midi midi[4]; midi 1809 sound/pci/rme9652/hdspm.c return hdspm_read(hdspm, hdspm->midi[id].dataIn); midi 1816 sound/pci/rme9652/hdspm.c return hdspm_write(hdspm, hdspm->midi[id].dataOut, val); midi 1821 sound/pci/rme9652/hdspm.c return hdspm_read(hdspm, hdspm->midi[id].statusIn) & 0xFF; midi 1828 sound/pci/rme9652/hdspm.c fifo_bytes_used = hdspm_read(hdspm, hdspm->midi[id].statusOut) & 0xFF; midi 2056 sound/pci/rme9652/hdspm.c hdspm->midi[id].id = id; midi 2057 sound/pci/rme9652/hdspm.c hdspm->midi[id].hdspm = hdspm; midi 2058 sound/pci/rme9652/hdspm.c spin_lock_init (&hdspm->midi[id].lock); midi 2063 sound/pci/rme9652/hdspm.c hdspm->midi[0].dataIn = HDSPM_midiDataIn2; midi 2064 sound/pci/rme9652/hdspm.c hdspm->midi[0].statusIn = HDSPM_midiStatusIn2; midi 2065 sound/pci/rme9652/hdspm.c hdspm->midi[0].dataOut = HDSPM_midiDataOut2; midi 2066 sound/pci/rme9652/hdspm.c hdspm->midi[0].statusOut = HDSPM_midiStatusOut2; midi 2067 sound/pci/rme9652/hdspm.c hdspm->midi[0].ie = HDSPM_Midi2InterruptEnable; midi 2068 sound/pci/rme9652/hdspm.c hdspm->midi[0].irq = HDSPM_midi2IRQPending; midi 2070 sound/pci/rme9652/hdspm.c hdspm->midi[0].dataIn = HDSPM_midiDataIn0; midi 2071 sound/pci/rme9652/hdspm.c hdspm->midi[0].statusIn = HDSPM_midiStatusIn0; midi 2072 sound/pci/rme9652/hdspm.c hdspm->midi[0].dataOut = HDSPM_midiDataOut0; midi 2073 sound/pci/rme9652/hdspm.c hdspm->midi[0].statusOut = HDSPM_midiStatusOut0; midi 2074 sound/pci/rme9652/hdspm.c hdspm->midi[0].ie = HDSPM_Midi0InterruptEnable; midi 2075 sound/pci/rme9652/hdspm.c hdspm->midi[0].irq = HDSPM_midi0IRQPending; midi 2078 sound/pci/rme9652/hdspm.c hdspm->midi[1].dataIn = HDSPM_midiDataIn1; midi 2079 sound/pci/rme9652/hdspm.c hdspm->midi[1].statusIn = HDSPM_midiStatusIn1; midi 2080 sound/pci/rme9652/hdspm.c hdspm->midi[1].dataOut = HDSPM_midiDataOut1; midi 2081 sound/pci/rme9652/hdspm.c hdspm->midi[1].statusOut = HDSPM_midiStatusOut1; midi 2082 sound/pci/rme9652/hdspm.c hdspm->midi[1].ie = HDSPM_Midi1InterruptEnable; midi 2083 sound/pci/rme9652/hdspm.c hdspm->midi[1].irq = HDSPM_midi1IRQPending; midi 2086 sound/pci/rme9652/hdspm.c hdspm->midi[2].dataIn = HDSPM_midiDataIn2; midi 2087 sound/pci/rme9652/hdspm.c hdspm->midi[2].statusIn = HDSPM_midiStatusIn2; midi 2088 sound/pci/rme9652/hdspm.c hdspm->midi[2].dataOut = HDSPM_midiDataOut2; midi 2089 sound/pci/rme9652/hdspm.c hdspm->midi[2].statusOut = HDSPM_midiStatusOut2; midi 2090 sound/pci/rme9652/hdspm.c hdspm->midi[2].ie = HDSPM_Midi2InterruptEnable; midi 2091 sound/pci/rme9652/hdspm.c hdspm->midi[2].irq = HDSPM_midi2IRQPending; midi 2094 sound/pci/rme9652/hdspm.c hdspm->midi[2].dataIn = HDSPM_midiDataIn2; midi 2095 sound/pci/rme9652/hdspm.c hdspm->midi[2].statusIn = HDSPM_midiStatusIn2; midi 2096 sound/pci/rme9652/hdspm.c hdspm->midi[2].dataOut = -1; midi 2097 sound/pci/rme9652/hdspm.c hdspm->midi[2].statusOut = -1; midi 2098 sound/pci/rme9652/hdspm.c hdspm->midi[2].ie = HDSPM_Midi2InterruptEnable; midi 2099 sound/pci/rme9652/hdspm.c hdspm->midi[2].irq = HDSPM_midi2IRQPendingAES; midi 2102 sound/pci/rme9652/hdspm.c hdspm->midi[3].dataIn = HDSPM_midiDataIn3; midi 2103 sound/pci/rme9652/hdspm.c hdspm->midi[3].statusIn = HDSPM_midiStatusIn3; midi 2104 sound/pci/rme9652/hdspm.c hdspm->midi[3].dataOut = -1; midi 2105 sound/pci/rme9652/hdspm.c hdspm->midi[3].statusOut = -1; midi 2106 sound/pci/rme9652/hdspm.c hdspm->midi[3].ie = HDSPM_Midi3InterruptEnable; midi 2107 sound/pci/rme9652/hdspm.c hdspm->midi[3].irq = HDSPM_midi3IRQPending; midi 2123 sound/pci/rme9652/hdspm.c &hdspm->midi[id].rmidi); midi 2127 sound/pci/rme9652/hdspm.c snprintf(hdspm->midi[id].rmidi->name, midi 2128 sound/pci/rme9652/hdspm.c sizeof(hdspm->midi[id].rmidi->name), midi 2130 sound/pci/rme9652/hdspm.c hdspm->midi[id].rmidi->private_data = &hdspm->midi[id]; midi 2132 sound/pci/rme9652/hdspm.c snd_rawmidi_set_ops(hdspm->midi[id].rmidi, midi 2135 sound/pci/rme9652/hdspm.c snd_rawmidi_set_ops(hdspm->midi[id].rmidi, midi 2139 sound/pci/rme9652/hdspm.c hdspm->midi[id].rmidi->info_flags |= midi 2148 sound/pci/rme9652/hdspm.c &hdspm->midi[id].rmidi); midi 2152 sound/pci/rme9652/hdspm.c snprintf(hdspm->midi[id].rmidi->name, midi 2153 sound/pci/rme9652/hdspm.c sizeof(hdspm->midi[id].rmidi->name), midi 2155 sound/pci/rme9652/hdspm.c hdspm->midi[id].rmidi->private_data = &hdspm->midi[id]; midi 2157 sound/pci/rme9652/hdspm.c snd_rawmidi_set_ops(hdspm->midi[id].rmidi, midi 2161 sound/pci/rme9652/hdspm.c hdspm->midi[id].rmidi->info_flags |= SNDRV_RAWMIDI_INFO_INPUT; midi 2174 sound/pci/rme9652/hdspm.c if (hdspm->midi[i].pending) midi 2175 sound/pci/rme9652/hdspm.c snd_hdspm_midi_input_read(&hdspm->midi[i]); midi 5387 sound/pci/rme9652/hdspm.c int i, audio, midi, schedule = 0; midi 5393 sound/pci/rme9652/hdspm.c midi = status & (HDSPM_midi0IRQPending | HDSPM_midi1IRQPending | midi 5413 sound/pci/rme9652/hdspm.c if (!audio && !midi) midi 5428 sound/pci/rme9652/hdspm.c if (midi) { midi 5432 sound/pci/rme9652/hdspm.c hdspm->midi[i].statusIn) & 0xff) && midi 5433 sound/pci/rme9652/hdspm.c (status & hdspm->midi[i].irq)) { midi 5437 sound/pci/rme9652/hdspm.c hdspm->control_register &= ~hdspm->midi[i].ie; midi 5440 sound/pci/rme9652/hdspm.c hdspm->midi[i].pending = 1; midi 265 sound/pci/trident/trident.h midi: 1; midi 3862 sound/pci/trident/trident_main.c voice->use = voice->pcm = voice->synth = voice->midi = 0; midi 234 sound/pci/ymfpci/ymfpci.h midi: 1; midi 231 sound/pci/ymfpci/ymfpci_main.c voice->midi = 1; midi 279 sound/pci/ymfpci/ymfpci_main.c pvoice->use = pvoice->pcm = pvoice->synth = pvoice->midi = 0; midi 51 sound/usb/6fire/chip.c if (chip->midi) midi 70 sound/usb/6fire/chip.c if (chip->midi) midi 21 sound/usb/6fire/chip.h struct midi_runtime *midi; midi 36 sound/usb/6fire/comm.c struct midi_runtime *midi_rt = rt->chip->midi; midi 195 sound/usb/6fire/midi.c chip->midi = rt; midi 201 sound/usb/6fire/midi.c struct midi_runtime *rt = chip->midi; midi 209 sound/usb/6fire/midi.c struct midi_runtime *rt = chip->midi; midi 213 sound/usb/6fire/midi.c chip->midi = NULL; midi 176 sound/usb/line6/midi.c struct snd_line6_midi *midi = line6->line6midi; midi 178 sound/usb/line6/midi.c wait_event_interruptible(midi->send_wait, midi 179 sound/usb/line6/midi.c midi->num_active_send_urbs == 0); midi 1325 sound/usb/misc/ua101.c struct list_head *midi; midi 1339 sound/usb/misc/ua101.c list_for_each(midi, &ua->midi_list) midi 1340 sound/usb/misc/ua101.c snd_usbmidi_disconnect(midi);