From: Daniel Gomez <daniel@qtec.com>
To: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
linux-media@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Daniel Gomez <daniel@qtec.com>
Subject: [PATCH] media: imx214: Fix stop streaming
Date: Thu, 3 Oct 2019 16:46:24 +0200 [thread overview]
Message-ID: <20191003144624.17899-1-daniel@qtec.com> (raw)
Stop video streaming when requested.
When s_stream is called to stop the video streaming, if/else condition calls
start_streaming function instead of the one for stopping it.
Fixes: 436190596241 ("media: imx214: Add imx214 camera sensor driver")
Signed-off-by: Daniel Gomez <daniel@qtec.com>
---
You can find some logs before/after running in the hardware. Notice 0x100
register is for starting/stopping the video streaming from the imx214 sensor.
* Before patch:
# media-ctl -d /dev/media0 -l '"msm_csiphy0":1->"msm_csid0":0[1],"msm_csid0":1->"msm_ispif0":0[1],"msm_ispif0":1->"msm_vfe0_rdi0":0[1]'
# media-ctl -d /dev/media0 -V '"imx214 3-001a":0[fmt:SRGGB10/1920x1080],"msm_csiphy0":0[fmt:SRGGB10/1920x1080],"msm_csid0":0[fmt:SRGGB10/1920x1080],"msm_ispif0":0[fmt:SRGGB10/1920x1080],"msm_vfe0_rdi0":0[fmt:SRGGB10/1920x1080]'
# yavta -f SRGGB10P -s 1920x1080 -n 1 --capture=5 /dev/v4l/by-path/platform-a34000.camss-video-index0
Device /dev/v4l/by-path/platform-a34000.camss-video-index0 opened.
Device `Qualcomm Camera Subsystem' on `platform:a34000.camss' (driver 'qcom-camss') supports video, capture, with mplanes.
Video format set: SRGGB10P (41415270) 1920x1080 field none, 1 planes:
* Stride 2400, buffer size 2592000
Video format: SRGGB10P (41415270) 1920x1080 field none, 1 planes:
* Stride 2400, buffer size 2592000
1 buffers requested.
length: 1 offset: 4093609832 timestamp type/source: mono/EoF
Buffer 0/0 mapped at address 0xffff84b6b000.
0 (0) [-] none 0 2592000 B 30.682759 30.705111 4.697 fps ts mono/EoF
1 (0) [-] none 1 2592000 B 30.749391 30.771609 15.008 fps ts mono/EoF
2 (0) [-] none 2 2592000 B 30.816042 30.838225 15.004 fps ts mono/EoF
3 (0) [-] none 3 2592000 B 30.882690 30.904992 15.004 fps ts mono/EoF
4 (0) [-] none 4 2592000 B 30.949333 30.971543 15.005 fps ts mono/EoF
Captured 5 frames in 0.501681 seconds (9.966480 fps, 0.000000 B/s).
1 buffers released.
# v4l2-dbg -d /dev/v4l-subdev19 -g 0x100
ioctl: VIDIOC_DBG_G_REGISTER
Register 0x00000100 = 1h (1d 00000001b)
* After patch:
# media-ctl -d /dev/media0 -l '"msm_csiphy0":1->"msm_csid0":0[1],"msm_csid0":1->"msm_ispif0":0[1],"msm_ispif0":1->"msm_vfe0_rdi0":0[1]'
# media-ctl -d /dev/media0 -V '"imx214 3-001a":0[fmt:SRGGB10/1920x1080],"msm_csiphy0":0[fmt:SRGGB10/1920x1080],"msm_csid0":0[fmt:SRGGB10/1920x1080],"msm_ispif0":0[fmt:SRGGB10/1920x1080],"msm_vfe0_rdi0":0[fmt:SRGGB10/1920x1080]'
# yavta -f SRGGB10P -s 1920x1080 -n 1 --capture=5 /dev/v4l/by-path/platform-a34000.camss-video-index0
Device /dev/v4l/by-path/platform-a34000.camss-video-index0 opened.
Device `Qualcomm Camera Subsystem' on `platform:a34000.camss' (driver 'qcom-camss') supports video, capture, with mplanes.
Video format set: SRGGB10P (41415270) 1920x1080 field none, 1 planes:
* Stride 2400, buffer size 2592000
Video format: SRGGB10P (41415270) 1920x1080 field none, 1 planes:
* Stride 2400, buffer size 2592000
1 buffers requested.
length: 1 offset: 3764913896 timestamp type/source: mono/EoF
Buffer 0/0 mapped at address 0xffffb62f7000.
0 (0) [-] none 0 2592000 B 31.283473 31.306390 4.697 fps ts mono/EoF
1 (0) [-] none 1 2592000 B 31.350115 31.372475 15.006 fps ts mono/EoF
2 (0) [-] none 2 2592000 B 31.416765 31.439728 15.004 fps ts mono/EoF
3 (0) [-] none 3 2592000 B 31.483410 31.505791 15.005 fps ts mono/EoF
4 (0) [-] none 4 2592000 B 31.550058 31.573025 15.004 fps ts mono/EoF
Captured 5 frames in 0.502440 seconds (9.951430 fps, 0.000000 B/s).
1 buffers released.
# v4l2-dbg -d /dev/v4l-subdev19 -g 0x100
ioctl: VIDIOC_DBG_G_REGISTER
Register 0x00000100 = 0h (0d 00000000b)
drivers/media/i2c/imx214.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/i2c/imx214.c b/drivers/media/i2c/imx214.c
index 159a3a604f0e..24659cb0d083 100644
--- a/drivers/media/i2c/imx214.c
+++ b/drivers/media/i2c/imx214.c
@@ -785,7 +785,7 @@ static int imx214_s_stream(struct v4l2_subdev *subdev, int enable)
if (ret < 0)
goto err_rpm_put;
} else {
- ret = imx214_start_streaming(imx214);
+ ret = imx214_stop_streaming(imx214);
if (ret < 0)
goto err_rpm_put;
pm_runtime_put(imx214->dev);
--
2.20.1
next reply other threads:[~2019-10-03 14:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-03 14:46 Daniel Gomez [this message]
2019-10-03 19:59 ` [PATCH] media: imx214: Fix stop streaming Ricardo Ribalda Delgado
2019-11-07 12:38 ` Ricardo Ribalda Delgado
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191003144624.17899-1-daniel@qtec.com \
--to=daniel@qtec.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=ricardo.ribalda@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.