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

Written by:                  Thomas Hildebrandt <toxym@web.de>
Project's homepage:          coming soon
Latest version available at: coming soon

See the file COPYING for license information.

---------------------------------------------------------------------------
Sound control plugin - 'sndctl'
---------------------------------------------------------------------------

Description:
-------------------------------
This plugin was inspired and reengineered from the AVolCtl-Plugin by Martin
Prochnow (thanks for it).
It's used to control the volume levels of different controls of your sound-
card according to the volume settings of VDR.

So far so good, you can use 'AVolCtl' for this purpose, too. My personal
needs are to have different ways, how the soundcard controls depends from
the VDR volume settings. This ways (or profiles) are named 'sound sets'.

A sound set for 'normal' stereo sound is different from a dolby digital
sound set, means, other soundcard controls have to be moved, when changing
the VDR volume.

With 'sndctl' you can define as many sound sets as you want and switch
between it from the VDR menu.

* Development environment was:
Linux 2.6.8.1 (LFS 6.0)
VDR 1.5.1
ALSA-Lib 1.0.10
g++ (GCC) 3.4.1

* Compilation and running tested:
VDR 1.4.1
VDR 1.4.6
VDR 1.5.0
VDR 1.5.1


Configuration:
--------------
Hm, there is still no configuration page for soundsets ... please remember,
we are in version 0.0.1.
All configuration have to be done in VDR's 'setup.conf'. (Do this only, when
VDR is NOT running or all your work may be lost.)

Here is an example to do this:
...
sndctl.s1001_Bass = =40
sndctl.s1001_Center = =0
sndctl.s1001_Front = =0
sndctl.s1001_LFE = =0
sndctl.s1001_Line = =80
sndctl.s1001_Master = =80
sndctl.s1001_name = Stereo
sndctl.s1001_PCM = =0
sndctl.s1001_Surround = =0
sndctl.s1001_Treble = =60
sndctl.s1002_Bass = =40
sndctl.s1002_Center = +0
sndctl.s1002_Front = +0
sndctl.s1002_LFE = -20;1
sndctl.s1002_Line = =0
sndctl.s1002_Master = =100
sndctl.s1002_name = Movie
sndctl.s1002_PCM = =74
sndctl.s1002_Surround = -20;1
sndctl.s1002_Treble = =60
...

You see the definition of two sound sets, named 'Stereo' and 'Movie'.
Some explanation:

* sndctl.s1001_name = Stereo
  it's the name for the sound set with the ID 's1001'
* sndctl.s1001_Master = =80
  configuration for the soundcard control 'Master'
  meaning: on every change of VDR volume set the Master control of your
           soundcard to 80% of it's maximum value
* sndctl.s1002_Center = +0
  configuration for the soundcard control 'Center'
  meaning: on every change of VDR volume set the Center control of your
           soundcard to the VDR volume level plus 0 (in fact: it follows
           the VDR volume directly)
* sndctl.s1002_LFE = -20;1
  configuration for the soundcard control 'LFE' (boom box ;-) )
  meaning: on every change of VDR volume set the LFE control of your
           soundcard to the VDR volume level minus 20, but do not go
           below volume 1 (only on VDR volume 0, LFE goes to 0, too)

Some hints:
- get the soundcard control names i.e. from 'alsamixer'
- the VDR volume ranges from 0 to 255; the plugin calculates from 0 to 100
- the following operation modes (first character) are valid:
  '~' > do nothing (a control with this setting will be removed from the
        setup values)
  '=' > set this control always to the same level
        (nice for 'Bass' and 'Treble' or control muting)
  '+' > increase the VDR volume with this value
  '-' > decrease the VDR volume with this value
  '%' > set volume level to x percent of the VDR volume
- if VDR on your system doesn't run as root, the VDR user needs permissions
  to access the soundcard mixer device; maybe you need to put the VDR user
  to the group 'audio' or 'video'
