]> Git Repo - linux.git/commitdiff
ALSA: pcm - Fix unbalanced pm_qos_request
authorTakashi Iwai <[email protected]>
Thu, 16 Sep 2010 20:52:32 +0000 (22:52 +0200)
committerTakashi Iwai <[email protected]>
Thu, 16 Sep 2010 21:04:38 +0000 (23:04 +0200)
The pm_qos_request isn't freed properly when OSS PCM emulation is used
because it skips snd_pcm_hw_free() call but directly releases the
stream.  This resulted in Oops later.

Tested-by: Simon Kirby <[email protected]>
Signed-off-by: Takashi Iwai <[email protected]>
sound/core/pcm_native.c

index 134fc6c2e08dc01eeda84a730545b0532f0588fe..d4eb2ef8078416cc8d06e5d80f3ec3bb467a4f1b 100644 (file)
@@ -1992,6 +1992,8 @@ void snd_pcm_release_substream(struct snd_pcm_substream *substream)
                substream->ops->close(substream);
                substream->hw_opened = 0;
        }
+       if (pm_qos_request_active(&substream->latency_pm_qos_req))
+               pm_qos_remove_request(&substream->latency_pm_qos_req);
        if (substream->pcm_release) {
                substream->pcm_release(substream);
                substream->pcm_release = NULL;
This page took 0.057553 seconds and 4 git commands to generate.