snd_mpu401_uart_new — create an MPU401-UART instance
int snd_mpu401_uart_new ( | struct snd_card * card, |
| int device, | |
| unsigned short hardware, | |
| unsigned long port, | |
| unsigned int info_flags, | |
| int irq, | |
| int irq_flags, | |
struct snd_rawmidi ** rrawmidi); |
cardthe card instance
devicethe device index, zero-based
hardwarethe hardware type, MPU401_HW_XXXX
portthe base address of MPU401 port
info_flagsbitflags MPU401_INFO_XXX
irqthe irq number, -1 if no interrupt for mpu
irq_flagsthe irq request flags (SA_XXX), 0 if irq was already reserved.
rrawmidithe pointer to store the new rawmidi instance
Creates a new MPU-401 instance.
Note that the rawmidi instance is returned on the rrawmidi argument, not the mpu401 instance itself. To access to the mpu401 instance, cast from rawmidi->private_data (with struct snd_mpu401 magic-cast).
Returns zero if successful, or a negative error code.