diff options
| author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-11-26 19:04:24 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-11-26 19:04:24 -0800 |
| commit | 09cfd929860532f95c9944d39abbb043b8082f36 (patch) | |
| tree | b06c1666cc5e40fa350103fddcea780455b28799 /sound/drivers/mpu401/mpu401_uart.c | |
| parent | 8c6531f7a99f29ba8817ffb12cc9ecf190049bd6 (diff) | |
| parent | 7cb41c65b3fc547da4050721445d07277768aa37 (diff) | |
| download | olio-linux-3.10-09cfd929860532f95c9944d39abbb043b8082f36.tar.xz olio-linux-3.10-09cfd929860532f95c9944d39abbb043b8082f36.zip | |
Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/perex/alsa
* 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/perex/alsa:
[ALSA] version 1.0.15
[ALSA] emu10k1 - Check value ranges in ctl callbacks
[ALSA] emu10k1: Add mixer controls parameter checking.
[ALSA] fix private data pointer calculation in CS4270 driver
[ALSA] portman2x4 - Fix probe error
[ALSA] ca0106 - Fix write proc assignment
[ALSA] s3c2443-ac97: compilation fix
[ALSA] hda-codec - Revert volume knob controls in STAC codecs
[ALSA] ca0106 - Check value range in ctl callbacks
[ALSA] hda-codec - Check PINCAP only for PIN widgets
[ALSA] mpu401: fix recursive locking in timer
[ALSA] cmipci: fix FLINKON/OFF bits
[ALSA] hda-codec - Disable shared stream on AD1986A
Diffstat (limited to 'sound/drivers/mpu401/mpu401_uart.c')
| -rw-r--r-- | sound/drivers/mpu401/mpu401_uart.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/sound/drivers/mpu401/mpu401_uart.c b/sound/drivers/mpu401/mpu401_uart.c index 3306ecd4924..b57f2d5a1c9 100644 --- a/sound/drivers/mpu401/mpu401_uart.c +++ b/sound/drivers/mpu401/mpu401_uart.c @@ -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 |