diff options
author | Shengjiu Wang <shengjiu.wang@freescale.com> | 2017-05-31 11:04:52 +0800 |
---|---|---|
committer | Anson Huang <Anson.Huang@nxp.com> | 2017-06-09 22:22:50 +0800 |
commit | 38e29e8c9fbba0edbf0fd65cbfa2a7a69387934b (patch) | |
tree | e3cb7053154a86edfc939562f04aac09edc0d912 /sound | |
parent | 9f6011dca05997b73dd6fbab095dfe571918e1f7 (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>
(cherry picked from commit ea80731e828695bcfbf0d20c966813c3bdddfb88)
Diffstat (limited to 'sound')
-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 */ |