Roland Scheidegger <roland_scheidegger@xxxxxxxxxxx> writes: > "Rene H. Larsen" wrote: > > > > It seems that bttv 0.7.44/0.7.45 has a few problems regarding stereo > > detection on msp34xx. This is what I get when I tune into a channel > > that is transmitting in NICAM stereo: [...] > The stereo detect register doesn't make any sense in NICAM mode. I think > the msp3400 driver doesn't set the msp->mode correctly in most cases if > using the simple programming mode, but msp->mode is used by the > autodetect_stereo procedure. You can try loading the msp3400 module with > simple=0 (or you can fix it, just put in the missing cases in the > switch(val) in the msp3410d_thread procedure, and it *might* work). I added the missing cases and it seems to work ok. Here's the patch: diff -u /usr/local/src/kernel/bttv-0.7.46/driver/msp3400.c.orig /usr/local/src/kernel/bttv-0.7.46/driver/msp3400.c --- /usr/local/src/kernel/bttv-0.7.46/driver/msp3400.c.orig Thu Oct 26 21:33:29 2000 +++ /usr/local/src/kernel/bttv-0.7.46/driver/msp3400.c Thu Oct 26 21:33:29 2000 @@ -1081,6 +1081,20 @@ /* set prescale / stereo */ switch (val) { + case 0x0008: /* B/G NICAM */ + case 0x000a: /* I NICAM */ + if (val == 0x0008) + msp->mode = MSP_MODE_FM_NICAM1; + else + msp->mode = MSP_MODE_FM_NICAM2; + /* just turn on stereo */ + msp->stereo = VIDEO_SOUND_STEREO; + msp->nicam_on = 1; + msp->watch_stereo = 1; + msp3400c_setstereo(client,VIDEO_SOUND_STEREO); + msp3400c_write(client, I2C_MSP3400C_DFP, 0x0e, 0x2403); /* FM */ + msp3400c_write(client, I2C_MSP3400C_DFP, 0x10, 0x5a00); /* NICAM */ + break; case 0x0009: msp->mode = MSP_MODE_AM_NICAM; msp->stereo = VIDEO_SOUND_MONO; I now get this debug output when tuning to a channel with NICAM stereo: ,---- | msp34xx: setvolume: 0:0 0x00 0x00 | tuner: tv freq set to 55.25 | msp3410: setting mode: autodetect start (0x0001) | msp3410: detection still in progress | msp3410: current mode: 5.5/5.85 B/G NICAM FM (0x0008) | msp3400: NICAM setstereo: 2 | msp34xx: setbass: 32768 0x00 | msp34xx: settreble: 32768 0x00 | msp34xx: setvolume: 65535:65535 0x73 0x00 | msp34xx: nicam sync=1, mode=8 | msp34xx: nicam sync=1, mode=8 | + a lot more of these... `---- And xawtv reports that the transmission is in stereo! Whether it will report mono for a NICAM mono transmission I don't know, since mono transmissions are becoming rare around here. As I've never seen a multi-language transmission, this patch has only been tested for plain NICAM stereo signals. I should mention that I know next to nothing about the msp34xx, so my changes may be way off base... -- Echelon bait: SDI Bosnia cypherpunk Panama DES FSF Lon Horiuchi Janet Reno genetic Watergate fissionable explosion Croatian munitions FBI