All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [Asterisk] DTMF noise
From: David D. Hagood @ 2003-01-08 12:43 UTC (permalink / raw)
  To: Thomas Tonino; +Cc: Roy Sigurd Karlsbakk, linux-kernel
In-Reply-To: <3E1BD88A.4080808@users.sf.net>

Thomas Tonino wrote:
> Roy Sigurd Karlsbakk wrote:
> 
>> so - we DO NOT need a 'simplistic' DTMF decoder.
> 
> 
> You need a good one. But good can be simplistic, is what I'm saying.
> 
> DTMF was designed to be easy to decode reliably. Complex doesn't 
> automatically mean better.
> 

I haven't looked at the code, but I'd recommend using a bank of Goertzel 
filters -


http://www.google.com/search?hl=en&lr=&ie=ISO-8859-1&q=Goertzel+filter+DTMF&btnG=Google+Search

The basic idea is that you have 8 filters (for the 4 row and 4 column 
frequencies), as well as 8 filters looking at the first harmonic of the 
8 frequencies. You then compare the energies in each frequency - if you 
see significant energy in the harmonic filter bank, discard the signal. 
That prevents you from detecting speech as DTMF, since speech will 
usually have harmonics that a good DTMF signal won't.

Since the Goertzel filters are simple, they can be implemented in fixed 
point math rather than floating point. At work, we've done this on a 
Motorola 56301 DSP, which is a fixed-point DSP. I think there's an app 
note from Moto on this - I'll check when I get into work today.


^ permalink raw reply

* Re: opening a port..
From: Dharmendra.T @ 2003-01-08 12:33 UTC (permalink / raw)
  To: mdew; +Cc: netfilter
In-Reply-To: <1042027958.606.7.camel@nirvana>



On Wed, 2003-01-08 at 17:42, mdew wrote:
> 
> Hi,
> Just *testing* this out..
> 
> iptables -A INPUT -i eth0 -p tcp --dport 4662 -j ACCEPT
> iptables -A INPUT -i eth0 -p udp --dport 4662 -j ACCEPT
> iptables -A INPUT -i eth1 -p udp --dport 4662 -j ACCEPT
> iptables -A INPUT -i eth1 -p tcp --dport 4662 -j ACCEPT
> iptables -A INPUT -i eth1 -p tcp --sport 4662 -j ACCEPT
> iptables -A INPUT -i eth1 -p udp --sport 4662 -j ACCEPT
> iptables -A INPUT -i eth0 -p udp --sport 4662 -j ACCEPT
> iptables -A INPUT -i eth0 -p tcp --sport 4662 -j ACCEPT
> 
> iptables -A FORWARD -o eth0 -p tcp --dport 4662 -j ACCEPT
> iptables -A FORWARD -o eth1 -p tcp --dport 4662 -j ACCEPT
> iptables -A FORWARD -o eth1 -p udp --dport 4662 -j ACCEPT
> iptables -A FORWARD -o eth0 -p udp --dport 4662 -j ACCEPT
> iptables -A FORWARD -o eth0 -p udp --sport 4662 -j ACCEPT
> iptables -A FORWARD -o eth1 -p udp --sport 4662 -j ACCEPT
> iptables -A FORWARD -o eth1 -p tcp --sport 4662 -j ACCEPT
> iptables -A FORWARD -o eth0 -p tcp --sport 4662 -j ACCEPT
> 
> yet, when i try to telnet to it,
> 
> mdew:~# telnet 127.0.0.1 4662
> Trying 127.0.0.1...
> telnet: Unable to connect to remote host: Connection refused
> 
> Yeah I know I have lots of unnessary rules, but im only testing 'em...it
> just seems a little strange that i cant see 4662 (Edonkey port) on the
> router.
> 
> -mdew
> 
> 
Note:
telnet 127.0.0.1 port

 This will not go through any of the interfaces(eth*). You should allow
this through -i lo.

Here some how you are getting connected and you are getting the response
connection refused. Probably you are not running the service on the
router!.

-- 
Dharmendra.T
Linux Enthu



^ permalink raw reply

* [PATCH] proper bus error handling for IP22
From: Ladislav Michl @ 2003-01-08 12:41 UTC (permalink / raw)
  To: linux-mips; +Cc: Ralf Baechle, Guido Guenther

This patch makes get_dbe/put_dbe useable. Additionaly prints some useful
informations on bus error. Depends on GIO interface removing patch.

	ladis

Index: arch/mips/sgi-ip22/ip22-berr.c
===================================================================
RCS file: /home/cvs/linux/arch/mips/sgi-ip22/ip22-berr.c,v
retrieving revision 1.1.2.2
diff -u -r1.1.2.2 ip22-berr.c
--- arch/mips/sgi-ip22/ip22-berr.c	5 Aug 2002 23:53:35 -0000	1.1.2.2
+++ arch/mips/sgi-ip22/ip22-berr.c	8 Jan 2003 12:22:32 -0000
@@ -15,12 +15,11 @@
 #include <asm/sgi/sgimc.h>
 #include <asm/sgi/sgihpc.h>
 
-unsigned int cpu_err_stat;	/* Status reg for CPU */
-unsigned int gio_err_stat;	/* Status reg for GIO */
-unsigned int cpu_err_addr;	/* Error address reg for CPU */
-unsigned int gio_err_addr;	/* Error address reg for GIO */
 
-volatile int nofault;
+static unsigned int cpu_err_stat;	/* Status reg for CPU */
+static unsigned int gio_err_stat;	/* Status reg for GIO */
+static unsigned int cpu_err_addr;	/* Error address reg for CPU */
+static unsigned int gio_err_addr;	/* Error address reg for GIO */
 
 static void save_and_clear_buserr(void)
 {
@@ -33,6 +32,35 @@
 	mcmisc_regs->cstat = mcmisc_regs->gstat = 0;
 }
 
+#define GIO_ERRMASK	0xff00
+#define CPU_ERRMASK	0x3f00
+
+static void print_buserr(void)
+{
+	if (cpu_err_stat & CPU_ERRMASK)
+		printk(KERN_ALERT "CPU Error/Addr 0x%x<%s%s%s%s%s%s> 0x%08x\n",
+			cpu_err_stat,
+			cpu_err_stat & SGIMC_CSTAT_RD ? "RD " : "",
+			cpu_err_stat & SGIMC_CSTAT_PAR ? "PAR " : "",
+			cpu_err_stat & SGIMC_CSTAT_ADDR ? "ADDR " : "",
+			cpu_err_stat & SGIMC_CSTAT_SYSAD_PAR ? "SYSAD " : "",
+			cpu_err_stat & SGIMC_CSTAT_SYSCMD_PAR ? "SYSCMD " : "",
+			cpu_err_stat & SGIMC_CSTAT_BAD_DATA ? "BAD_DATA " : "",
+			cpu_err_addr);
+	if (gio_err_stat & GIO_ERRMASK)
+		printk(KERN_ALERT "GIO Error/Addr 0x%x:<%s%s%s%s%s%s%s%s> 0x08%x\n",
+			gio_err_stat,
+			gio_err_stat & SGIMC_GSTAT_RD ? "RD " : "",
+			gio_err_stat & SGIMC_GSTAT_WR ? "WR " : "",
+			gio_err_stat & SGIMC_GSTAT_TIME ? "TIME " : "",
+			gio_err_stat & SGIMC_GSTAT_PROM ? "PROM " : "",
+			gio_err_stat & SGIMC_GSTAT_ADDR ? "ADDR " : "",
+			gio_err_stat & SGIMC_GSTAT_BC ? "BC " : "",
+			gio_err_stat & SGIMC_GSTAT_PIO_RD ? "PIO_RD " : "",
+			gio_err_stat & SGIMC_GSTAT_PIO_WR ? "PIO_WR " : "",
+			gio_err_addr);
+}
+
 /*
  * MC sends an interrupt whenever bus or parity errors occur. In addition,
  * if the error happened during a CPU read, it also asserts the bus error
@@ -43,33 +71,18 @@
 void be_ip22_interrupt(int irq, struct pt_regs *regs)
 {
 	save_and_clear_buserr();
-	printk(KERN_ALERT "Bus error, epc == %08lx, ra == %08lx\n",
-	       regs->cp0_epc, regs->regs[31]);
-	die_if_kernel("Oops", regs);
-	force_sig(SIGBUS, current);
+	print_buserr();
+	panic("Bus error, epc == %08lx, ra == %08lx\n",
+	      regs->cp0_epc, regs->regs[31]);
 }
 
 int be_ip22_handler(struct pt_regs *regs, int is_fixup)
 {
 	save_and_clear_buserr();
-	if (nofault) {
-		nofault = 0;
-		compute_return_epc(regs);
-		return MIPS_BE_DISCARD;
-	}
-	return MIPS_BE_FIXUP;
-}
-
-int ip22_baddr(unsigned int *val, unsigned long addr)
-{
-	nofault = 1;
-	*val = *(volatile unsigned int *) addr;
-	__asm__ __volatile__("nop;nop;nop;nop");
-	if (nofault) {
-		nofault = 0;
-		return 0;
-	}
-	return -EFAULT;
+	if (is_fixup)
+		return MIPS_BE_FIXUP;
+	print_buserr();
+	return MIPS_BE_FATAL;
 }
 
 void __init bus_error_init(void)
Index: include/asm-mips/sgi/sgimc.h
===================================================================
RCS file: /home/cvs/linux/include/asm-mips/sgi/sgimc.h,v
retrieving revision 1.5
diff -u -r1.5 sgimc.h
--- include/asm-mips/sgi/sgimc.h	6 Sep 2001 13:12:03 -0000	1.5
+++ include/asm-mips/sgi/sgimc.h	8 Jan 2003 12:22:33 -0000
@@ -15,144 +15,159 @@
 
 struct sgimc_misc_ctrl {
 	u32 _unused1;
-	volatile u32 cpuctrl0;     /* CPU control register 0, readwrite */
-#define SGIMC_CCTRL0_REFS         0x0000000f /* REFS mask */
-#define SGIMC_CCTRL0_EREFRESH     0x00000010 /* Memory refresh enable */
-#define SGIMC_CCTRL0_EPERRGIO     0x00000020 /* GIO parity error enable */
-#define SGIMC_CCTRL0_EPERRMEM     0x00000040 /* Main mem parity error enable */
-#define SGIMC_CCTRL0_EPERRCPU     0x00000080 /* CPU bus parity error enable */
-#define SGIMC_CCTRL0_WDOG         0x00000100 /* Watchdog timer enable */
-#define SGIMC_CCTRL0_SYSINIT      0x00000200 /* System init bit */
-#define SGIMC_CCTRL0_GFXRESET     0x00000400 /* Graphics interface reset */
-#define SGIMC_CCTRL0_EISALOCK     0x00000800 /* Lock CPU from memory for EISA */
-#define SGIMC_CCTRL0_EPERRSCMD    0x00001000 /* SysCMD bus parity error enable */
-#define SGIMC_CCTRL0_IENAB        0x00002000 /* Allow interrupts from MC */
-#define SGIMC_CCTRL0_ESNOOP       0x00004000 /* Snooping I/O enable */
-#define SGIMC_CCTRL0_EPROMWR      0x00008000 /* Prom writes from cpu enable */
-#define SGIMC_CCTRL0_WRESETPMEM   0x00010000 /* Perform warm reset, preserves mem */
-#define SGIMC_CCTRL0_LENDIAN      0x00020000 /* Put MC in little-endian mode */
-#define SGIMC_CCTRL0_WRESETDMEM   0x00040000 /* Warm reset, destroys mem contents */
-#define SGIMC_CCTRL0_CMEMBADPAR   0x02000000 /* Generate bad perr from cpu to mem */
-#define SGIMC_CCTRL0_R4KNOCHKPARR 0x04000000 /* Don't chk parity on mem data reads */
-#define SGIMC_CCTRL0_GIOBTOB      0x08000000 /* Allow GIO back to back writes */
+	volatile u32 cpuctrl0;	/* CPU control register 0, readwrite */
+#define SGIMC_CCTRL0_REFS	0x0000000f /* REFS mask */
+#define SGIMC_CCTRL0_EREFRESH	0x00000010 /* Memory refresh enable */
+#define SGIMC_CCTRL0_EPERRGIO	0x00000020 /* GIO parity error enable */
+#define SGIMC_CCTRL0_EPERRMEM	0x00000040 /* Main mem parity error enable */
+#define SGIMC_CCTRL0_EPERRCPU	0x00000080 /* CPU bus parity error enable */
+#define SGIMC_CCTRL0_WDOG	0x00000100 /* Watchdog timer enable */
+#define SGIMC_CCTRL0_SYSINIT	0x00000200 /* System init bit */
+#define SGIMC_CCTRL0_GFXRESET	0x00000400 /* Graphics interface reset */
+#define SGIMC_CCTRL0_EISALOCK	0x00000800 /* Lock CPU from memory for EISA */
+#define SGIMC_CCTRL0_EPERRSCMD	0x00001000 /* SysCMD bus parity error enable */
+#define SGIMC_CCTRL0_IENAB	0x00002000 /* Allow interrupts from MC */
+#define SGIMC_CCTRL0_ESNOOP	0x00004000 /* Snooping I/O enable */
+#define SGIMC_CCTRL0_EPROMWR	0x00008000 /* Prom writes from cpu enable */
+#define SGIMC_CCTRL0_WRESETPMEM	0x00010000 /* Perform warm reset, preserves mem */
+#define SGIMC_CCTRL0_LENDIAN	0x00020000 /* Put MC in little-endian mode */
+#define SGIMC_CCTRL0_WRESETDMEM	0x00040000 /* Warm reset, destroys mem contents */
+#define SGIMC_CCTRL0_CMEMBADPAR	0x02000000 /* Generate bad perr from cpu to mem */
+#define SGIMC_CCTRL0_R4KNOPAR	0x04000000 /* Don't chk parity on mem data reads */
+#define SGIMC_CCTRL0_GIOBTOB	0x08000000 /* Allow GIO back to back writes */
 
 	u32 _unused2;
-	volatile u32 cpuctrl1;     /* CPU control register 1, readwrite */
-#define SGIMC_CCTRL1_EGIOTIMEO    0x00000010 /* GIO bus timeout enable */
-#define SGIMC_CCTRL1_FIXEDEHPC    0x00001000 /* Fixed HPC endianness */
-#define SGIMC_CCTRL1_LITTLEHPC    0x00002000 /* Little endian HPC */
-#define SGIMC_CCTRL1_FIXEDEEXP0   0x00004000 /* Fixed EXP0 endianness */
-#define SGIMC_CCTRL1_LITTLEEXP0   0x00008000 /* Little endian EXP0 */
-#define SGIMC_CCTRL1_FIXEDEEXP1   0x00010000 /* Fixed EXP1 endianness */
-#define SGIMC_CCTRL1_LITTLEEXP1   0x00020000 /* Little endian EXP1 */
+	volatile u32 cpuctrl1;	/* CPU control register 1, readwrite */
+#define SGIMC_CCTRL1_EGIOTIMEO	0x00000010 /* GIO bus timeout enable */
+#define SGIMC_CCTRL1_FIXEDEHPC	0x00001000 /* Fixed HPC endianness */
+#define SGIMC_CCTRL1_LITTLEHPC	0x00002000 /* Little endian HPC */
+#define SGIMC_CCTRL1_FIXEDEEXP0	0x00004000 /* Fixed EXP0 endianness */
+#define SGIMC_CCTRL1_LITTLEEXP0	0x00008000 /* Little endian EXP0 */
+#define SGIMC_CCTRL1_FIXEDEEXP1	0x00010000 /* Fixed EXP1 endianness */
+#define SGIMC_CCTRL1_LITTLEEXP1	0x00020000 /* Little endian EXP1 */
 
 	u32 _unused3;
-	volatile u32 watchdogt;    /* Watchdog reg rdonly, write clears */
+	volatile u32 watchdogt;	/* Watchdog reg rdonly, write clears */
 
 	u32 _unused4;
-	volatile u32 systemid;     /* MC system ID register, readonly */
-#define SGIMC_SYSID_MASKREV       0x0000000f /* Revision of MC controller */
-#define SGIMC_SYSID_EPRESENT      0x00000010 /* Indicates presence of EISA bus */
+	volatile u32 systemid;	/* MC system ID register, readonly */
+#define SGIMC_SYSID_MASKREV	0x0000000f /* Revision of MC controller */
+#define SGIMC_SYSID_EPRESENT	0x00000010 /* Indicates presence of EISA bus */
 
 	u32 _unused5[3];
-	volatile u32 divider;      /* Divider reg for RPSS */
+	volatile u32 divider;	/* Divider reg for RPSS */
 
 	u32 _unused6;
-	volatile unsigned char eeprom;       /* EEPROM byte reg for r4k */
-#define SGIMC_EEPROM_PRE          0x00000001 /* eeprom chip PRE pin assertion */
-#define SGIMC_EEPROM_CSEL         0x00000002 /* Active high, eeprom chip select */
-#define SGIMC_EEPROM_SECLOCK      0x00000004 /* EEPROM serial clock */
-#define SGIMC_EEPROM_SDATAO       0x00000008 /* Serial EEPROM data-out */
-#define SGIMC_EEPROM_SDATAI       0x00000010 /* Serial EEPROM data-in */
+	volatile unsigned char eeprom;     /* EEPROM byte reg for r4k */
+#define SGIMC_EEPROM_PRE	0x00000001 /* eeprom chip PRE pin assertion */
+#define SGIMC_EEPROM_CSEL	0x00000002 /* Active high, eeprom chip select */
+#define SGIMC_EEPROM_SECLOCK	0x00000004 /* EEPROM serial clock */
+#define SGIMC_EEPROM_SDATAO	0x00000008 /* Serial EEPROM data-out */
+#define SGIMC_EEPROM_SDATAI	0x00000010 /* Serial EEPROM data-in */
 
 	unsigned char _unused7[3];
 	u32 _unused8[3];
-	volatile unsigned short rcntpre;     /* Preload refresh counter */
+	volatile unsigned short rcntpre;   /* Preload refresh counter */
 
 	unsigned short _unused9;
 	u32 _unused9a;
-	volatile unsigned short rcounter;    /* Readonly refresh counter */
+	volatile unsigned short rcounter;  /* Readonly refresh counter */
 
 	unsigned short _unused10;
 	u32 _unused11[13];
-	volatile u32 gioparm;      /* Parameter word for GIO64 */
-#define SGIMC_GIOPARM_HPC64       0x00000001 /* HPC talks to GIO using 64-bits */
-#define SGIMC_GIOPARM_GFX64       0x00000002 /* GFX talks to GIO using 64-bits */
-#define SGIMC_GIOPARM_EXP064      0x00000004 /* EXP(slot0) talks using 64-bits */
-#define SGIMC_GIOPARM_EXP164      0x00000008 /* EXP(slot1) talks using 64-bits */
-#define SGIMC_GIOPARM_EISA64      0x00000010 /* EISA bus talks 64-bits to GIO */
-#define SGIMC_GIOPARM_HPC264      0x00000020 /* 2nd HPX talks 64-bits to GIO */
-#define SGIMC_GIOPARM_RTIMEGFX    0x00000040 /* GFX device has realtime attr */
-#define SGIMC_GIOPARM_RTIMEEXP0   0x00000080 /* EXP(slot0) has realtime attr */
-#define SGIMC_GIOPARM_RTIMEEXP1   0x00000100 /* EXP(slot1) has realtime attr */
-#define SGIMC_GIOPARM_MASTEREISA  0x00000200 /* EISA bus can act as bus master */
-#define SGIMC_GIOPARM_ONEBUS      0x00000400 /* Exists one GIO64 pipelined bus */
-#define SGIMC_GIOPARM_MASTERGFX   0x00000800 /* GFX can act as a bus master */
-#define SGIMC_GIOPARM_MASTEREXP0  0x00001000 /* EXP(slot0) can bus master */
-#define SGIMC_GIOPARM_MASTEREXP1  0x00002000 /* EXP(slot1) can bus master */
-#define SGIMC_GIOPARM_PLINEEXP0   0x00004000 /* EXP(slot0) has pipeline attr */
-#define SGIMC_GIOPARM_PLINEEXP1   0x00008000 /* EXP(slot1) has pipeline attr */
+	volatile u32 gioparm;	/* Parameter word for GIO64 */
+#define SGIMC_GIOPARM_HPC64	0x00000001 /* HPC talks to GIO using 64-bits */
+#define SGIMC_GIOPARM_GFX64	0x00000002 /* GFX talks to GIO using 64-bits */
+#define SGIMC_GIOPARM_EXP064	0x00000004 /* EXP(slot0) talks using 64-bits */
+#define SGIMC_GIOPARM_EXP164	0x00000008 /* EXP(slot1) talks using 64-bits */
+#define SGIMC_GIOPARM_EISA64	0x00000010 /* EISA bus talks 64-bits to GIO */
+#define SGIMC_GIOPARM_HPC264	0x00000020 /* 2nd HPX talks 64-bits to GIO */
+#define SGIMC_GIOPARM_RTIMEGFX	0x00000040 /* GFX device has realtime attr */
+#define SGIMC_GIOPARM_RTIMEEXP0	0x00000080 /* EXP(slot0) has realtime attr */
+#define SGIMC_GIOPARM_RTIMEEXP1	0x00000100 /* EXP(slot1) has realtime attr */
+#define SGIMC_GIOPARM_MSTREISA	0x00000200 /* EISA bus can act as bus master */
+#define SGIMC_GIOPARM_ONEBUS	0x00000400 /* Exists one GIO64 pipelined bus */
+#define SGIMC_GIOPARM_MSTRGFX	0x00000800 /* GFX can act as a bus master */
+#define SGIMC_GIOPARM_MSTREXP0	0x00001000 /* EXP(slot0) can bus master */
+#define SGIMC_GIOPARM_MSTREXP1	0x00002000 /* EXP(slot1) can bus master */
+#define SGIMC_GIOPARM_PLINEEXP0	0x00004000 /* EXP(slot0) has pipeline attr */
+#define SGIMC_GIOPARM_PLINEEXP1	0x00008000 /* EXP(slot1) has pipeline attr */
 
 	u32 _unused13;
-	volatile unsigned short cputp;       /* CPU bus arb time period */
+	volatile unsigned short cputp;     /* CPU bus arb time period */
 
 	unsigned short _unused14;
 	u32 _unused15[3];
-	volatile unsigned short lbursttp;    /* Time period for long bursts */
+	volatile unsigned short lbursttp;  /* Time period for long bursts */
 
 	unsigned short _unused16;
 	u32 _unused17[9];
-	volatile u32 mconfig0;     /* Memory config register zero */
+	volatile u32 mconfig0;	/* Memory config register zero */
 	u32 _unused18;
-	volatile u32 mconfig1;     /* Memory config register one */
+	volatile u32 mconfig1;	/* Memory config register one */
 
-        /* These defines apply to both mconfig registers above. */
-#define SGIMC_MCONFIG_FOURMB     0x00000000  /* Physical ram = 4megs */
-#define SGIMC_MCONFIG_EIGHTMB    0x00000100  /* Physical ram = 8megs */
-#define SGIMC_MCONFIG_SXTEENMB   0x00000300  /* Physical ram = 16megs */
-#define SGIMC_MCONFIG_TTWOMB     0x00000700  /* Physical ram = 32megs */
-#define SGIMC_MCONFIG_SFOURMB    0x00000f00  /* Physical ram = 64megs */
-#define SGIMC_MCONFIG_OTEIGHTMB  0x00001f00  /* Physical ram = 128megs */
-#define SGIMC_MCONFIG_RMASK      0x00001f00  /* Ram config bitmask */
+	/* These defines apply to both mconfig registers above. */
+#define SGIMC_MCONFIG_FOURMB	0x00000000 /* Physical ram = 4megs */
+#define SGIMC_MCONFIG_EIGHTMB	0x00000100 /* Physical ram = 8megs */
+#define SGIMC_MCONFIG_SXTEENMB	0x00000300 /* Physical ram = 16megs */
+#define SGIMC_MCONFIG_TTWOMB	0x00000700 /* Physical ram = 32megs */
+#define SGIMC_MCONFIG_SFOURMB	0x00000f00 /* Physical ram = 64megs */
+#define SGIMC_MCONFIG_OTEIGHTMB	0x00001f00 /* Physical ram = 128megs */
+#define SGIMC_MCONFIG_RMASK	0x00001f00 /* Ram config bitmask */
 
 	u32 _unused19;
-	volatile u32 cmacc;        /* Mem access config for CPU */
+	volatile u32 cmacc;	/* Mem access config for CPU */
 	u32 _unused20;
-	volatile u32 gmacc;        /* Mem access config for GIO */
+	volatile u32 gmacc;	/* Mem access config for GIO */
 
 	/* This define applies to both cmacc and gmacc registers above. */
-#define SGIMC_MACC_ALIASBIG       0x20000000 /* 512MB home for alias */
+#define SGIMC_MACC_ALIASBIG	0x20000000 /* 512MB home for alias */
 
 	/* Error address/status regs from GIO and CPU perspectives. */
 	u32 _unused21;
-	volatile u32 cerr;         /* Error address reg for CPU */
+	volatile u32 cerr;	/* Error address reg for CPU */
 	u32 _unused22;
-	volatile u32 cstat;        /* Status reg for CPU */
+	volatile u32 cstat;	/* Status reg for CPU */
+#define	SGIMC_CSTAT_RD		0x00000100 /* read parity error */
+#define	SGIMC_CSTAT_PAR		0x00000200 /* CPU parity error */
+#define	SGIMC_CSTAT_ADDR	0x00000400 /* memory bus error bad addr */
+#define	SGIMC_CSTAT_SYSAD_PAR	0x00000800 /* sysad parity error */
+#define	SGIMC_CSTAT_SYSCMD_PAR	0x00001000 /* syscmd parity error */
+#define	SGIMC_CSTAT_BAD_DATA	0x00002000 /* bad data identifier */
+#define	SGIMC_CSTAT_PAR_MASK	0x00001f00 /* parity error mask */
+#define	SGIMC_CSTAT_RD_PAR	(SGIMC_CSTAT_RD | SGIMC_CSTAT_PAR)
 	u32 _unused23;
-	volatile u32 gerr;         /* Error address reg for GIO */
+	volatile u32 gerr;	/* Error address reg for GIO */
 	u32 _unused24;
-	volatile u32 gstat;        /* Status reg for GIO */
-
+	volatile u32 gstat;	/* Status reg for GIO */
+#define	SGIMC_GSTAT_RD		0x00000100 /* read parity error */
+#define	SGIMC_GSTAT_WR		0x00000200 /* write parity error */
+#define	SGIMC_GSTAT_TIME	0x00000400 /* GIO bus timed out */
+#define	SGIMC_GSTAT_PROM	0x00000800 /* write to PROM when PROM_EN not set */
+#define	SGIMC_GSTAT_ADDR	0x00001000 /* parity error on addr cycle */
+#define	SGIMC_GSTAT_BC		0x00002000 /* parity error on byte count cycle */
+#define SGIMC_GSTAT_PIO_RD	0x00004000 /* read data parity on pio */
+#define SGIMC_GSTAT_PIO_WR	0x00008000 /* write data parity on pio */
 	/* Special hard bus locking registers. */
 	u32 _unused25;
-	volatile unsigned char syssembit;    /* Uni-bit system semaphore */
+	volatile unsigned char syssembit;	/* Uni-bit system semaphore */
 	unsigned char _unused26[3];
 	u32 _unused27;
-	volatile unsigned char mlock;        /* Global GIO memory access lock */
+	volatile unsigned char mlock;	/* Global GIO memory access lock */
 	unsigned char _unused28[3];
 	u32 _unused29;
-	volatile unsigned char elock;        /* Locks EISA from GIO accesses */
+	volatile unsigned char elock;	/* Locks EISA from GIO accesses */
 
 	/* GIO dma control registers. */
 	unsigned char _unused30[3];
 	u32 _unused31[14];
-	volatile u32 gio_dma_trans;/* DMA mask to translation GIO addrs */
+	volatile u32 gio_dma_trans;	/* DMA mask to translation GIO addrs */
 	u32 _unused32;
-	volatile u32 gio_dma_sbits;/* DMA GIO addr substitution bits */
+	volatile u32 gio_dma_sbits;	/* DMA GIO addr substitution bits */
 	u32 _unused33;
-	volatile u32 dma_intr_cause; /* DMA IRQ cause indicator bits */
+	volatile u32 dma_intr_cause;	/* DMA IRQ cause indicator bits */
 	u32 _unused34;
-	volatile u32 dma_ctrl;     /* Main DMA control reg */
+	volatile u32 dma_ctrl;		/* Main DMA control reg */
 
 	/* DMA TLB entry 0 */
 	u32 _unused35;
@@ -181,47 +196,47 @@
 
 /* MC misc control registers live at physical 0x1fa00000. */
 extern struct sgimc_misc_ctrl *mcmisc_regs;
-extern u32 *rpsscounter;          /* Chirps at 100ns */
+extern u32 *rpsscounter;		/* Chirps at 100ns */
 
 struct sgimc_dma_ctrl {
 	u32 _unused1;
-	volatile u32 maddronly;   /* Address DMA goes at */
+	volatile u32 maddronly;		/* Address DMA goes at */
 	u32 _unused2;
-	volatile u32 maddrpdeflts; /* Same as above, plus set defaults */
+	volatile u32 maddrpdeflts;	/* Same as above, plus set defaults */
 	u32 _unused3;
-	volatile u32 dmasz;       /* DMA count */
+	volatile u32 dmasz;		/* DMA count */
 	u32 _unused4;
-	volatile u32 ssize;       /* DMA stride size */
+	volatile u32 ssize;		/* DMA stride size */
 	u32 _unused5;
-	volatile u32 gmaddronly;  /* Set GIO DMA but do not start trans */
+	volatile u32 gmaddronly;	/* Set GIO DMA but do not start trans */
 	u32 _unused6;
-	volatile u32 dmaddnpgo;   /* Set GIO DMA addr + start transfer */
+	volatile u32 dmaddnpgo;		/* Set GIO DMA addr + start transfer */
 	u32 _unused7;
-	volatile u32 dmamode;     /* DMA mode config bit settings */
+	volatile u32 dmamode;		/* DMA mode config bit settings */
 	u32 _unused8;
-	volatile u32 dmaccount;    /* Zoom and byte count for DMA */
+	volatile u32 dmaccount;		/* Zoom and byte count for DMA */
 	u32 _unused9;
-	volatile u32 dmastart;    /* Pedal to the metal. */
+	volatile u32 dmastart;		/* Pedal to the metal. */
 	u32 _unused10;
-	volatile u32 dmarunning;  /* DMA op is in progress */
+	volatile u32 dmarunning;	/* DMA op is in progress */
 	u32 _unused11;
 
 	/* Set dma addr, defaults, and kick it */
-	volatile u32 maddr_defl_go; /* go go go! -lm */
+	volatile u32 maddr_defl_go;	/* go go go! -lm */
 };
 
 /* MC controller dma regs live at physical 0x1fa02000. */
 extern struct sgimc_dma_ctrl *dmactrlregs;
 
 /* Base location of the two ram banks found in IP2[0268] machines. */
-#define SGIMC_SEG0_BADDR     0x08000000
-#define SGIMC_SEG1_BADDR     0x20000000
+#define SGIMC_SEG0_BADDR	0x08000000
+#define SGIMC_SEG1_BADDR	0x20000000
 
 /* Maximum size of the above banks are per machine. */
 extern u32 sgimc_seg0_size, sgimc_seg1_size;
-#define SGIMC_SEG0_SIZE_ALL         0x10000000 /* 256MB */
-#define SGIMC_SEG1_SIZE_IP20_IP22   0x08000000 /* 128MB */
-#define SGIMC_SEG1_SIZE_IP26_IP28   0x20000000 /* 512MB */
+#define SGIMC_SEG0_SIZE_ALL		0x10000000 /* 256MB */
+#define SGIMC_SEG1_SIZE_IP20_IP22	0x08000000 /* 128MB */
+#define SGIMC_SEG1_SIZE_IP26_IP28	0x20000000 /* 512MB */
 
 extern void sgimc_init(void);
 
Index: include/asm-mips64/sgi/sgimc.h
===================================================================
RCS file: /home/cvs/linux/include/asm-mips64/sgi/sgimc.h,v
retrieving revision 1.3
diff -u -r1.3 sgimc.h
--- include/asm-mips64/sgi/sgimc.h	9 Jul 2001 00:25:38 -0000	1.3
+++ include/asm-mips64/sgi/sgimc.h	8 Jan 2003 12:22:33 -0000
@@ -15,144 +15,159 @@
 
 struct sgimc_misc_ctrl {
 	u32 _unused1;
-	volatile u32 cpuctrl0;     /* CPU control register 0, readwrite */
-#define SGIMC_CCTRL0_REFS         0x0000000f /* REFS mask */
-#define SGIMC_CCTRL0_EREFRESH     0x00000010 /* Memory refresh enable */
-#define SGIMC_CCTRL0_EPERRGIO     0x00000020 /* GIO parity error enable */
-#define SGIMC_CCTRL0_EPERRMEM     0x00000040 /* Main mem parity error enable */
-#define SGIMC_CCTRL0_EPERRCPU     0x00000080 /* CPU bus parity error enable */
-#define SGIMC_CCTRL0_WDOG         0x00000100 /* Watchdog timer enable */
-#define SGIMC_CCTRL0_SYSINIT      0x00000200 /* System init bit */
-#define SGIMC_CCTRL0_GFXRESET     0x00000400 /* Graphics interface reset */
-#define SGIMC_CCTRL0_EISALOCK     0x00000800 /* Lock CPU from memory for EISA */
-#define SGIMC_CCTRL0_EPERRSCMD    0x00001000 /* SysCMD bus parity error enable */
-#define SGIMC_CCTRL0_IENAB        0x00002000 /* Allow interrupts from MC */
-#define SGIMC_CCTRL0_ESNOOP       0x00004000 /* Snooping I/O enable */
-#define SGIMC_CCTRL0_EPROMWR      0x00008000 /* Prom writes from cpu enable */
-#define SGIMC_CCTRL0_WRESETPMEM   0x00010000 /* Perform warm reset, preserves mem */
-#define SGIMC_CCTRL0_LENDIAN      0x00020000 /* Put MC in little-endian mode */
-#define SGIMC_CCTRL0_WRESETDMEM   0x00040000 /* Warm reset, destroys mem contents */
-#define SGIMC_CCTRL0_CMEMBADPAR   0x02000000 /* Generate bad perr from cpu to mem */
-#define SGIMC_CCTRL0_R4KNOCHKPARR 0x04000000 /* Don't chk parity on mem data reads */
-#define SGIMC_CCTRL0_GIOBTOB      0x08000000 /* Allow GIO back to back writes */
+	volatile u32 cpuctrl0;	/* CPU control register 0, readwrite */
+#define SGIMC_CCTRL0_REFS	0x0000000f /* REFS mask */
+#define SGIMC_CCTRL0_EREFRESH	0x00000010 /* Memory refresh enable */
+#define SGIMC_CCTRL0_EPERRGIO	0x00000020 /* GIO parity error enable */
+#define SGIMC_CCTRL0_EPERRMEM	0x00000040 /* Main mem parity error enable */
+#define SGIMC_CCTRL0_EPERRCPU	0x00000080 /* CPU bus parity error enable */
+#define SGIMC_CCTRL0_WDOG	0x00000100 /* Watchdog timer enable */
+#define SGIMC_CCTRL0_SYSINIT	0x00000200 /* System init bit */
+#define SGIMC_CCTRL0_GFXRESET	0x00000400 /* Graphics interface reset */
+#define SGIMC_CCTRL0_EISALOCK	0x00000800 /* Lock CPU from memory for EISA */
+#define SGIMC_CCTRL0_EPERRSCMD	0x00001000 /* SysCMD bus parity error enable */
+#define SGIMC_CCTRL0_IENAB	0x00002000 /* Allow interrupts from MC */
+#define SGIMC_CCTRL0_ESNOOP	0x00004000 /* Snooping I/O enable */
+#define SGIMC_CCTRL0_EPROMWR	0x00008000 /* Prom writes from cpu enable */
+#define SGIMC_CCTRL0_WRESETPMEM	0x00010000 /* Perform warm reset, preserves mem */
+#define SGIMC_CCTRL0_LENDIAN	0x00020000 /* Put MC in little-endian mode */
+#define SGIMC_CCTRL0_WRESETDMEM	0x00040000 /* Warm reset, destroys mem contents */
+#define SGIMC_CCTRL0_CMEMBADPAR	0x02000000 /* Generate bad perr from cpu to mem */
+#define SGIMC_CCTRL0_R4KNOPAR	0x04000000 /* Don't chk parity on mem data reads */
+#define SGIMC_CCTRL0_GIOBTOB	0x08000000 /* Allow GIO back to back writes */
 
 	u32 _unused2;
-	volatile u32 cpuctrl1;     /* CPU control register 1, readwrite */
-#define SGIMC_CCTRL1_EGIOTIMEO    0x00000010 /* GIO bus timeout enable */
-#define SGIMC_CCTRL1_FIXEDEHPC    0x00001000 /* Fixed HPC endianness */
-#define SGIMC_CCTRL1_LITTLEHPC    0x00002000 /* Little endian HPC */
-#define SGIMC_CCTRL1_FIXEDEEXP0   0x00004000 /* Fixed EXP0 endianness */
-#define SGIMC_CCTRL1_LITTLEEXP0   0x00008000 /* Little endian EXP0 */
-#define SGIMC_CCTRL1_FIXEDEEXP1   0x00010000 /* Fixed EXP1 endianness */
-#define SGIMC_CCTRL1_LITTLEEXP1   0x00020000 /* Little endian EXP1 */
+	volatile u32 cpuctrl1;	/* CPU control register 1, readwrite */
+#define SGIMC_CCTRL1_EGIOTIMEO	0x00000010 /* GIO bus timeout enable */
+#define SGIMC_CCTRL1_FIXEDEHPC	0x00001000 /* Fixed HPC endianness */
+#define SGIMC_CCTRL1_LITTLEHPC	0x00002000 /* Little endian HPC */
+#define SGIMC_CCTRL1_FIXEDEEXP0	0x00004000 /* Fixed EXP0 endianness */
+#define SGIMC_CCTRL1_LITTLEEXP0	0x00008000 /* Little endian EXP0 */
+#define SGIMC_CCTRL1_FIXEDEEXP1	0x00010000 /* Fixed EXP1 endianness */
+#define SGIMC_CCTRL1_LITTLEEXP1	0x00020000 /* Little endian EXP1 */
 
 	u32 _unused3;
-	volatile u32 watchdogt;    /* Watchdog reg rdonly, write clears */
+	volatile u32 watchdogt;	/* Watchdog reg rdonly, write clears */
 
 	u32 _unused4;
-	volatile u32 systemid;     /* MC system ID register, readonly */
-#define SGIMC_SYSID_MASKREV       0x0000000f /* Revision of MC controller */
-#define SGIMC_SYSID_EPRESENT      0x00000010 /* Indicates presence of EISA bus */
+	volatile u32 systemid;	/* MC system ID register, readonly */
+#define SGIMC_SYSID_MASKREV	0x0000000f /* Revision of MC controller */
+#define SGIMC_SYSID_EPRESENT	0x00000010 /* Indicates presence of EISA bus */
 
 	u32 _unused5[3];
-	volatile u32 divider;      /* Divider reg for RPSS */
+	volatile u32 divider;	/* Divider reg for RPSS */
 
 	u32 _unused6;
-	volatile unsigned char eeprom;       /* EEPROM byte reg for r4k */
-#define SGIMC_EEPROM_PRE          0x00000001 /* eeprom chip PRE pin assertion */
-#define SGIMC_EEPROM_CSEL         0x00000002 /* Active high, eeprom chip select */
-#define SGIMC_EEPROM_SECLOCK      0x00000004 /* EEPROM serial clock */
-#define SGIMC_EEPROM_SDATAO       0x00000008 /* Serial EEPROM data-out */
-#define SGIMC_EEPROM_SDATAI       0x00000010 /* Serial EEPROM data-in */
+	volatile unsigned char eeprom;     /* EEPROM byte reg for r4k */
+#define SGIMC_EEPROM_PRE	0x00000001 /* eeprom chip PRE pin assertion */
+#define SGIMC_EEPROM_CSEL	0x00000002 /* Active high, eeprom chip select */
+#define SGIMC_EEPROM_SECLOCK	0x00000004 /* EEPROM serial clock */
+#define SGIMC_EEPROM_SDATAO	0x00000008 /* Serial EEPROM data-out */
+#define SGIMC_EEPROM_SDATAI	0x00000010 /* Serial EEPROM data-in */
 
 	unsigned char _unused7[3];
 	u32 _unused8[3];
-	volatile unsigned short rcntpre;     /* Preload refresh counter */
+	volatile unsigned short rcntpre;   /* Preload refresh counter */
 
 	unsigned short _unused9;
 	u32 _unused9a;
-	volatile unsigned short rcounter;    /* Readonly refresh counter */
+	volatile unsigned short rcounter;  /* Readonly refresh counter */
 
 	unsigned short _unused10;
 	u32 _unused11[13];
-	volatile u32 gioparm;      /* Parameter word for GIO64 */
-#define SGIMC_GIOPARM_HPC64       0x00000001 /* HPC talks to GIO using 64-bits */
-#define SGIMC_GIOPARM_GFX64       0x00000002 /* GFX talks to GIO using 64-bits */
-#define SGIMC_GIOPARM_EXP064      0x00000004 /* EXP(slot0) talks using 64-bits */
-#define SGIMC_GIOPARM_EXP164      0x00000008 /* EXP(slot1) talks using 64-bits */
-#define SGIMC_GIOPARM_EISA64      0x00000010 /* EISA bus talks 64-bits to GIO */
-#define SGIMC_GIOPARM_HPC264      0x00000020 /* 2nd HPX talks 64-bits to GIO */
-#define SGIMC_GIOPARM_RTIMEGFX    0x00000040 /* GFX device has realtime attr */
-#define SGIMC_GIOPARM_RTIMEEXP0   0x00000080 /* EXP(slot0) has realtime attr */
-#define SGIMC_GIOPARM_RTIMEEXP1   0x00000100 /* EXP(slot1) has realtime attr */
-#define SGIMC_GIOPARM_MASTEREISA  0x00000200 /* EISA bus can act as bus master */
-#define SGIMC_GIOPARM_ONEBUS      0x00000400 /* Exists one GIO64 pipelined bus */
-#define SGIMC_GIOPARM_MASTERGFX   0x00000800 /* GFX can act as a bus master */
-#define SGIMC_GIOPARM_MASTEREXP0  0x00001000 /* EXP(slot0) can bus master */
-#define SGIMC_GIOPARM_MASTEREXP1  0x00002000 /* EXP(slot1) can bus master */
-#define SGIMC_GIOPARM_PLINEEXP0   0x00004000 /* EXP(slot0) has pipeline attr */
-#define SGIMC_GIOPARM_PLINEEXP1   0x00008000 /* EXP(slot1) has pipeline attr */
+	volatile u32 gioparm;	/* Parameter word for GIO64 */
+#define SGIMC_GIOPARM_HPC64	0x00000001 /* HPC talks to GIO using 64-bits */
+#define SGIMC_GIOPARM_GFX64	0x00000002 /* GFX talks to GIO using 64-bits */
+#define SGIMC_GIOPARM_EXP064	0x00000004 /* EXP(slot0) talks using 64-bits */
+#define SGIMC_GIOPARM_EXP164	0x00000008 /* EXP(slot1) talks using 64-bits */
+#define SGIMC_GIOPARM_EISA64	0x00000010 /* EISA bus talks 64-bits to GIO */
+#define SGIMC_GIOPARM_HPC264	0x00000020 /* 2nd HPX talks 64-bits to GIO */
+#define SGIMC_GIOPARM_RTIMEGFX	0x00000040 /* GFX device has realtime attr */
+#define SGIMC_GIOPARM_RTIMEEXP0	0x00000080 /* EXP(slot0) has realtime attr */
+#define SGIMC_GIOPARM_RTIMEEXP1	0x00000100 /* EXP(slot1) has realtime attr */
+#define SGIMC_GIOPARM_MSTREISA	0x00000200 /* EISA bus can act as bus master */
+#define SGIMC_GIOPARM_ONEBUS	0x00000400 /* Exists one GIO64 pipelined bus */
+#define SGIMC_GIOPARM_MSTRGFX	0x00000800 /* GFX can act as a bus master */
+#define SGIMC_GIOPARM_MSTREXP0	0x00001000 /* EXP(slot0) can bus master */
+#define SGIMC_GIOPARM_MSTREXP1	0x00002000 /* EXP(slot1) can bus master */
+#define SGIMC_GIOPARM_PLINEEXP0	0x00004000 /* EXP(slot0) has pipeline attr */
+#define SGIMC_GIOPARM_PLINEEXP1	0x00008000 /* EXP(slot1) has pipeline attr */
 
 	u32 _unused13;
-	volatile unsigned short cputp;       /* CPU bus arb time period */
+	volatile unsigned short cputp;     /* CPU bus arb time period */
 
 	unsigned short _unused14;
 	u32 _unused15[3];
-	volatile unsigned short lbursttp;    /* Time period for long bursts */
+	volatile unsigned short lbursttp;  /* Time period for long bursts */
 
 	unsigned short _unused16;
 	u32 _unused17[9];
-	volatile u32 mconfig0;     /* Memory config register zero */
+	volatile u32 mconfig0;	/* Memory config register zero */
 	u32 _unused18;
-	volatile u32 mconfig1;     /* Memory config register one */
+	volatile u32 mconfig1;	/* Memory config register one */
 
-        /* These defines apply to both mconfig registers above. */
-#define SGIMC_MCONFIG_FOURMB     0x00000000  /* Physical ram = 4megs */
-#define SGIMC_MCONFIG_EIGHTMB    0x00000100  /* Physical ram = 8megs */
-#define SGIMC_MCONFIG_SXTEENMB   0x00000300  /* Physical ram = 16megs */
-#define SGIMC_MCONFIG_TTWOMB     0x00000700  /* Physical ram = 32megs */
-#define SGIMC_MCONFIG_SFOURMB    0x00000f00  /* Physical ram = 64megs */
-#define SGIMC_MCONFIG_OTEIGHTMB  0x00001f00  /* Physical ram = 128megs */
-#define SGIMC_MCONFIG_RMASK      0x00001f00  /* Ram config bitmask */
+	/* These defines apply to both mconfig registers above. */
+#define SGIMC_MCONFIG_FOURMB	0x00000000 /* Physical ram = 4megs */
+#define SGIMC_MCONFIG_EIGHTMB	0x00000100 /* Physical ram = 8megs */
+#define SGIMC_MCONFIG_SXTEENMB	0x00000300 /* Physical ram = 16megs */
+#define SGIMC_MCONFIG_TTWOMB	0x00000700 /* Physical ram = 32megs */
+#define SGIMC_MCONFIG_SFOURMB	0x00000f00 /* Physical ram = 64megs */
+#define SGIMC_MCONFIG_OTEIGHTMB	0x00001f00 /* Physical ram = 128megs */
+#define SGIMC_MCONFIG_RMASK	0x00001f00 /* Ram config bitmask */
 
 	u32 _unused19;
-	volatile u32 cmacc;        /* Mem access config for CPU */
+	volatile u32 cmacc;	/* Mem access config for CPU */
 	u32 _unused20;
-	volatile u32 gmacc;        /* Mem access config for GIO */
+	volatile u32 gmacc;	/* Mem access config for GIO */
 
 	/* This define applies to both cmacc and gmacc registers above. */
-#define SGIMC_MACC_ALIASBIG       0x20000000 /* 512MB home for alias */
+#define SGIMC_MACC_ALIASBIG	0x20000000 /* 512MB home for alias */
 
 	/* Error address/status regs from GIO and CPU perspectives. */
 	u32 _unused21;
-	volatile u32 cerr;         /* Error address reg for CPU */
+	volatile u32 cerr;	/* Error address reg for CPU */
 	u32 _unused22;
-	volatile u32 cstat;        /* Status reg for CPU */
+	volatile u32 cstat;	/* Status reg for CPU */
+#define	SGIMC_CSTAT_RD		0x00000100 /* read parity error */
+#define	SGIMC_CSTAT_PAR		0x00000200 /* CPU parity error */
+#define	SGIMC_CSTAT_ADDR	0x00000400 /* memory bus error bad addr */
+#define	SGIMC_CSTAT_SYSAD_PAR	0x00000800 /* sysad parity error */
+#define	SGIMC_CSTAT_SYSCMD_PAR	0x00001000 /* syscmd parity error */
+#define	SGIMC_CSTAT_BAD_DATA	0x00002000 /* bad data identifier */
+#define	SGIMC_CSTAT_PAR_MASK	0x00001f00 /* parity error mask */
+#define	SGIMC_CSTAT_RD_PAR	(SGIMC_CSTAT_RD | SGIMC_CSTAT_PAR)
 	u32 _unused23;
-	volatile u32 gerr;         /* Error address reg for GIO */
+	volatile u32 gerr;	/* Error address reg for GIO */
 	u32 _unused24;
-	volatile u32 gstat;        /* Status reg for GIO */
-
+	volatile u32 gstat;	/* Status reg for GIO */
+#define	SGIMC_GSTAT_RD		0x00000100 /* read parity error */
+#define	SGIMC_GSTAT_WR		0x00000200 /* write parity error */
+#define	SGIMC_GSTAT_TIME	0x00000400 /* GIO bus timed out */
+#define	SGIMC_GSTAT_PROM	0x00000800 /* write to PROM when PROM_EN not set */
+#define	SGIMC_GSTAT_ADDR	0x00001000 /* parity error on addr cycle */
+#define	SGIMC_GSTAT_BC		0x00002000 /* parity error on byte count cycle */
+#define SGIMC_GSTAT_PIO_RD	0x00004000 /* read data parity on pio */
+#define SGIMC_GSTAT_PIO_WR	0x00008000 /* write data parity on pio */
 	/* Special hard bus locking registers. */
 	u32 _unused25;
-	volatile unsigned char syssembit;    /* Uni-bit system semaphore */
+	volatile unsigned char syssembit;	/* Uni-bit system semaphore */
 	unsigned char _unused26[3];
 	u32 _unused27;
-	volatile unsigned char mlock;        /* Global GIO memory access lock */
+	volatile unsigned char mlock;	/* Global GIO memory access lock */
 	unsigned char _unused28[3];
 	u32 _unused29;
-	volatile unsigned char elock;        /* Locks EISA from GIO accesses */
+	volatile unsigned char elock;	/* Locks EISA from GIO accesses */
 
 	/* GIO dma control registers. */
 	unsigned char _unused30[3];
 	u32 _unused31[14];
-	volatile u32 gio_dma_trans;/* DMA mask to translation GIO addrs */
+	volatile u32 gio_dma_trans;	/* DMA mask to translation GIO addrs */
 	u32 _unused32;
-	volatile u32 gio_dma_sbits;/* DMA GIO addr substitution bits */
+	volatile u32 gio_dma_sbits;	/* DMA GIO addr substitution bits */
 	u32 _unused33;
-	volatile u32 dma_intr_cause; /* DMA IRQ cause indicator bits */
+	volatile u32 dma_intr_cause;	/* DMA IRQ cause indicator bits */
 	u32 _unused34;
-	volatile u32 dma_ctrl;     /* Main DMA control reg */
+	volatile u32 dma_ctrl;		/* Main DMA control reg */
 
 	/* DMA TLB entry 0 */
 	u32 _unused35;
@@ -181,47 +196,47 @@
 
 /* MC misc control registers live at physical 0x1fa00000. */
 extern struct sgimc_misc_ctrl *mcmisc_regs;
-extern u32 *rpsscounter;          /* Chirps at 100ns */
+extern u32 *rpsscounter;		/* Chirps at 100ns */
 
 struct sgimc_dma_ctrl {
 	u32 _unused1;
-	volatile u32 maddronly;   /* Address DMA goes at */
+	volatile u32 maddronly;		/* Address DMA goes at */
 	u32 _unused2;
-	volatile u32 maddrpdeflts; /* Same as above, plus set defaults */
+	volatile u32 maddrpdeflts;	/* Same as above, plus set defaults */
 	u32 _unused3;
-	volatile u32 dmasz;       /* DMA count */
+	volatile u32 dmasz;		/* DMA count */
 	u32 _unused4;
-	volatile u32 ssize;       /* DMA stride size */
+	volatile u32 ssize;		/* DMA stride size */
 	u32 _unused5;
-	volatile u32 gmaddronly;  /* Set GIO DMA but do not start trans */
+	volatile u32 gmaddronly;	/* Set GIO DMA but do not start trans */
 	u32 _unused6;
-	volatile u32 dmaddnpgo;   /* Set GIO DMA addr + start transfer */
+	volatile u32 dmaddnpgo;		/* Set GIO DMA addr + start transfer */
 	u32 _unused7;
-	volatile u32 dmamode;     /* DMA mode config bit settings */
+	volatile u32 dmamode;		/* DMA mode config bit settings */
 	u32 _unused8;
-	volatile u32 dmacount;    /* Zoom and byte count for DMA */
+	volatile u32 dmaccount;		/* Zoom and byte count for DMA */
 	u32 _unused9;
-	volatile u32 dmastart;    /* Pedal to the metal. */
+	volatile u32 dmastart;		/* Pedal to the metal. */
 	u32 _unused10;
-	volatile u32 dmarunning;  /* DMA op is in progress */
+	volatile u32 dmarunning;	/* DMA op is in progress */
 	u32 _unused11;
 
 	/* Set dma addr, defaults, and kick it */
-	volatile u32 maddr_defl_go; /* go go go! -lm */
+	volatile u32 maddr_defl_go;	/* go go go! -lm */
 };
 
 /* MC controller dma regs live at physical 0x1fa02000. */
 extern struct sgimc_dma_ctrl *dmactrlregs;
 
 /* Base location of the two ram banks found in IP2[0268] machines. */
-#define SGIMC_SEG0_BADDR     0x08000000
-#define SGIMC_SEG1_BADDR     0x20000000
+#define SGIMC_SEG0_BADDR	0x08000000
+#define SGIMC_SEG1_BADDR	0x20000000
 
 /* Maximum size of the above banks are per machine. */
 extern u32 sgimc_seg0_size, sgimc_seg1_size;
-#define SGIMC_SEG0_SIZE_ALL         0x10000000 /* 256MB */
-#define SGIMC_SEG1_SIZE_IP20_IP22   0x08000000 /* 128MB */
-#define SGIMC_SEG1_SIZE_IP26_IP28   0x20000000 /* 512MB */
+#define SGIMC_SEG0_SIZE_ALL		0x10000000 /* 256MB */
+#define SGIMC_SEG1_SIZE_IP20_IP22	0x08000000 /* 128MB */
+#define SGIMC_SEG1_SIZE_IP26_IP28	0x20000000 /* 512MB */
 
 extern void sgimc_init(void);
 

^ permalink raw reply

* [parisc-linux] Visualize FX2
From: Yves De Muyter @ 2003-01-08 12:20 UTC (permalink / raw)
  To: parisc-linux

Hello,

I just got a C240 and i'm new to the PA-RISC architecture. It runs debian fine except the Visualize FX2 graphics board only works under sticon. What's the status of an XFree or FB driver for this card? Is any1 working on that?

-Yves

^ permalink raw reply

* Remove GIO interface
From: Ladislav Michl @ 2003-01-08 12:30 UTC (permalink / raw)
  To: linux-mips; +Cc: Ralf Baechle, Guido Guenther

Hi,

after many tests I decided to remove GIO interface from kernel...

Reasons:
* Due to hardware setup it is not possible to determine device in GFX slot.
  Even more it's not possible to say if there is any. (gio.ps Lie #1)
* Newport XL nor XZ doesn't provide GIO product identification word. In fact
  Newport is simply mapped from SLOT_BASE + 0xf0000. (gio.ps Lie #2)
* Even in case everything work as stated in documentation, we are unable
  to use this mechanism to detect Newport for console driver (the main
  reason why I created this interface was to provide neccessary
  informations to Xserver), because our DBE handling doesn't work until
  modules are initialized (in case we are building kernel with modules
  support).

Because we have only three (two on Indigo) slots and each type of device
can be located only in one (rarely two possitions), drivers will use
get_dbe for device probing (see my next post).

I think now is time to eat humble pie for my stupidity, I'll no more trust
any documentation and will always verify facts. I'm sorry.

	ladis

Index: include/asm-mips/sgi/sgigio.h
===================================================================
RCS file: /home/cvs/linux/include/asm-mips/sgi/sgigio.h,v
retrieving revision 1.1.2.2
diff -u -r1.1.2.2 sgigio.h
--- include/asm-mips/sgi/sgigio.h	5 Aug 2002 23:53:38 -0000	1.1.2.2
+++ include/asm-mips/sgi/sgigio.h	8 Jan 2003 11:10:37 -0000
@@ -12,6 +12,11 @@
 #define _ASM_SGI_SGIGIO_H
 
 /*
+ * GIO bus addresses
+ *
+ * The Indigo and Indy have two GIO bus connectors. Indigo2 (all models) have
+ * three physical connectors, but only two slots, GFX and EXP0.
+ * 
  * There is 10MB of GIO address space for GIO64 slot devices
  * slot#   slot type address range            size
  * -----   --------- ----------------------- -----
@@ -26,44 +31,56 @@
  * Following space is reserved and unused
  *   -     RESERVED  0x18000000 - 0x1effffff 112MB
  *
- * The GIO specification tends to use slot numbers while the MC specification
- * tends to use slot types.
+ * GIO bus IDs
+ *
+ * Each GIO bus device identifies itself to the system by answering a
+ * read with an "ID" value. IDs are either 8 or 32 bits long. IDs less
+ * than 128 are 8 bits long, with the most significant 24 bits read from
+ * the slot undefined.
+ *
+ * 32-bit IDs are divided into
+ *	bits 0:6        the product ID; ranges from 0x00 to 0x7F.
+ *	bit 7		0=GIO Product ID is 8 bits wide
+ *			1=GIO Product ID is 32 bits wide.
+ *	bits 8:15       manufacturer version for the product.
+ *	bit 16		0=GIO32 and GIO32-bis, 1=GIO64.
+ *	bit 17		0=no ROM present
+ *			1=ROM present on this board AND next three words
+ *			space define the ROM.
+ *	bits 18:31	up to manufacturer.
+ *
+ * IDs above 0x50/0xd0 are of 3rd party boards.
+ *
+ * 8-bit IDs
+ *	0x01		XPI low cost FDDI
+ *	0x02		GTR TokenRing
+ *	0x04		Synchronous ISDN
+ *	0x05		ATM board [*]
+ *	0x06		Canon Interface
+ *	0x07		16 bit SCSI Card [*]
+ *	0x08		JPEG (Double Wide)
+ *	0x09		JPEG (Single Wide)
+ *	0x0a		XPI mez. FDDI device 0
+ *	0x0b		XPI mez. FDDI device 1
+ *	0x0c		SMPTE 259M Video [*]
+ *	0x0d		Babblefish Compression [*]
+ *	0x0e		E-Plex 8-port Ethernet
+ *	0x30		Lyon Lamb IVAS
+ *	0xb8		GIO 100BaseTX Fast Ethernet (gfe)
+ *
+ * [*] Device provide 32-bit ID.
  *
- * slot0  - the "graphics" (GFX) slot but there is no requirement that
- *          a graphics dev may only use this slot
- * slot1  - this is the "expansion"-slot 0 (EXP0), do not confuse with
- *          slot 0 (GFX).
- * slot2  - this is the "expansion"-slot 1 (EXP1), do not confuse with
- *          slot 1 (EXP0).
  */
 
-#define GIO_SLOT_GFX	0
-#define GIO_SLOT_GIO1	1
-#define GIO_SLOT_GIO2	2
-#define GIO_NUM_SLOTS	3
-
-#define GIO_ANY_ID	0xff
-
-#define GIO_VALID_ID_ONLY	0x01
-#define GIO_IFACE_64		0x02
-#define GIO_HAS_ROM		0x04
-
-struct gio_dev {
-	unsigned char	device;
-	unsigned char	revision;
-	unsigned short	vendor;
-	unsigned char	flags;
-
-	unsigned char	slot_number;
-	unsigned long	base_addr;
-	unsigned int	map_size;
-
-	char		*name;
-	char		slot_name[5];
-};
-
-extern struct gio_dev* gio_find_device(unsigned char device, const struct gio_dev *from);
-
-extern void sgigio_init(void);
+#define GIO_ID(x)		(x & 0x7f)
+#define GIO_32BIT_ID		0x80
+#define GIO_REV(x)		((x >> 8) & 0xff)
+#define GIO_64BIT_IFACE		0x10000
+#define GIO_ROM_PRESENT		0x20000
+#define GIO_VENDOR_CODE(x)	((x >> 18) & 0x3fff)
+
+#define GIO_SLOT_GFX_BASE	0x1f000000
+#define GIO_SLOT_EXP0_BASE	0x1f400000
+#define GIO_SLOT_EXP1_BASE	0x1f600000
 
 #endif /* _ASM_SGI_SGIGIO_H */
Index: include/asm-mips64/sgi/sgigio.h
===================================================================
RCS file: /home/cvs/linux/include/asm-mips64/sgi/sgigio.h,v
retrieving revision 1.1.2.2
diff -u -r1.1.2.2 sgigio.h
--- include/asm-mips64/sgi/sgigio.h	5 Aug 2002 23:53:40 -0000	1.1.2.2
+++ include/asm-mips64/sgi/sgigio.h	8 Jan 2003 11:10:37 -0000
@@ -12,6 +12,11 @@
 #define _ASM_SGI_SGIGIO_H
 
 /*
+ * GIO bus addresses
+ *
+ * The Indigo and Indy have two GIO bus connectors. Indigo2 (all models) have
+ * three physical connectors, but only two slots, GFX and EXP0.
+ * 
  * There is 10MB of GIO address space for GIO64 slot devices
  * slot#   slot type address range            size
  * -----   --------- ----------------------- -----
@@ -26,44 +31,56 @@
  * Following space is reserved and unused
  *   -     RESERVED  0x18000000 - 0x1effffff 112MB
  *
- * The GIO specification tends to use slot numbers while the MC specification
- * tends to use slot types.
+ * GIO bus IDs
+ *
+ * Each GIO bus device identifies itself to the system by answering a
+ * read with an "ID" value. IDs are either 8 or 32 bits long. IDs less
+ * than 128 are 8 bits long, with the most significant 24 bits read from
+ * the slot undefined.
+ *
+ * 32-bit IDs are divided into
+ *	bits 0:6        the product ID; ranges from 0x00 to 0x7F.
+ *	bit 7		0=GIO Product ID is 8 bits wide
+ *			1=GIO Product ID is 32 bits wide.
+ *	bits 8:15       manufacturer version for the product.
+ *	bit 16		0=GIO32 and GIO32-bis, 1=GIO64.
+ *	bit 17		0=no ROM present
+ *			1=ROM present on this board AND next three words
+ *			space define the ROM.
+ *	bits 18:31	up to manufacturer.
+ *
+ * IDs above 0x50/0xd0 are of 3rd party boards.
+ *
+ * 8-bit IDs
+ *	0x01		XPI low cost FDDI
+ *	0x02		GTR TokenRing
+ *	0x04		Synchronous ISDN
+ *	0x05		ATM board [*]
+ *	0x06		Canon Interface
+ *	0x07		16 bit SCSI Card [*]
+ *	0x08		JPEG (Double Wide)
+ *	0x09		JPEG (Single Wide)
+ *	0x0a		XPI mez. FDDI device 0
+ *	0x0b		XPI mez. FDDI device 1
+ *	0x0c		SMPTE 259M Video [*]
+ *	0x0d		Babblefish Compression [*]
+ *	0x0e		E-Plex 8-port Ethernet
+ *	0x30		Lyon Lamb IVAS
+ *	0xb8		GIO 100BaseTX Fast Ethernet (gfe)
+ *
+ * [*] Device provide 32-bit ID.
  *
- * slot0  - the "graphics" (GFX) slot but there is no requirement that
- *          a graphics dev may only use this slot
- * slot1  - this is the "expansion"-slot 0 (EXP0), do not confuse with
- *          slot 0 (GFX).
- * slot2  - this is the "expansion"-slot 1 (EXP1), do not confuse with
- *          slot 1 (EXP0).
  */
 
-#define GIO_SLOT_GFX	0
-#define GIO_SLOT_GIO1	1
-#define GIO_SLOT_GIO2	2
-#define GIO_NUM_SLOTS	3
-
-#define GIO_ANY_ID	0xff
-
-#define GIO_VALID_ID_ONLY	0x01
-#define GIO_IFACE_64		0x02
-#define GIO_HAS_ROM		0x04
-
-struct gio_dev {
-	unsigned char	device;
-	unsigned char	revision;
-	unsigned short	vendor;
-	unsigned char	flags;
-
-	unsigned char	slot_number;
-	unsigned long	base_addr;
-	unsigned int	map_size;
-
-	char		*name;
-	char		slot_name[5];
-};
-
-extern struct gio_dev* gio_find_device(unsigned char device, const struct gio_dev *from);
-
-extern void sgigio_init(void);
+#define GIO_ID(x)		(x & 0x7f)
+#define GIO_32BIT_ID		0x80
+#define GIO_REV(x)		((x >> 8) & 0xff)
+#define GIO_64BIT_IFACE		0x10000
+#define GIO_ROM_PRESENT		0x20000
+#define GIO_VENDOR_CODE(x)	((x >> 18) & 0x3fff)
+
+#define GIO_SLOT_GFX_BASE	0x1f000000
+#define GIO_SLOT_EXP0_BASE	0x1f400000
+#define GIO_SLOT_EXP1_BASE	0x1f600000
 
 #endif /* _ASM_SGI_SGIGIO_H */
Index: arch/mips/sgi-ip22/ip22-time.c
===================================================================
RCS file: /home/cvs/linux/arch/mips/sgi-ip22/ip22-time.c,v
retrieving revision 1.1.2.11
diff -u -r1.1.2.11 ip22-time.c
--- arch/mips/sgi-ip22/ip22-time.c	18 Dec 2002 22:37:29 -0000	1.1.2.11
+++ arch/mips/sgi-ip22/ip22-time.c	8 Jan 2003 11:10:38 -0000
@@ -180,14 +180,6 @@
 		(int) (r4k_tick / 5000), (int) (r4k_tick % 5000) / 50);
 
 	mips_counter_frequency = r4k_tick * HZ;
-
-	/* HACK ALERT! This get's called after traps initialization
-	 * We piggyback the initialization of GIO bus here even though
-	 * it is technically not related with the timer in any way.
-	 * Doing it from ip22_setup wouldn't work since traps aren't
-	 * initialized yet.
-	 */
-	sgigio_init();
 }
 
 /* Generic SGI handler for (spurious) 8254 interrupts */
Index: arch/mips/sgi-ip22/ip22-setup.c
===================================================================
RCS file: /home/cvs/linux/arch/mips/sgi-ip22/ip22-setup.c,v
retrieving revision 1.1.2.14
diff -u -r1.1.2.14 ip22-setup.c
--- arch/mips/sgi-ip22/ip22-setup.c	27 Sep 2002 16:45:04 -0000	1.1.2.14
+++ arch/mips/sgi-ip22/ip22-setup.c	8 Jan 2003 11:18:39 -0000
@@ -47,7 +47,6 @@
 extern struct rtc_ops indy_rtc_ops;
 extern void indy_reboot_setup(void);
 extern void sgi_volume_set(unsigned char);
-extern void create_gio_proc_entry(void);
 
 #define sgi_kh ((struct hpc_keyb *) &(hpc3mregs->kbdmouse0))
 
@@ -69,11 +68,6 @@
 	 * ip22_setup wouldn't work since kmalloc isn't initialized yet.
 	 */
 	indy_reboot_setup();
-
-	/* Ehm, well... once David used hack above, let's add yet another.
-	 * Register GIO bus proc entry here.
-	 */
-	create_gio_proc_entry();
 
 	return request_irq(SGI_KEYBD_IRQ, handler, 0, "keyboard", NULL);
 }
Index: arch/mips/sgi-ip22/ip22-gio.c
===================================================================
RCS file: /home/cvs/linux/arch/mips/sgi-ip22/ip22-gio.c,v
retrieving revision 1.1.2.4
diff -u -r1.1.2.4 ip22-gio.c
--- arch/mips/sgi-ip22/ip22-gio.c	18 Dec 2002 19:11:09 -0000	1.1.2.4
+++ arch/mips/sgi-ip22/ip22-gio.c	8 Jan 2003 12:14:53 -0000
@@ -1,137 +1,5 @@
 /*
- * ip22-gio.c: Support for GIO64 bus (inspired by PCI code)
- *
- * Copyright (C) 2002 Ladislav Michl
+ * ip22-gio.c: Support for GIO bus (add interrupt handling code here)
  */
 
-#include <linux/kernel.h>
-#include <linux/types.h>
-#include <linux/slab.h>
-#include <linux/init.h>
-#include <linux/proc_fs.h>
-
-#include <asm/addrspace.h>
-#include <asm/sgi/sgimc.h>
 #include <asm/sgi/sgigio.h>
-
-#define GIO_PIO_MAP_BASE	0x1f000000L
-#define GIO_PIO_MAP_SIZE	(16 * 1024*1024)
-
-#define GIO_ADDR_GFX		0x1f000000L
-#define GIO_ADDR_GIO1		0x1f400000L
-#define GIO_ADDR_GIO2		0x1f600000L
-
-#define GIO_GFX_MAP_SIZE	(4 * 1024*1024)
-#define GIO_GIO1_MAP_SIZE	(2 * 1024*1024)
-#define GIO_GIO2_MAP_SIZE	(4 * 1024*1024)
-
-#define GIO_NO_DEVICE		0x80
-
-static struct gio_dev gio_slot[GIO_NUM_SLOTS] = {{
-	.flags		= GIO_NO_DEVICE,
-	.slot_number	= GIO_SLOT_GFX,
-	.base_addr	= GIO_ADDR_GFX,
-	.map_size	= GIO_GFX_MAP_SIZE,
-	.slot_name	= "GFX",
-}, {
-	.flags		= GIO_NO_DEVICE,
-	.slot_number	= GIO_SLOT_GIO1,
-	.base_addr	= GIO_ADDR_GIO1,
-	.map_size	= GIO_GIO1_MAP_SIZE,
-	.slot_name	= "EXP0",
-}, {
-	.flags		= GIO_NO_DEVICE,
-	.slot_number	= GIO_SLOT_GIO2,
-	.base_addr	= GIO_ADDR_GIO2,
-	.map_size	= GIO_GIO2_MAP_SIZE,
-	.slot_name	= "EXP1"
-}};
-
-static int gio_read_proc(char *buf, char **start, off_t off,
-			 int count, int *eof, void *data)
-{
-	int i;
-	char *p = buf;
-
-	p += sprintf(p, "GIO devices found:\n");
-	for (i = 0; i < GIO_NUM_SLOTS; i++) {
-		if (gio_slot[i].flags & GIO_NO_DEVICE)
-			continue;
-		p += sprintf(p, "  Slot %s, DeviceId 0x%02x\n",
-			     gio_slot[i].slot_name, gio_slot[i].device);
-		p += sprintf(p, "    BaseAddr 0x%08lx, MapSize 0x%08x\n",
-			     gio_slot[i].base_addr, gio_slot[i].map_size);
-	}
-
-	return p - buf;
-}
-
-void create_gio_proc_entry(void)
-{
-	create_proc_read_entry("gio", 0, NULL, gio_read_proc, NULL);
-}
-
-/**
- * gio_find_device - begin or continue searching for a GIO device by device id
- * @device: GIO device id to match, or %GIO_ANY_ID to match all device ids
- * @from: Previous GIO device found in search, or %NULL for new search.
- *
- * Iterates through the list of known GIO devices. If a GIO device is found
- * with a matching @device, a pointer to its device structure is returned.
- * Otherwise, %NULL is returned.
- * A new search is initiated by passing %NULL to the @from argument.
- * Otherwise if @from is not %NULL, searches continue from next device.
- */
-struct gio_dev *
-gio_find_device(unsigned char device, const struct gio_dev *from)
-{
-	int i;
-
-	for (i = (from) ? from->slot_number : 0; i < GIO_NUM_SLOTS; i++)
-		if (!(gio_slot[i].flags & GIO_NO_DEVICE) &&
-		   (device == GIO_ANY_ID || device == gio_slot[i].device))
-			return &gio_slot[i];
-
-	return NULL;
-}
-
-#define GIO_IDCODE(x)		(x & 0x7f)
-#define GIO_ALL_BITS_VALID	0x80
-#define GIO_REV(x)		((x >> 8) & 0xff)
-#define GIO_GIO_SIZE_64		0x10000
-#define GIO_ROM_PRESENT		0x20000
-#define GIO_VENDOR_CODE(x)	((x >> 18) & 0x3fff)
-
-extern int ip22_baddr(unsigned int *val, unsigned long addr);
-
-/**
- * sgigio_init - scan the GIO space and figure out what hardware is actually
- * present.
- */
-void __init sgigio_init(void)
-{
-	unsigned int i, id, found = 0;
-
-	printk("GIO: Scanning for GIO cards...\n");
-	for (i = 0; i < GIO_NUM_SLOTS; i++) {
-		if (ip22_baddr(&id, KSEG1ADDR(gio_slot[i].base_addr)))
-			continue;
-
-		found = 1;
-		gio_slot[i].device = GIO_IDCODE(id);
-		if (id & GIO_ALL_BITS_VALID) {
-			gio_slot[i].revision = GIO_REV(id);
-			gio_slot[i].vendor = GIO_VENDOR_CODE(id);
-			gio_slot[i].flags =
-				(id & GIO_GIO_SIZE_64) ? GIO_IFACE_64 : 0 |
-				(id & GIO_ROM_PRESENT) ? GIO_HAS_ROM : 0;
-		} else
-			gio_slot[i].flags = GIO_VALID_ID_ONLY;
-
-		printk("GIO: Card 0x%02x @ 0x%08lx\n", gio_slot[i].device,
-			gio_slot[i].base_addr);
-	}
-
-	if (!found)
-		printk("GIO: No GIO cards present.\n");
-}

^ permalink raw reply

* Re: Why is Nvidia given GPL'd code to use in closed source drivers?
From: Mark Hounschell @ 2003-01-08 12:28 UTC (permalink / raw)
  To: linux-kernel
In-Reply-To: <3E1BF82B.E55C84EE@aitel.hist.no>

Helge Hafting wrote:
> 
> Valdis.Kletnieks@vt.edu wrote:
> >
> > On Tue, 07 Jan 2003 10:08:00 +0100, Helge Hafting <helgehaf@aitel.hist.no>  said:
> > > loss.  Giving away driver code (or at least programming specs)
> > > wouldn't be a loss to nvidia though - because users would still
> > > need to buy those cards.
> >
> > It would be a major loss to nvidia *AND* its customers if it were bankrupted in
> > a lawsuit because it open-sourced code or specs that contained intellectual
> > property that belonged to somebody else.
> 
> Perhaps their driver contains some IP.  But I seriously doubt the
> programming specs for their chips contains such secrets.  It is
> not as if we need the entire chip layout - it is basically
> things like:
> 
> "To achieve effect X, write command code 0x3477 into register 5
> and the new coordinates into registers 75-78.  Then wait 2.03ms before
> attempting to access the chip again..."
> 
> Something is very wrong if they _can't_ release that sort of
> information.
> Several other manufacturers have no problem with this.

Aren't nvidias' chipsets really owned by SGI. It think there is some deal nvidia
has with SGI that prohibits nvidia from opening up their driver and chip set
info. It's looking like SGI might be gone soon. Maybe if they disappear, nvidia
can do what they want???


Mark

^ permalink raw reply

* BUILD PROBLEM - Linux 2.5 BK - smpboot.c
From: Andrew Walrond @ 2003-01-08 12:21 UTC (permalink / raw)
  To: linux-kernel

I'm seeing this error:

   gcc -Wp,-MD,arch/i386/kernel/.smpboot.o.d -D__KERNEL__ -Iinclude 
-Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing 
-fno-common -pipe -mpreferred-stack-boundary=2 -march=pentium4 
-Iinclude/asm-i386/mach-default -fomit-frame-pointer -nostdinc 
-iwithprefix include    -DKBUILD_BASENAME=smpboot 
-DKBUILD_MODNAME=smpboot   -c -o arch/i386/kernel/smpboot.o 
arch/i386/kernel/smpboot.c
make -f scripts/Makefile.build obj=fs
make -f scripts/Makefile.build obj=fs/autofs4
arch/i386/kernel/smpboot.c:55:26:make -f scripts/Makefile.build obj=fs/devfs
  mach_wakecpu.h: No such file or directory
make -f scripts/Makefile.build obj=fs/devpts
make -f scripts/Makefile.build obj=fs/exportfs
make -f scripts/Makefile.build obj=fs/lockd
arch/i386/kernel/smpboot.c: In function `smp_callin':
arch/i386/kernel/smpboot.c:351: warning: implicit declaration of 
function `wait_for_init_deassert'arch/i386/kernel/smpboot.c:400: 
warning: implicit declaration of function `smp_callin_clear_local_apic'
make -f scripts/Makefile.build obj=fs/nfs
arch/i386/kernel/smpboot.c: In function `do_boot_cpu':
arch/i386/kernel/smpboot.c:826: warning: implicit declaration of 
function `store_NMI_vector'
arch/i386/kernel/smpboot.c:831: `TRAMPOLINE_HIGH' undeclared (first use 
in this function)
arch/i386/kernel/smpboot.c:831: (Each undeclared identifier is reported 
only once
arch/i386/kernel/smpboot.c:831: for each function it appears in.)
arch/i386/kernel/smpboot.c:833: `TRAMPOLINE_LOW' undeclared (first use 
in this function)
arch/i386/kernel/smpboot.c:839: warning: implicit declaration of 
function `wakeup_secondary_cpu'
arch/i386/kernel/smpboot.c:873: warning: implicit declaration of 
function `inquire_remote_apic'
arch/i386/kernel/smpboot.c: In function `smp_boot_cpus':
arch/i386/kernel/smpboot.c:1048: `boot_cpu_apicid' undeclared (first use 
in this function)
make -f scripts/Makefile.build obj=fs/nfsd
make -f scripts/Makefile.build obj=fs/partitions
make -f scripts/Makefile.build obj=fs/proc
make[1]: *** [arch/i386/kernel/smpboot.o] Error 1
make: *** [arch/i386/kernel] Error 2
make: *** Waiting for unfinished jobs....


^ permalink raw reply

* opening a port..
From: mdew @ 2003-01-08 12:12 UTC (permalink / raw)
  To: netfilter


Hi,
Just *testing* this out..

iptables -A INPUT -i eth0 -p tcp --dport 4662 -j ACCEPT
iptables -A INPUT -i eth0 -p udp --dport 4662 -j ACCEPT
iptables -A INPUT -i eth1 -p udp --dport 4662 -j ACCEPT
iptables -A INPUT -i eth1 -p tcp --dport 4662 -j ACCEPT
iptables -A INPUT -i eth1 -p tcp --sport 4662 -j ACCEPT
iptables -A INPUT -i eth1 -p udp --sport 4662 -j ACCEPT
iptables -A INPUT -i eth0 -p udp --sport 4662 -j ACCEPT
iptables -A INPUT -i eth0 -p tcp --sport 4662 -j ACCEPT

iptables -A FORWARD -o eth0 -p tcp --dport 4662 -j ACCEPT
iptables -A FORWARD -o eth1 -p tcp --dport 4662 -j ACCEPT
iptables -A FORWARD -o eth1 -p udp --dport 4662 -j ACCEPT
iptables -A FORWARD -o eth0 -p udp --dport 4662 -j ACCEPT
iptables -A FORWARD -o eth0 -p udp --sport 4662 -j ACCEPT
iptables -A FORWARD -o eth1 -p udp --sport 4662 -j ACCEPT
iptables -A FORWARD -o eth1 -p tcp --sport 4662 -j ACCEPT
iptables -A FORWARD -o eth0 -p tcp --sport 4662 -j ACCEPT

yet, when i try to telnet to it,

mdew:~# telnet 127.0.0.1 4662
Trying 127.0.0.1...
telnet: Unable to connect to remote host: Connection refused

Yeah I know I have lots of unnessary rules, but im only testing 'em...it
just seems a little strange that i cant see 4662 (Edonkey port) on the
router.

-mdew





^ permalink raw reply

* Re: Gigabit/SMP performance problem
From: Jon Burgess @ 2003-01-08 12:17 UTC (permalink / raw)
  To: avery_fay; +Cc: linux-kernel



Avery Fay wrote:
> can probably handle all of the interrupts. Really the issue I'm
> trying to solve is not routing performance, but rather the fact
> that SMP routing performance is worse while using twice
> the cpu time (2 cpu's at around 95% vs. 1 at around 95%).

Please forgive me if this is a silly suggestion, but are you sure this is a real
95% utilisation in the 2 CPU case. I think some versions of top show 0..200% for
the 2 CPU case, and therefore 95% utilisation is represents a  real CPU
utilisation of 47.5%

     Jon



^ permalink raw reply

* CRAMFS on MTD/NAND Issue
From: Srinivasu.Vaduguri @ 2003-01-08 12:40 UTC (permalink / raw)
  To: linux-mtd

Hi all,

I am trying to mount CRAMFS using MTD driver on a NAND flash. 
If there is a BAD block in the CRAMFS area of the NAND flash then i get the following error during mount. 

Error -3 while decompressing!
802c3674(666163445)->83d7d000(4096)

Then the applications on the mounted cramfs are not running properly.

any suggestions are appreciated..

thanx in advance,

regards,
Srini

^ permalink raw reply

* Re: Re: rotation.
From: John Bradford @ 2003-01-08 12:05 UTC (permalink / raw)
  To: Måns Rullgård
  Cc: luther, geert, jsimmons, linux-fbdev-devel, linux-kernel
In-Reply-To: <yw1xu1gj51ep.fsf@tiptop.e.kth.se>

> > > > I'm about to implement rotation which is needed for devices
> > > > like the ipaq.
> > > > The question is do we flip the xres and yres values depending
> > > > on the rotation or do we just alter the data that will be
> > > > drawn to make the screen appear to rotate. How does hardware
> > > > rotate view the x and y axis?  Are they rotated or does just
> > > > the data get rotated?
> > > 
> > > Where are you going to implement the rotation? At the fbcon or
> > > fbdev level? 
> > > 
> > > Fbcon has the advantage that it'll work for all frame buffer
> > > devices.
> > 
> > But you could also provide driver hooks for the chips which have
> > such a rotation feature included (don't know if such exist, but i
> > suppose they do, or may in the future).

It would be nice to have an option to be able to do the rotation
entirely in software - some desktop users might prefer to have a
portait-orientated display, when their graphics card doesn't have any
hardware rotation facilities at all.

John.


-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com

^ permalink raw reply

* [PATCH][COMPAT] {get,put}_compat_timspec 8/8 parisc
From: Stephen Rothwell @ 2003-01-08 12:12 UTC (permalink / raw)
  To: matthew; +Cc: torvalds, linux-kernel
In-Reply-To: <20030108223744.0c4856b7.sfr@canb.auug.org.au>

Hi Willy,

Here is the parisc part.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

diff -ruN 2.5.54-200301081106-32bit.2/arch/parisc/kernel/sys_parisc32.c 2.5.54-200301081106-32bit.3/arch/parisc/kernel/sys_parisc32.c
--- 2.5.54-200301081106-32bit.2/arch/parisc/kernel/sys_parisc32.c	2003-01-08 12:04:15.000000000 +1100
+++ 2.5.54-200301081106-32bit.3/arch/parisc/kernel/sys_parisc32.c	2003-01-08 17:10:25.000000000 +1100
@@ -490,15 +490,6 @@
 }
 #endif /* CONFIG_SYSCTL */
 
-static int
-put_compat_timespec(struct compat_timespec *u, struct timespec *t)
-{
-	struct compat_timespec t32;
-	t32.tv_sec = t->tv_sec;
-	t32.tv_nsec = t->tv_nsec;
-	return copy_to_user(u, &t32, sizeof t32);
-}
-
 asmlinkage long sys32_sched_rr_get_interval(pid_t pid,
 	struct compat_timespec *interval)
 {
@@ -507,7 +498,7 @@
 	extern asmlinkage long sys_sched_rr_get_interval(pid_t pid, struct timespec *interval);
 	
 	KERNEL_SYSCALL(ret, sys_sched_rr_get_interval, pid, &t);
-	if (put_compat_timespec(interval, &t))
+	if (put_compat_timespec(&t, interval))
 		return -EFAULT;
 	return ret;
 }

^ permalink raw reply

* Re: intel8x0: changing characteristics after an APM suspend-resume cycle
From: Takashi Iwai @ 2003-01-08 12:03 UTC (permalink / raw)
  To: D. Sen; +Cc: alsa-user, alsa-devel
In-Reply-To: <3E1B3B2A.4070204@homemail.com>

At Tue, 07 Jan 2003 15:40:10 -0500,
D. Sen <dsen@homemail.com> wrote:
> 
> Hi,
> 
> I am using the snd-intel8x0 drivers (0.9.0rc6) on my IBM Thinkpad 
> running Linux 2.4.20. Everything seems to run fine until the machine 
> goes through a suspend/resume cycle when mono files/streams seem to get 
> played back at a much faster rate.
> 
> A cold reboot resolves the problem.

even after unloading/reloading the module the problem persists?


Takashi


-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com

^ permalink raw reply

* [linux-lvm] problem
From: Daniel Wittenberg @ 2003-01-08 12:03 UTC (permalink / raw)
  To: linux-lvm

I had 2 drives in my machine, with a VG across both of them.  The only
thing on the second drive was part of /tmp, so when the second drive
died I didn't really lose anything.  But I have problems now because I
can't activate the VG because part of it is missing, but I can't remove
tmp, so it's a catch-22.  Is there anyway to remove an LV without
activating the VG?  Or another way I can tell it to ignore missing LV's?

Thanks!
Dan

-- 
===========================
Daniel Wittenberg
Senior Unix Admin
University of Iowa - ITS

^ permalink raw reply

* [PATCH][COMPAT] {get,put}_compat_timspec 7/8 mips64
From: Stephen Rothwell @ 2003-01-08 12:10 UTC (permalink / raw)
  To: ralf; +Cc: torvalds, linux-kernel
In-Reply-To: <20030108223744.0c4856b7.sfr@canb.auug.org.au>

Hi Ralf,

Here is the mips64 part.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

diff -ruN 2.5.54-200301081106-32bit.2/arch/mips64/kernel/linux32.c 2.5.54-200301081106-32bit.3/arch/mips64/kernel/linux32.c
--- 2.5.54-200301081106-32bit.2/arch/mips64/kernel/linux32.c	2003-01-08 12:04:15.000000000 +1100
+++ 2.5.54-200301081106-32bit.3/arch/mips64/kernel/linux32.c	2003-01-08 17:09:19.000000000 +1100
@@ -1086,8 +1086,7 @@
 	set_fs (KERNEL_DS);
 	ret = sys_sched_rr_get_interval(pid, &t);
 	set_fs (old_fs);
-	if (put_user (t.tv_sec, &interval->tv_sec) ||
-	    __put_user (t.tv_nsec, &interval->tv_nsec))
+	if (put_compat_timespec(&t, interval))
 		return -EFAULT;
 	return ret;
 }

^ permalink raw reply

* Re: OT Naming. was: Re: Why is Nvidia given GPL'd code to use in  closed source drivers?
From: Måns Rullgård @ 2003-01-08 12:09 UTC (permalink / raw)
  To: linux-kernel@vger.kernel.org
In-Reply-To: <200301081123.h08BNQiO000383@habitrail.home.fools-errant.com>

Hacksaw <hacksaw@hacksaw.org> writes:

> >The "GNU/Linux" vs "Linux" argument is a political one, not a practical
> >one, don't try to disguise it.
> 
> I used to agree with this, and as far as politics, I do. However, a
> practical reason to call it GNU/Linux just occurred to me: the ABI.
> 
> Linux is a kernel. It runs on a variety of platforms. You certainly
> must differentiate between a program for Linux on StrongARM and one
> for Linux on x86. To use a kernel one makes calls into it via a
> system call mechanism. In the case of the vast majority of Linux
> installations, that is done via glibc.  Not for kicks is that 'g'
> there.
> 
> A system with a linux kernel using a different API will likely have a 
> different ABI for it's programs.

The functions in glibc that you are referring to are specified by
ANSI/ISO C and POSIX standards.  If a system doesn't comply to these
it's broken.  Yes, I consider systems like MSWindows broken.  Well,
there's VMS, of course.  I'll don't know what standards it follows.

-- 
Måns Rullgård
mru@users.sf.net

^ permalink raw reply

* Re: the last changes to trident driver
From: Takashi Iwai @ 2003-01-08 12:00 UTC (permalink / raw)
  To: James Tappin; +Cc: Self at home, alsa-devel
In-Reply-To: <20030108110650.1d579069.sjt@star.sr.bham.ac.uk>

[-- Attachment #1: Type: text/plain, Size: 1477 bytes --]

At Wed, 8 Jan 2003 11:06:50 +0000,
James Tappin wrote:
> 
> On Wed, 08 Jan 2003 11:08:39 +0100
> Takashi Iwai <tiwai@suse.de> wrote:
> 
> TI> At Tue, 7 Jan 2003 23:20:51 +0000,
> TI> James Tappin wrote:
> TI> > 
> TI> > On Tue, 07 Jan 2003 17:04:47 +0100
> TI> > Takashi Iwai <tiwai@suse.de> wrote:
> TI> > 
> TI> > > Hi,
> TI> > > 
> TI> > > if someone has a Trident 4DNX (not DX), could you test the latest CVS
> TI> > > driver?  i hope my last change doesn't break, but i couldn't test the
> TI> > > board atm...
> TI> > > 
> TI> > > 
> TI> > 
> TI> > Hi Takashi,
> TI> > 	I've managed to resolve my unresolved references problem by rebuilding
> TI> > the kernel without gameport support, but now attempting to aplay a wav
> TI> > file produces an immediate segfault (but it refuses to dump core).
> TI> 
> TI> hmm, perhaps it caused oops in kernel.
> TI> could you check the kernel message and get the trace via ksymoops if
> TI> possible?
> TI> 
> 
> I've just logged into the machine from work and looked back at the system logs and this 
> is what I see from "ksymoops syslog.0":
> 

hmm, unfortunately the stack wasn't parsed correctly with symbols.
did you build the alsa drivers with debug option (--with-debug=full)?
anyway, please rebuild the drivers with the attached patch (and debug
option, if not yet).  i hope a fatal oops or hang-up can be avoided
now...
oh, also, please update the cvs tree again.  i've done some changes
since yesterday.


thanks,

Takashi

[-- Attachment #2: trident-nx-fix.dif --]
[-- Type: application/octet-stream, Size: 6023 bytes --]

Index: alsa-kernel/pci/trident/trident_main.c
===================================================================
RCS file: /suse/tiwai/cvs/alsa/alsa-kernel/pci/trident/trident_main.c,v
retrieving revision 1.19
diff -u -r1.19 trident_main.c
--- alsa-kernel/pci/trident/trident_main.c	7 Jan 2003 10:51:12 -0000	1.19
+++ alsa-kernel/pci/trident/trident_main.c	8 Jan 2003 11:56:17 -0000
@@ -2041,6 +2041,20 @@
 	.pointer =	snd_trident_playback_pointer,
 };
 
+static snd_pcm_ops_t snd_trident_nx_playback_ops = {
+	.open =		snd_trident_playback_open,
+	.close =	snd_trident_playback_close,
+	.ioctl =	snd_trident_ioctl,
+	.hw_params =	snd_trident_hw_params,
+	.hw_free =	snd_trident_hw_free,
+	.prepare =	snd_trident_playback_prepare,
+	.trigger =	snd_trident_trigger,
+	.pointer =	snd_trident_playback_pointer,
+	.copy =		snd_pcm_sgbuf_ops_copy_playback,
+	.silence =	snd_pcm_sgbuf_ops_silence,
+	.page =		snd_pcm_sgbuf_ops_page,
+};
+
 static snd_pcm_ops_t snd_trident_capture_ops = {
 	.open =		snd_trident_capture_open,
 	.close =	snd_trident_capture_close,
@@ -2052,6 +2066,20 @@
 	.pointer =	snd_trident_capture_pointer,
 };
 
+static snd_pcm_ops_t snd_trident_nx_capture_ops = {
+	.open =		snd_trident_capture_open,
+	.close =	snd_trident_capture_close,
+	.ioctl =	snd_trident_ioctl,
+	.hw_params =	snd_trident_capture_hw_params,
+	.hw_free =	snd_trident_hw_free,
+	.prepare =	snd_trident_capture_prepare,
+	.trigger =	snd_trident_trigger,
+	.pointer =	snd_trident_capture_pointer,
+	.copy =		snd_pcm_sgbuf_ops_copy_capture,
+	.silence =	snd_pcm_sgbuf_ops_silence,
+	.page =		snd_pcm_sgbuf_ops_page,
+};
+
 static snd_pcm_ops_t snd_trident_si7018_capture_ops = {
 	.open =		snd_trident_capture_open,
 	.close =	snd_trident_capture_close,
@@ -2074,6 +2102,20 @@
 	.pointer =	snd_trident_playback_pointer,
 };
 
+static snd_pcm_ops_t snd_trident_nx_foldback_ops = {
+	.open =		snd_trident_foldback_open,
+	.close =	snd_trident_foldback_close,
+	.ioctl =	snd_trident_ioctl,
+	.hw_params =	snd_trident_hw_params,
+	.hw_free =	snd_trident_hw_free,
+	.prepare =	snd_trident_foldback_prepare,
+	.trigger =	snd_trident_trigger,
+	.pointer =	snd_trident_playback_pointer,
+	.copy =		snd_pcm_sgbuf_ops_copy_capture,
+	.silence =	snd_pcm_sgbuf_ops_silence,
+	.page =		snd_pcm_sgbuf_ops_page,
+};
+
 static snd_pcm_ops_t snd_trident_spdif_ops = {
 	.open =		snd_trident_spdif_open,
 	.close =	snd_trident_spdif_close,
@@ -2085,6 +2127,20 @@
 	.pointer =	snd_trident_spdif_pointer,
 };
 
+static snd_pcm_ops_t snd_trident_nx_spdif_ops = {
+	.open =		snd_trident_spdif_open,
+	.close =	snd_trident_spdif_close,
+	.ioctl =	snd_trident_ioctl,
+	.hw_params =	snd_trident_spdif_hw_params,
+	.hw_free =	snd_trident_hw_free,
+	.prepare =	snd_trident_spdif_prepare,
+	.trigger =	snd_trident_trigger,
+	.pointer =	snd_trident_spdif_pointer,
+	.copy =		snd_pcm_sgbuf_ops_copy_playback,
+	.silence =	snd_pcm_sgbuf_ops_silence,
+	.page =		snd_pcm_sgbuf_ops_page,
+};
+
 static snd_pcm_ops_t snd_trident_spdif_7018_ops = {
 	.open =		snd_trident_spdif_open,
 	.close =	snd_trident_spdif_close,
@@ -2154,11 +2210,16 @@
 	pcm->private_data = trident;
 	pcm->private_free = snd_trident_pcm_free;
 
-	snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &snd_trident_playback_ops);
-	snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE,
+	if (trident->tlb.entries) {
+		snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &snd_trident_nx_playback_ops);
+		snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &snd_trident_nx_capture_ops);
+	} else {
+		snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &snd_trident_playback_ops);
+		snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE,
 				trident->device != TRIDENT_DEVICE_ID_SI7018 ?
-					&snd_trident_capture_ops :
-					&snd_trident_si7018_capture_ops);
+				&snd_trident_capture_ops :
+				&snd_trident_si7018_capture_ops);
+	}
 
 	pcm->info_flags = 0;
 	pcm->dev_subclass = SNDRV_PCM_SUBCLASS_GENERIC_MIX;
@@ -2200,7 +2261,10 @@
 
 	foldback->private_data = trident;
 	foldback->private_free = snd_trident_foldback_pcm_free;
-	snd_pcm_set_ops(foldback, SNDRV_PCM_STREAM_CAPTURE, &snd_trident_foldback_ops);
+	if (trident->tlb.entries)
+		snd_pcm_set_ops(foldback, SNDRV_PCM_STREAM_CAPTURE, &snd_trident_nx_foldback_ops);
+	else
+		snd_pcm_set_ops(foldback, SNDRV_PCM_STREAM_CAPTURE, &snd_trident_foldback_ops);
 	foldback->info_flags = 0;
 	strcpy(foldback->name, "Trident 4DWave");
 	substream = foldback->streams[SNDRV_PCM_STREAM_CAPTURE].substream;
@@ -2246,7 +2310,9 @@
 
 	spdif->private_data = trident;
 	spdif->private_free = snd_trident_spdif_pcm_free;
-	if (trident->device != TRIDENT_DEVICE_ID_SI7018) {
+	if (trident->tlb.entries) {
+		snd_pcm_set_ops(spdif, SNDRV_PCM_STREAM_PLAYBACK, &snd_trident_nx_spdif_ops);
+	} else if (trident->device != TRIDENT_DEVICE_ID_SI7018) {
 		snd_pcm_set_ops(spdif, SNDRV_PCM_STREAM_PLAYBACK, &snd_trident_spdif_ops);
 	} else {
 		snd_pcm_set_ops(spdif, SNDRV_PCM_STREAM_PLAYBACK, &snd_trident_spdif_7018_ops);
Index: alsa-kernel/pci/trident/trident_memory.c
===================================================================
RCS file: /suse/tiwai/cvs/alsa/alsa-kernel/pci/trident/trident_memory.c,v
retrieving revision 1.6
diff -u -r1.6 trident_memory.c
--- alsa-kernel/pci/trident/trident_memory.c	7 Jan 2003 10:47:57 -0000	1.6
+++ alsa-kernel/pci/trident/trident_memory.c	8 Jan 2003 11:45:21 -0000
@@ -202,12 +202,20 @@
 		up(&hdr->block_mutex);
 		return NULL;
 	}
+	if (lastpg(blk) - firstpg(blk) >= sgbuf->pages) {
+		snd_printk(KERN_ERR "page calculation doesn't match: allocated pages = %d, trident = %d/%d\n", sgbuf->pages, firstpg(blk), lastpg(blk));
+		__snd_util_mem_free(hdr, blk);
+		up(&hdr->block_mutex);
+		return NULL;
+	}
+			   
 	/* set TLB entries */
 	idx = 0;
 	for (page = firstpg(blk); page <= lastpg(blk); page++, idx++) {
 		dma_addr_t addr = sgbuf->table[idx].addr;
 		unsigned long ptr = (unsigned long)sgbuf->table[idx].buf;
 		if (! is_valid_page(addr)) {
+			__snd_util_mem_free(hdr, blk);
 			up(&hdr->block_mutex);
 			return NULL;
 		}

^ permalink raw reply

* [patch] saa7134 driver update
From: Gerd Knorr @ 2003-01-08 12:15 UTC (permalink / raw)
  To: Linus Torvalds, Kernel List

  Hi,

This patch updates the saa7134 driver.  It adds support for a few more
cards and includes adaptions to the video-buf.c changes sent earlier.

Please apply,

  Gerd

--- linux-2.5.54/drivers/media/video/saa7134/saa7134-cards.c	2003-01-08 10:34:58.000000000 +0100
+++ linux/drivers/media/video/saa7134/saa7134-cards.c	2003-01-08 10:59:59.000000000 +0100
@@ -288,6 +288,81 @@
 			.amux = LINE2,
 		},
 	},
+	[SAA7134_BOARD_KWORLD] = {
+                .name           = "Kworld/KuroutoShikou SAA7130-TVPCI",
+		.audio_clock    = 0x00187de7,
+		.tuner_type     = TUNER_PHILIPS_NTSC_M,
+                .inputs         = {{
+                        .name = name_svideo,
+                        .vmux = 8,
+                        .amux = LINE1,
+                },{
+                        .name = name_comp1,
+                        .vmux = 3,
+                        .amux = LINE1,
+                },{
+                        .name = name_tv,
+                        .vmux = 1,
+                        .amux = TV,
+                        .tv   = 1,
+                }},
+        },
+	[SAA7134_BOARD_CINERGY600] = {
+                .name           = "Terratec Cinergy 600 TV",
+                .audio_clock    = 0x00200000,
+                .tuner_type     = TUNER_PHILIPS_PAL,
+                .inputs         = {{
+                        .name = name_tv,
+                        .vmux = 1,
+                        .amux = TV,
+                        .tv   = 1,
+                },{
+                        .name = name_comp1,
+                        .vmux = 4,
+                        .amux = LINE1,
+                },{
+                        .name = name_svideo,
+                        .vmux = 8,
+                        .amux = LINE1,
+                },{
+                        .name = name_comp2, // CVideo over SVideo Connector
+                        .vmux = 0,
+                        .amux = LINE1,
+                }},
+		.radio = {
+			.name = name_radio,
+			.amux = LINE2,
+               },
+
+        },
+	[SAA7134_BOARD_MD7134] = {
+		.name           = "Medion 7134",
+		.audio_clock    = 0x00200000,
+		.tuner_type     = TUNER_PHILIPS_FM1216ME_MK3,
+		.need_tda9887   = 1,
+		.inputs = {{
+			.name   = name_tv,
+			.vmux   = 1,
+			.amux   = LINE2,
+			.tv     =   1,
+		},{
+			.name   = name_comp1,
+			.vmux   = 0,
+			.amux   = LINE2,
+		},{
+			.name   = name_comp2,
+			.vmux   = 3,
+			.amux   = LINE2,
+		},{
+			.name   = name_svideo,
+			.vmux   = 8,
+			.amux   = LINE2,
+		}},
+		.radio = {
+			.name   = name_radio,
+			.amux   = LINE2,
+		},
+      },
 };
 const int saa7134_bcount = (sizeof(saa7134_boards)/sizeof(struct saa7134_board));
 
@@ -320,7 +395,25 @@
                 .subdevice    = 0x1142,
                 .driver_data  = SAA7134_BOARD_CINERGY400,
         },{
-
+                .vendor       = PCI_VENDOR_ID_PHILIPS,
+                .device       = PCI_DEVICE_ID_PHILIPS_SAA7134,
+                .subvendor    = 0x153B,
+                .subdevice    = 0x1143,
+                .driver_data  = SAA7134_BOARD_CINERGY600,
+        },{
+		.vendor       = PCI_VENDOR_ID_PHILIPS,
+		.device       = PCI_DEVICE_ID_PHILIPS_SAA7134,
+		.subvendor    = 0x5168,
+		.subdevice    = 0x0138,
+		.driver_data  = SAA7134_BOARD_FLYVIDEO3000,
+        },{
+		.vendor       = PCI_VENDOR_ID_PHILIPS,
+		.device       = PCI_DEVICE_ID_PHILIPS_SAA7134,
+		.subvendor    = 0x16be,
+		.subdevice    = 0x0003,
+		.driver_data  = SAA7134_BOARD_MD7134,
+	},{
+		
 		/* --- boards without eeprom + subsystem ID --- */
                 .vendor       = PCI_VENDOR_ID_PHILIPS,
                 .device       = PCI_DEVICE_ID_PHILIPS_SAA7134,
--- linux-2.5.54/drivers/media/video/saa7134/saa7134-i2c.c	2003-01-08 10:33:59.000000000 +0100
+++ linux/drivers/media/video/saa7134/saa7134-i2c.c	2003-01-08 10:59:59.000000000 +0100
@@ -318,6 +318,7 @@
 	return I2C_FUNC_SMBUS_EMUL;
 }
 
+
 static int attach_inform(struct i2c_client *client)
 {
         struct saa7134_dev *dev = client->adapter->algo_data;
--- linux-2.5.54/drivers/media/video/saa7134/saa7134-oss.c	2003-01-08 10:34:28.000000000 +0100
+++ linux/drivers/media/video/saa7134/saa7134-oss.c	2003-01-08 10:59:59.000000000 +0100
@@ -102,11 +102,13 @@
 	/* prepare buffer */
 	if (0 != (err = videobuf_dma_pci_map(dev->pci,&dev->oss.dma)))
 		return err;
+	if (0 != (err = saa7134_pgtable_alloc(dev->pci,&dev->oss.pt)))
+		goto fail1;
 	if (0 != (err = saa7134_pgtable_build(dev->pci,&dev->oss.pt,
 					      dev->oss.dma.sglist,
 					      dev->oss.dma.sglen,
 					      0)))
-		goto fail1;
+		goto fail2;
 
 	/* sample format */
 	switch (dev->oss.afmt) {
--- linux-2.5.54/drivers/media/video/saa7134/saa7134-ts.c	2003-01-08 10:33:53.000000000 +0100
+++ linux/drivers/media/video/saa7134/saa7134-ts.c	2003-01-08 10:59:59.000000000 +0100
@@ -52,21 +52,24 @@
 			   struct saa7134_buf *buf,
 			   struct saa7134_buf *next)
 {
-	unsigned long control,status;
-
+	u32 control;
+	
 	dprintk("buffer_activate [%p]\n",buf);
 	buf->vb.state = STATE_ACTIVE;
 	
-	/* dma: setup channel 5 (= TS) */
-	control = SAA7134_RS_CONTROL_BURST_16 |
-		SAA7134_RS_CONTROL_ME |
-		(buf->pt->dma >> 12);
-
-	status = saa_readl(SAA7134_IRQ_STATUS);
-	if (0 == (status & 0x100000)) {
+        /* dma: setup channel 5 (= TS) */
+        control = SAA7134_RS_CONTROL_BURST_16 |
+                SAA7134_RS_CONTROL_ME |
+                (buf->pt->dma >> 12);
+
+	if (NULL == next)
+		next = buf;
+	if (V4L2_FIELD_TOP == buf->vb.field) {
+		dprintk("[top]     buf=%p next=%p",buf,next);
 		saa_writel(SAA7134_RS_BA1(5),saa7134_buffer_base(buf));
 		saa_writel(SAA7134_RS_BA2(5),saa7134_buffer_base(next));
 	} else {
+		dprintk("[bottom]  buf=%p next=%p",buf,next);
 		saa_writel(SAA7134_RS_BA1(5),saa7134_buffer_base(next));
 		saa_writel(SAA7134_RS_BA2(5),saa7134_buffer_base(buf));
 	}
@@ -80,7 +83,8 @@
 	return 0;
 }
 
-static int buffer_prepare(struct file *file, struct videobuf_buffer *vb)
+static int buffer_prepare(struct file *file, struct videobuf_buffer *vb,
+			  enum v4l2_field field)
 {
 	struct saa7134_dev *dev = file->private_data;
 	struct saa7134_buf *buf = (struct saa7134_buf *)vb;
@@ -116,7 +120,7 @@
 	buf->vb.state = STATE_PREPARED;
 	buf->top_seen = 0;
 	buf->activate = buffer_activate;
-	buf->vb.field = V4L2_FIELD_SEQ_TB;
+	buf->vb.field = field;
 	return 0;
 
  oops:
@@ -408,11 +412,13 @@
 		tsbufs = VIDEO_MAX_FRAME;
 
 	INIT_LIST_HEAD(&dev->ts_q.queue);
+	init_timer(&dev->ts_q.timeout);
 	dev->ts_q.timeout.function = saa7134_buffer_timeout;
 	dev->ts_q.timeout.data     = (unsigned long)(&dev->ts_q);
 	dev->ts_q.dev              = dev;
 	videobuf_queue_init(&dev->ts.ts, &ts_qops, dev->pci, &dev->slock,
 			    V4L2_BUF_TYPE_VIDEO_CAPTURE,
+			    V4L2_FIELD_ALTERNATE,
 			    sizeof(struct saa7134_buf));
 	saa7134_pgtable_alloc(dev->pci,&dev->ts.pt_ts);
 
@@ -437,11 +443,23 @@
 
 void saa7134_irq_ts_done(struct saa7134_dev *dev, unsigned long status)
 {
+	enum v4l2_field field;
+
 	spin_lock(&dev->slock);
 	if (dev->ts_q.curr) {
+		field = dev->video_q.curr->vb.field;
+		if (field == V4L2_FIELD_TOP) {
+			if ((status & 0x100000) != 0x100000)
+				goto done;
+		} else {
+			if ((status & 0x100000) != 0x000000)
+				goto done;
+		}
 		saa7134_buffer_finish(dev,&dev->ts_q,STATE_DONE);
 	}
 	saa7134_buffer_next(dev,&dev->ts_q);
+
+ done:
 	spin_unlock(&dev->slock);
 }
 
--- linux-2.5.54/drivers/media/video/saa7134/saa7134-tvaudio.c	2003-01-08 10:33:52.000000000 +0100
+++ linux/drivers/media/video/saa7134/saa7134-tvaudio.c	2003-01-08 10:59:59.000000000 +0100
@@ -26,6 +26,7 @@
 #include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/slab.h>
+#include <linux/delay.h>
 #include <linux/smp_lock.h>
 #include <asm/div64.h>
 
@@ -119,6 +120,10 @@
 
 	/* init all audio registers */
 	saa_writeb(SAA7134_AUDIO_PLL_CTRL,   0x00);
+	if (need_resched())
+		schedule();
+	else
+		udelay(10);
 		
 	saa_writeb(SAA7134_AUDIO_CLOCK0,      clock        & 0xff);
 	saa_writeb(SAA7134_AUDIO_CLOCK1,     (clock >>  8) & 0xff);
@@ -357,6 +362,7 @@
 	return value;
 }
 
+#if 0
 static void sifdebug_dump_regs(struct saa7134_dev *dev)
 {
 	print_regb(AUDIO_STATUS);
@@ -372,6 +378,7 @@
 	print_regb(SIF_SAMPLE_FREQ);
 	print_regb(ANALOG_IO_SELECT);
 }
+#endif
 
 static int tvaudio_thread(void *data)
 {
@@ -440,9 +447,8 @@
 		}
 		if (0 == carrier) {
 			/* Oops: autoscan didn't work for some reason :-/ */
-			printk("%s/audio: oops: audio carrier scan failed\n",
-			       dev->name);
-			sifdebug_dump_regs(dev);
+			printk(KERN_WARNING "%s/audio: oops: audio carrier "
+			       "scan failed\n", dev->name);
 		} else {
 			dprintk("found %s main sound carrier @ %d.%03d MHz\n",
 				dev->tvnorm->name,
--- linux-2.5.54/drivers/media/video/saa7134/saa7134-vbi.c	2003-01-08 10:35:03.000000000 +0100
+++ linux/drivers/media/video/saa7134/saa7134-vbi.c	2003-01-08 10:59:59.000000000 +0100
@@ -114,7 +114,8 @@
 	return 0;
 }
 
-static int buffer_prepare(struct file *file, struct videobuf_buffer *vb)
+static int buffer_prepare(struct file *file, struct videobuf_buffer *vb,
+			  enum v4l2_field field)
 {
 	struct saa7134_fh *fh   = file->private_data;
 	struct saa7134_dev *dev = fh->dev;
@@ -158,7 +159,7 @@
 	buf->vb.state = STATE_PREPARED;
 	buf->top_seen = 0;
 	buf->activate = buffer_activate;
-	buf->vb.field = V4L2_FIELD_SEQ_TB;
+	buf->vb.field = field;
 	return 0;
 
  oops:
@@ -218,6 +219,7 @@
 int saa7134_vbi_init(struct saa7134_dev *dev)
 {
 	INIT_LIST_HEAD(&dev->vbi_q.queue);
+	init_timer(&dev->vbi_q.timeout);
 	dev->vbi_q.timeout.function = saa7134_buffer_timeout;
 	dev->vbi_q.timeout.data     = (unsigned long)(&dev->vbi_q);
 	dev->vbi_q.dev              = dev;
--- linux-2.5.54/drivers/media/video/saa7134/saa7134-video.c	2003-01-08 10:33:59.000000000 +0100
+++ linux/drivers/media/video/saa7134/saa7134-video.c	2003-01-08 10:59:59.000000000 +0100
@@ -133,10 +133,9 @@
 };
 #define FORMATS (sizeof(formats)/sizeof(struct saa7134_format))
 
-
 static struct saa7134_tvnorm tvnorms[] = {
 	{
-		.name          = "PAL-BGHI",
+		.name          = "PAL",
 		.id            = V4L2_STD_PAL,
 		.width         = 720,
 		.height        = 576,
@@ -154,7 +153,7 @@
 		.vbi_v_start   = 7-3,  /* FIXME */
 		.vbi_v_stop    = 22-3,
 	},{
-		.name          = "NTSC-M",
+		.name          = "NTSC",
 		.id            = V4L2_STD_NTSC,
 		.width         = 720,
 		.height        = 480,
@@ -189,9 +188,10 @@
 		.video_v_stop  = 311,
 		.vbi_v_start   = 7,
 		.vbi_v_stop    = 22,
+#if 0
 	},{
 		.name          = "AUTO",
-		.id            = -1,
+		.id            = V4L2_STD_PAL|V4L2_STD_NTSC|V4L2_STD_SECAM,
 		.width         = 768,
 		.height        = 576,
 
@@ -207,6 +207,7 @@
 		.video_v_stop  = 311,
 		.vbi_v_start   = 7,
 		.vbi_v_stop    = 22,
+#endif
 	}
 };
 #define TVNORMS (sizeof(tvnorms)/sizeof(struct saa7134_tvnorm))
@@ -825,7 +826,8 @@
 	return 0;
 }
 
-static int buffer_prepare(struct file *file, struct videobuf_buffer *vb)
+static int buffer_prepare(struct file *file, struct videobuf_buffer *vb,
+			  enum v4l2_field field)
 {
 	struct saa7134_fh *fh = file->private_data;
 	struct saa7134_dev *dev = fh->dev;
@@ -845,12 +847,12 @@
 		return -EINVAL;
 
 	dprintk("buffer_prepare [size=%dx%d,bytes=%d,fields=%s,%s]\n",
-		fh->width,fh->height,size,v4l2_field_names[fh->field],
+		fh->width,fh->height,size,v4l2_field_names[field],
 		fh->fmt->name);
 	if (buf->vb.width  != fh->width  ||
 	    buf->vb.height != fh->height ||
 	    buf->vb.size   != size       ||
-	    buf->vb.field  != fh->field  ||
+	    buf->vb.field  != field      ||
 	    buf->fmt       != fh->fmt) {
 		saa7134_dma_free(dev,buf);
 	}
@@ -859,8 +861,8 @@
 		buf->vb.width  = fh->width;
 		buf->vb.height = fh->height;
 		buf->vb.size   = size;
+		buf->vb.field  = field;
 		buf->fmt       = fh->fmt;
-		buf->vb.field  = fh->field;
 		buf->pt        = &fh->pt_cap;
 
 		err = videobuf_iolock(dev->pci,&buf->vb);
@@ -1125,6 +1127,7 @@
 	videobuf_queue_init(&fh->cap, &video_qops,
 			    dev->pci, &dev->slock,
 			    V4L2_BUF_TYPE_VIDEO_CAPTURE,
+			    V4L2_FIELD_INTERLACED,
 			    sizeof(struct saa7134_buf));
 	init_MUTEX(&fh->cap.lock);
 	saa7134_pgtable_alloc(dev->pci,&fh->pt_cap);
@@ -1132,6 +1135,7 @@
 	videobuf_queue_init(&fh->vbi, &saa7134_vbi_qops,
 			    dev->pci, &dev->slock,
 			    V4L2_BUF_TYPE_VBI_CAPTURE,
+			    V4L2_FIELD_SEQ_TB,
 			    sizeof(struct saa7134_buf));
         init_MUTEX(&fh->vbi.lock);
 	saa7134_pgtable_alloc(dev->pci,&fh->pt_vbi);
@@ -1155,9 +1159,13 @@
 
 	switch (fh->type) {
 	case V4L2_BUF_TYPE_VIDEO_CAPTURE:
+		if (res_locked(fh->dev,RESOURCE_VIDEO))
+			return -EBUSY;
 		return videobuf_read_one(file, saa7134_queue(fh),
 					 data, count, ppos);
 	case V4L2_BUF_TYPE_VBI_CAPTURE:
+		if (!res_get(fh->dev,fh,RESOURCE_VBI))
+			return -EBUSY;
 		return videobuf_read_stream(file, saa7134_queue(fh),
 					    data, count, ppos, 1);
 		break;
@@ -1187,7 +1195,7 @@
                                 up(&fh->cap.lock);
                                 return POLLERR;
                         }
-                        if (0 != fh->cap.ops->buf_prepare(file,fh->cap.read_buf)) {
+                        if (0 != fh->cap.ops->buf_prepare(file,fh->cap.read_buf,fh->cap.field)) {
                                 up(&fh->cap.lock);
                                 return POLLERR;
                         }
@@ -1214,12 +1222,15 @@
 	struct saa7134_dev *dev = fh->dev;
 	unsigned long flags;
 
+	/* turn off overlay */
 	if (res_check(fh, RESOURCE_OVERLAY)) {
 		spin_lock_irqsave(&dev->slock,flags);
 		stop_preview(dev,fh);
 		spin_unlock_irqrestore(&dev->slock,flags);
 		res_free(dev,fh,RESOURCE_OVERLAY);
 	}
+
+	/* stop video capture */
 	if (res_check(fh, RESOURCE_VIDEO)) {
 		videobuf_queue_cancel(file,&fh->cap);
 		res_free(dev,fh,RESOURCE_VIDEO);
@@ -1228,10 +1239,15 @@
 		buffer_release(file,fh->cap.read_buf);
 		kfree(fh->cap.read_buf);
 	}
-	if (fh->vbi.streaming)
-		videobuf_streamoff(file,&fh->vbi);
-	if (fh->vbi.reading)
-		videobuf_read_stop(file,&fh->vbi);
+
+	/* stop vbi capture */
+	if (res_check(fh, RESOURCE_VBI)) {
+		if (fh->vbi.streaming)
+			videobuf_streamoff(file,&fh->vbi);
+		if (fh->vbi.reading)
+			videobuf_read_stop(file,&fh->vbi);
+		res_free(dev,fh,RESOURCE_VBI);
+	}
 
 	saa7134_pgtable_free(dev->pci,&fh->pt_cap);
 	saa7134_pgtable_free(dev->pci,&fh->pt_vbi);
@@ -1259,6 +1275,7 @@
 		memset(&f->fmt.pix,0,sizeof(f->fmt.pix));
 		f->fmt.pix.width        = fh->width;
 		f->fmt.pix.height       = fh->height;
+		f->fmt.pix.field        = fh->cap.field;
 		f->fmt.pix.pixelformat  = fh->fmt->fourcc;
 		f->fmt.pix.sizeimage    =
 			(fh->width*fh->height*fh->fmt->depth)/8;
@@ -1354,10 +1371,10 @@
 		if (0 != err)
 			return err;
 			
-		fh->fmt    = format_by_fourcc(f->fmt.pix.pixelformat);
-		fh->width  = f->fmt.pix.width;
-		fh->height = f->fmt.pix.height;
-		fh->field  = f->fmt.pix.field;
+		fh->fmt       = format_by_fourcc(f->fmt.pix.pixelformat);
+		fh->width     = f->fmt.pix.width;
+		fh->height    = f->fmt.pix.height;
+		fh->cap.field = f->fmt.pix.field;
 		return 0;
 	case V4L2_BUF_TYPE_VIDEO_OVERLAY:
 		err = verify_preview(dev,&f->fmt.win);
@@ -1429,11 +1446,14 @@
 	case VIDIOC_ENUMSTD:
 	{
 		struct v4l2_standard *e = arg;
+		int i;
 
-		if (e->index < 0 || e->index >= TVNORMS)
+		i = e->index;
+		if (i < 0 || i >= TVNORMS)
 			return -EINVAL;
 		err = v4l2_video_std_construct(e, tvnorms[e->index].id,
 					       tvnorms[e->index].name);
+		e->index = i;
 		if (err < 0)
 			return err;
 		return 0;
@@ -1473,15 +1493,33 @@
 	case VIDIOC_ENUMINPUT:
 	{
 		struct v4l2_input *i = arg;
-		
-		if (i->index >= SAA7134_INPUT_MAX)
+		int n;
+
+		n = i->index;
+		if (n >= SAA7134_INPUT_MAX)
 			return -EINVAL;
 		if (NULL == card_in(dev,i->index).name)
 			return -EINVAL;
-		i->type = V4L2_INPUT_TYPE_CAMERA;
-		strcpy(i->name,card_in(dev,i->index).name);
-		if (card_in(dev,i->index).tv)
+		memset(i,0,sizeof(*i));
+		i->index = n;
+		i->type  = V4L2_INPUT_TYPE_CAMERA;
+		strcpy(i->name,card_in(dev,n).name);
+		if (card_in(dev,n).tv)
 			i->type = V4L2_INPUT_TYPE_TUNER;
+		i->audioset = 1;
+		if (n == dev->ctl_input) {
+			int v1 = saa_readb(SAA7134_STATUS_VIDEO1);
+			int v2 = saa_readb(SAA7134_STATUS_VIDEO2);
+
+			if (0 != (v1 & 0x40))
+				i->status |= V4L2_IN_ST_NO_H_LOCK;
+			if (0 != (v2 & 0x40))
+				i->status |= V4L2_IN_ST_NO_SYNC;
+			if (0 != (v2 & 0x0e))
+				i->status |= V4L2_IN_ST_MACROVISION;
+		}
+		for (n = 0; n < TVNORMS; n++)
+			i->std |= tvnorms[n].id;
 		return 0;
 	}
 	case VIDIOC_G_INPUT:
@@ -1510,6 +1548,8 @@
 		struct v4l2_tuner *t = arg;
 		int n;
 
+		if (0 != t->index)
+			return -EINVAL;
 		memset(t,0,sizeof(*t));
 		for (n = 0; n < SAA7134_INPUT_MAX; n++)
 			if (card_in(dev,n).tv)
@@ -1521,12 +1561,12 @@
 				V4L2_TUNER_CAP_LANG1 |
 				V4L2_TUNER_CAP_LANG2;
 			t->rangehigh = 0xffffffffUL;
-			if (dev->tvaudio) {
+			t->rxsubchans = -1;
+			if (dev->tvaudio)
 				t->rxsubchans = saa7134_tvaudio_getstereo
 					(dev,dev->tvaudio);
-			} else {
+			if (-1 == t->rxsubchans)
 				t->rxsubchans = V4L2_TUNER_SUB_MONO;
-			}
 #if 1
 			/* fill audmode -- FIXME: allow manual switching */
 			t->audmode = V4L2_TUNER_MODE_MONO;
@@ -1618,12 +1658,14 @@
 	case VIDIOC_ENUM_FMT:
 	{
 		struct v4l2_fmtdesc *f = arg;
+		enum v4l2_buf_type type;
 		int index;
 
-		switch (f->type) {
+		index = f->index;
+		type  = f->type;
+		switch (type) {
 		case V4L2_BUF_TYPE_VIDEO_CAPTURE:
 		case V4L2_BUF_TYPE_VIDEO_OVERLAY:
-			index = f->index;
 			if (index < 0 || index >= FORMATS)
 				return -EINVAL;
 			if (f->type == V4L2_BUF_TYPE_VIDEO_OVERLAY &&
@@ -1631,9 +1673,19 @@
 				return -EINVAL;
 			memset(f,0,sizeof(*f));
 			f->index = index;
+			f->type  = type;
 			strncpy(f->description,formats[index].name,31);
 			f->pixelformat = formats[index].fourcc;
 			break;
+		case V4L2_BUF_TYPE_VBI_CAPTURE:
+			if (0 != index)
+				return -EINVAL;
+			memset(f,0,sizeof(*f));
+			f->index = index;
+			f->type  = type;
+			f->pixelformat = V4L2_PIX_FMT_GREY;
+			strcpy(f->description,"vbi data");
+			break;
 		default:
 			return -EINVAL;	
 		}
@@ -1898,8 +1950,8 @@
 struct video_device saa7134_video_template =
 {
 	.name          = "saa7134-video",
-	type:          VID_TYPE_CAPTURE|VID_TYPE_TUNER|VID_TYPE_OVERLAY|
-	               VID_TYPE_CLIPPING|VID_TYPE_SCALES,
+	.type          = VID_TYPE_CAPTURE|VID_TYPE_TUNER|VID_TYPE_OVERLAY|
+	                 VID_TYPE_CLIPPING|VID_TYPE_SCALES,
 	.hardware      = 0,
 	.fops          = &video_fops,
 	.minor         = -1,
@@ -1944,6 +1996,7 @@
 	dev->automute       = 0;
 
         INIT_LIST_HEAD(&dev->video_q.queue);
+	init_timer(&dev->video_q.timeout);
 	dev->video_q.timeout.function = saa7134_buffer_timeout;
 	dev->video_q.timeout.data     = (unsigned long)(&dev->video_q);
 	dev->video_q.dev              = dev;
@@ -1984,7 +2037,7 @@
 	int norm;
 
 	norm = saa_readb(SAA7134_STATUS_VIDEO1) & 0x03;
-	printk("%s/video: DCSDT: %s\n",dev->name,st[norm]);
+	dprintk("DCSDT: %s\n",st[norm]);
 	
 	if (0 != norm) {
 		/* wake up tvaudio audio carrier scan thread */
--- linux-2.5.54/drivers/media/video/saa7134/saa7134.h	2003-01-08 10:34:52.000000000 +0100
+++ linux/drivers/media/video/saa7134/saa7134.h	2003-01-08 10:59:59.000000000 +0100
@@ -117,6 +117,9 @@
 #define SAA7134_BOARD_TVSTATION_RDS     7
 #define SAA7134_BOARD_CINERGY400	8
 #define SAA7134_BOARD_MD5044		9
+#define SAA7134_BOARD_KWORLD           10
+#define SAA7134_BOARD_CINERGY600       11
+#define SAA7134_BOARD_MD7134           12
 
 #define SAA7134_INPUT_MAX 8
 
@@ -159,7 +162,7 @@
 
 #define RESOURCE_OVERLAY       1
 #define RESOURCE_VIDEO         2
-#define RESOURCE_VBI           3
+#define RESOURCE_VBI           4
 
 #define INTERLACE_AUTO         0
 #define INTERLACE_ON           1
@@ -224,7 +227,6 @@
 	/* video capture */
 	struct saa7134_format      *fmt;
 	int                        width,height;
-	enum v4l2_field            field;
 	struct videobuf_queue      cap;
 	struct saa7134_pgtable     pt_cap;
 

-- 
Weil die späten Diskussionen nicht mal mehr den Rotwein lohnen.
				-- Wacholder in "Melanie"

^ permalink raw reply

* [patch] i2c update for tuner.c
From: Gerd Knorr @ 2003-01-08 12:12 UTC (permalink / raw)
  To: Linus Torvalds, Kernel List

  Hi,

This patch has some i2c adaptions and cleanups for the tv card tuner
module.  Please apply,

  Gerd

--- linux-2.5.54/drivers/media/video/tuner.c	2003-01-08 10:34:58.000000000 +0100
+++ linux/drivers/media/video/tuner.c	2003-01-08 10:59:59.000000000 +0100
@@ -18,17 +18,7 @@
 /* Addresses to scan */
 static unsigned short normal_i2c[] = {I2C_CLIENT_END};
 static unsigned short normal_i2c_range[] = {0x60,0x6f,I2C_CLIENT_END};
-static unsigned short probe[2]        = { I2C_CLIENT_END, I2C_CLIENT_END };
-static unsigned short probe_range[2]  = { I2C_CLIENT_END, I2C_CLIENT_END };
-static unsigned short ignore[2]       = { I2C_CLIENT_END, I2C_CLIENT_END };
-static unsigned short ignore_range[2] = { I2C_CLIENT_END, I2C_CLIENT_END };
-static unsigned short force[2]        = { I2C_CLIENT_END, I2C_CLIENT_END };
-static struct i2c_client_address_data addr_data = {
-	normal_i2c, normal_i2c_range, 
-	probe, probe_range, 
-	ignore, ignore_range, 
-	force
-};
+I2C_CLIENT_INSMOD;
 
 /* insmod options */
 static int debug =  0;
@@ -142,7 +132,7 @@
 	  16*140.25,16*463.25,0x02,0x04,0x01,0x8e,623},
 	{ "Philips PAL_I (FI1246 and compatibles)", Philips, PAL_I,
 	  16*140.25,16*463.25,0xa0,0x90,0x30,0x8e,623},
-	{ "Philips NTSC (FI1236 and compatibles)", Philips, NTSC,
+	{ "Philips NTSC (FI1236,FM1236 and compatibles)", Philips, NTSC,
 	  16*157.25,16*451.25,0xA0,0x90,0x30,0x8e,732},
 	{ "Philips (SECAM+PAL_BG) (FI1216MF, FM1216MF, FR1216MF)", Philips, SECAM,
 	  16*168.25,16*447.25,0xA7,0x97,0x37,0x8e,623},
@@ -736,6 +726,7 @@
 
         if2=10700*1000; //  10.7MHz FM intermediate frequency
 
+	// per Manual for FM tuning: first if center freq. 1085 MHz
         mt2032_set_if_freq(c,freq* 1000*1000/16, 1085*1000*1000,if2,if2,if2);
 }
 
@@ -811,6 +802,7 @@
         memset(t,0,sizeof(struct tuner));
 	if (type >= 0 && type < TUNERS) {
 		t->type = type;
+		printk("tuner(bttv): type forced to %d (%s) [insmod]\n",t->type,tuners[t->type].name);
 		strncpy(client->name, tuners[t->type].name, sizeof(client->name));
 	} else {
 		t->type = -1;
@@ -820,7 +812,6 @@
                  mt2032_init(client);
 
 	MOD_INC_USE_COUNT;
-
 	return 0;
 }
 
@@ -837,6 +828,7 @@
 	case I2C_ALGO_BIT | I2C_HW_B_BT848:
 	case I2C_ALGO_BIT | I2C_HW_B_RIVA:
 	case I2C_ALGO_SAA7134:
+	case I2C_ALGO_SAA7146:
 		printk("tuner: probing %s i2c adapter [id=0x%x]\n",
 		       adap->name,adap->id);
 		rc = i2c_probe(adap, &addr_data, tuner_attach);
@@ -875,7 +867,7 @@
 	/* --- configuration --- */
 	case TUNER_SET_TYPE:
 		if (t->type != -1) {
-			printk("tuner: type already set\n");
+			printk("tuner: type already set (%d)\n",t->type);
 			return 0;
 		}
 		if (*iarg < 0 || *iarg >= TUNERS)
@@ -975,18 +967,19 @@
 /* ----------------------------------------------------------------------- */
 
 static struct i2c_driver driver = {
-	.name		= "i2cTVtunerdriver",
-	.id		= I2C_DRIVERID_TUNER,
-	.flags		= I2C_DF_NOTIFY,
-	.attach_adapter	= tuner_probe,
-	.detach_client	= tuner_detach,
-	.command	= tuner_command,
+	.owner          = THIS_MODULE,
+        .name           = "i2c TV tuner driver",
+        .id             = I2C_DRIVERID_TUNER,
+        .flags          = I2C_DF_NOTIFY,
+        .attach_adapter = tuner_probe,
+        .detach_client  = tuner_detach,
+        .command        = tuner_command,
 };
-static struct i2c_client client_template = 
+static struct i2c_client client_template =
 {
-	.name	= "(tunerunset)",
-	.flags	= I2C_CLIENT_ALLOW_USE,
-	.driver	= &driver,
+        .name   = "(tuner unset)",
+	.flags  = I2C_CLIENT_ALLOW_USE,
+        .driver = &driver,
 };
 
 static int tuner_init_module(void)

-- 
Weil die späten Diskussionen nicht mal mehr den Rotwein lohnen.
				-- Wacholder in "Melanie"

^ permalink raw reply

* Re: [Linux-fbdev-devel] Re: rotation.
From: John Bradford @ 2003-01-08 12:05 UTC (permalink / raw)
  To: Måns Rullgård
  Cc: luther, geert, jsimmons, linux-fbdev-devel, linux-kernel
In-Reply-To: <yw1xu1gj51ep.fsf@tiptop.e.kth.se>

> > > > I'm about to implement rotation which is needed for devices
> > > > like the ipaq.
> > > > The question is do we flip the xres and yres values depending
> > > > on the rotation or do we just alter the data that will be
> > > > drawn to make the screen appear to rotate. How does hardware
> > > > rotate view the x and y axis?  Are they rotated or does just
> > > > the data get rotated?
> > > 
> > > Where are you going to implement the rotation? At the fbcon or
> > > fbdev level? 
> > > 
> > > Fbcon has the advantage that it'll work for all frame buffer
> > > devices.
> > 
> > But you could also provide driver hooks for the chips which have
> > such a rotation feature included (don't know if such exist, but i
> > suppose they do, or may in the future).

It would be nice to have an option to be able to do the rotation
entirely in software - some desktop users might prefer to have a
portait-orientated display, when their graphics card doesn't have any
hardware rotation facilities at all.

John.

^ permalink raw reply

* [patch] media/video i2c updates
From: Gerd Knorr @ 2003-01-08 12:11 UTC (permalink / raw)
  To: Linus Torvalds, Kernel List

  Hi,

This patch updates a bunch of i2c modules in drivers/media/video.
Most of it are adaptions to the recent i2c changes in the kernel.
While being at it I also did some other cleanups like deleting
unused+dead code, using name-based initialization for some not-yet
converted structs, ...

The patch also has a few small fixes here and there, but no major
functional changes.

Please apply,

  Gerd

--- linux-2.5.54/drivers/media/video/audiochip.h	2003-01-08 10:59:58.000000000 +0100
+++ linux/drivers/media/video/audiochip.h	2003-01-08 10:59:59.000000000 +0100
@@ -30,44 +30,6 @@
  * make sense in v4l context only.  So I think that's acceptable...
  */
 
-#if 0
-
-/* TODO (if it is ever [to be] accessible in the V4L[2] spec):
- *   maybe fade? (back/front)
- * notes:
- * NEWCHANNEL and SWITCH_MUTE are here because the MSP3400 has a special
- * routine to go through when it tunes in to a new channel before turning
- * back on the sound.
- * Either SET_RADIO, NEWCHANNEL, and SWITCH_MUTE or SET_INPUT need to be
- * implemented (MSP3400 uses SET_RADIO to select inputs, and SWITCH_MUTE for
- * channel-change mute -- TEA6300 et al use SET_AUDIO to select input [TV, 
- * radio, external, or MUTE]).  If both methods are implemented, you get a
- * cookie for doing such a good job! :)
- */
-
-#define AUDC_SET_TVNORM       _IOW('m',1,int)  /* TV mode + PAL/SECAM/NTSC  */
-#define AUDC_NEWCHANNEL       _IO('m',3)       /* indicate new chan - off mute */
-
-#define AUDC_GET_VOLUME_LEFT  _IOR('m',4,__u16)
-#define AUDC_GET_VOLUME_RIGHT _IOR('m',5,__u16)
-#define AUDC_SET_VOLUME_LEFT  _IOW('m',6,__u16)
-#define AUDC_SET_VOLUME_RIGHT _IOW('m',7,__u16)
-
-#define AUDC_GET_STEREO       _IOR('m',8,__u16)
-#define AUDC_SET_STEREO       _IOW('m',9,__u16)
-
-#define AUDC_GET_DC           _IOR('m',10,__u16)/* ??? */
-
-#define AUDC_GET_BASS         _IOR('m',11,__u16)
-#define AUDC_SET_BASS         _IOW('m',12,__u16)
-#define AUDC_GET_TREBLE       _IOR('m',13,__u16)
-#define AUDC_SET_TREBLE       _IOW('m',14,__u16)
-
-#define AUDC_GET_UNIT         _IOR('m',15,int) /* ??? - unimplemented in MSP3400 */
-#define AUDC_SWITCH_MUTE      _IO('m',16)      /* turn on mute */
-#endif
-
-
 /* misc stuff to pass around config info to i2c chips */
 #define AUDC_CONFIG_PINNACLE  _IOW('m',32,int)
 
--- linux-2.5.54/drivers/media/video/msp3400.c	2003-01-08 10:34:37.000000000 +0100
+++ linux/drivers/media/video/msp3400.c	2003-01-08 10:59:59.000000000 +0100
@@ -62,17 +62,7 @@
 /* Addresses to scan */
 static unsigned short normal_i2c[] = {I2C_CLIENT_END};
 static unsigned short normal_i2c_range[] = {0x40,0x40,I2C_CLIENT_END};
-static unsigned short probe[2]        = { I2C_CLIENT_END, I2C_CLIENT_END };
-static unsigned short probe_range[2]  = { I2C_CLIENT_END, I2C_CLIENT_END };
-static unsigned short ignore[2]       = { I2C_CLIENT_END, I2C_CLIENT_END };
-static unsigned short ignore_range[2] = { I2C_CLIENT_END, I2C_CLIENT_END };
-static unsigned short force[2]        = { I2C_CLIENT_END, I2C_CLIENT_END };
-static struct i2c_client_address_data addr_data = {
-	normal_i2c, normal_i2c_range, 
-	probe, probe_range, 
-	ignore, ignore_range, 
-	force
-};
+I2C_CLIENT_INSMOD;
 
 /* insmod parameters */
 static int debug   = 0;    /* debug output */
@@ -145,17 +135,33 @@
 /* ----------------------------------------------------------------------- */
 /* functions for talking to the MSP3400C Sound processor                   */
 
+#ifndef I2C_M_IGNORE_NAK
+# define I2C_M_IGNORE_NAK 0x1000
+#endif
+
 static int msp3400c_reset(struct i2c_client *client)
 {
-        static char reset_off[3] = { 0x00, 0x80, 0x00 };
-        static char reset_on[3]  = { 0x00, 0x00, 0x00 };
-
-        i2c_master_send(client,reset_off,3);  /* XXX ignore errors here */
-        if (3 != i2c_master_send(client,reset_on, 3)) {
-		printk(KERN_ERR "msp3400: chip reset failed, penguin on i2c bus?\n");
-                return -1;
-	}
-        return 0;
+	/* reset and read revision code */
+	static char reset_off[3] = { 0x00, 0x80, 0x00 };
+	static char reset_on[3]  = { 0x00, 0x00, 0x00 };
+	static char write[3]     = { I2C_MSP3400C_DFP + 1, 0x00, 0x1e };
+	char read[2];
+	struct i2c_msg reset[2] = {
+		{ client->addr, I2C_M_IGNORE_NAK, 3, reset_off },
+		{ client->addr, I2C_M_IGNORE_NAK, 3, reset_on  },
+	};
+	struct i2c_msg test[2] = {
+		{ client->addr, 0,        3, write },
+		{ client->addr, I2C_M_RD, 2, read  },
+	};
+	
+	if ( (1 != i2c_transfer(client->adapter,&reset[0],1)) ||
+	     (1 != i2c_transfer(client->adapter,&reset[1],1)) ||
+	     (2 != i2c_transfer(client->adapter,test,2)) ) {
+		printk(KERN_ERR "msp3400: chip reset failed\n");
+		return -1;
+        }
+	return 0; 
 }
 
 static int
@@ -1213,19 +1219,20 @@
 static int msp_command(struct i2c_client *client, unsigned int cmd, void *arg);
 
 static struct i2c_driver driver = {
-	.name		= "i2cmsp3400driver",
-	.id		= I2C_DRIVERID_MSP3400,
-	.flags		= I2C_DF_NOTIFY,
-	.attach_adapter	= msp_probe,
-	.detach_client	= msp_detach,
-	.command	= msp_command,
+	.owner          = THIS_MODULE,
+        .name           = "i2c msp3400 driver",
+        .id             = I2C_DRIVERID_MSP3400,
+        .flags          = I2C_DF_NOTIFY,
+        .attach_adapter = msp_probe,
+        .detach_client  = msp_detach,
+        .command        = msp_command,
 };
 
 static struct i2c_client client_template = 
 {
-	.name	= "(unset)",
-	.flags	= I2C_CLIENT_ALLOW_USE,
-	.driver	= &driver,
+	.name   = "(unset)",
+	.flags  = I2C_CLIENT_ALLOW_USE,
+        .driver = &driver,
 };
 
 static int msp_attach(struct i2c_adapter *adap, int addr,
@@ -1258,6 +1265,7 @@
 	msp->bass   = 32768;
 	msp->treble = 32768;
 	msp->input  = -1;
+	msp->muted  = 1;
 	for (i = 0; i < DFP_COUNT; i++)
 		msp->dfp_regs[i] = -1;
 
@@ -1283,8 +1291,9 @@
 
 #if 0
 	/* this will turn on a 1kHz beep - might be useful for debugging... */
-	msp3400c_write(client,I2C_MSP3400C_DFP, 0x0014, 0x1040);
+	msp3400c_write(c,I2C_MSP3400C_DFP, 0x0014, 0x1040);
 #endif
+	msp3400c_setvolume(c,msp->muted,msp->left,msp->right);
 
 	sprintf(c->name,"MSP34%02d%c-%c%d",
 		(rev2>>8)&0xff, (rev1&0xff)+'@', ((rev1>>8)&0xff)+'@', rev2&0x1f);
--- linux-2.5.54/drivers/media/video/tda7432.c	2003-01-08 10:34:51.000000000 +0100
+++ linux/drivers/media/video/tda7432.c	2003-01-08 10:59:59.000000000 +0100
@@ -18,8 +18,12 @@
  *
  * loudness - set between 0 and 15 for varying degrees of loudness effect
  *
+ * maxvol   - set maximium volume to +20db (1), default is 0db(0)
  *
  *
+ *  Revision: 0.7 - maxvol module parm to set maximium volume 0db or +20db
+ *  				store if muted so we can return it
+ *  				change balance only if flaged to
  *  Revision: 0.6 - added tone controls
  *  Revision: 0.5 - Fixed odd balance problem
  *  Revision: 0.4 - added muting
@@ -48,12 +52,19 @@
 #include "audiochip.h"
 #include "id.h"
 
+#ifndef VIDEO_AUDIO_BALANCE
+# define VIDEO_AUDIO_BALANCE 32
+#endif
+
 MODULE_AUTHOR("Eric Sandeen <eric_sandeen@bigfoot.com>");
 MODULE_DESCRIPTION("bttv driver for the tda7432 audio processor chip");
 MODULE_LICENSE("GPL");
 
 MODULE_PARM(debug,"i");
 MODULE_PARM(loudness,"i");
+MODULE_PARM_DESC(maxvol,"Set maximium volume to +20db (0), default is 0db(1)");
+MODULE_PARM(maxvol,"i");
+static int maxvol = 0;
 static int loudness = 0; /* disable loudness by default */
 static int debug = 0;	 /* insmod parameter */
 
@@ -61,19 +72,10 @@
 /* Address to scan (I2C address of this chip) */
 static unsigned short normal_i2c[] = {
 	I2C_TDA7432 >> 1,
-	I2C_CLIENT_END};
-static unsigned short normal_i2c_range[] = {I2C_CLIENT_END};
-static unsigned short probe[2]        = { I2C_CLIENT_END, I2C_CLIENT_END };
-static unsigned short probe_range[2]  = { I2C_CLIENT_END, I2C_CLIENT_END };
-static unsigned short ignore[2]       = { I2C_CLIENT_END, I2C_CLIENT_END };
-static unsigned short ignore_range[2] = { I2C_CLIENT_END, I2C_CLIENT_END };
-static unsigned short force[2]        = { I2C_CLIENT_END, I2C_CLIENT_END };
-static struct i2c_client_address_data addr_data = {
-	normal_i2c, normal_i2c_range, 
-	probe, probe_range, 
-	ignore, ignore_range, 
-	force
+	I2C_CLIENT_END,
 };
+static unsigned short normal_i2c_range[] = { I2C_CLIENT_END, I2C_CLIENT_END };
+I2C_CLIENT_INSMOD;
 
 /* Structure of address and subaddresses for the tda7432 */
 
@@ -81,12 +83,12 @@
 	int addr;
 	int input;
 	int volume;
+	int muted;
 	int bass, treble;
 	int lf, lr, rf, rr;
 	int loud;
 	struct i2c_client c;
 };
-
 static struct i2c_driver driver;
 static struct i2c_client client_template;
 
@@ -291,9 +293,10 @@
 	t->input  = TDA7432_STEREO_IN |  /* Main (stereo) input   */
 		    TDA7432_BASS_SYM  |  /* Symmetric bass cut    */
 		    TDA7432_BASS_NORM;   /* Normal bass range     */ 
-	t->volume = TDA7432_VOL_0DB;	 /* 0dB Volume            */
+	t->volume =  0x3b ;				 /* -27dB Volume            */
 	if (loudness)			 /* Turn loudness on?     */
 		t->volume |= TDA7432_LD_ON;	
+	t->muted    = VIDEO_AUDIO_MUTE;
 	t->treble   = TDA7432_TREBLE_0DB; /* 0dB Treble            */
 	t->bass		= TDA7432_BASS_0DB; 	 /* 0dB Bass              */
 	t->lf     = TDA7432_ATTEN_0DB;	 /* 0dB attenuation       */
@@ -374,17 +377,24 @@
 
 		va->flags |= VIDEO_AUDIO_VOLUME |
 			VIDEO_AUDIO_BASS |
-			VIDEO_AUDIO_TREBLE;
+			VIDEO_AUDIO_TREBLE |
+			VIDEO_AUDIO_MUTABLE;
+		if (t->muted)
+			va->flags |= VIDEO_AUDIO_MUTE;
 		va->mode |= VIDEO_SOUND_STEREO;
 		/* Master volume control
 		 * V4L volume is min 0, max 65535
 		 * TDA7432 Volume: 
 		 * Min (-79dB) is 0x6f
-		 * Max (+20dB) is 0x07
+		 * Max (+20dB) is 0x07 (630)
+		 * Max (0dB) is 0x20 (829)
 		 * (Mask out bit 7 of vol - it's for the loudness setting)
 		 */
-
-		va->volume = ( 0x6f - (t->volume & 0x7F) ) * 630;
+		if (!maxvol){  /* max +20db */
+			va->volume = ( 0x6f - (t->volume & 0x7F) ) * 630;
+		} else {       /* max 0db   */
+			va->volume = ( 0x6f - (t->volume & 0x7F) ) * 829;
+		}
 		
 		/* Balance depends on L,R attenuation
 		 * V4L balance is 0 to 65535, middle is 32768
@@ -401,15 +411,15 @@
 			/* left is attenuated, balance shifted right */
 			va->balance = (32768 + 1057*(t->lf));
 		
-		/* Bass/treble */	
+		/* Bass/treble 4 bits each */	
 		va->bass=t->bass;
 		if(va->bass >= 0x8)
-				va->bass = ~(va->bass - 0x8) & 0xf;
-		va->bass = va->bass << 12;
+			va->bass = ~(va->bass - 0x8) & 0xf;
+		va->bass = (va->bass << 12)+(va->bass << 8)+(va->bass << 4)+(va->bass);
 		va->treble=t->treble;
 		if(va->treble >= 0x8)
-				va->treble = ~(va->treble - 0x8) & 0xf;
-		va->treble = va->treble << 12;
+			va->treble = ~(va->treble - 0x8) & 0xf;
+		va->treble = (va->treble << 12)+(va->treble << 8)+(va->treble << 4)+(va->treble);
 								
 		break; /* VIDIOCGAUDIO case */
 	}
@@ -420,26 +430,35 @@
 		struct video_audio *va = arg;
 		dprintk("tda7432: VIDEOCSAUDIO\n");
 
-		t->volume = 0x6f - ( (va->volume)/630 );
+		if(va->flags & VIDEO_AUDIO_VOLUME){
+			if(!maxvol){ /* max +20db */
+				t->volume = 0x6f - ((va->volume)/630);
+			} else {    /* max 0db   */
+				t->volume = 0x6f - ((va->volume)/829);
+			}
 		
 		if (loudness)		/* Turn on the loudness bit */
 			t->volume |= TDA7432_LD_ON;
 		
+			tda7432_write(client,TDA7432_VL, t->volume);
+		}
+		
 		if(va->flags & VIDEO_AUDIO_BASS)
 		{
 			t->bass = va->bass >> 12;
 			if(t->bass>= 0x8)
 					t->bass = (~t->bass & 0xf) + 0x8 ;
-			t->bass = t->bass | 0x10;
 		}
 		if(va->flags & VIDEO_AUDIO_TREBLE)
 		{
 			t->treble= va->treble >> 12;
 			if(t->treble>= 0x8)
 					t->treble = (~t->treble & 0xf) + 0x8 ;
-						
 		}
+		if(va->flags & (VIDEO_AUDIO_TREBLE| VIDEO_AUDIO_BASS))
+			tda7432_write(client,TDA7432_TN, 0x10 | (t->bass << 4) | t->treble );
 		
+		if(va->flags & VIDEO_AUDIO_BALANCE)	{
 		if (va->balance < 32768) 
 		{
 			/* shifted to left, attenuate right */
@@ -464,20 +483,17 @@
 			t->lf = TDA7432_ATTEN_0DB;
 			t->lr = TDA7432_ATTEN_0DB;
 		}
+		}
 					
-		tda7432_write(client,TDA7432_TN, (t->bass << 4)| t->treble );		
-		tda7432_write(client,TDA7432_VL, t->volume);
-		
-		if (va->flags & VIDEO_AUDIO_MUTE)
+	 	t->muted=(va->flags & VIDEO_AUDIO_MUTE);	
+		if (t->muted)
 		{
 			/* Mute & update balance*/	
 			tda7432_write(client,TDA7432_LF, t->lf | TDA7432_MUTE);
 			tda7432_write(client,TDA7432_LR, t->lr | TDA7432_MUTE);
 			tda7432_write(client,TDA7432_RF, t->rf | TDA7432_MUTE);
 			tda7432_write(client,TDA7432_RR, t->rr | TDA7432_MUTE);
-		}
-		else
-		{	
+		} else {
 			tda7432_write(client,TDA7432_LF, t->lf);
 			tda7432_write(client,TDA7432_LR, t->lr);
 			tda7432_write(client,TDA7432_RF, t->rf);
@@ -498,35 +514,29 @@
 	return 0;
 }
 
-
 static struct i2c_driver driver = {
-        "i2c tda7432 driver",
-	I2C_DRIVERID_TDA7432,
-        I2C_DF_NOTIFY,
-	tda7432_probe,
-        tda7432_detach,
-        tda7432_command,
+	.owner           = THIS_MODULE,
+        .name            = "i2c tda7432 driver",
+	.id              = I2C_DRIVERID_TDA7432,
+        .flags           = I2C_DF_NOTIFY,
+	.attach_adapter  = tda7432_probe,
+        .detach_client   = tda7432_detach,
+        .command         = tda7432_command,
 };
 
 static struct i2c_client client_template =
 {
-        "(unset)",		/* name */
-        -1,
-        0,
-        0,
-        NULL,
-        &driver
+        .name   = "tda7432",
+        .id     = -1,
+	.driver = &driver, 
 };
 
 static int tda7432_init(void)
 {
-
-	if ( (loudness < 0) || (loudness > 15) )
-	{
+	if ( (loudness < 0) || (loudness > 15) ) {
 		printk(KERN_ERR "tda7432: loudness parameter must be between 0 and 15\n");
 		return -EINVAL;
 	}
-
 	i2c_add_driver(&driver);
 	return 0;
 }
--- linux-2.5.54/drivers/media/video/tda9875.c	2003-01-08 10:34:24.000000000 +0100
+++ linux/drivers/media/video/tda9875.c	2003-01-08 10:59:59.000000000 +0100
@@ -42,19 +42,10 @@
 /* Addresses to scan */
 static unsigned short normal_i2c[] =  {
     I2C_TDA9875 >> 1,
-    I2C_CLIENT_END};
-static unsigned short normal_i2c_range[] = {I2C_CLIENT_END};
-static unsigned short probe[2]        = { I2C_CLIENT_END, I2C_CLIENT_END };
-static unsigned short probe_range[2]  = { I2C_CLIENT_END, I2C_CLIENT_END };
-static unsigned short ignore[2]       = { I2C_CLIENT_END, I2C_CLIENT_END };
-static unsigned short ignore_range[2] = { I2C_CLIENT_END, I2C_CLIENT_END };
-static unsigned short force[2]        = { I2C_CLIENT_END, I2C_CLIENT_END };
-static struct i2c_client_address_data addr_data = {
-	normal_i2c, normal_i2c_range, 
-	probe, probe_range, 
-	ignore, ignore_range, 
-	force
+    I2C_CLIENT_END
 };
+static unsigned short normal_i2c_range[] = {I2C_CLIENT_END};
+I2C_CLIENT_INSMOD;
 
 /* This is a superset of the TDA9875 */
 struct tda9875 {
@@ -64,7 +55,6 @@
 	struct i2c_client c;
 };
 
-
 static struct i2c_driver driver;
 static struct i2c_client client_template;
 
@@ -397,22 +387,20 @@
 
 
 static struct i2c_driver driver = {
-        "i2c tda9875 driver",
-        I2C_DRIVERID_TDA9875, /* Get new one for TDA9875 */
-        I2C_DF_NOTIFY,
-	tda9875_probe,
-        tda9875_detach,
-        tda9875_command,
+	.owner          = THIS_MODULE,
+        .name           = "i2c tda9875 driver",
+        .id             = I2C_DRIVERID_TDA9875,
+        .flags          = I2C_DF_NOTIFY,
+	.attach_adapter = tda9875_probe,
+        .detach_client  = tda9875_detach,
+        .command        = tda9875_command,
 };
 
 static struct i2c_client client_template =
 {
-        "(unset)",		/* name */
-        -1,
-        0,
-        0,
-        NULL,
-        &driver
+        .name    = "tda9875",
+        .id      = -1,
+        .driver  = &driver,
 };
 
 static int tda9875_init(void)
--- linux-2.5.54/drivers/media/video/tda9887.c	2003-01-08 10:59:58.000000000 +0100
+++ linux/drivers/media/video/tda9887.c	2003-01-08 10:59:59.000000000 +0100
@@ -26,17 +26,7 @@
 /* Addresses to scan */
 static unsigned short normal_i2c[] = {I2C_CLIENT_END};
 static unsigned short normal_i2c_range[] = {0x86>>1,0x86>>1,I2C_CLIENT_END};
-static unsigned short probe[2]        = { I2C_CLIENT_END, I2C_CLIENT_END };
-static unsigned short probe_range[2]  = { I2C_CLIENT_END, I2C_CLIENT_END };
-static unsigned short ignore[2]       = { I2C_CLIENT_END, I2C_CLIENT_END };
-static unsigned short ignore_range[2] = { I2C_CLIENT_END, I2C_CLIENT_END };
-static unsigned short force[2]        = { I2C_CLIENT_END, I2C_CLIENT_END };
-static struct i2c_client_address_data addr_data = {
-	normal_i2c, normal_i2c_range, 
-	probe, probe_range, 
-	ignore, ignore_range, 
-	force
-};
+I2C_CLIENT_INSMOD;
 
 /* insmod options */
 static int debug =  0;
@@ -145,8 +135,8 @@
 	u8   bOutPort2    = cOutputPort2Inactive;
 #endif
 	u8   bVideoTrap   = cVideoTrapBypassOFF;
-#if 0
-	u8   bTopAdjust   = mbAGC;
+#if 1
+	u8   bTopAdjust   = 0x0e /* -2dB */;
 #else
 	u8   bTopAdjust   = 0;
 #endif
@@ -456,18 +446,19 @@
 /* ----------------------------------------------------------------------- */
 
 static struct i2c_driver driver = {
-        name:           "i2c tda9887 driver",
-        id:             -1, /* FIXME */
-        flags:          I2C_DF_NOTIFY,
-        attach_adapter: tda9887_probe,
-        detach_client:  tda9887_detach,
-        command:        tda9887_command,
+	.owner          = THIS_MODULE,
+        .name           = "i2c tda9887 driver",
+        .id             = -1, /* FIXME */
+        .flags          = I2C_DF_NOTIFY,
+        .attach_adapter = tda9887_probe,
+        .detach_client  = tda9887_detach,
+        .command        = tda9887_command,
 };
 static struct i2c_client client_template =
 {
-        name:   "tda9887",
-	flags:  I2C_CLIENT_ALLOW_USE,
-        driver: &driver,
+        .name   = "tda9887",
+	.flags  = I2C_CLIENT_ALLOW_USE,
+        .driver = &driver,
 };
 
 static int tda9887_init_module(void)
--- linux-2.5.54/drivers/media/video/tvaudio.c	2003-01-08 10:34:09.000000000 +0100
+++ linux/drivers/media/video/tvaudio.c	2003-01-08 10:59:59.000000000 +0100
@@ -146,17 +146,7 @@
 	I2C_PIC16C54  >> 1,
 	I2C_CLIENT_END };
 static unsigned short normal_i2c_range[2] = { I2C_CLIENT_END, I2C_CLIENT_END };
-static unsigned short probe[2]            = { I2C_CLIENT_END, I2C_CLIENT_END };
-static unsigned short probe_range[2]      = { I2C_CLIENT_END, I2C_CLIENT_END };
-static unsigned short ignore[2]           = { I2C_CLIENT_END, I2C_CLIENT_END };
-static unsigned short ignore_range[2]     = { I2C_CLIENT_END, I2C_CLIENT_END };
-static unsigned short force[2]            = { I2C_CLIENT_END, I2C_CLIENT_END };
-static struct i2c_client_address_data addr_data = {
-	normal_i2c, normal_i2c_range, 
-	probe, probe_range, 
-	ignore, ignore_range, 
-	force
-};
+I2C_CLIENT_INSMOD;
 
 static struct i2c_driver driver;
 static struct i2c_client client_template;
@@ -1088,6 +1078,19 @@
 static int tda8425_shift10(int val) { return (val >> 10) | 0xc0; }
 static int tda8425_shift12(int val) { return (val >> 12) | 0xf0; }
 
+static int tda8425_initialize(struct CHIPSTATE *chip)
+{
+	struct CHIPDESC *desc = chiplist + chip->type;
+	int inputmap[8] = { /* tuner	*/ TDA8425_S1_CH2, /* radio  */ TDA8425_S1_CH1,
+			    /* extern	*/ TDA8425_S1_CH1, /* intern */ TDA8425_S1_OFF,
+			    /* off	*/ TDA8425_S1_OFF, /* on     */ TDA8425_S1_CH2};
+
+	if (chip->c.adapter->id == (I2C_ALGO_BIT | I2C_HW_B_RIVA)) {
+		memcpy (desc->inputmap, inputmap, sizeof (inputmap));
+	}
+	return 0;
+}
+
 static void tda8425_setmode(struct CHIPSTATE *chip, int mode)
 {
 	int s1 = chip->shadow.bytes[TDA8425_S1+1] & 0xe1;
@@ -1188,7 +1191,7 @@
 		.inputreg   = TDA9873_SW,
 		.inputmute  = TDA9873_MUTE | TDA9873_AUTOMUTE,
 		.inputmap   = {0xa0, 0xa2, 0xa0, 0xa0, 0xc0},
-		.inputmask  = TDA9873_INP_MASK | TDA9873_MUTE | TDA9873_AUTOMUTE
+		.inputmask  = TDA9873_INP_MASK|TDA9873_MUTE|TDA9873_AUTOMUTE,
 		
 	},
 	{
@@ -1285,8 +1288,8 @@
 		.registers  = 9,
 		.flags      = CHIP_HAS_VOLUME | CHIP_HAS_BASSTREBLE | CHIP_HAS_INPUTSEL,
 
-		.leftreg    = TDA8425_VR,
-		.rightreg   = TDA8425_VL,
+		.leftreg    = TDA8425_VL,
+		.rightreg   = TDA8425_VR,
 		.bassreg    = TDA8425_BA,
 		.treblereg  = TDA8425_TR,
 		.volfunc    = tda8425_shift10,
@@ -1298,6 +1301,7 @@
 		.inputmute  = TDA8425_S1_OFF,
 
 		.setmode    = tda8425_setmode,
+		.initialize = tda8425_initialize,
 	},
 	{
 		.name       = "pic16c54 (PV951)",
@@ -1316,7 +1320,7 @@
 			     PIC16C54_MISC_SND_NOTMUTE},
 		.inputmute  = PIC16C54_MISC_SND_MUTE,
 	},
-	{ .name = NULL } /* EOF */
+	{ name: NULL } /* EOF */
 };
 
 
@@ -1544,19 +1548,20 @@
 
 
 static struct i2c_driver driver = {
-	.name		= "generic i2c audio driver",
-	.id		= I2C_DRIVERID_TVAUDIO,
-	.flags		= I2C_DF_NOTIFY,
-	.attach_adapter	= chip_probe,
-	.detach_client	= chip_detach,
-	.command	= chip_command,
+	.owner           = THIS_MODULE,
+        .name            = "generic i2c audio driver",
+        .id              = I2C_DRIVERID_TVAUDIO,
+        .flags           = I2C_DF_NOTIFY,
+        .attach_adapter  = chip_probe,
+        .detach_client   = chip_detach,
+        .command         = chip_command,
 };
 
 static struct i2c_client client_template =
 {
-	.name		= "(unset)",
-	.flags		= I2C_CLIENT_ALLOW_USE,
-	.driver		= &driver,
+        .name   = "(unset)",
+	.flags  = I2C_CLIENT_ALLOW_USE,
+        .driver = &driver,
 };
 
 static int audiochip_init_module(void)
--- linux-2.5.54/drivers/media/video/tvmixer.c	2003-01-08 10:35:01.000000000 +0100
+++ linux/drivers/media/video/tvmixer.c	2003-01-08 10:59:59.000000000 +0100
@@ -195,9 +195,8 @@
 
 	/* lock bttv in memory while the mixer is in use  */
 	file->private_data = mix;
-
-	if (!try_module_get(client->adapter->owner))
-		return -ENODEV;
+	if (client->adapter->owner)
+		try_module_get(client->adapter->owner);
         return 0;
 }
 
@@ -211,25 +210,26 @@
 		return -ENODEV;
 	}
 
-	module_put(client->adapter->owner);
+	if (client->adapter->owner)
+		module_put(client->adapter->owner);
 	return 0;
 }
 
-
 static struct i2c_driver driver = {
-	.name		= "tv card mixer driver",
-	.id		= I2C_DRIVERID_TVMIXER,
-	.flags		= I2C_DF_DUMMY,
-	.attach_adapter	= tvmixer_adapters,
-	.detach_client	= tvmixer_clients,
+	.owner           = THIS_MODULE,
+	.name            = "tv card mixer driver",
+        .id              = I2C_DRIVERID_TVMIXER,
+	.flags           = I2C_DF_DUMMY,
+        .attach_adapter  = tvmixer_adapters,
+        .detach_client   = tvmixer_clients,
 };
 
 static struct file_operations tvmixer_fops = {
 	.owner		= THIS_MODULE,
-	.llseek		= no_llseek,
-	.ioctl		= tvmixer_ioctl,
-	.open		= tvmixer_open,
-	.release	= tvmixer_release,
+	.llseek         = no_llseek,
+	.ioctl          = tvmixer_ioctl,
+	.open           = tvmixer_open,
+	.release        = tvmixer_release,
 };
 
 /* ----------------------------------------------------------------------- */

-- 
Weil die späten Diskussionen nicht mal mehr den Rotwein lohnen.
				-- Wacholder in "Melanie"

^ permalink raw reply

* [PATCH][COMPAT] {get,put}_compat_timspec 6/8 s390x
From: Stephen Rothwell @ 2003-01-08 12:04 UTC (permalink / raw)
  To: torvalds; +Cc: linux-kernel, schwidefsky
In-Reply-To: <20030108223744.0c4856b7.sfr@canb.auug.org.au>

Hi Linus,

Here is the s390x part of the patch. Martin has said that I should feed
these straight to you and he will fix up any problems later.  Please apply
if you apply the gerneic part.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

diff -ruN 2.5.54-200301081106-32bit.2/arch/s390x/kernel/linux32.c 2.5.54-200301081106-32bit.3/arch/s390x/kernel/linux32.c
--- 2.5.54-200301081106-32bit.2/arch/s390x/kernel/linux32.c	2003-01-08 11:40:35.000000000 +1100
+++ 2.5.54-200301081106-32bit.3/arch/s390x/kernel/linux32.c	2003-01-08 17:14:08.000000000 +1100
@@ -1671,8 +1671,7 @@
 	set_fs (KERNEL_DS);
 	ret = sys_sched_rr_get_interval(pid, &t);
 	set_fs (old_fs);
-	if (put_user (t.tv_sec, &interval->tv_sec) ||
-	    __put_user (t.tv_nsec, &interval->tv_nsec))
+	if (put_compat_timespec(&t, interval))
 		return -EFAULT;
 	return ret;
 }
@@ -1806,8 +1805,7 @@
 	signotset(&these);
 
 	if (uts) {
-		if (get_user (ts.tv_sec, &uts->tv_sec) ||
-		    get_user (ts.tv_nsec, &uts->tv_nsec))
+		if (get_compat_timespec(&ts, uts))
 			return -EINVAL;
 		if (ts.tv_nsec >= 1000000000L || ts.tv_nsec < 0
 		    || ts.tv_sec < 0)
@@ -4149,13 +4147,12 @@
 	mm_segment_t old_fs;
 	int ret;
 
-	if (get_user (tmp.tv_sec,  &timeout32->tv_sec)  ||
-	    get_user (tmp.tv_nsec, &timeout32->tv_nsec))
+	if (timeout32 && get_compat_timespec(&tmp, timeout32))
 		return -EINVAL;
 
 	old_fs = get_fs();
 	set_fs(KERNEL_DS);
-	ret = sys_futex(uaddr, op, val, &tmp);
+	ret = sys_futex(uaddr, op, val, timeout32 ? &tmp : NULL);
 	set_fs(old_fs);
 
 	return ret;

^ permalink raw reply

* Re: More tests [Was: Problem with read blocking for a long time on /dev/scd1]
From: Andrey Borzenkov @ 2003-01-08 12:03 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Stark

> I've done some more tests:
>
> The problem still occurs with straight ide drivers, no ide-scsi
>
> The problem still occurs with 2.4.20-ac2
>
> I removed extraneous llseek syscalls from libdvdread, it's now reading
> purely sequentially and still failing. I doubt an llseek to the current
> location even gets through to the driver but I figured I would remove
> another variable.
> 
> Question: Does the readahead parameter in hdparm affect accesses to the
> raw /dev/hdd device? Does it affect atapi cdrom access?

I have seen the same phenomenon under slightly different conditions.

I am running Mandrake with supermount. In short, supermount fakes mounting device and then mounts real device on first access. On every file operation it checks for media change and invalidates and remounts media in this case.

In some cases, the best example being rpm -Uvh * on CD, this command lasts ages. The reason is long pause during file closing, as much as 5 seconds (in my case), so it takes very long time to examine all files. The device is pure IDE DVD-R (Creative) running in UDMA2 on i815e. I put timing information in ide-cd.c and ide.c and it shows that pause happens between ide_do_drive_cmd called from cdrom_queue_packet_command (from cdrom_check_status) and next corresponding ide_do_request (unfortunately, the log output happened inside of it, when request is already fetched).

Some strange things to observe: 

- this delay happens only during file close, while there are much more checks for media changes (every operation on supermount fs does it), the delayed ones are probably just 10% at most

- there is always a READ request being processed between ide_do_drive_cmd and ide_do_request; the actual delay happens between ide_do_drive_cmd and this READ request; I am going to trace all requests to CD_ROM to see when READ is generated

- when I try the above during relatively high disk activity, this usually works normally (i.e. without delays); OTOH when system is mostly idle I get these delays. I have pure IDE system, HD is on one channel, DVD in question on the other. I thought it may be related to DMA (packet commands are run with DMA disabled) but disabling DMA did not change anything.

The problem is old, it existed at least in 2.4.18 that shipped in Mandrake. Currently Mandrake is on 2.4.20 with the same problem.

I will do some tests to pinpoint the place where delays happen; I have not looked at ps output, but if delay happens in ide_do_request, there should not be many possibilities.

Regards

-andrej



^ permalink raw reply

* [PATCH][COMPAT] {get,put}_compat_timspec 5/8 ia64
From: Stephen Rothwell @ 2003-01-08 12:01 UTC (permalink / raw)
  To: davidm; +Cc: torvalds, linux-kernel
In-Reply-To: <20030108223744.0c4856b7.sfr@canb.auug.org.au>

Hi David,

Here is the ia64 part.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

diff -ruN 2.5.54-200301081106-32bit.2/arch/ia64/ia32/ia32_signal.c 2.5.54-200301081106-32bit.3/arch/ia64/ia32/ia32_signal.c
--- 2.5.54-200301081106-32bit.2/arch/ia64/ia32/ia32_signal.c	2002-12-27 15:15:38.000000000 +1100
+++ 2.5.54-200301081106-32bit.3/arch/ia64/ia32/ia32_signal.c	2003-01-08 17:05:48.000000000 +1100
@@ -607,14 +607,11 @@
 
 	if (copy_from_user(&s.sig, uthese, sizeof(sigset32_t)))
 		return -EFAULT;
-	if (uts) {
-		ret = get_user(t.tv_sec, &uts->tv_sec);
-		ret |= get_user(t.tv_nsec, &uts->tv_nsec);
-		if (ret)
-			return -EFAULT;
-	}
+	if (uts && get_compat_timespec(&t, uts))
+		return -EFAULT;
 	set_fs(KERNEL_DS);
-	ret = sys_rt_sigtimedwait(&s, &info, &t, sigsetsize);
+	ret = sys_rt_sigtimedwait(&s, uinfo ? &info : NULL, uts ? &t : NULL,
+			sigsetsize);
 	set_fs(old_fs);
 	if (ret >= 0 && uinfo) {
 		if (copy_siginfo_to_user32(uinfo, &info))
diff -ruN 2.5.54-200301081106-32bit.2/arch/ia64/ia32/sys_ia32.c 2.5.54-200301081106-32bit.3/arch/ia64/ia32/sys_ia32.c
--- 2.5.54-200301081106-32bit.2/arch/ia64/ia32/sys_ia32.c	2003-01-08 12:03:33.000000000 +1100
+++ 2.5.54-200301081106-32bit.3/arch/ia64/ia32/sys_ia32.c	2003-01-08 17:08:05.000000000 +1100
@@ -3536,7 +3536,7 @@
 	set_fs(KERNEL_DS);
 	ret = sys_sched_rr_get_interval(pid, &t);
 	set_fs(old_fs);
-	if (put_user (t.tv_sec, &interval->tv_sec) || put_user (t.tv_nsec, &interval->tv_nsec))
+	if (put_compat_timespec(&t, interval))
 		return -EFAULT;
 	return ret;
 }

^ permalink raw reply

* [patch] 30_bttv-doc
From: Gerd Knorr @ 2003-01-08 12:04 UTC (permalink / raw)
  To: Linus Torvalds, Kernel List

  Hi,

$subject says all:  This patch updates the bttv documentation.

  Gerd

--- linux-2.5.54/Documentation/video4linux/bttv/CARDLIST	2003-01-08 10:33:57.000000000 +0100
+++ linux/Documentation/video4linux/bttv/CARDLIST	2003-01-08 10:59:58.000000000 +0100
@@ -69,7 +69,7 @@
   card=67 - IODATA GV-BCTV4/PCI
   card=68 - 3Dfx VoodooTV FM (Euro), VoodooTV 200 (USA)
   card=69 - Active Imaging AIMMS
-  card=70 - Prolink Pixelview PV-BT878P+ (Rev.4C)
+  card=70 - Prolink Pixelview PV-BT878P+ (Rev.4C,8E)
   card=71 - Lifeview FlyVideo 98EZ (capture only) LR51
   card=72 - Prolink Pixelview PV-BT878P+9B (PlayTV Pro rev.9B FM+NICAM)
   card=73 - Sensoray 311
--- linux-2.5.54/Documentation/video4linux/bttv/Cards	2003-01-08 10:34:02.000000000 +0100
+++ linux/Documentation/video4linux/bttv/Cards	2003-01-08 10:59:58.000000000 +0100
@@ -4,25 +4,27 @@
 
 
 Suppported cards:
-
-
 Bt848/Bt848a/Bt849/Bt878/Bt879 cards
 ------------------------------------
 
-All cards with Bt848/Bt848a/Bt849/Bt878/Bt879 and normal Composite/S-VHS inputs
-are supported.
-Teletext and Intercast support (PAL only) for ALL cards via VBI sample decoding
-in software.
+All cards with Bt848/Bt848a/Bt849/Bt878/Bt879 and normal
+Composite/S-VHS inputs are supported.  Teletext and Intercast support
+(PAL only) for ALL cards via VBI sample decoding in software.
+
+Some cards with additional multiplexing of inputs or other additional
+fancy chips are only partially supported (unless specifications by the
+card manufacturer are given).  When a card is listed here it isn't
+necessarily fully supported.
 
-Some cards with additional multiplexing of inputs are only partially 
-supported (unless specifications by the card manufacturer are given).
+All other cards only differ by additional components as tuners, sound
+decoders, EEPROMs, teletext decoders ...
 
-All other cards only differ by additional components as tuners, sound decoders,
-EEPROMs, teletext decoders ...
 
 Unsupported Cards: 
 ------------------
-Cards with Zoran (ZR) or Philips (SAA) or ISA are not supported by this driver. 
+
+Cards with Zoran (ZR) or Philips (SAA) or ISA are not supported by
+this driver.
 
 
 MATRIX Vision
@@ -197,7 +199,7 @@
   50686 "TV Tuner"                       = KNC1 TV Station
   50687 "TV Tuner stereo"                = KNC1 TV Station pro
   50688 "TV Tuner RDS" (black package)   = KNC1 TV Station RDS
-  50689  TV SAT DVB-S CARD CI PCI (SAA7146AH)
+  50689  TV SAT DVB-S CARD CI PCI (SAA7146AH, SU1278?) = "KNC1 TV Station DVB-S"
   50692 "TV/FM Tuner" (small PCB)
   50694  TV TUNER CARD RDS (PHILIPS CHIPSET SAA7134HL)
   50696  TV TUNER STEREO (PHILIPS CHIPSET SAA7134HL, MK3ME Tuner)
@@ -234,10 +236,20 @@
    PixelView PowerStudio PAK - (Model: PV-M3600 REV 4E)
    PixelView DigitalVCR PAK -  (Model: PV-M2400 REV 4C / 8D / 10A )
 
+   PixelView PlayTV PAK II (TV/FM card + usb camera)  PV-M3800 
+   PixelView PlayTV XP PV-M4700,PV-M4700(w/FM)
+   PixelView PlayTV DVR PV-M4600  package contents:PixelView PlayTV pro, windvr & videoMail s/w
+
    Further Cards:
    PV-BT878P+rev.9B (Play TV Pro, opt. w/FM w/NICAM)
    PV-BT878P+rev.2F
    PV-BT878P Rev.1D (bt878, capture only)
+
+   XCapture PV-CX881P (cx23881)
+   PlayTV HD PV-CX881PL+, PV-CX881PL+(w/FM) (cx23881)
+
+   DTV3000 PV-DTV3000P+ DVB-S CI = Twinhan VP-1030
+   DTV2000 DVB-S = Twinhan VP-1020
    
    Video Conferencing:
    PixelView Meeting PAK - (Model: PV-BT878P)
@@ -245,6 +257,9 @@
    PixelView Meeting PAK plus - (Model: PV-BT878P+rev 4C/8D/10A)
    PixelView Capture - (Model: PV-BT848P)
 
+   PixelView PlayTV USB pro
+   Model No. PV-NT1004+, PV-NT1004+ (w/FM) = NT1004 USB decoder chip + SAA7113 video decoder chip
+
 Dynalink
 --------
    These are CPH series.
@@ -284,6 +299,8 @@
    TV-Station pro (+TV stereo)
    TV-Station FM (+Radio)
    TV-Station RDS (+RDS)
+   TV Station SAT (analog satellite)
+   TV-Station DVB-S
 
    newer Cards have saa7134, but model name stayed the same?
 
@@ -296,8 +313,23 @@
    3DeMon PV951
    MediaForte TV-Vision PV951
    Yoko PV951
-  )
+   Vivanco Tuner Card PCI Art.-Nr.: 68404
+  ) now named PV-951T
+
+  Surveillance Series
+  PV-141
+  PV-143
+  PV-147
   PV-148 (capture only)
+  PV-150
+  PV-151
+
+  TV-FM Tuner Series
+  PV-951TDV (tv tuner + 1394)
+  PV-951T/TF
+  PV-951PT/TF
+  PV-956T/TF Low Profile
+  PV-911
 
 Highscreen
 ----------
@@ -372,9 +404,9 @@
 
 IXMicro (former: IMS=Integrated Micro Solutions)
 -------
-   IXTV BT848
+   IXTV BT848 (=TurboTV)
    IXTV BT878
-   TurboTV (Bt848)
+   IMS TurboTV (Bt848)
 
 Lifetec/Medion/Tevion/Aldi
 --------------------------
@@ -386,8 +418,10 @@
 Modular Technologies (www.modulartech.com) UK
 ---------------------------------------------
    MM100 PCTV (Bt848)
+   MM201 PCTV (Bt878, Bt832) w/ Quartzsight camera
+   MM202 PCTV (Bt878, Bt832, tda9874)
    MM205 PCTV (Bt878)
-   MM210 PCTV (Bt878) (Galaxy TV)
+   MM210 PCTV (Bt878) (Galaxy TV, Galaxymedia ?)
 
 Terratec
 --------
@@ -399,6 +433,7 @@
    Terra TValue Version BT878,    "80-CP2830110-0 TTTV4" printed on the PCB, 
 				     "CPH011-D83" on back
    Terra TValue Version 1.0       "ceb105.PCB" (really identical to Terra TV+ Version 1.0)
+   Terra TValue New Revision	  "LR102 Rec.C"
    Terra Active Radio Upgrade (tea5757h, saa6588t)
 
    LR74 is a newer PCB revision of ceb105 (both incl. connector for Active Radio Upgrade)
@@ -446,7 +481,7 @@
    Studio PCTV Pro  (Bt878 stereo w/ FM)
    Pinnacle PCTV    (Bt878, MT2032)
    Pinnacle PCTV Pro (Bt878, MT2032)
-   Pinncale PCTV Sat
+   Pinncale PCTV Sat (bt878a, HM1821/1221)
 
    M(J)PEG capture and playback:
    DC1+ (ISA)
@@ -519,7 +554,7 @@
 ------
    iProTV (Card for iMac Mezzanine slot, Bt848+SCSI)
    ProTV (Bt848)
-   ProTV II = ProTV Stereo (Bt878)
+   ProTV II = ProTV Stereo (Bt878) ["stereo" means FM stereo, tv is still mono]
 
 ATI
 ---
@@ -544,7 +579,7 @@
 
 STB
 ---
-   STB bt878 == Gateway 6000704 
+   STB Gateway 6000704 (bt878)
    STB Gateway 6000699 (bt848)
    STB Gateway 6000402 (bt848)
    STB TV130 PCI
@@ -558,13 +593,14 @@
 ------------
    TT-SAT PCI (PCB "Sat-PCI Rev.:1.3.1"; zr36125, vpx3225d, stc0056a, Tuner:BSKE6-155A
    TT-DVB-Sat
+    revisions 1.1, 1.3, 1.5, 1.6 and 2.1
     This card is sold as OEM from:
 	Siemens DVB-s Card
 	Hauppauge WinTV DVB-S
 	Technisat SkyStar 1 DVB
 	Galaxis DVB Sat
     Now this card is called TT-PCline Premium Family
-   TT-Budget
+   TT-Budget (saa7146, bsru6-701a)
     This card is sold as OEM from:
 	Hauppauge WinTV Nova
 	Satelco Standard PCI (DVB-S)
@@ -603,18 +639,71 @@
    Galaxis DVB Card C CI
    Galaxis DVB Card S
    Galaxis DVB Card C
+   Galaxis plug.in S [neuer Name: Galaxis DVB Card S CI
 
 Hauppauge
 ---------
    many many WinTV models ...
-   WinTV DVBs = Tehcnotrend Premium
-   WinTV NOVA = Technotrend Budget
-   WinTV NOVA-CI
-   WinTV-Nexus-s
+   WinTV DVBs = Technotrend Premium 1.3
+   WinTV NOVA = Technotrend Budget 1.1 "S-DVB DATA"
+   WinTV NOVA-CI "SDVBACI"
+   WinTV Nova USB (=Technotrend USB 1.0)
+   WinTV-Nexus-s (=Technotrend Premium 2.1 or 2.2)
    WinTV PVR
    WinTV PVR 250
    WinTV PVR 450
 
+  US models
+  990 WinTV-PVR-350 (249USD)
+  980 WinTV-PVR-250 (149USD)
+  880 WinTV-PVR-PCI (199USD)
+  881 WinTV-PVR-USB
+  190 WinTV-GO
+  191 WinTV-GO-FM
+  404 WinTV
+  401 WinTV-radio
+  495 WinTV-Theater
+  602 WinTV-USB
+  621 WinTV-USB-FM
+  600 USB-Live
+  698 WinTV-HD
+  697 WinTV-D
+  564 WinTV-Nexus-S
+
+  Deutsche Modelle
+  603 WinTV GO
+  719 WinTV Primio-FM
+  718 WinTV PCI-FM
+  497 WinTV Theater
+  569 WinTV USB
+  568 WinTV USB-FM
+  882 WinTV PVR
+  981 WinTV PVR 250
+  891 WinTV-PVR-USB
+  541 WinTV Nova
+  488 WinTV Nova-Ci
+  564 WinTV-Nexus-s
+  727 WinTV-DVB-c
+  545 Common Interface
+  898 WinTV-Nova-USB
+
+  UK models
+  607 WinTV Go
+  693,793 WinTV Primio FM
+  647,747 WinTV PCI FM
+  498 WinTV Theater
+  883 WinTV PVR
+  893 WinTV PVR USB  (Duplicate entry)
+  566 WinTV USB (UK)
+  573 WinTV USB FM
+  429 Impact VCB (bt848)
+  600 USB Libe (Video-In 1x Comp, 1xSVHS)
+  542 WinTV Nova
+  717 WinTV DVB-S
+  909 Nova-t PCI
+  893 Nova-t USB   (Duplicate entry)
+  
+
 Matrix-Vision
 -------------
    MATRIX-Vision MV-Delta
@@ -699,7 +788,7 @@
    HS-878 Mini PCI Capture Add-on Card
    HS-879 Mini PCI 3D Audio and Capture Add-on Card (w/ ES1938 Solo-1)
 
-Satelco
+Satelco www.citycom-gmbh.de, www.satelco.de
 -------
    TV-FM =KNC1 saa7134
    Standard PCI (DVB-S) = Technotrend Budget
@@ -724,7 +813,8 @@
 
 AITech
 ------
-   AITech WaveWatcher TV-PCI = LR26
+   Wavewatcher TV (ISA)
+   AITech WaveWatcher TV-PCI = can be LR26 (Bt848) or LR50 (BT878)
    WaveWatcher TVR-202 TV/FM Radio Card (ISA)
 
 MAXRON
@@ -750,3 +840,42 @@
    CyberMail AV Video Email Kit w/ PCI Capture Card (capture only)
    CyberMail Xtreme
   These are Flyvideo
+
+VCR (http://www.vcrinc.com/) 
+---
+  Video Catcher 16
+
+Twinhan
+-------
+   DST Card/DST-IP (bt878, twinhan asic) VP-1020
+    Sold as:
+     KWorld DVBS Satellite TV-Card
+     Powercolor DSTV Satellite Tuner Card
+     Prolink Pixelview DTV2000
+     Provideo PV-911 Digital Satellite TV Tuner Card With Common Interface ?
+   DST-CI Card (DVB Satellite) VP-1030
+   DCT Card (DVB cable)
+
+MSI
+---
+    MSI TV@nywhere Tuner Card (MS-8876) (CX23881/883) Not Bt878 compatible.
+    MS-8401 DVB-S
+
+Focus www.focusinfo.com
+-----
+    InVideo PCI (bt878)
+
+Sdisilk www.sdisilk.com/
+-------
+    SDI Silk 100
+    SDI Silk 200 SDI Input Card
+
+www.euresys.com
+    PICOLO series 
+
+PMC/Pace
+www.pacecom.co.uk website closed
+
+Mercury www.kobian.com (UK and FR)
+    LR50
+    LR138RBG-Rx  == LR138

-- 
Weil die späten Diskussionen nicht mal mehr den Rotwein lohnen.
				-- Wacholder in "Melanie"

^ permalink raw reply


This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.