summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSylwester Nawrocki <s.nawrocki@samsung.com>2017-12-14 16:55:15 +0100
committerSylwester Nawrocki <s.nawrocki@samsung.com>2017-12-15 10:53:26 +0100
commit8a80309b676088b21574bcbcb66946ad5ed4f474 (patch)
treecfb5f0034d10fba045423be639345c7d0b49559c
parent257aa3cdaee6884414353bede7297c31ca66c870 (diff)
downloadgst-plugins-camera-n4-8a80309b676088b21574bcbcb66946ad5ed4f474.tar.gz
gst-plugins-camera-n4-8a80309b676088b21574bcbcb66946ad5ed4f474.tar.bz2
gst-plugins-camera-n4-8a80309b676088b21574bcbcb66946ad5ed4f474.zip
Fix driver close sequence for front camera
Ensure VIDIOC_S_CTRL calls are done only where required for specific FIMC-IS pipeline. Change-Id: I966ad7e68c0d19239ce437ca5b2cc40df836cd52 Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
-rw-r--r--camerasrc/src/camerasrc.c22
1 files changed, 13 insertions, 9 deletions
diff --git a/camerasrc/src/camerasrc.c b/camerasrc/src/camerasrc.c
index c781217..f3cb6b4 100644
--- a/camerasrc/src/camerasrc.c
+++ b/camerasrc/src/camerasrc.c
@@ -3176,17 +3176,21 @@ int camerasrc_stop_stream(camsrc_handle_t handle)
camsrc_info("[SENSOR] REQBUF 0 done");
}
- ret = _camerasrc_ioctl_s_ctrl(p, p->fd_3aa0, 0x9a1032, 4096);
- if (ret != CAMERASRC_SUCCESS)
- camsrc_error("[3AA0] _camerasrc_ioctl_s_ctrl failed[%x]", ret);
- ret = _camerasrc_ioctl_s_ctrl(p, p->fd_3aa0, 0x9a1032, 4096);
- if (ret != CAMERASRC_SUCCESS)
- camsrc_error("[3AA0] _camerasrc_ioctl_s_ctrl failed[%x]", ret);
+ if (p->cur_dev_id == CAMERASRC_DEV_ID_PRIMARY) {
+ ret = _camerasrc_ioctl_s_ctrl(p, p->fd_3aa0, 0x9a1032, 4096);
+ if (ret != CAMERASRC_SUCCESS)
+ camsrc_error("[3AA0] _camerasrc_ioctl_s_ctrl failed[%x]", ret);
+
+ ret = _camerasrc_ioctl_s_ctrl(p, p->fd_3aa0, 0x9a1032, 4096);
+ if (ret != CAMERASRC_SUCCESS)
+ camsrc_error("[3AA0] _camerasrc_ioctl_s_ctrl failed[%x]", ret);
+
+ ret = _camerasrc_ioctl_s_ctrl(p, p->fd_isp, 0x9a1032, 4096);
+ if (ret != CAMERASRC_SUCCESS)
+ camsrc_error("[ISP] _camerasrc_ioctl_s_ctrl failed[%x]", ret);
+ }
- ret = _camerasrc_ioctl_s_ctrl(p, p->fd_isp, 0x9a1032, 4096);
- if (ret != CAMERASRC_SUCCESS)
- camsrc_error("[ISP] _camerasrc_ioctl_s_ctrl failed[%x]", ret);
/* 3AA0 - OUTPUT */
if (p->streamon_3aa0_output) {