Re: [PATCH 2/5] media: v4l2-core changes to use media tuner token api

Shuah Khan
2014-09-24T15:30:52Z

On 09/24/2014 05:57 AM, Hans Verkuil wrote:
> Hi Shuah,
>
> Here is my review...
>
> On 09/22/2014 05:00 PM, Shuah Khan wrote:
>> Changes to v4l2-core to hold tuner token in v4l2 ioctl that change
>> the tuner modes, and reset the token from fh exit. The changes are
>> limited to vb2 calls that disrupt digital stream. vb1 changes are
>> made in the driver. The following ioctls are changed:
>>
>> S_INPUT, S_OUTPUT, S_FMT, S_TUNER, S_MODULATOR, S_FREQUENCY,
>
> S_MODULATOR doesn't need to take a token. Certainly not a tuner token,
> since it is a modulator, not a tuner. There aren't many modulator drivers,
> and none of them have different modes.
>
> The same is true for S_OUTPUT: it deals with outputs, so it has nothing
> to do with tuners since those are for input.
>
>> S_STD, S_HW_FREQ_SEEK:
>>
>> - hold tuner in shared analog mode before calling appropriate
>> ops->vidioc_s_*
>> - return leaving tuner in shared mode.
>> - Note that S_MODULATOR is now implemented in the core
>> previously FCN.
>>
>> QUERYSTD:
>> - hold tuner in shared analog mode before calling
>> ops->vidioc_querystd
>> - return after calling put tuner - this simply decrements the
>> owners. Leaves tuner in shared analog mode if owners > 0
>
> I would handle QUERYSTD the same as the ones in the first group.
> It's a fair assumption that once you call QUERYSTD you expect to
> switch the tuner to analog mode and keep it there.
>
> I'm missing STREAMON in this list as well.
>
> With regards to G_TUNER and ENUM_INPUT, I will reply to the post that
> discusses that topic.

Hans,

Didn't see you address G_TUNER and ENUM_INPUT in your other response.
Hope I didn't miss it.

thanks,
-- Shuah

--
Shuah Khan
Sr. Linux Kernel Developer
Samsung Research America (Silicon Valley)
shuahkh@osg.samsung.com | (970) 217-8978