This is a "plugin" for the Video Disk Recorder (VDR).

originally written by: Andreas <andreas.regel@powarman.de>
(Some parts of the plugin's source are based on the analogtv plugin by
Andreas Kool.)

Since the ivtv driver API changed in ivtv >= 0.8 a lot of API calls are no
longer existent/working. Unfortunally the author does no longer maintain this
plugin (see http://www.vdr-portal.de/board/thread.php?threadid=48772).

This INOFFICIAL version allows to use the plugin with newer ivtv versions,
but it is completely without any warranty and still very experimental:

-Adapted to ivtv driver 0.8 by "Wirbel" Winfried Koehler 
 <handygewinnspiel AET gmx dOt de>
-Further development in 2006/2007 by "Dr. Seltsam" Martin Dauskardt
 (md001@gmx.de) and Andreas Schäfers  (andreas_schaefers@gmx.de).

See the file HISTORY for changes.
See the file COPYING for license information.


Description:
------------

This plugin uses a Hauppauge PVR card as an input device. All cards
supported by the ivtv driver should work. This version of the plugin requires
ivtv driver version 0.8 or higher. You need very current versions of videodev.h
and videodev2.h in /usr/include/linux to get the plugin compiled 

Take the channels.conf in example dir as a reference for your own
channels.conf. You can also take a channels.conf from the analogtv plugin
and modify parameter, teletext and CA values. It is important to have the
following values for the channels:
 Source ID: 'C'
 Video PID: 301
 Audio PID: 300
 Teletext PID: 305
 CA identifier: A1

for example:
RTL:217250:C0:C:0:301:300:305:A1:12003:1:1089:0
       |   |       |   |   |  |    |   |   |
       |   |       |   |   |  |    |   |   --> Transport Stream ID
       |   |       |   |   |  |    |   --> Network ID
       |   |       |   |   |  |    --> Service ID
       |   |       |   |   |  --> CA identifier
       |   |       |   |   --> Teletext PID
       |   |       |   --> Audio PID
       |   |       --> Video PID (set to 0 for radio stations, but see below)
       |   --> Parameters (see below)
       --> Frequency

Parameters:
With a frequency higher than 10000 kHz the tuner input of the PVR card is used.
The number of the tuner input should be detected automatically during startup
of the plugin. If this doesn't work you can specify it by setting the "C"
parameter of the channel entry to the right value. You also have to specify
this value if you want to use another input of the PVR card:
  C0   - Input 0
  C12  - Input 1
  C23  - Input 2
  C34  - Input 3
  C45  - Input 4
  C56  - Input 5
  C67  - Input 6
  C78  - Input 7
  C89  - Input 8
  C999 - Input 9

Not all inputs are available on all cards and with every ivtv driver version.
Try different settings to find the right input for Composite/FBAS and S-Video.

The video norm can be chosen in a similar way using the "I" parameter:
  I0   - NTSC
  I1   - SECAM
  I999 - PAL
With no "I" parameter, PAL is used.

If you need more information configuring your channels.conf, please read this:
(links to other languages than german are available)

- http://www.vdr-wiki.de/wiki/index.php/Channels.conf
- http://www.vdr-wiki.de/wiki/index.php/Vdr(5)
- http://www.vdr-wiki.de/wiki/index.php/W_pvrscan
- http://www.vdr-wiki.de/wiki/index.php/Wirbelscan-plugin


/*
There is a small OSD window for setting up the picture parameters (brightness,
contrast, saturation, hue). It can be reached from the main menu. Use the
Up/Down keys to switch between the parameters and Left/Right to change a
value. Press Ok to save the settings and close the window. Menu/Back just
closes the window without saving the values.
*/

Radio
-----
The PVR150, PVR350, PVR500(first device only) and obviously some versions of
PVR250 have a built-in radio tuner.
The pvrinput-plugins detects a radio channel if it has a frequency of 
 87.5MHz .. 108 MHz (channels.conf: 87500 .. 108000). VPID should be set to 0.

VPID=301 is (only) necessary if the PVR350 is used as output device (pvr350-plugin).
With missing video, you won`t hear anything.
Workaround: Set VPID 301 for radio channels. Unfortunately this leads to a green screen
on radio channels. This is a driver bug which was fixed in v4l-dvb hg in October 2007.

To avoid stuttering on cards with saa7115, you need a patched ivtv-driver:
http://www.gossamer-threads.com/lists/ivtv/devel/35315. (The patch is already in
v4l-dvb hg since May 2007.)

Because the radio audio volume level is much lower, you can set radio and TV
audio volume separately for TV and FM radio.

When using radio channels, the driver sets the video stream blank (black). To avoid large files,
you can set the video bitrate separately. Default value is 1/4 of the driver`s default video bitrate:
1/4 of 6 MB/s = 1,5 MB/s
A radio recording with a length of 2 minute may have 120 MB (8 MBit/s) or only 12 MB (1,5 MB/s).


VDR-1.5.x
---------
vdr-1.5.x needs to be patched to work with pvrinput. See folder patches,
tested with 1.5.10.
Later versions most probably will no longer need to be patched, 
but other changes in plugin + channels.conf. We will see..




