mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jiri Benc <jbenc@suse.cz>
To: v4l <video4linux-list@redhat.com>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH 2/2] video/tuner: add VIDEO_G_FREQUENCY and freq range to VIDIOC_G_TUNER
Date: Fri, 6 May 2005 16:15:03 +0200	[thread overview]
Message-ID: <20050506161503.094bfb0c@griffin.suse.cz> (raw)

This patch adds a VIDIOC_G_FREQUENCY command to tuner-core.c and sets
lowest and highest tunable frequencies in v4l2_tuner structure returned
by VIDIOC_G_TUNER command.


Signed-off-by: Jiri Benc <jbenc@suse.cz>

--- a/drivers/media/video/tuner-core.c
+++ b/drivers/media/video/tuner-core.c
@@ -360,6 +360,15 @@
 		set_freq(client,f->frequency);
 		break;
 	}
+	case VIDIOC_G_FREQUENCY:
+	{
+		struct v4l2_frequency *f = arg;
+
+		SWITCH_V4L2;
+		f->type = t->mode;
+		f->frequency = t->freq;
+		break;
+	}
 	case VIDIOC_G_TUNER:
 	{
 		struct v4l2_tuner *tuner = arg;
@@ -367,6 +376,8 @@
 		SWITCH_V4L2;
 		if (V4L2_TUNER_RADIO == t->mode  &&  t->has_signal)
 			tuner->signal = t->has_signal(client);
+		tuner->rangelow = tv_range[0] * 16;
+		tuner->rangehigh = tv_range[1] * 16;
 		break;
 	}
 	default:


--
Jiri Benc
SUSE Labs

                 reply	other threads:[~2005-05-06 14:15 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20050506161503.094bfb0c@griffin.suse.cz \
    --to=jbenc@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=video4linux-list@redhat.com \
    /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

all inboxes | Powered by JetHome®