LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 11-30-2018, 05:41 AM   #1
ssuesens
LQ Newbie
 
Registered: Nov 2018
Posts: 3

Rep: Reputation: Disabled
How to access v4l2 controls at i2c sensor (camera) driver?


Hello,

how can I access the v4l2 controls from my camera sensor?

If I use v4l2-ctl -l. I get no output.

What I know is following:

I have a bridge driver which is connect with a mipi csi2 driver.
And the mipi csi2 driver is connect with the camera sensor for example ov5640.

I have only a /dev/video0 device.
 
Old 12-01-2018, 04:14 AM   #2
zeebra
Senior Member
 
Registered: Dec 2011
Distribution: Slackware
Posts: 1,830
Blog Entries: 17

Rep: Reputation: 638Reputation: 638Reputation: 638Reputation: 638Reputation: 638Reputation: 638
What do you mean by controls exactly?

Did you have a look into /sys?
 
Old 12-03-2018, 12:51 AM   #3
ssuesens
LQ Newbie
 
Registered: Nov 2018
Posts: 3

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by zeebra View Post
What do you mean by controls exactly?

The camera has for example following controls:
gain
brightness

Did you have a look into /sys?
Yes I have looked into sys file system, but I have only a /dev/video0 device.

The v4l2 API say:
When a sub-device is registered with a V4L2 driver by calling v4l2_device_register_subdev() and the ctrl_handler fields of both v4l2_subdev and v4l2_device are set, then the controls of the subdev will become automatically available in the V4L2 driver as well. If the subdev driver contains controls that already exist in the V4L2 driver, then those will be skipped (so a V4L2 driver can always override a subdev control).

But my driver are asynchronous registered.

My driver structure looks following:

bridge driver -> csi-driver -> sensor driver (includes controls)
register-async-notifer for csi driver register-async-notifer for sensor driver
register video device
 
Old 12-03-2018, 03:21 PM   #4
zeebra
Senior Member
 
Registered: Dec 2011
Distribution: Slackware
Posts: 1,830
Blog Entries: 17

Rep: Reputation: 638Reputation: 638Reputation: 638Reputation: 638Reputation: 638Reputation: 638
Have you inspected lspci -vv and lsusb -vv and dmesg and lsmod to find out if everything is as it is expected to be?

Is it a custom kernel or a distro kernel? Which distro do you use?

Try
Code:
v4l2-ctl --all
What does it say?

Last edited by zeebra; 12-03-2018 at 03:46 PM.
 
Old 12-04-2018, 12:55 AM   #5
ssuesens
LQ Newbie
 
Registered: Nov 2018
Posts: 3

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by zeebra View Post
Have you inspected lspci -vv and lsusb -vv and dmesg and lsmod to find out if everything is as it is expected to be?

Is it a custom kernel or a distro kernel? Which distro do you use?

Try
Code:
v4l2-ctl --all
What does it say?
Thank you for your help,
but I found out that this problem comes from the driver.
 
Old 12-09-2018, 11:51 PM   #6
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524

Rep: Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015
Try this: https://linuxtv.org/downloads/v4l-dv...-controls.html
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to forward IOCTL's from i2c-dev.c to adapter driver (i2c-rt3352.c) elonica.pl Linux - Kernel 2 08-23-2011 02:03 AM
[SOLVED] TOSHIBA Hard Drive Impact Sensor (3D sensor) and Linux josephj Linux - Laptop and Netbook 4 11-06-2010 06:39 PM
How to write a V4L2 driver for CMOS image sensor? homn Linux - Newbie 1 05-02-2008 12:33 AM
K8S-LA (pavilion a1203w) SiS 760/964 i2c sensor question (Fedora Core 5) NeoKaiserSigma Linux - Hardware 0 07-31-2006 12:40 AM
Slackware 10.2 missing i2c-amd756 sensor code? namenobodyuses Slackware 5 04-13-2006 12:10 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 05:55 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration