]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
[ALSA] Define MPU401 registers in sound/mpu401_uart.h
authorTakashi Iwai <tiwai@suse.de>
Wed, 23 Apr 2008 15:47:28 +0000 (17:47 +0200)
committerTakashi Iwai <tiwai@suse.de>
Thu, 24 Apr 2008 10:38:22 +0000 (12:38 +0200)
Define some MPU401 registers in sound/mpu401_uart.h so that other
drivers can refer to them.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
include/sound/mpu401.h
sound/drivers/mpu401/mpu401_uart.c

index d45218b44dfe590364acc94af00c039c32e15e30..68b634b75068bfe9e33573d6c1fe2d6f475a8b53 100644 (file)
@@ -102,6 +102,21 @@ struct snd_mpu401 {
 #define MPU401C(mpu) (mpu)->cport
 #define MPU401D(mpu) (mpu)->port
 
+/*
+ * control register bits
+ */
+/* read MPU401C() */
+#define MPU401_RX_EMPTY                0x80
+#define MPU401_TX_FULL         0x40
+
+/* write MPU401C() */
+#define MPU401_RESET           0xff
+#define MPU401_ENTER_UART      0x3f
+
+/* read MPU401D() */
+#define MPU401_ACK             0xfe
+
+
 /*
 
  */
index dd6ec4266732b168e4af30d415436b4bea3b7de3..18cca2457d44c1164978cc2453531396d8b38b0a 100644 (file)
@@ -49,12 +49,10 @@ static void snd_mpu401_uart_output_write(struct snd_mpu401 * mpu);
 
  */
 
-#define snd_mpu401_input_avail(mpu)    (!(mpu->read(mpu, MPU401C(mpu)) & 0x80))
-#define snd_mpu401_output_ready(mpu)   (!(mpu->read(mpu, MPU401C(mpu)) & 0x40))
-
-#define MPU401_RESET           0xff
-#define MPU401_ENTER_UART      0x3f
-#define MPU401_ACK             0xfe
+#define snd_mpu401_input_avail(mpu) \
+       (!(mpu->read(mpu, MPU401C(mpu)) & MPU401_RX_EMPTY))
+#define snd_mpu401_output_ready(mpu) \
+       (!(mpu->read(mpu, MPU401C(mpu)) & MPU401_TX_FULL))
 
 /* Build in lowlevel io */
 static void mpu401_write_port(struct snd_mpu401 *mpu, unsigned char data,