Ok, everything fixed. DiSEqC re-added. I don't know why, but ttusb did not compile anymore. To fix it I just had to move inclusion of interrupt.h after spinlock.h (I moved after all system includes).
Maybe I had truble compiling because smp was kernel not tested on new ttusb changes. Il ven, 2003-12-05 alle 14:32, Vincenzo Di Massa ha scritto: > The problem should be in ttusb_dec.c. It seem a .h file was removed. > > /usr/src/linux-2.4.22-sata-p/include/asm/hw_irq.h > was not touched by me! old CVS compiles. > > Il ven, 2003-12-05 alle 12:59, Niklas Peinecke ha scritto: > > Hmm, this has got nothing to do with the changes we made. > > > > hw_irq.h > > > > seems to be the problem. > > > > Niklas > > > > Vincenzo Di Massa wrote: > > > I'm redoing the patch but CVS does not compile! > > > > > > gcc -I/home/hawk/stanzino/src/DVB-KERNEL/dvb-kernel/build-2.4/include > > > -D__KERNEL__ -I/usr/src/linux-2.4.22-sata-p/include -Wall > > > -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common > > > -fomit-frame-pointer -pipe -mpreferred-stack-boundary=2 -march=i686 > > > -DMODULE -DMODVERSIONS -include > > > /usr/src/linux-2.4.22-sata-p/include/linux/modversions.h -MD -I > > > ../linux/include -I . -DCONFIG_DVB_AV7110_OSD -nostdinc -iwithprefix > > > include -DKBUILD_BASENAME=ttusb_dec -c -o ttusb_dec.o ttusb_dec.c > > > In file included from > > > /usr/src/linux-2.4.22-sata-p/include/linux/irq.h:69, > > > from > > > /usr/src/linux-2.4.22-sata-p/include/asm/hardirq.h:6, > > > from > > > /usr/src/linux-2.4.22-sata-p/include/linux/interrupt.h:46, > > > from ttusb_dec.c:23: > > > /usr/src/linux-2.4.22-sata-p/include/asm/hw_irq.h: In function > > > `x86_do_profile': > > > /usr/src/linux-2.4.22-sata-p/include/asm/hw_irq.h:210: `current' > > > undeclared (first use in this function) > > > /usr/src/linux-2.4.22-sata-p/include/asm/hw_irq.h:210: (Each undeclared > > > identifier is reported only once > > > /usr/src/linux-2.4.22-sata-p/include/asm/hw_irq.h:210: for each function > > > it appears in.) > > > In file included from ttusb_dec.c:820: > > > dsp_dec2000t.h:3:2: warning: #warning WARNING: > > > dsp_dec2000t.h:4:2: warning: #warning If you intend to use the DEC2000-t > > > driver please fetch the firmware as > > > dsp_dec2000t.h:5:2: warning: #warning described in: > > > dsp_dec2000t.h:6:2: warning: #warning > > > linux/drivers/media/dvb/ttusb-dec/Kconfig > > > In file included from ttusb_dec.c:821: > > > dsp_dec3000s.h:3:2: warning: #warning WARNING: > > > dsp_dec3000s.h:4:2: warning: #warning If you intend to use the DEC3000-s > > > driver please fetch the firmware as > > > dsp_dec3000s.h:5:2: warning: #warning described in: > > > dsp_dec3000s.h:6:2: warning: #warning > > > linux/drivers/media/dvb/ttusb-dec/Kconfig > > > make[2]: *** [ttusb_dec.o] Error 1 > > > make[2]: Leaving directory > > > `/home/hawk/stanzino/src/DVB-KERNEL/dvb-kernel/build-2.4' > > > make[1]: *** > > > [_mod_/home/hawk/stanzino/src/DVB-KERNEL/dvb-kernel/build-2.4] Error 2 > > > make[1]: Leaving directory `/usr/src/linux-2.4.22-sata-p' > > > make: *** [build] Error 2 > > > > > > Il ven, 2003-12-05 alle 10:42, Niklas Peinecke ha scritto: > > > > > >>Oops, > > >> > > >>it looks like Wolfgang's last diff comitted to CVS yesterday made > > >>Vincenzo's new soft diseqc disappear :( Somebody should re-add it quick. > > >> > > >>Niklas > > > -- > Vincenzo Di Massa <[EMAIL PROTECTED]> -- Vincenzo Di Massa <[EMAIL PROTECTED]>
? dvb-kernel/build-2.4/dsp_dec2000t.h ? dvb-kernel/build-2.4/dsp_dec3000s.h Index: dvb-kernel/linux/drivers/media/dvb/b2c2/skystar2.c =================================================================== RCS file: /cvs/linuxtv/dvb-kernel/linux/drivers/media/dvb/b2c2/skystar2.c,v retrieving revision 1.19 diff -p -u -r1.19 skystar2.c --- dvb-kernel/linux/drivers/media/dvb/b2c2/skystar2.c 4 Dec 2003 19:15:49 -0000 1.19 +++ dvb-kernel/linux/drivers/media/dvb/b2c2/skystar2.c 5 Dec 2003 15:06:25 -0000 @@ -10,7 +10,7 @@ * * IMP: Converted to Linux coding style * Roberto Ragusa, r.ragusa at libero.it - * + * * Added hardware filtering support, * Niklas Peinecke, peinecke at gdv.uni-hannover.de * @@ -29,6 +29,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + #include <linux/module.h> #include <linux/delay.h> #include <linux/pci.h> @@ -2121,138 +2122,147 @@ static void set_tuner_polarity(struct ad write_reg_dw(adapter, 0x204, var); } -static int flexcop_diseqc_ioctl(struct dvb_frontend *fe, unsigned int cmd, void *arg) +static void diseqc_send_bit (struct adapter *adapter, int data) { - struct adapter *adapter = fe->before_after_data; - - struct dvb_frontend_info info; - - switch (cmd) { - - case FE_DISEQC_SEND_BURST: - { - u8 count; - fe_sec_mini_cmd_t b = (fe_sec_mini_cmd_t) arg; - dprintk("%s: FE_SEND_BURST ", __FUNCTION__); - switch ( b ) - { - case SEC_MINI_A: - { - dprintk("SEC_MINI_A\n"); - set_tuner_tone(adapter, 1); // This lines are needed - udelay(500*25); // to do a down-step - set_tuner_tone(adapter, 0); - udelay(500*25); - break; - } - case SEC_MINI_B: - { - dprintk("SEC_MINI_B\n"); - set_tuner_tone(adapter, 0); - udelay(1000*15); - for (count=0;count<9; count++) - { - set_tuner_tone(adapter, 1); - udelay(500); - set_tuner_tone(adapter, 0); - udelay(1000); - } - udelay(1000*15); - break; - } - default: - break; - }; - return 0; - } - + set_tuner_tone(adapter, 1); + udelay(data ? 500 : 1000); + set_tuner_tone(adapter, 0); + udelay(data ? 1000 : 500); +} - case FE_SLEEP: - { - dprintk("%s: FE_SLEEP\n", __FUNCTION__); - set_tuner_polarity(adapter, 0); +static void diseqc_send_byte (struct adapter *adapter, int data) +{ + int i, par=1, d; - // return -EOPNOTSUPP, to make DVB core also send "FE_SLEEP" command to frontend. - return -EOPNOTSUPP; - } + for (i=7; i>=0; i--) { + d = (data>>i)&1; + par ^= d; + diseqc_send_bit(adapter, d); + } - case FE_SET_VOLTAGE: - { - dprintk("%s: FE_SET_VOLTAGE\n", __FUNCTION__); + diseqc_send_bit(adapter, par); +} - switch ((fe_sec_voltage_t) arg) - { - case SEC_VOLTAGE_13: - dprintk("%s: SEC_VOLTAGE_13, %x\n", __FUNCTION__, SEC_VOLTAGE_13); +static int send_diseqc_msg (struct adapter *adapter, int len, u8 *msg, unsigned long burst) +{ + int i; - set_tuner_polarity(adapter, 1); + set_tuner_tone(adapter, 0); + mdelay(16); - return 0; + for (i=0; i<len; i++) + diseqc_send_byte(adapter, msg[i]); - case SEC_VOLTAGE_18: + mdelay(16); - dprintk("%s: SEC_VOLTAGE_18, %x\n", __FUNCTION__, SEC_VOLTAGE_18); + if (burst!=-1) { + if (burst) + diseqc_send_byte(adapter, 0xff); + else { + set_tuner_tone(adapter, 1); + udelay(12500); + set_tuner_tone(adapter, 0); + } + dvb_delay(20); + } - set_tuner_polarity(adapter, 2); + return 0; +} - return 0; - default: +int soft_diseqc (struct adapter *adapter, unsigned int cmd, void *arg) +{ + switch (cmd) { + case FE_SET_TONE: + switch ((fe_sec_tone_mode_t) arg) { + case SEC_TONE_ON: + set_tuner_tone(adapter, 1); + break; + case SEC_TONE_OFF: + set_tuner_tone(adapter, 0); + break; + default: + return -EINVAL; + }; + break; + + case FE_DISEQC_SEND_MASTER_CMD: + { + struct dvb_diseqc_master_cmd *cmd = arg; + + send_diseqc_msg (adapter, cmd->msg_len, cmd->msg, 0); + break; + } + + case FE_DISEQC_SEND_BURST: + send_diseqc_msg (adapter, 0, NULL, (unsigned long)arg); + break; - return -EINVAL; - }; + default: + return -EOPNOTSUPP; + }; - } + return 0; +} - case FE_SET_TONE: - { - dprintk("%s: FE_SET_TONE\n", __FUNCTION__); +static int flexcop_diseqc_ioctl(struct dvb_frontend *fe, unsigned int cmd, void *arg) +{ + struct adapter *adapter = fe->before_after_data; - fe->ioctl(fe, FE_GET_INFO, &info); + struct dvb_frontend_info info; + + fe->ioctl(fe, FE_GET_INFO, &info); - if ( strcmp(info.name, "Zarlink MT312") == 0) - { - dprintk("%s: FE_SET_TONE for %s frontend\n", __FUNCTION__, info.name); - - switch ((fe_sec_tone_mode_t) arg) - { - case SEC_TONE_ON: + // we must use different DiSEqC hw + + if ( strcmp(info.name, "Zarlink MT312") == 0){ + //VP310 using mt312 driver for tuning only: diseqc not wired + //use FCII instead + if (!soft_diseqc(adapter,cmd,arg)) + return 0; + } + + switch (cmd) { + case FE_SLEEP: + { + dprintk("%s: FE_SLEEP\n", __FUNCTION__); - dprintk("%s: SEC_TONE_ON, %x\n", __FUNCTION__, SEC_TONE_ON); + set_tuner_polarity(adapter, 0); - set_tuner_tone(adapter, 1); + // return -EOPNOTSUPP, to make DVB core also send "FE_SLEEP" command to frontend. + return -EOPNOTSUPP; + } - return 0; + case FE_SET_VOLTAGE: + { + dprintk("%s: FE_SET_VOLTAGE\n", __FUNCTION__); - case SEC_TONE_OFF: + switch ((fe_sec_voltage_t) arg) + { + case SEC_VOLTAGE_13: - dprintk("%s: SEC_TONE_OFF, %x\n", __FUNCTION__, SEC_TONE_OFF); + dprintk("%s: SEC_VOLTAGE_13, %x\n", __FUNCTION__, SEC_VOLTAGE_13); - set_tuner_tone(adapter, 0); + set_tuner_polarity(adapter, 1); - return 0; + return 0; - default: + case SEC_VOLTAGE_18: - return -EINVAL; - }; + dprintk("%s: SEC_VOLTAGE_18, %x\n", __FUNCTION__, SEC_VOLTAGE_18); - }; - - if ( strcmp(info.name, "STV0299/TSA5059/SL1935 based") == 0) - { - dprintk("%s: FE_SET_TONE for %s frontend\n", __FUNCTION__, info.name); + set_tuner_polarity(adapter, 2); - /* allow the frontend driver to handle this command*/ - return -EOPNOTSUPP; - }; + return 0; - printk("%s: FE_SET_TONE unknown frontend : %s\n", __FUNCTION__, info.name); + default: - return -EINVAL; + return -EINVAL; + }; } + default: Index: dvb-kernel/linux/drivers/media/dvb/ttusb-dec/ttusb_dec.c =================================================================== RCS file: /cvs/linuxtv/dvb-kernel/linux/drivers/media/dvb/ttusb-dec/ttusb_dec.c,v retrieving revision 1.24 diff -p -u -r1.24 ttusb_dec.c --- dvb-kernel/linux/drivers/media/dvb/ttusb-dec/ttusb_dec.c 5 Dec 2003 00:11:36 -0000 1.24 +++ dvb-kernel/linux/drivers/media/dvb/ttusb-dec/ttusb_dec.c 5 Dec 2003 15:06:31 -0000 @@ -20,7 +20,6 @@ */ #include <asm/semaphore.h> -#include <linux/interrupt.h> #include <linux/list.h> #include <linux/module.h> #include <linux/pci.h> @@ -28,6 +27,7 @@ #include <linux/spinlock.h> #include <linux/usb.h> #include <linux/version.h> +#include <linux/interrupt.h> #include "dmxdev.h" #include "dvb_demux.h"