Lines Matching refs:port
19 * Nominally 3125 bytes/second, but the MIDI port's clock might be
224 static bool midi_ratelimit_per_packet(struct amdtp_stream *s, unsigned int port)
229 used = p->midi_fifo_used[port];
235 p->midi_fifo_used[port] = used;
241 unsigned int port, unsigned int count)
245 p->midi_fifo_used[port] += amdtp_rate_table[s->sfc] * count;
252 unsigned int f, port;
257 port = (data_block_counter + f) % 8;
261 if (port < MAX_MIDI_PORTS &&
262 midi_ratelimit_per_packet(s, port) &&
263 p->midi[port] != NULL)
264 len = snd_rawmidi_transmit(p->midi[port], b + 1, 2);
268 * Upper 4 bits of LSB represent port number.
269 * - 0000b: physical MIDI port 1.
270 * - 0010b: physical MIDI port 2.
271 * - 1110b: console MIDI port.
273 if (port == 2)
275 else if (port == 1)
280 midi_use_bytes(s, port, len);
296 unsigned int f, port, len;
305 * Upper 4 bits of LSB represent port number.
306 * - 0000b: physical MIDI port 1. Use port 0.
307 * - 1110b: console MIDI port. Use port 2.
310 port = 2;
312 port = 0;
314 if (port < MAX_MIDI_PORTS && p->midi[port])
315 snd_rawmidi_receive(p->midi[port], b + 1, len);
335 void amdtp_dot_midi_trigger(struct amdtp_stream *s, unsigned int port,
340 if (port < MAX_MIDI_PORTS)
341 WRITE_ONCE(p->midi[port], midi);