aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/sound/mpu401.h15
-rw-r--r--sound/drivers/mpu401/mpu401_uart.c10
2 files changed, 19 insertions, 6 deletions
diff --git a/include/sound/mpu401.h b/include/sound/mpu401.h
index d45218b44dfe..68b634b75068 100644
--- a/include/sound/mpu401.h
+++ b/include/sound/mpu401.h
@@ -103,6 +103,21 @@ struct snd_mpu401 {
103#define MPU401D(mpu) (mpu)->port 103#define MPU401D(mpu) (mpu)->port
104 104
105/* 105/*
106 * control register bits
107 */
108/* read MPU401C() */
109#define MPU401_RX_EMPTY 0x80
110#define MPU401_TX_FULL 0x40
111
112/* write MPU401C() */
113#define MPU401_RESET 0xff
114#define MPU401_ENTER_UART 0x3f
115
116/* read MPU401D() */
117#define MPU401_ACK 0xfe
118
119
120/*
106 121
107 */ 122 */
108 123
diff --git a/sound/drivers/mpu401/mpu401_uart.c b/sound/drivers/mpu401/mpu401_uart.c
index dd6ec4266732..18cca2457d44 100644
--- a/sound/drivers/mpu401/mpu401_uart.c
+++ b/sound/drivers/mpu401/mpu401_uart.c
@@ -49,12 +49,10 @@ static void snd_mpu401_uart_output_write(struct snd_mpu401 * mpu);
49 49
50 */ 50 */
51 51
52#define snd_mpu401_input_avail(mpu) (!(mpu->read(mpu, MPU401C(mpu)) & 0x80)) 52#define snd_mpu401_input_avail(mpu) \
53#define snd_mpu401_output_ready(mpu) (!(mpu->read(mpu, MPU401C(mpu)) & 0x40)) 53 (!(mpu->read(mpu, MPU401C(mpu)) & MPU401_RX_EMPTY))
54 54#define snd_mpu401_output_ready(mpu) \
55#define MPU401_RESET 0xff 55 (!(mpu->read(mpu, MPU401C(mpu)) & MPU401_TX_FULL))
56#define MPU401_ENTER_UART 0x3f
57#define MPU401_ACK 0xfe
58 56
59/* Build in lowlevel io */ 57/* Build in lowlevel io */
60static void mpu401_write_port(struct snd_mpu401 *mpu, unsigned char data, 58static void mpu401_write_port(struct snd_mpu401 *mpu, unsigned char data,