Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 92259
b: refs/heads/master
c: b415ed4
h: refs/heads/master
i:
  92257: 40fc9a9
  92255: ba846a1
v: v3
  • Loading branch information
Takashi Iwai committed Apr 24, 2008
1 parent 25803d6 commit 519dd36
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: efd89d9dcf75ab0a31b200db0ae4ae19cad25e48
refs/heads/master: b415ed45f4db9f8365daac84cf2518642a174dc0
15 changes: 15 additions & 0 deletions trunk/include/sound/mpu401.h
Original file line number Diff line number Diff line change
Expand Up @@ -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


/*
*/
Expand Down
10 changes: 4 additions & 6 deletions trunk/sound/drivers/mpu401/mpu401_uart.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 519dd36

Please sign in to comment.