summaryrefslogtreecommitdiffstats
path: root/sound/pcmcia/pdaudiocf/pdaudiocf_pcm.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2014-09-10 14:58:59 +0200
committerTakashi Iwai <tiwai@suse.de>2014-09-15 15:52:38 +0200
commit3b73cfe5598eda7f5540608acd63b86688242731 (patch)
tree2f405e7c5eefdf3c17e069905548237ceca2155b /sound/pcmcia/pdaudiocf/pdaudiocf_pcm.c
parent6336c20cdaee1dd13d01dfa8c07ce3b18bbc846f (diff)
downloadop-kernel-dev-3b73cfe5598eda7f5540608acd63b86688242731.zip
op-kernel-dev-3b73cfe5598eda7f5540608acd63b86688242731.tar.gz
ALSA: pdaudiocf: Use nonatomic PCM ops
Like other fixes, convert the tasklet to a threaded irq and replace spinlock with mutex appropriately. ak4117_lock remains as spinlock since it's called in another spinlock context from ak4117 driver. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pcmcia/pdaudiocf/pdaudiocf_pcm.c')
-rw-r--r--sound/pcmcia/pdaudiocf/pdaudiocf_pcm.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sound/pcmcia/pdaudiocf/pdaudiocf_pcm.c b/sound/pcmcia/pdaudiocf/pdaudiocf_pcm.c
index 43f995a..b48aa0a 100644
--- a/sound/pcmcia/pdaudiocf/pdaudiocf_pcm.c
+++ b/sound/pcmcia/pdaudiocf/pdaudiocf_pcm.c
@@ -77,7 +77,7 @@ static int pdacf_pcm_trigger(struct snd_pcm_substream *subs, int cmd)
default:
return -EINVAL;
}
- spin_lock(&chip->reg_lock);
+ mutex_lock(&chip->reg_lock);
chip->pcm_running += inc;
tmp = pdacf_reg_read(chip, PDAUDIOCF_REG_SCR);
if (chip->pcm_running) {
@@ -91,7 +91,7 @@ static int pdacf_pcm_trigger(struct snd_pcm_substream *subs, int cmd)
tmp |= val;
pdacf_reg_write(chip, PDAUDIOCF_REG_SCR, tmp);
__end:
- spin_unlock(&chip->reg_lock);
+ mutex_unlock(&chip->reg_lock);
snd_ak4117_check_rate_and_errors(chip->ak4117, AK4117_CHECK_NO_RATE);
return ret;
}
@@ -296,6 +296,7 @@ int snd_pdacf_pcm_new(struct snd_pdacf *chip)
pcm->private_data = chip;
pcm->info_flags = 0;
+ pcm->nonatomic = true;
strcpy(pcm->name, chip->card->shortname);
chip->pcm = pcm;
OpenPOWER on IntegriCloud