All of lore.kernel.org
 help / color / mirror / Atom feed
From: Huang Shijie <shijie8@gmail.com>
To: Hans Verkuil <hverkuil@xs4all.nl>
Cc: linux-media@vger.kernel.org, Hans Verkuil <hans.verkuil@cisco.com>
Subject: Re: [RFC PATCH 08/18] tlg2300: fix radio querycap
Date: Mon, 04 Feb 2013 23:07:00 -0500	[thread overview]
Message-ID: <51108564.8090609@gmail.com> (raw)
In-Reply-To: <201302040938.17407.hverkuil@xs4all.nl>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=gb18030; format=flowed, Size: 2118 bytes --]

ÓÚ 2013Äê02ÔÂ04ÈÕ 03:38, Hans Verkuil дµÀ:
> On Mon February 4 2013 05:36:56 Huang Shijie wrote:
>> ÓÚ 2013Äê01ÔÂ31ÈÕ 05:25, Hans Verkuil дµÀ:
>>> From: Hans Verkuil<hans.verkuil@cisco.com>
>>>
>>> Signed-off-by: Hans Verkuil<hans.verkuil@cisco.com>
>>> ---
>>>   drivers/media/usb/tlg2300/pd-radio.c |    7 ++++++-
>>>   1 file changed, 6 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/media/usb/tlg2300/pd-radio.c b/drivers/media/usb/tlg2300/pd-radio.c
>>> index 854ffa0..80307d3 100644
>>> --- a/drivers/media/usb/tlg2300/pd-radio.c
>>> +++ b/drivers/media/usb/tlg2300/pd-radio.c
>>> @@ -147,7 +147,12 @@ static int vidioc_querycap(struct file *file, void *priv,
>>>   	strlcpy(v->driver, "tele-radio", sizeof(v->driver));
>>>   	strlcpy(v->card, "Telegent Poseidon", sizeof(v->card));
>>>   	usb_make_path(p->udev, v->bus_info, sizeof(v->bus_info));
>>> -	v->capabilities = V4L2_CAP_TUNER | V4L2_CAP_RADIO;
>>> +	v->device_caps = V4L2_CAP_TUNER | V4L2_CAP_RADIO;
>>> +	/* Report all capabilities of the USB device */
>>> +	v->capabilities = v->device_caps | V4L2_CAP_DEVICE_CAPS |
>>> +			V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_VBI_CAPTURE |
>> why add these video/vbi capabilities?
> The capabilities field contains the V4L2 capabilities of the whole device
> (i.e. radio+video+vbi), the device_caps field contains the capabilities of
> just that node.
>
> In the past different drivers interpreted the capabilities field differently:
> either with the capabilities of the whole device or the capabilities of just
> that device node. This situation was clarified recently and the device_caps
> field was added instead so both the caps for the full device and the current
> device node are now available.
>
> This wasn't there when the tlg2300 driver was developed, and the spec was
> never clear enough regarding the meaning of the capabilities field.
>
> So this is a later improvement to the V4L2 API.


thanks for the explanation.

Acked-by: Huang Shijie <shijie8@gmail.com>


> Regards,
>
> 	Hans
>
>>> +			V4L2_CAP_AUDIO | V4L2_CAP_STREAMING
>>> +			V4L2_CAP_READWRITE;
>>>   	return 0;
>>>   }
>>>


  reply	other threads:[~2013-02-04 15:03 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-31 10:25 [RFC PATCH 00/18] tlg2300: various v4l2-compliance fixes Hans Verkuil
2013-01-31 10:25 ` [RFC PATCH 01/18] tlg2300: use correct device parent Hans Verkuil
2013-01-31 10:25   ` [RFC PATCH 02/18] tlg2300: fix tuner and frequency handling of the radio device Hans Verkuil
2013-02-04  3:46     ` Huang Shijie
2013-01-31 10:25   ` [RFC PATCH 03/18] tlg2300: switch to unlocked_ioctl Hans Verkuil
2013-02-04  3:48     ` Huang Shijie
2013-01-31 10:25   ` [RFC PATCH 04/18] tlg2300: remove ioctls that are invalid for radio devices Hans Verkuil
2013-02-04  4:16     ` Huang Shijie
2013-02-04  8:34       ` Hans Verkuil
2013-02-05  4:03     ` Huang Shijie
2013-01-31 10:25   ` [RFC PATCH 05/18] tlg2300: embed video_device instead of allocating it Hans Verkuil
2013-02-04  4:26     ` Huang Shijie
2013-01-31 10:25   ` [RFC PATCH 06/18] tlg2300: add control handler for radio device node Hans Verkuil
2013-02-04  4:47     ` Huang Shijie
2013-01-31 10:25   ` [RFC PATCH 07/18] tlg2300: switch to v4l2_fh Hans Verkuil
2013-02-04  4:32     ` Huang Shijie
2013-01-31 10:25   ` [RFC PATCH 08/18] tlg2300: fix radio querycap Hans Verkuil
2013-02-04  4:36     ` Huang Shijie
2013-02-04  8:38       ` Hans Verkuil
2013-02-05  4:07         ` Huang Shijie [this message]
2013-01-31 10:25   ` [RFC PATCH 09/18] tlg2300: add missing video_unregister_device Hans Verkuil
2013-02-04  4:38     ` Huang Shijie
2013-01-31 10:25   ` [RFC PATCH 10/18] tlg2300: embed video_device Hans Verkuil
2013-02-04  4:39     ` Huang Shijie
2013-01-31 10:25   ` [RFC PATCH 11/18] tlg2300: fix querycap Hans Verkuil
2013-02-04  4:43     ` Huang Shijie
2013-01-31 10:25   ` [RFC PATCH 12/18] tlg2300: fix frequency handling Hans Verkuil
2013-02-04  4:44     ` Huang Shijie
2013-01-31 10:25   ` [RFC PATCH 13/18] tlg2300: fix missing audioset Hans Verkuil
2013-02-04  4:48     ` Huang Shijie
2013-02-04  8:39       ` Hans Verkuil
2013-02-05  4:07     ` Huang Shijie
2013-01-31 10:25   ` [RFC PATCH 14/18] tlg2300: implement the control framework Hans Verkuil
2013-02-04  4:46     ` Huang Shijie
2013-01-31 10:25   ` [RFC PATCH 15/18] tlg2300: remove empty vidioc_try_fmt_vid_cap, add missing g_std Hans Verkuil
2013-02-04  4:51     ` Huang Shijie
2013-01-31 10:25   ` [RFC PATCH 16/18] tlg2300: allow multiple opens Hans Verkuil
2013-02-04  4:54     ` Huang Shijie
2013-01-31 10:25   ` [RFC PATCH 17/18] tlg2300: Remove logs() macro Hans Verkuil
2013-02-04  4:54     ` Huang Shijie
2013-01-31 10:25   ` [RFC PATCH 18/18] tlg2300: update MAINTAINERS file Hans Verkuil
2013-02-04  4:55     ` Huang Shijie
2013-02-04  8:40       ` Hans Verkuil
2013-02-04  2:40   ` [RFC PATCH 01/18] tlg2300: use correct device parent Huang Shijie
2013-02-04  8:40     ` Hans Verkuil
2013-02-01  2:22 ` [RFC PATCH 00/18] tlg2300: various v4l2-compliance fixes Huang Shijie
2013-02-01  7:49   ` Hans Verkuil
2013-02-01  8:02     ` Huang Shijie
2013-02-01  8:07       ` Hans Verkuil

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=51108564.8090609@gmail.com \
    --to=shijie8@gmail.com \
    --cc=hans.verkuil@cisco.com \
    --cc=hverkuil@xs4all.nl \
    --cc=linux-media@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.