I have looked at the various "TAPE"-type tuners from LG and seen that
they involved patching tuner.c to have the radio work. The attached
patch is empirical and works for me. It is quite straightforward.
However I haven't found any specification detailing how to program the
tuner, so in particular I do not know if the reverse order of commands
when freq < t->freq is really needed, it seems to work without it as
well, but I followed the comment on line 938.
Cheers,
--
Christophe Massiot Freebox S.A.
diff -ru ivtv-0.3.7/driver/tuner.c ivtv-0.3.7-fm/driver/tuner.c
--- ivtv-0.3.7/driver/tuner.c 2005-07-05 16:09:09.000000000 +0200
+++ ivtv-0.3.7-fm/driver/tuner.c 2005-07-20 18:19:10.000000000 +0200
@@ -969,10 +969,6 @@
int rc;
tun = &tuners[t->type];
- div = freq + (int)(16 * 10.7);
- buffer[0] = (div >> 8) & 0x7f;
- buffer[1] = div & 0xff;
- buffer[2] = tun->config;
switch (t->type) {
case TUNER_PHILIPS_FM1216ME_MK3:
case TUNER_PHILIPS_FM1236_MK3:
@@ -983,7 +979,25 @@
buffer[2] = 0x80;
buffer[3] = 0x19;
break;
+ case TUNER_LG_PAL_TAPE_S001D:
+ div = ((freq * 62500) + 10700000) / 50000;
+ if (freq < t->freq) {
+ buffer[0] = 0x80;
+ buffer[1] = 0x19;
+ buffer[2] = (div >> 8) & 0x7f;
+ buffer[3] = div & 0xff;
+ } else {
+ buffer[0] = (div >> 8) & 0x7f;
+ buffer[1] = div & 0xff;
+ buffer[2] = 0x80;
+ buffer[3] = 0x19;
+ }
+ break;
default:
+ div = freq + (int)(16 * 10.7);
+ buffer[0] = (div >> 8) & 0x7f;
+ buffer[1] = div & 0xff;
+ buffer[2] = tun->config;
buffer[3] = 0xa4;
break;
}