LinuxQuestions.org
Review your favorite Linux distribution.
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, 06: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, 05:14 AM   #2
zeebra
Member
 
Registered: Dec 2011
Distribution: Mageia, Slackware, Maemo
Posts: 483
Blog Entries: 1

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

Did you have a look into /sys?
 
Old 12-03-2018, 01: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, 04:21 PM   #4
zeebra
Member
 
Registered: Dec 2011
Distribution: Mageia, Slackware, Maemo
Posts: 483
Blog Entries: 1

Rep: Reputation: 101Reputation: 101
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 04:46 PM.
 
Old 12-04-2018, 01: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-10-2018, 12:51 AM   #6
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,513

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


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 03:03 AM
[SOLVED] TOSHIBA Hard Drive Impact Sensor (3D sensor) and Linux josephj Linux - Laptop and Netbook 4 11-06-2010 07:39 PM
How to write a V4L2 driver for CMOS image sensor? homn Linux - Newbie 1 05-02-2008 01:33 AM
K8S-LA (pavilion a1203w) SiS 760/964 i2c sensor question (Fedora Core 5) NeoKaiserSigma Linux - Hardware 0 07-31-2006 01:40 AM
Slackware 10.2 missing i2c-amd756 sensor code? namenobodyuses Slackware 5 04-13-2006 01:10 PM

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

All times are GMT -5. The time now is 07:16 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration