aboutsummaryrefslogtreecommitdiffstats
path: root/sound/drivers/vx/vx_mixer.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2014-09-09 17:17:20 +0200
committerTakashi Iwai <tiwai@suse.de>2014-09-15 15:52:03 +0200
commitdb0a5214b8d6cc7a90ce3336d24a85b90cbb4e67 (patch)
treefdfcfaee149e83613d9854a763bbe3fe95f60292 /sound/drivers/vx/vx_mixer.c
parentsound: pci: au88x0: printk replacement (diff)
downloadlinux-dev-db0a5214b8d6cc7a90ce3336d24a85b90cbb4e67.tar.xz
linux-dev-db0a5214b8d6cc7a90ce3336d24a85b90cbb4e67.zip
ALSA: vx: Use nonatomic PCM ops
Rewrite VXpocket and VX222 drivers to use the new PCM nonatomic ops. The former irq tasklet is replaced with a threaded irq handler, and the tasklet for the PCM delayed start is simply merged into the normal PCM trigger, as well as the replacement of spinlock with mutex. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/drivers/vx/vx_mixer.c')
-rw-r--r--sound/drivers/vx/vx_mixer.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/sound/drivers/vx/vx_mixer.c b/sound/drivers/vx/vx_mixer.c
index c71b8d148d7f..3b6823fc0606 100644
--- a/sound/drivers/vx/vx_mixer.c
+++ b/sound/drivers/vx/vx_mixer.c
@@ -32,17 +32,15 @@
*/
static void vx_write_codec_reg(struct vx_core *chip, int codec, unsigned int data)
{
- unsigned long flags;
-
if (snd_BUG_ON(!chip->ops->write_codec))
return;
if (chip->chip_status & VX_STAT_IS_STALE)
return;
- spin_lock_irqsave(&chip->lock, flags);
+ mutex_lock(&chip->lock);
chip->ops->write_codec(chip, codec, data);
- spin_unlock_irqrestore(&chip->lock, flags);
+ mutex_unlock(&chip->lock);
}
/*
@@ -178,14 +176,12 @@ void vx_reset_codec(struct vx_core *chip, int cold_reset)
*/
static void vx_change_audio_source(struct vx_core *chip, int src)
{
- unsigned long flags;
-
if (chip->chip_status & VX_STAT_IS_STALE)
return;
- spin_lock_irqsave(&chip->lock, flags);
+ mutex_lock(&chip->lock);
chip->ops->change_audio_source(chip, src);
- spin_unlock_irqrestore(&chip->lock, flags);
+ mutex_unlock(&chip->lock);
}