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

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to