diff options
author | Takashi Iwai <tiwai@suse.de> | 2014-09-10 08:58:59 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2014-09-15 09:52:38 -0400 |
commit | 3b73cfe5598eda7f5540608acd63b86688242731 (patch) | |
tree | 2f405e7c5eefdf3c17e069905548237ceca2155b /sound/pcmcia/pdaudiocf/pdaudiocf_pcm.c | |
parent | 6336c20cdaee1dd13d01dfa8c07ce3b18bbc846f (diff) |
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.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sound/pcmcia/pdaudiocf/pdaudiocf_pcm.c b/sound/pcmcia/pdaudiocf/pdaudiocf_pcm.c index 43f995a3f960..b48aa0a78c19 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) | |||
77 | default: | 77 | default: |
78 | return -EINVAL; | 78 | return -EINVAL; |
79 | } | 79 | } |
80 | spin_lock(&chip->reg_lock); | 80 | mutex_lock(&chip->reg_lock); |
81 | chip->pcm_running += inc; | 81 | chip->pcm_running += inc; |
82 | tmp = pdacf_reg_read(chip, PDAUDIOCF_REG_SCR); | 82 | tmp = pdacf_reg_read(chip, PDAUDIOCF_REG_SCR); |
83 | if (chip->pcm_running) { | 83 | if (chip->pcm_running) { |
@@ -91,7 +91,7 @@ static int pdacf_pcm_trigger(struct snd_pcm_substream *subs, int cmd) | |||
91 | tmp |= val; | 91 | tmp |= val; |
92 | pdacf_reg_write(chip, PDAUDIOCF_REG_SCR, tmp); | 92 | pdacf_reg_write(chip, PDAUDIOCF_REG_SCR, tmp); |
93 | __end: | 93 | __end: |
94 | spin_unlock(&chip->reg_lock); | 94 | mutex_unlock(&chip->reg_lock); |
95 | snd_ak4117_check_rate_and_errors(chip->ak4117, AK4117_CHECK_NO_RATE); | 95 | snd_ak4117_check_rate_and_errors(chip->ak4117, AK4117_CHECK_NO_RATE); |
96 | return ret; | 96 | return ret; |
97 | } | 97 | } |
@@ -296,6 +296,7 @@ int snd_pdacf_pcm_new(struct snd_pdacf *chip) | |||
296 | 296 | ||
297 | pcm->private_data = chip; | 297 | pcm->private_data = chip; |
298 | pcm->info_flags = 0; | 298 | pcm->info_flags = 0; |
299 | pcm->nonatomic = true; | ||
299 | strcpy(pcm->name, chip->card->shortname); | 300 | strcpy(pcm->name, chip->card->shortname); |
300 | chip->pcm = pcm; | 301 | chip->pcm = pcm; |
301 | 302 | ||