All of lore.kernel.org
 help / color / mirror / Atom feed
From: Antti Palosaari <crope@iki.fi>
To: linux-media@vger.kernel.org
Cc: Mauro Carvalho Chehab <m.chehab@samsung.com>,
	Hans Verkuil <hverkuil@xs4all.nl>, Antti Palosaari <crope@iki.fi>
Subject: [PATCH RFC 0/4] SDR API set ADC and RF frequency
Date: Thu, 12 Dec 2013 01:53:59 +0200	[thread overview]
Message-ID: <1386806043-5331-1-git-send-email-crope@iki.fi> (raw)

Here is small example what it looks like when v4l2-ctl is used.

[crope@localhost v4l2-ctl]$ 
[crope@localhost v4l2-ctl]$ ./v4l2-ctl -d /dev/sdr0 --all
Driver Info (not using libv4l2):
	Driver name   : rtl2832_sdr
	Card type     : Realtek RTL2832U SDR
	Bus info      : usb-0000:00:13.2-2
	Driver version: 3.13.0
	Capabilities  : 0x85010001
		Video Capture
		Tuner
		Read/Write
		Streaming
		Device Capabilities
	Device Caps   : 0x05010001
		Video Capture
		Tuner
		Read/Write
		Streaming
Priority: 2
Frequency for tuner 0: 0 (0.000000 MHz)
Tuner 0:
	Name                 : ADC
	Capabilities         : 1 Hz freq-bands 
	Frequency range      : 0.300000 MHz - 3.200000 MHz
Video input : 0 (SDR data: ok)

User Controls
                     tuner_gain (int)    : min=0 max=102 step=1 default=0 value=0
[crope@localhost v4l2-ctl]$ ./v4l2-ctl -d /dev/sdr0 --tuner-index=1 --all
Driver Info (not using libv4l2):
	Driver name   : rtl2832_sdr
	Card type     : Realtek RTL2832U SDR
	Bus info      : usb-0000:00:13.2-2
	Driver version: 3.13.0
	Capabilities  : 0x85010001
		Video Capture
		Tuner
		Read/Write
		Streaming
		Device Capabilities
	Device Caps   : 0x05010001
		Video Capture
		Tuner
		Read/Write
		Streaming
Priority: 2
Frequency for tuner 1: 0 (0.000000 MHz)
Tuner 1:
	Name                 : RF
	Capabilities         : 62.5 Hz freq-bands 
	Frequency range      : 50.000 MHz - 1500.000 MHz
Video input : 0 (SDR data: ok)

User Controls
                     tuner_gain (int)    : min=0 max=102 step=1 default=0 value=0
(reverse-i-search)`en': gedit drivers/media/radio/radio-ke^Ce.c
[crope@localhost v4l2-ctl]$ ./v4l2-ctl -d /dev/sdr0 --tuner-index=0 --list-freq-bands
ioctl: VIDIOC_ENUM_FREQ_BANDS
	Index          : 0
	Modulation     : Unknown
	Capability     : 1 Hz freq-bands 
	Frequency Range: 0.300000 MHz - 0.300000 MHz

	Index          : 1
	Modulation     : Unknown
	Capability     : 1 Hz freq-bands 
	Frequency Range: 0.900001 MHz - 2.800000 MHz

	Index          : 2
	Modulation     : Unknown
	Capability     : 1 Hz freq-bands 
	Frequency Range: 3.200000 MHz - 3.200000 MHz
[crope@localhost v4l2-ctl]$ ./v4l2-ctl -d /dev/sdr0 --tuner-index=1 --list-freq-bands
ioctl: VIDIOC_ENUM_FREQ_BANDS
	Index          : 0
	Modulation     : Unknown
	Capability     : 62.5 Hz freq-bands 
	Frequency Range: 50.000 MHz - 1500.000 MHz
[crope@localhost v4l2-ctl]$ ./v4l2-ctl -d /dev/sdr0 --tuner-index=0 --set-freq=0.300000
Frequency for tuner 0 set to 300000 (0.300000 MHz)
[crope@localhost v4l2-ctl]$ ./v4l2-ctl -d /dev/sdr0 --tuner-index=0 --get-freq
Frequency for tuner 0: 300000 (0.300000 MHz)
[crope@localhost v4l2-ctl]$ ./v4l2-ctl -d /dev/sdr0 --tuner-index=1 --set-freq=100
Frequency for tuner 1 set to 1600000 (100.000000 MHz)
[crope@localhost v4l2-ctl]$ ./v4l2-ctl -d /dev/sdr0 --tuner-index=1 --get-freq
Frequency for tuner 1: 1600000 (100.000000 MHz)
[crope@localhost v4l2-ctl]$ ./v4l2-ctl -d /dev/sdr0 --tuner-index=1 --all
Driver Info (not using libv4l2):
	Driver name   : rtl2832_sdr
	Card type     : Realtek RTL2832U SDR
	Bus info      : usb-0000:00:13.2-2
	Driver version: 3.13.0
	Capabilities  : 0x85010001
		Video Capture
		Tuner
		Read/Write
		Streaming
		Device Capabilities
	Device Caps   : 0x05010001
		Video Capture
		Tuner
		Read/Write
		Streaming
Priority: 2
Frequency for tuner 1: 1600000 (100.000000 MHz)
Tuner 1:
	Name                 : RF
	Capabilities         : 62.5 Hz freq-bands 
	Frequency range      : 50.000 MHz - 1500.000 MHz
Video input : 0 (SDR data: ok)

User Controls
                     tuner_gain (int)    : min=0 max=102 step=1 default=0 value=0
[crope@localhost v4l2-ctl]$ ./v4l2-ctl -d /dev/sdr0 --tuner-index=0 --all
Driver Info (not using libv4l2):
	Driver name   : rtl2832_sdr
	Card type     : Realtek RTL2832U SDR
	Bus info      : usb-0000:00:13.2-2
	Driver version: 3.13.0
	Capabilities  : 0x85010001
		Video Capture
		Tuner
		Read/Write
		Streaming
		Device Capabilities
	Device Caps   : 0x05010001
		Video Capture
		Tuner
		Read/Write
		Streaming
Priority: 2
Frequency for tuner 0: 300000 (0.300000 MHz)
Tuner 0:
	Name                 : ADC
	Capabilities         : 1 Hz freq-bands 
	Frequency range      : 0.300000 MHz - 3.200000 MHz
Video input : 0 (SDR data: ok)

User Controls
                     tuner_gain (int)    : min=0 max=102 step=1 default=0 value=0
[crope@localhost v4l2-ctl]$ 



Antti Palosaari (4):
  v4l2-core: don't clear VIDIOC_G_FREQUENCY tuner type
  v4l2: add new device type for Software Defined Radio
  v4l: add new tuner types for SDR
  v4l: 1 Hz resolution flag for tuners

 drivers/media/v4l2-core/v4l2-dev.c   |  5 +++++
 drivers/media/v4l2-core/v4l2-ioctl.c | 40 +++++++++++++++++++++++++-----------
 include/media/v4l2-dev.h             |  3 ++-
 include/uapi/linux/videodev2.h       |  3 +++
 4 files changed, 38 insertions(+), 13 deletions(-)

-- 
1.8.4.2


             reply	other threads:[~2013-12-11 23:54 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-11 23:53 Antti Palosaari [this message]
2013-12-11 23:54 ` [PATCH RFC 1/4] v4l2-core: don't clear VIDIOC_G_FREQUENCY tuner type Antti Palosaari
2013-12-11 23:54 ` [PATCH RFC 2/4] v4l2: add new device type for Software Defined Radio Antti Palosaari
2013-12-11 23:54 ` [PATCH RFC 3/4] v4l: add new tuner types for SDR Antti Palosaari
2013-12-12  7:50   ` Hans Verkuil
2013-12-12 17:12     ` Antti Palosaari
2013-12-12 19:14       ` Antti Palosaari
2013-12-13 14:31         ` Hans Verkuil
2013-12-13 13:58       ` Hans Verkuil
2013-12-11 23:54 ` [PATCH RFC 4/4] v4l: 1 Hz resolution flag for tuners Antti Palosaari
2013-12-12  7:55   ` Hans Verkuil
2013-12-12 17:22     ` Antti Palosaari
2013-12-13 14:05       ` Hans Verkuil
2013-12-13 15:42         ` Antti Palosaari
2013-12-13 16:08           ` Hans Verkuil
2013-12-13 19:27             ` Antti Palosaari

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=1386806043-5331-1-git-send-email-crope@iki.fi \
    --to=crope@iki.fi \
    --cc=hverkuil@xs4all.nl \
    --cc=linux-media@vger.kernel.org \
    --cc=m.chehab@samsung.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 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.