From: Mauro Carvalho Chehab <mchehab@redhat.com>
To: Hans Verkuil <hverkuil@xs4all.nl>
Cc: linux-media@vger.kernel.org, Hans Verkuil <hans.verkuil@cisco.com>
Subject: Re: [RFCv1 PATCH 7/7] tuner-core: s_tuner should not change tuner mode.
Date: Sat, 11 Jun 2011 10:54:59 -0300 [thread overview]
Message-ID: <4DF373B3.4000601@redhat.com> (raw)
In-Reply-To: <2a85334a8d3f0861fc10f2d6adbf46946d12bb0e.1307798213.git.hans.verkuil@cisco.com>
Em 11-06-2011 10:34, Hans Verkuil escreveu:
> From: Hans Verkuil <hans.verkuil@cisco.com>
>
> According to the spec the tuner type field is not used when calling
> S_TUNER: index, audmode and reserved are the only writable fields.
>
> So remove the type check. Instead, just set the audmode if the current
> tuner mode is set to radio.
I suspect that this patch also breaks support for a separate radio tuner.
if tuner-type is not properly filled, then the easiest fix would be to
revert some changes done at the tuner cleanup/fixup patches applied on .39.
Yet, the previous logic were trying to hint the device mode, with is bad
(that's why it was changed).
The proper change seems to add a parameter to this callback, set by the
bridge driver, informing if the device is using radio or video mode.
We need also to patch the V4L API specs, as it allows using a video node
for radio, and vice versa. This is not well supported, and it seems silly
to keep it at the specs and needing to add hints at the drivers due to
that.
Cheers,
Mauro
>
> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
> ---
> drivers/media/video/tuner-core.c | 8 +++-----
> 1 files changed, 3 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/media/video/tuner-core.c b/drivers/media/video/tuner-core.c
> index 7280998..0ffcf54 100644
> --- a/drivers/media/video/tuner-core.c
> +++ b/drivers/media/video/tuner-core.c
> @@ -1156,12 +1156,10 @@ static int tuner_s_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *vt)
> {
> struct tuner *t = to_tuner(sd);
>
> - if (!set_mode(t, vt->type))
> - return 0;
> -
> - if (t->mode == V4L2_TUNER_RADIO)
> + if (t->mode == V4L2_TUNER_RADIO) {
> t->audmode = vt->audmode;
> - set_freq(t, 0);
> + set_freq(t, 0);
> + }
>
> return 0;
> }
next prev parent reply other threads:[~2011-06-11 13:55 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-11 13:34 [RFCv1 PATCH 0/7] tuner-core: fix g_freq/s_std and g/s_tuner Hans Verkuil
2011-06-11 13:34 ` [RFCv1 PATCH 1/7] tuner-core: rename check_mode to supported_mode Hans Verkuil
2011-06-11 13:34 ` [RFCv1 PATCH 2/7] tuner-core: change return type of set_mode_freq to bool Hans Verkuil
2011-06-11 13:34 ` [RFCv1 PATCH 3/7] tuner-core: fix g_frequency support Hans Verkuil
2011-06-11 13:44 ` Mauro Carvalho Chehab
2011-06-11 13:53 ` Hans Verkuil
2011-06-11 13:34 ` [RFCv1 PATCH 4/7] tuner-core: simplify the standard fixup Hans Verkuil
2011-06-11 13:34 ` [RFCv1 PATCH 5/7] tuner-core: fix s_std and s_tuner Hans Verkuil
2011-06-11 13:34 ` [RFCv1 PATCH 6/7] tuner-core: fix g_tuner Hans Verkuil
2011-06-11 13:48 ` Mauro Carvalho Chehab
2011-06-11 13:34 ` [RFCv1 PATCH 7/7] tuner-core: s_tuner should not change tuner mode Hans Verkuil
2011-06-11 13:54 ` Mauro Carvalho Chehab [this message]
2011-06-11 17:27 ` Hans Verkuil
2011-06-11 18:21 ` Andy Walls
2011-06-11 19:04 ` Mauro Carvalho Chehab
2011-06-12 11:36 ` Hans Verkuil
2011-06-12 11:59 ` Mauro Carvalho Chehab
2011-06-12 12:13 ` Mauro Carvalho Chehab
2011-06-12 12:30 ` Hans Verkuil
2011-06-12 12:53 ` Andy Walls
2011-06-12 13:23 ` Hans Verkuil
2011-06-12 13:44 ` Andy Walls
2011-06-12 13:57 ` Devin Heitmueller
2011-06-12 14:28 ` Mauro Carvalho Chehab
2011-06-12 15:34 ` Andy Walls
2011-06-12 17:38 ` Mauro Carvalho Chehab
2011-06-12 14:06 ` Hans Verkuil
2011-06-12 12:23 ` Hans Verkuil
2011-06-12 14:11 ` Mauro Carvalho Chehab
2011-06-12 14:33 ` Hans Verkuil
2011-06-12 15:29 ` Andy Walls
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=4DF373B3.4000601@redhat.com \
--to=mchehab@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox