Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 92071
b: refs/heads/master
c: ea6b582
h: refs/heads/master
i:
  92069: 6a33ab5
  92067: 4f40440
  92063: 07a1c63
v: v3
  • Loading branch information
Clemens Ladisch authored and Takashi Iwai committed Apr 24, 2008
1 parent e374a63 commit 4eb1ee7
Show file tree
Hide file tree
Showing 2 changed files with 8 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: 47ba97f8fa01bb5b48e73b4b1271fbf1436a2d4b
refs/heads/master: ea6b5828cdbbedaf26b12ae64befbec18084ea3c
13 changes: 7 additions & 6 deletions trunk/sound/drivers/mpu401/mpu401_uart.c
Original file line number Diff line number Diff line change
Expand Up @@ -425,16 +425,17 @@ static void snd_mpu401_uart_input_read(struct snd_mpu401 * mpu)
static void snd_mpu401_uart_output_write(struct snd_mpu401 * mpu)
{
unsigned char byte;
int max = 256, timeout;
int max = 256;

do {
if (snd_rawmidi_transmit_peek(mpu->substream_output,
&byte, 1) == 1) {
for (timeout = 100; timeout > 0; timeout--) {
if (snd_mpu401_output_ready(mpu))
break;
}
if (timeout == 0)
/*
* Try twice because there is hardware that insists on
* setting the output busy bit after each write.
*/
if (!snd_mpu401_output_ready(mpu) &&
!snd_mpu401_output_ready(mpu))
break; /* Tx FIFO full - try again later */
mpu->write(mpu, byte, MPU401D(mpu));
snd_rawmidi_transmit_ack(mpu->substream_output, 1);
Expand Down

0 comments on commit 4eb1ee7

Please sign in to comment.