V4L2: Minumum Requirements for New Drivers

Slides:



Advertisements
Similar presentations
Complete CompTIA A+ Guide to PCs, 6e Chapter 5: Logical Troubleshooting © 2014 Pearson IT Certification
Advertisements

Lecture Roger Sutton CO331 Visual programming 15: Debugging 1.
16-Jun-15 Exceptions. Errors and Exceptions An error is a bug in your program dividing by zero going outside the bounds of an array trying to use a null.
Exceptions. Errors and Exceptions An error is a bug in your program –dividing by zero –going outside the bounds of an array –trying to use a null reference.
Programming – Touch Sensors Intro to Robotics. The Limit Switch When designing robotic arms there is always the chance the arm will move too far up or.
Copyright © 2001 by Wiley. All rights reserved. Chapter 1: Introduction to Programming and Visual Basic Computer Operations What is Programming? OOED Programming.
Programming Paradigms Imperative programming Functional programming Logic programming Event-driven programming Object-oriented programming A programming.
Data Flow Diagram A method used to analyze a system in a structured way Used during: Analysis stage: to describe the current system Design stage: to describe.
10/18/2007 EETS Bluetooth Bluetooth Architecture Bluetooth Applications The Bluetooth Protocol Stack The Bluetooth Radio Layer The Bluetooth Baseband.
Errors And How to Handle Them. GIGO There is a saying in computer science: “Garbage in, garbage out.” Is this true, or is it just an excuse for bad programming?
Classroom Interactions in Science and Math # 05: Classroom Norms.
Unit 2 Sections 1-6 Sentence Frames 5th Grade. Unit 2 Section 1 Sentence Frames 5th Grade.
CHAPTER 10: CORE MECHANICS Definitions and Mechanisms.
Recommended name changes for buttons in Schedule Sept 27, 2013.
Microscope Middleware Stand 29. Mai Microscope Manager Design Java SWIG MMCoreJ_wrap C++ MMCore C++ Device Drivers 1 class, 244 methods 6306 loc,
There would come a time when we have to stop loving someone not because that person started hating us but because we found out that they'd be happier if.
Object Oriented Software Development
Introduction to c++ programming - object oriented programming concepts - Structured Vs OOP. Classes and objects - class definition - Objects - class scope.
Chapter One An Introduction to Programming and Visual Basic.
Slide 1 Improving your Persuasion and Influencing Skills for better negotiated outcomes Presented by Katrena Friel March 2009.
What is it? The feeling that someone your own age is pushing you toward making a certain choice, good or bad. Example: A friend begs to borrow something.
Problem Solving, Decision Making, Negotiation and Compromise
Lesson 8: The OOP concepts of Polymorphism and Interfaces.
Interview techniques All interviews are similar in that the interviewer asks the interviewee questions, all interviewers will have a set out structure.
Having fun ignoring signals. Where do you use feedback in your life?
Lecture 2 Page 1 CS 236 Online Security Policies Security policies describe how a secure system should behave Policy says what should happen, not how you.
How to use a Pixel Shader CMT3317. Pixel shaders There is NO requirement to use a pixel shader for the coursework though you can if you want to You should.
Video4Linux: Supporting SoCs Hans Verkuil Tandberg Telecom AS.
Video4Linux: Past Present Future Hans Verkuil Tandberg Telecom AS.
Video4Linux: Progress, New videobuf2 Framework and the Future Hans Verkuil Cisco Systems Norway.
Video4Linux: Supporting SoCs Hans Verkuil Cisco Systems.
Saying “I’m Sorry” (and meaning it!)
I Can Show What I Know When I Gotta Go! (…to the Bathroom)
Mobile Testing - Bug Report
Generics, Exceptions and Undo Command
Selection API & Non-STD/DV_TIMINGS Devices
“All Different, All Equal”
What to Do About Gossip and Rumors
Programming – Touch Sensors
Wedding Bands Really Do Make a Difference at Your Wedding
Wedding Bands Just Make Your Wedding Complete
Strategies for Multiplication
I Can Show What I Know When I Gotta Go! (…to the Bathroom)
Present Simple / Present Continuous
CSE373: Data Structures & Algorithms Lecture 25: Software-Design Interlude – Preserving Abstractions Catie Baker Spring 2015.
Conditions and Ifs BIS1523 – Lecture 8.
In Class Program: Today in History
Lesson 16: Functions with Return Values
Saying “I’m Sorry” (and meaning it!)
Parsing and More Parsing
Organization Leadership Skill Area
TigerSHARC processor and evaluation board
March 17, 1999 Judy Slein WebDAV Collections March 17, 1999 Judy Slein
INVISIBLE I am here today to talk about something invisible – radiowaves. Radiowaves are a resource that everyone here uses. You use them every day when.
Complete CompTIA A+ Guide to PCs, 6e
Fundamentals of Data Representation
Pei Wang Temple University Philadelphia, USA
CSE373: Data Structures & Algorithms Lecture 16: Software-Design Interlude – Preserving Abstractions Dan Grossman Fall 2013.
Chapter One: An Introduction to Programming and Visual Basic
6.001 SICP Further Variations on a Scheme
Discovering Use Cases.
Thermal arm-wrestling
What problems are there for knowing things in the human sciences?
ECE 352 Digital System Fundamentals
The Troubleshooting theory
Exceptions 10-May-19.
Variables in C Topics Naming Variables Declaring Variables
What is an electric current?
Proposed Definition of the Pause Function
School Bus Safety Caverna Schools
Presentation transcript:

V4L2: Minumum Requirements for New Drivers Hans Verkuil Cisco Systems Norway

Staging If it uses controls, then it must use the control framework. Rationale: work is in progress to convert all drivers to the control framework. Having new drivers come in that don't use it makes it hard to ever finish the conversion. I2C devices must be implemented as sub-devices, using struct v4l2_subdev. Rationale: this ensures reusability. However, might this be too strict for staging?

Mainline Use struct v4l2_device and struct v4l2_fh. Subdevs use v4l2_subdev. Use the control framework for control handling. Use videobuf2 for buffer handling (exception: DVB buffers as long as vb2 doesn't support that). Must pass v4l2-compliance without errors. Document this in the wiki in the developer section: “Development: Submitting Drivers”

V4L2 API Ambiguities and Improvements Hans Verkuil Cisco Systems Norway

Unknown Colorspace If a device doesn't tell the driver what colorspace it uses (uvc), should the driver guess or tell the application that the colorspace is unknown? The driver is best at guessing a colorspace (sRGB usually), but may theoretically get it wrong. Can the application do anything useful with 'unknown colorspace'? Proposal: the driver should guess and we should never return 'Unknown Colorspace'.

Pixel Aspect Ratio Pixel aspect: currently this is only available through VIDIOC_CROPCAP. It never really belonged to VIDIOC_CROPCAP IMHO. It's just not a property of cropping/composing. It really belongs to the input/output timings (STD or DV_TIMINGS). That's where the pixel aspect ratio is determined. It is possible to add it to the dv_timings struct and we can also add it to struct v4l2_standard, but drivers will need to tell the core what the pixel aspect ratio is since VIDIOC_ENUMSTD is now handled inside the V4L2 core and doesn't call the drivers anymore. An other possibility is to add a new ioctl for this: VIDIOC_G_PIXELASPECT.

QUERYCAP for subdevs? There are no standard ioctls that one could call for a v4l-subdev node to determine whether the device node is a subdev node. Propose to have subdev nodes support VIDIOC_QUERYCAP as well, and just set a SUBDEVICE capability. Most fields of struct v4l2_capability apply to a subdev as well, except for 'card'. Alternative: create a VIDIOC_SUBDEV_QUERYCAP.

Tuner Ownership How to handle tuner ownership if both a video and radio node share the same tuner? Obvious rules: Calling S_FREQ, S_TUNER, S_MODULATOR or S_HW_FREQ_SEEK will make the filehandle the owner if possible. EBUSY is returned if someone else owns the tuner and you would need to switch the tuner mode. Ditto for ioctls that expect a valid tuner configuration like QUERYSTD. This is likely to be driver dependent, though. Just opening a device node should not switch ownership

Tuner Ownership But it is not clear what to do when any of these ioctls are called: G_FREQUENCY: could just return the last set frequency for radio or TV: requires that that is remembered when switching ownership. This is what happens today, so G_FREQUENCY does not have to switch ownership. G_TUNER: the rxsubchans, signal and afc fields all require ownership of the tuner. So in principle you would want to switch ownership when G_TUNER is called. On the other hand, that would mean that calling v4l2-ctl --all -d /dev/radio0 would change tuner ownership to radio for /dev/video0. That's rather unexpected. It is possible to just set rxsubchans, signal and afc to 0 if the device node doesn't own the tuner. I'm inclined to do that. Should closing a device node switch ownership? E.g. if nobody has a radio device open, should the tuner switch back to TV mode automatically? I don't think it should. How about hybrid tuners?