-
Notifications
You must be signed in to change notification settings - Fork 5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bcm2835-v4l2 works incorrectly without preview #1196
Comments
The reason of problem is described in RaspiCam Documentation (https://github.com/raspberrypi/userland/blob/master/host_applications/linux/apps/raspicam/RaspiCamDocs.odt): I have patch for bcm2835-v4l, which solves this issue. |
Ping @6by9 |
You've quoted a stack dump, but without the line immediately before it which will tell you what the warning was.
|
I wasn't interested about this stuck dump - my main target was AWB problem. But it is very easy to reproduce it on 4.1.12, you can see dump in attached file. It looks very similar to #817 in fact. Maybe my solution is not perfect, but at least fixes AWB problem and makes stack dump disappear. If firmware wouldn't request null_sink it is good idea to remove it, but at the moment it may be better to have workaround than incorrectly working code. About the still mode, you may be right, I didn't double check it. So it may be the case. But I disagree with idea of waiting for Broadcom to answer, it may take ages. |
Perhaps you haven't heard, but as far as 2835 is concerned there is no Broadcom anymore - just Raspberry Pi and its supporters. |
You quoted something in a report, therefore that has to be taken as something of interest - we're not mind-readers. As I have strong suspicions that your patch will affect others on stills mode captures, I'm afraid it can't be merged until we have an answer one way or other. Regressions on things that are working is worse than misbehaviour on things that have never worked. The use of null_sink from raspistill/vid wasn't the greatest of moves by those who wrote those demo apps. It is true that something needs to request frames to take reasonable stills, but for video mode that should be totally unnecessary. V4L2 is running in video mode more often than not. |
I have idea how to improve this patch. I agree that default behavior have changed and it's my fault. But I can set by default AWB mode and it should behave the same way like now to the user. Only if someone change to manual it will stay in manual mode as it should. The same way it will be after fix in firmware. What do you think about this solution? |
firmware: Camera: Set AWB mode on starting encode See: raspberrypi/linux#1196 firmware: video_encode: option to add timing data to SPS header See: #245 firmware: resize: add support for opaque images on the input See: #440 firmware: Add IL ISP component firmware: Add option to disable touchscreen on Pi display firmware: hdmi: Accept EDID even if checksum is wrong on final read pt 2 See: http://openelec.tv/forum/124-raspberry-pi/74408-problems-with-hdmi-audio-on-openelec-5-0 firmware: dt-blob: Don't assign i2c0 to p28 and p29 on a Pi Zero See: https://www.raspberrypi.org/forums/viewtopic.php?f=107&t=127292 firmware: platform: Bump default sdram to 450 on Pi0 firmware: mailbox: Add support for enabling/disabling v3d
firmware: Camera: Set AWB mode on starting encode See: raspberrypi/linux#1196 firmware: video_encode: option to add timing data to SPS header See: raspberrypi/firmware#245 firmware: resize: add support for opaque images on the input See: raspberrypi/firmware#440 firmware: Add IL ISP component firmware: Add option to disable touchscreen on Pi display firmware: hdmi: Accept EDID even if checksum is wrong on final read pt 2 See: http://openelec.tv/forum/124-raspberry-pi/74408-problems-with-hdmi-audio-on-openelec-5-0 firmware: dt-blob: Don't assign i2c0 to p28 and p29 on a Pi Zero See: https://www.raspberrypi.org/forums/viewtopic.php?f=107&t=127292 firmware: platform: Bump default sdram to 450 on Pi0 firmware: mailbox: Add support for enabling/disabling v3d
Is there any progress on finding a proper solution? |
The referenced commit should have fixed setting manual AWB gains and resolved this issue. Waiting for someone to confirm it. It worked well for me via qv4l2, though switching back to auto WB when in stills mode doesn't work. |
Just downloaded the new kernel and indeed, I can confirm that it works! Thank you for all your efforts! |
@popcornmix Please resolve. |
firmware: Camera: Set AWB mode on starting encode See: raspberrypi/linux#1196 firmware: video_encode: option to add timing data to SPS header See: raspberrypi#245 firmware: resize: add support for opaque images on the input See: raspberrypi#440 firmware: Add IL ISP component firmware: Add option to disable touchscreen on Pi display firmware: hdmi: Accept EDID even if checksum is wrong on final read pt 2 See: http://openelec.tv/forum/124-raspberry-pi/74408-problems-with-hdmi-audio-on-openelec-5-0 firmware: dt-blob: Don't assign i2c0 to p28 and p29 on a Pi Zero See: https://www.raspberrypi.org/forums/viewtopic.php?f=107&t=127292 firmware: platform: Bump default sdram to 450 on Pi0 firmware: mailbox: Add support for enabling/disabling v3d
This issue was discovered as a result of this discussion: https://www.raspberrypi.org/forums/viewtopic.php?f=43&t=62364&p=813478
Generally, if you capture video with preview on the screen module works fine. Unfortunately, if you turn off preview, white balance and exposition parameters are ignored and set to automatic.
To reproduce run:
v4l2-ctl -v width=1024,height=768,pixelformat=I420
v4l2-ctl --set-ctrl=white_balance_auto_preset=0,red_balance=5000,blue_balance=1500
v4l2-ctl --set-ctrl=brightness=55,contrast=15,saturation=0,horizontal_flip=1,vertical_flip=1,power_line_frequency=1,sharpness=0,color_effects=0,rotate=0,color_effects_cbcr=32896
v4l2-ctl --set-ctrl=auto_exposure=1,exposure_time_absolute=300,auto_exposure_bias=12,iso_sensitivity=1
v4l2-ctl -p 10
v4l2-ctl --stream-mmap=3 --stream-skip=2 --stream-to=./test.yuv --stream-count=4
As a result video will be captured with automatic white-balance (instead of reddish). If you turn on overlay, result will be correct.
Also system log says that something goes wrong without overlay (preview):
The text was updated successfully, but these errors were encountered: