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 | 0be04a695b8ca111bc74efcd395b5b82e29753ae (diff) | |
parent | bcab3a6e64a9647e022b46182c9687a8c3aa9d11 (diff) |
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: |