Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 73910
b: refs/heads/master
c: 60fac85
h: refs/heads/master
v: v3
  • Loading branch information
Clemens Ladisch authored and Jaroslav Kysela committed Nov 19, 2007
1 parent 626327d commit 7ca9998
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 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: 56c36ca3b2df3ad8f2a3b7d3fba3670695163aaa
refs/heads/master: 60fac85fffc74cdd2fbdae821f269594ca25b6b1
12 changes: 8 additions & 4 deletions trunk/sound/drivers/mpu401/mpu401_uart.c
Original file line number Diff line number Diff line change
Expand Up @@ -97,23 +97,27 @@ static void snd_mpu401_uart_clear_rx(struct snd_mpu401 *mpu)

static void uart_interrupt_tx(struct snd_mpu401 *mpu)
{
unsigned long flags;

if (test_bit(MPU401_MODE_BIT_OUTPUT, &mpu->mode) &&
test_bit(MPU401_MODE_BIT_OUTPUT_TRIGGER, &mpu->mode)) {
spin_lock(&mpu->output_lock);
spin_lock_irqsave(&mpu->output_lock, flags);
snd_mpu401_uart_output_write(mpu);
spin_unlock(&mpu->output_lock);
spin_unlock_irqrestore(&mpu->output_lock, flags);
}
}

static void _snd_mpu401_uart_interrupt(struct snd_mpu401 *mpu)
{
unsigned long flags;

if (mpu->info_flags & MPU401_INFO_INPUT) {
spin_lock(&mpu->input_lock);
spin_lock_irqsave(&mpu->input_lock, flags);
if (test_bit(MPU401_MODE_BIT_INPUT, &mpu->mode))
snd_mpu401_uart_input_read(mpu);
else
snd_mpu401_uart_clear_rx(mpu);
spin_unlock(&mpu->input_lock);
spin_unlock_irqrestore(&mpu->input_lock, flags);
}
if (! (mpu->info_flags & MPU401_INFO_TX_IRQ))
/* ok. for better Tx performance try do some output
Expand Down

0 comments on commit 7ca9998

Please sign in to comment.