The input you get is a TTL input which does not comply to the SPDIF signal level standard, but it is very useful anyway, because many devices have a TTL SPDIF output. This input can be directly used for example with the SPDIF output of a Technotrend or Hauppauge DVB-S card (Pin 4 of the 10 pin extension connector). This picture shows the modifications.
modprobe snd-card-emu10k1 snd_extin=0x000f snd_extout=0x1f0f
The volume of this input can be controlled with the following command, where the last number is the volume in percent:
amixer set 'IEC958 TTL' 50
diff -uN /tmp/vdr-1.1.31/dvbdevice.c vdr-1.1.31/dvbdevice.c
--- /tmp/vdr-1.1.31/dvbdevice.c 2003-05-03 16:03:20.000000000 +0200
+++ vdr-1.1.31/dvbdevice.c 2003-05-13 20:14:52.000000000 +0200
@@ -701,6 +701,12 @@
void cDvbDevice::SetVolumeDevice(int Volume)
{
+#if defined(SPDIF) // RaBa
+ char *cmd = NULL;
+ asprintf(&cmd, "amixer set 'IEC958 TTL' %d >/dev/null 2>&1", (Volume * 100) / 255);
+ system(cmd);
+ delete cmd;
+#endif
if (HasDecoder()) {
audio_mixer_t am;
am.volume_left = am.volume_right = Volume;
Common subdirectories: /tmp/vdr-1.1.31/libdtv and vdr-1.1.31/libdtv
diff -uN /tmp/vdr-1.1.31/Makefile vdr-1.1.31/Makefile
--- /tmp/vdr-1.1.31/Makefile 2003-01-06 13:28:09.000000000 +0100
+++ vdr-1.1.31/Makefile 2003-05-13 19:56:15.000000000 +0200
@@ -59,6 +59,10 @@
DEFINES += -DVFAT
endif
+ifdef SPDIF
+DEFINES += -DSPDIF
+endif
+
all: vdr
font: genfontfile fontfix.c fontosd.c
@echo "font files created."
An alternative patch to VDR was sent to me by Manio. He is not using the amixer ALSA utility, but is directly accessing the ALSA API to change the volume which is faster and more elegant. You can download Manio's patch here.