Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[vdr] Re: Determing which dvb-card is busy with recording



Hi,

On 16/10/2002 10:12 Stefan Lang wrote:

> is it possible to determine which dvb-card is recording a video?
> Or is it possible to check the status of a timer?
>
> I want to switch a red LED to "on", when the system is running
> "headless" and records something. I want to check this "externely"
> (without touching the vdr source) with a script and turn the LED
> "on" or "off".
>
> So I need to know whether there is a recording aktiv or not!

I would also be interested in this as I have extended my IR Controller
to work bidirectional now with LIRC via the RS232 interface. There is an
8-fold output latch at the PIC micro now which can drive LEDs or reed
relays (all I had to add to the circuit posted last time was one
resistor, one 8bit shift register/latch plus some software changes in
the PIC code). It can be easily extended to 16 or more outputs as well.

The outputs can be switched by the "rc" tool from the LIRC package with
simple commands. No additional software is required.

I use one of these outputs for an RGB switch to toggle between the DVB
output and a Linux text console, and additionally I connected three LEDs
to display the following VDR states:

Replaying a recording (green)
Replaying VCD/MP3/DVD  (yellow)
Recording (red) [I would like to have as many LEDs as DVB cards here]

No more questions like "Is this live or a recording?". The LEDs are much
easier to see than the info from the LCD (if any).

For first tests I have simply added some system() commands in menu.c and
mp3-menu.c (VDR 1.0.4) to call a small script with the respective rc
commands. But this way I can not distinguish between two or more DVB
cards recording, so I would prefer a better way.

If anyone is interested, I can upload the schematic and code of the new
version. Controlling the outputs is very simple:

24 RC5 commands are added in a new remote section called "RC5_TX" in
lircd.conf for transmitting via LIRC's rc. Each output has a separate
command for SET, RESET and TOGGLE. They are named S0, R0, T0 ... S7, R7,
T7. Then a simple script named TX is used to call rc (one line would be
enough, here is an example with additionally setting or resetting all
outputs by calling the script with TX S! and TX R! ):

sleep 0.1
case $1 in
    R!)                       # reset all outputs
    for i in 0 1 2 3 4 5 6 7
    do
    rc send_once RC5_TX R$i
    done
    ;;
    S!)                       # set all outputs
    for i in 0 1 2 3 4 5 6 7
    do
    rc send_once RC5_TX S$i
    done
    ;;
    *)                        # set/reset/toggle a single output
    rc send_once RC5_TX $1
    ;;
esac

That's all.

I am going to assemble by VDR box in the next weeks. Just received a
riser card with 2 PCI slots and waiting for a small ATX power supply.
There are some hardware extensions on my ToDo list:

An all-in-one printed circuit board with the following connectors and
functions witch is going to be located at the rear of the VDR box:

* External connectors *
KBD PS/2 Loop through (to internal receiver for IR-keyboard)
LPT Loop through (to internal LCD)
VGA Loop through (to internal RGB switch)
SCART out (to TV)
Cinch Audio out (to amplifier)
Digital Audio out (to amplifier)
12V output (active when VDR runs)
230V output (active when VDR runs)
Additional universal outputs from the IR-Controller (can also be used in
standby)

* Internal connections (number of required pins in brackets) *
RS232 for LIRC in/out (3)
GND, +5V standby, +12V, -5V in (4)
IR RX chip in (3)
IR status LED out (2)
PWR-Switch in (2)
Motherboard PWR/RESET out (4)
Status LEDs out (6+1 or more)
DVB RGB/Sync/Analog Audio/Digital Audio/GND in (9)
PS/2 connector for keyboard IR-receiver (4)

* Features *
- IR receiver as described before (remote power on/off etc.)
- 8 or more outputs, controllable directly by the remote or by VDR
- RGB+sync switch (DVB/text console)
- Getting rid of the annoying audio 'pops' when turning on VDR by
  inserting a mute circuit
- Same for video (blanking until the drivers are complete loaded)

One could even add a small video generator (RGB/sync only, then a PLD
with an EEPROM and some passive components would do the job). A nice VDR
logo (see the logo contest from a while ago) could be stored in the
EEPROM and would be displayed *immediately* when powering up VDR until
the drivers are loaded. Every 99-EURO-DVD player starts with a splash
screen and without audio pops :-( OK, this is useless for the many
amongst you who never turn off VDR anyway ...

- An additional very small 230 volts transformer (<1W) for standby,
  switching the main power supply by an SSR

Any more suggestions?

Thomas





-- 
Info:
To unsubscribe send a mail to listar@linuxtv.org with "unsubscribe vdr" as subject.



Home | Main Index | Thread Index