Em 17-08-2012 07:35, Hans Verkuil escreveu:
Hi all,
I've prepared a presentation for the upcoming workshop based on my RFC and the comments I received.
It is available here:
http://hverkuil.home.xs4all.nl/presentations/v4l2-workshop-2012.odp http://hverkuil.home.xs4all.nl/presentations/v4l2-workshop-2012.pdf
Attendees of the workshop: please review this before the workshop starts. I want to go through this list fairly quickly (particularly slides 1-14) so we can have more time for other topics.
With regards to "tuner ownership" topic, I think it should be handled on a more generic way. There are several parts of the media devices that could be owned by more than one device type: - tuners; - i2c buses; - DMA engines; - device-internal buses; ...
So, devices that share the same resource for more than one different type of access (radio, analog TV, digital TV, subdev API), should be locking the used resources.
A good news is that the i2c concurrency can now be handled using i2c_lock_adapter() and i2c_unlock_adapter(), but currently, just one driver currently uses it.
In practice, concurrency between radio and analog TV is not the worse problem, as, typically, there are different applications for each.
The concurrency between analog and digital TV is a way more severe, as there are well-used applications (mythtv) that loves to play with both API's and are known to cause several race effects.
Most hybrid devices don't allow neither tune or stream at the same time. Yet, it could be useful to allow tuning into one frequency and check using both DVB and V4L API's, if a frequency is locked and if the signal is either digital or analog, e. g., just like we did with streaming ownership, at V4L2, one file descriptor may have write access and the other ones read access only.
Regards, Mauro