]> Git Repo - linux.git/commitdiff
ASoC: core: Change power state before rechecking endpoint
authorJeeja KP <[email protected]>
Mon, 23 Nov 2015 15:52:31 +0000 (21:22 +0530)
committerMark Brown <[email protected]>
Wed, 25 Nov 2015 12:52:29 +0000 (12:52 +0000)
For DAPM resume, we should first change the power state of the
card and then recheck the endpoints. This ensures the dapm is
resumed first and then userspace can resume the streams.

Signed-off-by: Jeeja KP <[email protected]>
Signed-off-by: Vinod Koul <[email protected]>
Reviewed-by: Lars-Peter Clausen <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
sound/soc/soc-core.c

index 24b096066a07205c88e377e28f94eacff1261f3e..a1305f827a98f077ac3cdeffed96b2ce73d45c63 100644 (file)
@@ -795,12 +795,12 @@ static void soc_resume_deferred(struct work_struct *work)
 
        dev_dbg(card->dev, "ASoC: resume work completed\n");
 
-       /* userspace can access us now we are back as we were before */
-       snd_power_change_state(card->snd_card, SNDRV_CTL_POWER_D0);
-
        /* Recheck all endpoints too, their state is affected by suspend */
        dapm_mark_endpoints_dirty(card);
        snd_soc_dapm_sync(&card->dapm);
+
+       /* userspace can access us now we are back as we were before */
+       snd_power_change_state(card->snd_card, SNDRV_CTL_POWER_D0);
 }
 
 /* powers up audio subsystem after a suspend */
This page took 0.05328 seconds and 4 git commands to generate.