linux/include/sound/mpu401.h

/* SPDX-License-Identifier: GPL-2.0-or-later */
#ifndef __SOUND_MPU401_H
#define __SOUND_MPU401_H

/*
 *  Header file for MPU-401 and compatible cards
 *  Copyright (c) by Jaroslav Kysela <[email protected]>
 */

#include <sound/rawmidi.h>
#include <linux/interrupt.h>

#define MPU401_HW_MPU401
#define MPU401_HW_SB
#define MPU401_HW_ES1688
#define MPU401_HW_OPL3SA2
#define MPU401_HW_SONICVIBES
#define MPU401_HW_CS4232
#define MPU401_HW_ES18XX
#define MPU401_HW_FM801
#define MPU401_HW_TRID4DWAVE
#define MPU401_HW_AZT2320
#define MPU401_HW_ALS100
#define MPU401_HW_ICE1712
#define MPU401_HW_VIA686A
#define MPU401_HW_YMFPCI
#define MPU401_HW_CMIPCI
#define MPU401_HW_ALS4000
#define MPU401_HW_INTEL8X0
#define MPU401_HW_PC98II
#define MPU401_HW_AUREAL

#define MPU401_INFO_INPUT
#define MPU401_INFO_OUTPUT
#define MPU401_INFO_INTEGRATED
#define MPU401_INFO_MMIO
#define MPU401_INFO_TX_IRQ
#define MPU401_INFO_IRQ_HOOK
#define MPU401_INFO_NO_ACK
#define MPU401_INFO_USE_TIMER

#define MPU401_MODE_BIT_INPUT
#define MPU401_MODE_BIT_OUTPUT
#define MPU401_MODE_BIT_INPUT_TRIGGER
#define MPU401_MODE_BIT_OUTPUT_TRIGGER

#define MPU401_MODE_INPUT
#define MPU401_MODE_OUTPUT
#define MPU401_MODE_INPUT_TRIGGER
#define MPU401_MODE_OUTPUT_TRIGGER

#define MPU401_MODE_INPUT_TIMER
#define MPU401_MODE_OUTPUT_TIMER

struct snd_mpu401 {};

/* I/O ports */

#define MPU401C(mpu)
#define MPU401D(mpu)

/*
 * control register bits
 */
/* read MPU401C() */
#define MPU401_RX_EMPTY
#define MPU401_TX_FULL

/* write MPU401C() */
#define MPU401_RESET
#define MPU401_ENTER_UART

/* read MPU401D() */
#define MPU401_ACK


/*

 */

irqreturn_t snd_mpu401_uart_interrupt(int irq, void *dev_id);
irqreturn_t snd_mpu401_uart_interrupt_tx(int irq, void *dev_id);

int snd_mpu401_uart_new(struct snd_card *card,
			int device,
			unsigned short hardware,
			unsigned long port,
			unsigned int info_flags,
			int irq,
			struct snd_rawmidi ** rrawmidi);

#endif /* __SOUND_MPU401_H */