diff options
author | Liu Ying <Ying.Liu@freescale.com> | 2015-11-19 13:43:58 +0800 |
---|---|---|
committer | Liu Ying <Ying.Liu@freescale.com> | 2015-11-20 15:24:56 +0800 |
commit | 7c81c6e463dd4e646005f51e2dc60668076cab61 (patch) | |
tree | f9de8ac92f30f2408122ba2eb9e793c93221ec6c | |
parent | d9be8289d1808ed1c36b047357f506271eb8606a (diff) |
MLK-11874 media: platform: mxc v4l2 capture: Correct suspend/resume for capture
The capture channel should be correctly disabled in ->suspend() and
enabled in ->resume() with ->enc_disable()/->enc_disable_csi() and
->enc_enable()/->enc_enable_csi() respectively.
Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
(cherry picked from commit ebaa070e98b4a85a66b29863db46b003946b3901)
(cherry picked from commit f3610e3a5ef93a4567283d309278f1242cee255f)
-rw-r--r-- | drivers/media/platform/mxc/capture/mxc_v4l2_capture.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/drivers/media/platform/mxc/capture/mxc_v4l2_capture.c b/drivers/media/platform/mxc/capture/mxc_v4l2_capture.c index 11dd48c939cc..9a42daf362b2 100644 --- a/drivers/media/platform/mxc/capture/mxc_v4l2_capture.c +++ b/drivers/media/platform/mxc/capture/mxc_v4l2_capture.c @@ -2908,8 +2908,13 @@ static int mxc_v4l2_suspend(struct platform_device *pdev, pm_message_t state) if (cam->overlay_on == true) stop_preview(cam); - if ((cam->capture_on == true) && cam->enc_disable) - cam->enc_disable(cam); + if (cam->capture_on == true) { + if (cam->enc_disable_csi) + cam->enc_disable_csi(cam); + + if (cam->enc_disable) + cam->enc_disable(cam); + } if (cam->sensor && cam->open_count) { if (cam->mclk_on[cam->mclk_source]) { @@ -2962,8 +2967,13 @@ static int mxc_v4l2_resume(struct platform_device *pdev) if (cam->overlay_on == true) start_preview(cam); - if (cam->capture_on == true) - mxc_streamon(cam); + if (cam->capture_on == true) { + if (cam->enc_enable) + cam->enc_enable(cam); + + if (cam->enc_enable_csi) + cam->enc_enable_csi(cam); + } up(&cam->busy_lock); |