diff options
author | Shengjiu Wang <shengjiu.wang@freescale.com> | 2017-05-31 11:04:52 +0800 |
---|---|---|
committer | Dong Aisheng <aisheng.dong@nxp.com> | 2019-11-25 15:52:55 +0800 |
commit | 214ddc0e96c7629e041a9cb10a111996a193761e (patch) | |
tree | 855d8bea7219b2eff0fe4baefa00c4ae39bd112f | |
parent | 7fadff23ce8b7a88af8cc326bc7a2c91bef69788 (diff) |
MLK-14989: ASoC: fsl_rpmsg_i2s: enable pm_qos for audio
with "echo 1 > /sys/class/graphics/fb0/blank", and there is no
usb connected on board, the system may enter low power mode,
then audio playback will be failed. use pm_qos to prevent A7
core enter low power mode during audio playback and recording.
Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
-rw-r--r-- | sound/soc/fsl/fsl_rpmsg_i2s.c | 6 | ||||
-rw-r--r-- | sound/soc/fsl/fsl_rpmsg_i2s.h | 1 |
2 files changed, 7 insertions, 0 deletions
diff --git a/sound/soc/fsl/fsl_rpmsg_i2s.c b/sound/soc/fsl/fsl_rpmsg_i2s.c index 5a66e9097e43..3cfa3e9e50e2 100644 --- a/sound/soc/fsl/fsl_rpmsg_i2s.c +++ b/sound/soc/fsl/fsl_rpmsg_i2s.c @@ -178,11 +178,17 @@ static int fsl_rpmsg_i2s_remove(struct platform_device *pdev) #ifdef CONFIG_PM static int fsl_rpmsg_i2s_runtime_resume(struct device *dev) { + struct fsl_rpmsg_i2s *rpmsg_i2s = dev_get_drvdata(dev); + + pm_qos_add_request(&rpmsg_i2s->pm_qos_req, PM_QOS_CPU_DMA_LATENCY, 0); return 0; } static int fsl_rpmsg_i2s_runtime_suspend(struct device *dev) { + struct fsl_rpmsg_i2s *rpmsg_i2s = dev_get_drvdata(dev); + + pm_qos_remove_request(&rpmsg_i2s->pm_qos_req); return 0; } #endif diff --git a/sound/soc/fsl/fsl_rpmsg_i2s.h b/sound/soc/fsl/fsl_rpmsg_i2s.h index 259cb632630f..be951e91df29 100644 --- a/sound/soc/fsl/fsl_rpmsg_i2s.h +++ b/sound/soc/fsl/fsl_rpmsg_i2s.h @@ -309,6 +309,7 @@ struct i2s_info { struct fsl_rpmsg_i2s { struct platform_device *pdev; struct i2s_info i2s_info; + struct pm_qos_request pm_qos_req; }; #endif /* __FSL_RPMSG_I2S_H */ |