diff options
author | Takashi Iwai <tiwai@suse.de> | 2017-08-30 15:17:10 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2017-08-30 15:17:10 +0200 |
commit | 3454a476f2f5d6d3cac3b3f907190ffc58c4fd6f (patch) | |
tree | d187e798230675e05a2b39c0d9acf87c096daa40 /sound/core | |
parent | ALSA: aoa: Convert to using %pOF instead of full_name (diff) | |
parent | ALSA: pcm: Fix power lock unbalance via OSS emulation (diff) | |
download | linux-3454a476f2f5d6d3cac3b3f907190ffc58c4fd6f.tar.xz linux-3454a476f2f5d6d3cac3b3f907190ffc58c4fd6f.zip |
Merge branch 'for-linus' into for-next
Diffstat (limited to 'sound/core')
-rw-r--r-- | sound/core/pcm_native.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c index 22995cb3bd44..cf0433f80067 100644 --- a/sound/core/pcm_native.c +++ b/sound/core/pcm_native.c @@ -3064,6 +3064,7 @@ int snd_pcm_kernel_ioctl(struct snd_pcm_substream *substream, { snd_pcm_uframes_t *frames = arg; snd_pcm_sframes_t result; + int err; switch (cmd) { case SNDRV_PCM_IOCTL_FORWARD: @@ -3083,7 +3084,10 @@ int snd_pcm_kernel_ioctl(struct snd_pcm_substream *substream, case SNDRV_PCM_IOCTL_START: return snd_pcm_start_lock_irq(substream); case SNDRV_PCM_IOCTL_DRAIN: - return snd_pcm_drain(substream, NULL); + snd_power_lock(substream->pcm->card); + err = snd_pcm_drain(substream, NULL); + snd_power_unlock(substream->pcm->card); + return err; case SNDRV_PCM_IOCTL_DROP: return snd_pcm_drop(substream); case SNDRV_PCM_IOCTL_DELAY: |