dvb should have caused the hard crash

2011-01-25 Thread Davor Emard
HI

I complained that to the linux-kernel but now aftter
the testing I think dvb caused this hard crash.

It starts by corrupted page table and machine is
useless because although it didn't stop completely,
almost every new process segfaults.

memtest passes.

I tested the machine on linux without dvb. Constant compilation
of the kernel, and extra stressing of the gpu with nvidia 
binary module (kernel tainted), constantly running glxgears and
opencl matrix computation on GPU. no sign of crash after hours
of running, cpu at 59 deg C, cores at 79 deg C, GPU at 82 deg C.

Then I removed binary nvidia module and used opensource nv
(that doesn't taint the kernel).

Crash happens when vdr-1.7.13 (debian e-tobi repository) is running 
and saa7134 dvb-t (compro videomate t750f) and saa7146 dvb-s (budget 
satelco pci) are loaded. VDR is tuned to a satellite program
(DMAX Astra 19.2). I watch TV over dvb-s with vdr-sxfe as user.
Watching is not necessary to cause the crash, vdr itself is enough.

Best regards, Emard

EXT4-fs (dm-16): re-mounted. Opts: (null)
qt1010 I2C read failed
sky2 :02:00.0: eth1: disabling interface
br0: port 2(veth2H9WWj) entering forwarding state
br0: port 1(eth0) entering forwarding state
skge :05:02.0: eth0: disabling interface
device eth0 left promiscuous mode
br0: port 1(eth0) entering disabled state
br0: port 2(veth2H9WWj) entering disabled state
device eth0 entered promiscuous mode
skge :05:02.0: eth0: enabling interface
skge :05:02.0: eth0: Link is up at 1000 Mbps, full duplex, flow control both
br0: port 1(eth0) entering forwarding state
br0: port 1(eth0) entering forwarding state
br0: port 1(eth0) entering forwarding state
skge :05:02.0: eth0: disabling interface
device eth0 left promiscuous mode
br0: port 1(eth0) entering disabled state
Adding 4194300k swap on /dev/mapper/emard320-swap0.  Priority:-1 extents:1 
across:4194300k 
device eth0 entered promiscuous mode
skge :05:02.0: eth0: enabling interface
skge :05:02.0: eth0: Link is up at 1000 Mbps, full duplex, flow control both
br0: port 1(eth0) entering forwarding state
br0: port 1(eth0) entering forwarding state
md: md209: recovery done.
RAID1 conf printout:
 --- wd:3 rd:3
 disk 0, wo:0, o:1, dev:sdb9
 disk 1, wo:0, o:1, dev:sda9
 disk 2, wo:0, o:1, dev:sdc9
qt1010 I2C read failed
qt1010 I2C read failed
qt1010 I2C read failed
qt1010 I2C read failed
qt1010 I2C read failed
vdr-sxfe: Corrupted page table at address 7fe4c4f58000
PGD 7c610067 PUD 72359067 PMD 70d3d067 PTE 120d8067
Bad pagetable: 000f [#1] PREEMPT SMP 
last sysfs file: /sys/devices/platform/coretemp.3/temp1_input
CPU 1 
Modules linked in: parport_pc sco bnep veth rfcomm l2cap bluetooth uinput 
cls_u32 sch_htb sch_ingress sch_sfq xt_time xt_connlimit xt_realm iptable_raw 
xt_hashlimit xt_comment xt_owner xt_recent xt_iprange xt_policy xt_multiport 
ipt_ULOG ipt_REJECT ipt_REDIRECT ipt_NETMAP ipt_MASQUERADE ipt_LOG ipt_ECN 
ipt_ecn ipt_ah ipt_addrtype xt_tcpmss xt_pkttype xt_physdev xt_NFQUEUE xt_mark 
xt_mac xt_limit xt_length xt_helper xt_dccp xt_conntrack xt_connmark 
xt_CLASSIFY xt_tcpudp xt_state iptable_nat nf_nat iptable_mangle nfnetlink 
iptable_filter ip_tables x_tables fuse bridge stp llc aes_x86_64 aes_generic 
nf_conntrack_ftp coretemp hwmon parport tun kvm_intel kvm sbp2 qt1010 zl10353 
saa7134_dvb videobuf_dvb snd_hda_codec_analog tuner_xc2028 tuner arc4 rt2800usb 
rt2800lib rt2x00usb rt2x00lib rc_videomate_t750 led_class mac80211 
snd_hda_intel stv0299 saa7134 snd_hda_codec cfg80211 v4l2_common 
ir_sony_decoder videodev ves1x93 ir_jvc_decoder ir_rc6_decoder rtc_cmos snd_pcm 
rtc_core v4l1_compat ir_rc5_decoder snd_seq v4l2_compat_ioctl32 videobuf_dma_sg 
budget pcspkr rtc_lib budget_core i2c_i801 snd_timer ir_nec_decoder saa7146 
videobuf_core snd_seq_device ir_common ir_core ttpci_eeprom tveeprom snd 
dvb_core button processor snd_page_alloc usbhid hid firewire_ohci firewire_core 
sg sr_mod ohci1394 cdrom skge ieee1394 sky2 pata_marvell uhci_hcd thermal 
ehci_hcd [last unloaded: scsi_wait_scan]

Pid: 22841, comm: vdr-sxfe Not tainted 2.6.35.10-amd64-asus-p5q3-deluxe-wifi #4 
P5Q3 DELUXE/P5Q3 DELUXE
RIP: 0033:[<7fe4d611e211>]  [<7fe4d611e211>] 0x7fe4d611e211
RSP: 002b:7fe4ced4b8e0  EFLAGS: 00010212
RAX: 006d3b60 RBX: 00a1c040 RCX: 0122a1b0
RDX: 7fe4c4f57ff0 RSI: 01318cdc RDI: 01740848
RBP: 2816 R08: 0122a1ac R09: 0122a370
R10: 02eb R11: 0f90 R12: 0012
R13: 0f90 R14: f070 R15: 01af1920
FS:  7fe4ced4c710() GS:88000188() knlGS:
CS:  0010 DS:  ES:  CR0: 80050033
CR2: 7fe4c4f58000 CR3: 71d97000 CR4: 06e0
DR0:  DR1:  DR2: 
DR3:  DR6: 0ff0 DR7: 0400
Process vdr-sxfe (pid: 22841, threadinfo 8800709aa000, task 
fff

Re: af9015 and nxp tda182128 support

2010-11-16 Thread Davor Emard
On Mon, Nov 15, 2010 at 05:44:55PM +0100, Okkel Klaver wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>  
> Hello everybody,
> 
> 
> I own a brandless hdtv usb dvb-t stick.
> 
> lsusb identifies it as:
> Bus 001 Device 005: ID 15a4:9016 Afatech Technologies, Inc. AF9015 DVB-T
> USB2.0 stick

few days ago I submeitted
[PATCH] terratec cinergy t-stick RC (with TDA18218)
that applies to latest normal (not new) v4l tree
Just add your usb id as terratec cinergy t-stick RC,
make install and try it. it might work

best regards, Emard
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] terratec cinergy t-stick RC (with TDA18218)

2010-11-14 Thread Davor Emard
HI

This patch applies to lates v4l tree and seems to work for me.
I created it with diff -pur --new-file

No time to read docs about submitting patches yet for me, i'm sorrry...

Best regards, Davor

diff -pur --new-file v4l-dvb.orig/linux/drivers/media/common/tuners/Kconfig 
v4l-dvb/linux/drivers/media/common/tuners/Kconfig
--- v4l-dvb.orig/linux/drivers/media/common/tuners/Kconfig  2010-11-14 
10:07:34.0 +0100
+++ v4l-dvb/linux/drivers/media/common/tuners/Kconfig   2010-11-14 
14:05:34.223928063 +0100
@@ -70,6 +70,13 @@ config MEDIA_TUNER_TDA827X
help
  A DVB-T silicon tuner module. Say Y when you want to support this 
tuner.
 
+config MEDIA_TUNER_TDA18218
+   tristate "NXP TDA18218 silicon tuner"
+   depends on VIDEO_MEDIA && I2C
+   default m if MEDIA_TUNER_CUSTOMISE
+   help
+ A driver for the silicon tuner TDA18218 from NXP.
+
 config MEDIA_TUNER_TDA18271
tristate "NXP TDA18271 silicon tuner"
depends on VIDEO_MEDIA && I2C
diff -pur --new-file v4l-dvb.orig/linux/drivers/media/common/tuners/Makefile 
v4l-dvb/linux/drivers/media/common/tuners/Makefile
--- v4l-dvb.orig/linux/drivers/media/common/tuners/Makefile 2010-11-14 
10:07:34.0 +0100
+++ v4l-dvb/linux/drivers/media/common/tuners/Makefile  2010-11-14 
14:05:34.223928063 +0100
@@ -14,6 +14,7 @@ obj-$(CONFIG_MEDIA_TUNER_TEA5767) += tea
 obj-$(CONFIG_MEDIA_TUNER_TEA5761) += tea5761.o
 obj-$(CONFIG_MEDIA_TUNER_TDA9887) += tda9887.o
 obj-$(CONFIG_MEDIA_TUNER_TDA827X) += tda827x.o
+obj-$(CONFIG_MEDIA_TUNER_TDA18218) += tda18218.o
 obj-$(CONFIG_MEDIA_TUNER_TDA18271) += tda18271.o
 obj-$(CONFIG_MEDIA_TUNER_XC5000) += xc5000.o
 obj-$(CONFIG_MEDIA_TUNER_MT2060) += mt2060.o
diff -pur --new-file v4l-dvb.orig/linux/drivers/media/common/tuners/tda18218.c 
v4l-dvb/linux/drivers/media/common/tuners/tda18218.c
--- v4l-dvb.orig/linux/drivers/media/common/tuners/tda18218.c   1970-01-01 
01:00:00.0 +0100
+++ v4l-dvb/linux/drivers/media/common/tuners/tda18218.c2010-11-14 
14:05:34.246930323 +0100
@@ -0,0 +1,471 @@
+/*
+ *  Driver for NXP TDA18218 silicon tuner
+ *
+ *  Copyright (C) 2010 Lauris Ding 
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+#include "tda18218.h"
+#include "compat.h"
+#include "tda18218_priv.h"
+
+static int tda18218_write_reg(struct dvb_frontend *fe, u8 reg, u8 val)
+{
+   struct tda18218_priv *priv = fe->tuner_priv;
+   u8 buf[2] = { reg, val };
+   struct i2c_msg msg = { .addr = priv->cfg->i2c_address, .flags = 0,
+  .buf = buf, .len = 2 };
+   int ret;
+
+   if (fe->ops.i2c_gate_ctrl)
+   fe->ops.i2c_gate_ctrl(fe, 1);
+   /* write register */
+   ret = i2c_transfer(priv->i2c, &msg, 1);
+   if (fe->ops.i2c_gate_ctrl)
+   fe->ops.i2c_gate_ctrl(fe, 0);
+
+   if (ret != 1)
+   printk(KERN_WARNING "I2C write failed ret: %d reg: %02x\n", 
ret, reg);
+
+   return (ret == 1 ? 0 : ret);
+}
+
+static int tda18218_write_regs(struct dvb_frontend *fe, u8 reg,
+   u8 *val, u8 len)
+{
+   struct tda18218_priv *priv = fe->tuner_priv;
+   u8 buf[1+len];
+   struct i2c_msg msg = {
+   .addr = priv->cfg->i2c_address,
+   .flags = 0,
+   .len = sizeof(buf),
+   .buf = buf };
+   
+   int ret;
+
+   buf[0] = reg;
+   memcpy(&buf[1], val, len);
+   
+   if (fe->ops.i2c_gate_ctrl)
+   fe->ops.i2c_gate_ctrl(fe, 1);
+   ret = i2c_transfer(priv->i2c, &msg, 1);
+   if (fe->ops.i2c_gate_ctrl)
+   fe->ops.i2c_gate_ctrl(fe, 1);
+
+   if (ret != 1)
+   printk(KERN_WARNING "I2C write failed ret: %d reg: %02x len: 
%d\n", ret, reg, len);
+   
+   return (ret == 1 ? 0 : ret);
+}
+
+/*static int tda18218_read_reg(struct tda18218_priv *priv, u16 reg, u8 *val)
+{
+   u8 obuf[3] = { reg >> 8, reg & 0xff, 0 };
+   u8 ibuf[1];
+   struct i2c_msg msg[2] = {
+   {
+   .addr = 0x3a,
+   .flags = 0,
+   .len = sizeof(obuf),
+   .buf = obuf
+   }, {
+   .addr = 0x3a,
+   .flags = I2C_M_RD,
+   .len = si

[PATCH] Compro videmate T750f for 2.6.35.7

2010-10-01 Thread Davor Emard
g,
--- linux-2.6.35.7/drivers/media/IR/keymaps/Makefile.orig   2010-09-29 
03:09:08.0 +0200
+++ linux-2.6.35.7/drivers/media/IR/keymaps/Makefile2010-10-01 
21:32:01.207530164 +0200
@@ -63,6 +63,7 @@ obj-$(CONFIG_RC_MAP) += rc-adstech-dvb-t
rc-tevii-nec.o \
rc-tt-1500.o \
rc-videomate-s350.o \
+   rc-videomate-t750.o \
rc-videomate-tv-pvr.o \
rc-winfast.o \
rc-winfast-usbii-deluxe.o
--- linux-2.6.35.7/drivers/media/IR/keymaps/rc-videomate-t750.c.orig
1970-01-01 01:00:00.0 +0100
+++ linux-2.6.35.7/drivers/media/IR/keymaps/rc-videomate-t750.c 2010-10-02 
05:49:23.664275732 +0200
@@ -0,0 +1,123 @@
+/* videomate-s350.h - Keytable for videomate_s350 Remote Controller
+ *
+ * keymap imported from ir-keymaps.c
+ *
+ * Copyright (c) 2010 by Mauro Carvalho Chehab 
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ */
+
+#include 
+
+/*
+Compro videomate vista T750F remote
+---
+Emard 2010-05-09 
+POWER
+VIDEO   RADIO   AUDIO  CAMERA 
+PVR EPG TV  DVD  SUBTITLE
+
+  UP
+ LEFT OK RIGHT
+ DOWN
+
+BACK MENUINFO
+
+VOLUMEUPCHANNELUP
+ MUTE
+VOLUMEDOWNCHANNELDOWN
+
+RECORD   STOP
+REWIND   PLAY FASTFORWARD
+PREVIOUSSONG   PLAYPAUSE NEXTSONG
+
+NUMERIC_1  NUMERIC_2 NUMERIC_3
+NUMERIC_4  NUMERIC_5 NUMERIC_6
+NUMERIC_7  NUMERIC_8 NUMERIC_9
+NUMERIC_STAR   NUMERIC_0 NUMERIC_POUND
+
+CLEARZOOM ENTER
+
+RED  GREEN  YELLOW BLUETEXT
+*/
+static struct ir_scancode videomate_t750[] = {
+   { 0x01, KEY_POWER},
+   { 0x31, KEY_VIDEO},
+   { 0x33, KEY_RADIO},
+   { 0x2f, KEY_AUDIO},
+   { 0x30, KEY_CAMERA}, /* pictures */
+   { 0x2d, KEY_PVR},/* Recordings */
+   {   23, KEY_EPG},
+   {   44, KEY_TV},
+   {   43, KEY_DVD},
+   { 0x32, KEY_SUBTITLE},
+   {   17, KEY_UP},
+   {   19, KEY_LEFT},
+   {   21, KEY_OK},
+   {   20, KEY_RIGHT},
+   {   18, KEY_DOWN},
+   {   22, KEY_BACK},
+   { 0x02, KEY_MENU},
+   { 0x04, KEY_INFO},
+   { 0x05, KEY_VOLUMEUP},
+   { 0x06, KEY_VOLUMEDOWN},
+   { 0x03, KEY_MUTE},
+   { 0x07, KEY_CHANNELUP},
+   { 0x08, KEY_CHANNELDOWN},
+   { 0x0c, KEY_RECORD},
+   { 0x0e, KEY_STOP},
+   { 0x0a, KEY_REWIND},
+   { 0x0b, KEY_PLAY},
+   { 0x09, KEY_FASTFORWARD},
+   { 0x10, KEY_PREVIOUSSONG},
+   { 0x0d, KEY_PLAYPAUSE},
+   { 0x0f, KEY_NEXTSONG},
+   {   30, KEY_NUMERIC_1},
+   { 0x1f, KEY_NUMERIC_2},
+   { 0x20, KEY_NUMERIC_3},
+   { 0x21, KEY_NUMERIC_4},
+   { 0x22, KEY_NUMERIC_5},
+   { 0x23, KEY_NUMERIC_6},
+   { 0x24, KEY_NUMERIC_7},
+   { 0x25, KEY_NUMERIC_8},
+   { 0x26, KEY_NUMERIC_9},
+   { 0x2a, KEY_NUMERIC_STAR},
+   {   29, KEY_NUMERIC_0},
+   {   41, KEY_NUMERIC_POUND},
+   {   39, KEY_CLEAR},
+   { 0x34, KEY_ZOOM},
+   { 0x28, KEY_ENTER},
+   {   25, KEY_RED},
+   {   26, KEY_GREEN},
+   {   27, KEY_YELLOW},
+   {   28, KEY_BLUE},
+   {   24, KEY_TEXT},
+};
+
+static struct rc_keymap videomate_t750_map = {
+   .map = {
+   .scan= videomate_t750,
+   .size= ARRAY_SIZE(videomate_t750),
+   .ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */
+   .name= RC_MAP_VIDEOMATE_T750,
+   }
+};
+
+static int __init init_rc_map_videomate_t750(void)
+{
+   return ir_register_map(&videomate_t750_map);
+}
+
+static void __exit exit_rc_map_videomate_t750(void)
+{
+   ir_unregister_map(&videomate_t750_map);
+}
+
+module_init(init_rc_map_videomate_t750)
+module_exit(exit_rc_map_videomate_t750)
+
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR("Davor Emard ");
--- linux-2.6.35.7/include/media/rc-map.h.orig  2010-10-01 21:30:52.156604735 
+0200
+++ linux-2.6.35.7/include/media/rc-map.h   2010-10-01 21:31:13.515998577 
+0200
@@ -113,6 +113,7 @@ void rc_map_init(void);
 #define RC_MAP_TEVII_NEC "rc-tevii-nec"
 #define RC_MAP_TT_1500   "rc-tt-1500"
 #define RC_MAP_VIDEOMATE_S350"rc-videomate-s350"
+#define RC_MAP_VIDEOMATE_T750"rc-videomate-t750"
 #define RC_MA

Re: Avermedia dvb-t hybrid A188

2010-08-10 Thread Davor Emard
HI

This is my second attempt on Avermedia A188.
The hardware on this card is:

1x Philips SAA7160 pci-e bridge
2x NXP SAA7136 multistandard 10-bit A/V decoder
2x Afatech AF9013S demodulator
2x NXP TDA18271 silicon tuner ic (digital/analog)

I've written af9013 frontend attach code but I'm having
problems with loading firmware.

If someone can scan the card on window$ and see what the
driver does, are there some gpios that turn on the frontend
would be nice (maybe also extract correct firmware)

What I did
---
started from saa716x tree
hg clone http://www.jusst.de/hg/saa716x/
and added the af9013 frontend.

It compiles fine, loads af9013 module and requests
firmware but it won't load

Firmware was downloaded from 
http://www.otit.fi/~crope/v4l-dvb/af9015/dvb-fe-af9013.fw 
Also tried another firmware for af9015 usb sticks

In the code I made a loop to try i2c addresses from 0x00-0x7f
for af9013 but so far not found the correct one

The patch avermedia-005.diff
-
diff -pur saa716x.orig/linux/drivers/media/common/saa716x/saa716x_hybrid.c 
saa716x/linux/drivers/media/common/saa716x/saa716x_hybrid.c
--- saa716x.orig/linux/drivers/media/common/saa716x/saa716x_hybrid.c
2010-06-20 13:24:18.0 +0200
+++ saa716x/linux/drivers/media/common/saa716x/saa716x_hybrid.c 2010-08-10 
23:34:42.901211071 +0200
@@ -35,6 +35,9 @@
 #include "zl10353.h"
 #include "mb86a16.h"
 #include "tda1004x.h"
+#include "af9013.h"
+#include "tda18271.h"
+
 
 unsigned int verbose;
 module_param(verbose, int, 0644);
@@ -540,6 +543,82 @@ static struct saa716x_config saa716x_ave
.i2c_rate   = SAA716x_I2C_RATE_100,
 };
 
+#define SAA716x_MODEL_AVERMEDIA_A188   "Avermedia AVerTV Duo Hybrid PCI-E II 
A188"
+#define SAA716x_DEV_AVERMEDIA_A188 "2x DVB-T + 2x Analaog"
+
+static int load_config_avera188(struct saa716x_dev *saa716x)
+{
+   int ret = 0;
+   return ret;
+}
+
+/* probably af9013 is used in parallel mode 
+** common demod_address are 0x38 and 0x3a
+** tuner is nxp tda18271
+*/
+struct af9013_config avera188_af9013_config = {
+   .demod_address = 0x38,
+   .output_mode = AF9013_OUTPUT_MODE_PARALLEL,
+   .api_version = { 0, 1, 9, 0 },
+   .gpio[0] = AF9013_GPIO_HI,
+   .gpio[3] = AF9013_GPIO_TUNER_ON,
+
+/*
+   .demod_address = 0x3a,
+   .output_mode = AF9013_OUTPUT_MODE_SERIAL,
+   .api_version = { 0, 1, 9, 0 },
+   .gpio[0] = AF9013_GPIO_TUNER_ON,
+   .gpio[1] = AF9013_GPIO_LO,
+*/
+};
+
+
+static int saa716x_avera188_frontend_attach(struct saa716x_adapter *adapter, 
int count)
+{
+   struct saa716x_dev *saa716x = adapter->saa716x;
+   struct saa716x_i2c *i2c = &saa716x->i2c[count];
+int i;
+
+   if (count  == 0) {
+   dprintk(SAA716x_DEBUG, 1, "Adapter (%d) SAA716x frontend Init", 
count);
+   dprintk(SAA716x_DEBUG, 1, "Adapter (%d) Device ID=%02x", count, 
saa716x->pdev->subsystem_device);
+   dprintk(SAA716x_ERROR, 1, "Adapter (%d) Power ON", count);
+   saa716x_gpio_write(saa716x, GPIO_14, 1);
+   msleep(100);
+
+   for(i = 0; i < 1; i++)
+   { /* try all addresses in a loop */
+   /* avera188_af9013_config.demod_address = i; */
+
+printk("Trying af9013 frontend on I2C address 0x%02x", 
avera188_af9013_config.demod_address);
+   adapter->fe = af9013_attach(&avera188_af9013_config, 
&i2c->i2c_adapter);
+   if (adapter->fe == NULL) {
+   dprintk(SAA716x_ERROR, 1, "Frontend attach failed");
+   /* return -ENODEV; */
+   } else {
+   dprintk(SAA716x_ERROR, 1, "Done!");
+   return 0;
+   }
+   }
+   return -ENODEV;
+   
+   }
+
+   return 0;
+}
+
+static struct saa716x_config saa716x_avera188_config = {
+   .model_name = SAA716x_MODEL_AVERMEDIA_A188,
+   .dev_type   = SAA716x_DEV_AVERMEDIA_A188,
+   .boot_mode  = SAA716x_EXT_BOOT,
+   .load_config= &load_config_avera188,
+   .adapters   = 1,
+   .frontend_attach= saa716x_avera188_frontend_attach,
+   .irq_handler= saa716x_hybrid_pci_irq,
+   .i2c_rate   = SAA716x_I2C_RATE_100,
+};
+
+
 static struct pci_device_id saa716x_hybrid_pci_table[] = {
 
MAKE_ENTRY(TWINHAN_TECHNOLOGIES, TWINHAN_VP_6090, SAA7162, 
&saa716x_vp6090_config),
@@ -547,6 +626,7 @@ static struct pci_device_id saa716x_hybr
MAKE_ENTRY(NXP_REFERENCE_BOARD, PCI_ANY_ID, SAA7160, 
&saa716x_nemo_config),
MAKE_ENTRY(AVERMEDIA, AVERMEDIA_HC82, SAA7160, 
&saa716x_averhc82_config),
MAKE_ENTRY(AVERMEDIA, AVERMEDIA_H788, SAA7160, 
&saa716x_averh788_config),
+   MAKE_ENTRY(AVERMEDIA, AVERMEDIA_A188, SA

Avermedia dvb-t hybrid A188

2010-08-06 Thread Davor Emard
HI

For the card AVerTV Duo Hybrid PCI-E II (A188)

I have compiled correctly saa716x driver with kernel 2.6.32.17 
I have to modify a card id with this patch:

--- linux/drivers/media/common/saa716x/saa716x_hybrid.h~2010-06-20
--- 13:24:18.0 +0200
+++ linux/drivers/media/common/saa716x/saa716x_hybrid.h 2010-08-06
12:34:49.795695203 +0200
@@ -6,6 +6,6 @@
 
 #define TWINHAN_VP_60900x0027
 #define AVERMEDIA_HC82 0x2355
-#define AVERMEDIA_H788 0x1455
+#define AVERMEDIA_H788 0x1855
 
 #endif /* __SAA716x_HYBRID_H */

And the driver cleanly compiles with make and installs with make install
also it cleanly loads:

Aug  6 13:25:49 elf kernel: SAA716x Hybrid :02:00.0: PCI INT A -> 
Link[LN0A] -> GSI 19 (level, low) -> IRQ 19  
Aug  6 13:25:49 elf kernel: SAA716x Hybrid :02:00.0: setting latency timer 
to 64
Aug  6 13:25:49 elf kernel: DVB: registering new adapter (SAA716x dvb adapter)

Card registers dvb demux entries, but there's no frontend:

ls -al /dev/dvb/adapter0/
total 0
drwxr-xr-x  2 root root 100 2010-08-06 13:25 .
drwxr-xr-x  3 root root  60 2010-08-06 13:25 ..
crw-rw+ 1 root video 212, 0 2010-08-06 13:25 demux0
crw-rw+ 1 root video 212, 1 2010-08-06 13:25 dvr0
crw-rw+ 1 root video 212, 2 2010-08-06 13:25 net0

Maybe someone has idea how to get frontend working :)

d.
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] Compro Videomate T750F Vista digital+analog support

2010-06-03 Thread Davor Emard
> Didn't have time to look for gpios, tomorrow I will have. But I can
> tell that this change is not working for me:
> 
>   case SAA7134_BOARD_VIDEOMATE_T750:
>   dev->has_remote = SAA7134_REMOTE_GPIO;
>   saa_andorl(SAA7134_GPIO_GPMODE0 >> 2,   0x8082c000, 0x8082c000);
>   saa_andorl(SAA7134_GPIO_GPSTATUS0 >> 2, 0x8082c000, 0x0080c000);
>   break;

Thanx for testing it out, If it doesn't work, try this:

saa_andorl(SAA7134_GPIO_GPMODE0 >> 2,   /* keep */ 0x8082c000, /* keep */   
0x8082c000);
saa_andorl(SAA7134_GPIO_GPSTATUS0 >> 2, /* keep */ 0x8082c000, /* modify */ 
0x0080c000);

modify only the indicated number, try 0, try 0x8082c000 and if
you have time try all combinations of bits 0x8082c000 optionally set to 0
e.g. 0x8002c000, 0x8080c000, 0x80828000, 0x0080c000 etc...

It is possible that you and I don't have same revision of the
card and you need a slightly different initialization procedure.
If you get something to work for your card then I can try it back at
mine there's a changes that we get a common setup which works for both.

> OK, I'm not having any personal opinion about the keys nor a
> application which I'm using, I'm just noticed that the keys differ
> against standard keys defined at linuxtv wiki. But if the keys at
> wiki are not correct, then perhaps should we change them there and
> let all use the same keys.
> 
> If we have standard keys, than userspace applications programmers
> can make a use of it and assign the keys to their applications and
> to have just work experience to their users. But maybe I'm terrible
> wrong...

Yeah I know, almost every remote has its own logic so it seems my version
is yet-another-bla... I'm hoping for upcoming X11 xinput2 layer hopefully 
get full support of MCE remotes and nicely integrate with X applications
therefore I produced MCE stuff here for a challenge to the xinput2

For integrated TV and PC to work well we need all remote keys be different 
than any other existing key used by keyboard.

Without this, when X11 based TV view application gets "out of input focus"
means it becomes irresponsive to ambiguity keys on the remote controller 
(in this example cursor keys) and we need to first use mouse to click on 
TV application and then continue using cursors on remote control 
(imagine how practical it is to make mouse click when watching TV from sofa) 

best regards, d.
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] Compro Videomate T750F Vista digital+analog support

2010-06-02 Thread Davor Emard
HI!

Have you tested my lastest GPIO suggestion, or come up
with your own initialization? Does it allow
to load firmware without windows booting?

Key namings of the remote must be some from linux input.h
I welcome you to change whatever is needed to fit any of your
application if current scheme is not suitable. I use VDR whcih 
can adapt to just anything event layer gives.

d.
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] Compro Videomate T750F Vista digital+analog support

2010-06-02 Thread Davor Emard
> >HI!
> >
> >I just went to compro website and have seen that *f cards
> >have some identical MCE-alike but also slightly different remotes,
> >so we have to invent some better names to distinguish between
> >them (compro itself might have some names for them)
> >
> Tested your new patch with Gerd's input-events utility. input-events
> is reporting wrong key (KEY_MIN_INTERESTING) for KEY_MUTE, not sure
> why.

HI! Is at least tuner (and loading of the firmware) working now without 
preinitialization with windows?

About remote keys:
My evtest in debian is outdated (probably also your input-events). 
Not only it doesn't support all KEY_*s but also for some existing keys it 
reports the wrong names (like KEY_MIN_INTERESTING). 

Try it with xev, at least MUTE should work correctly there (reports 
XF86AudioMute).
However KEY_NUMERIC_* won't be recognized by xev because X11 doesn't map
them to anything by default

However only the input layer keycodes matter, we can ignore it's name 
interpreted 
by some application (every app may name it different or even wrong...).

The tools should be compiled against latest /usr/include/linux/input.h
and have all new key names there (and corrected some existing names).

My intention was to map remote key pictograms to most appropriate
event in latest kernel's input.h, avoiding PC keyboard ambiguity as
much as I can.

Because in the kernel they have expanded input.h with a number of new keys to 
better cover MCE remotes and new media keyboards, so you get those ??? for
old apps but the keycode numbers should still be correct according to the 
kernel's input layer. input layer Applications map key events to the keycode 
numbers, and have freedom to give any name to the key.

The KEY_PREVIOUS and KEY_NEXT are actually keys for prev page and
next page on the keyboard, used for scrolling text. PREVIOUSSONG 
NEXTSIONG are used to skip to songs and are also expanded to skipping
to video DVD chapters, so I thought they are more appropriate for the
remote pictograms "|<" ">|" at VCR key group. I wanted to avoid ambiguity
between keyboard events and remote, however I still have KEY_ENTER
and KEY_BACKSPACE and the cursors, which is in ambiguity to the
normal keyboard - any idea what to replace them with in MCE style?

I have no issue of mapping all current keys to VDR. If you have any real issue 
of
mapping keys to some other TV view application or to the linux console or X11, 
feel free to change them and suggest a patch

d.
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Is AVerTV Duo Hybrid PCI-E II A188 supported

2010-06-02 Thread Davor Emard
HI

I'm thinking of AVerTV Duo Hybrid PCI-E II A188 as
it has remote on support. Anybody got it running on linux?

d.
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] Compro Videomate T750F Vista digital+analog support

2010-05-31 Thread Davor Emard
HI!

I just went to compro website and have seen that *f cards
have some identical MCE-alike but also slightly different remotes, 
so we have to invent some better names to distinguish between 
them (compro itself might have some names for them)

d.
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] Compro Videomate T750F Vista digital+analog support

2010-05-30 Thread Davor Emard
HI!

Can you also try this GPIO settings? It's my try to use last summer's
registers dump to setup gpio mask and value

case SAA7134_BOARD_VIDEOMATE_T750:
dev->has_remote = SAA7134_REMOTE_GPIO;
saa_andorl(SAA7134_GPIO_GPMODE0 >> 2,   0x8082c000, 0x8082c000);
saa_andorl(SAA7134_GPIO_GPSTATUS0 >> 2, 0x8082c000, 0x0080c000);
break;
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] Compro Videomate T750F Vista digital+analog support

2010-05-30 Thread Davor Emard
HI

> 
> Forget about the later, is in new file mode.

I wanted the new file but I don't know hg diff too much
so I just manually cat >> to append to the hg diff output...

d.
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] Compro Videomate T750F Vista digital+analog support

2010-05-30 Thread Davor Emard
rs/media/video/saa7134/saa7134-input.c
--- a/linux/drivers/media/video/saa7134/saa7134-input.c Tue May 25 23:50:51 
2010 -0400
+++ b/linux/drivers/media/video/saa7134/saa7134-input.c Mon May 31 01:18:12 
2010 +0200
@@ -865,6 +865,11 @@
mask_keycode = 0x003f00;
mask_keydown = 0x04;
break;
+   case SAA7134_BOARD_VIDEOMATE_T750:
+   ir_codes = RC_MAP_VIDEOMATE_F;
+   mask_keycode = 0x003f00;
+   mask_keyup   = 0x04;
+   break;
case SAA7134_BOARD_LEADTEK_WINFAST_DTV1000S:
ir_codes = RC_MAP_WINFAST;
mask_keycode = 0x5f00;
diff -r 304cfde05b3f linux/include/media/rc-map.h
--- a/linux/include/media/rc-map.h  Tue May 25 23:50:51 2010 -0400
+++ b/linux/include/media/rc-map.h  Mon May 31 01:18:12 2010 +0200
@@ -113,6 +113,7 @@
 #define RC_MAP_TT_1500   "rc-tt-1500"
 #define RC_MAP_VIDEOMATE_S350"rc-videomate-s350"
 #define RC_MAP_VIDEOMATE_TV_PVR  "rc-videomate-tv-pvr"
+#define RC_MAP_VIDEOMATE_F   "rc-videomate-f"
 #define RC_MAP_WINFAST   "rc-winfast"
 #define RC_MAP_WINFAST_USBII_DELUXE  "rc-winfast-usbii-deluxe"
 /*
--- v4l-dvb/linux/drivers/media/IR/keymaps/rc-videomate-f.c.orig
2010-05-31 01:31:03.0 +0200
+++ v4l-dvb/linux/drivers/media/IR/keymaps/rc-videomate-f.c 2010-05-31 
00:54:31.0 +0200
@@ -0,0 +1,119 @@
+/* videomate-f.h - Keytable for videomate f series Remote Controller
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ */
+
+#include 
+
+/*
+Compro videomate vista T750F remote
+---
+Emard 2010-05-09 
+POWER
+VIDEO   RADIO   AUDIO  CAMERA 
+PVR EPG TV  DVD  SUBTITLE
+
+  UP
+ LEFT OK RIGHT
+ DOWN
+
+BACK MENUINFO
+
+VOLUMEUPCHANNELUP
+ MUTE
+VOLUMEDOWNCHANNELDOWN
+
+RECORD   STOP
+REWIND   PLAY FASTFORWARD
+PREVIOUSSONG   PLAYPAUSE NEXTSONG
+
+NUMERIC_1  NUMERIC_2 NUMERIC_3
+NUMERIC_4  NUMERIC_5 NUMERIC_6
+NUMERIC_7  NUMERIC_8 NUMERIC_9
+NUMERIC_STAR   NUMERIC_0 NUMERIC_POUND
+
+CLEARZOOM ENTER
+
+RED  GREEN  YELLOW BLUETEXT
+*/
+static struct ir_scancode videomate_f[] = {
+   { 0x01, KEY_POWER},
+   { 0x31, KEY_VIDEO},
+   { 0x33, KEY_RADIO},
+   { 0x2f, KEY_AUDIO},
+   { 0x30, KEY_CAMERA}, /* pictures */
+   { 0x2d, KEY_PVR},/* Recordings */
+   {   23, KEY_EPG},
+   {   44, KEY_TV},
+   {   43, KEY_DVD},
+   { 0x32, KEY_SUBTITLE},
+   {   17, KEY_UP},
+   {   19, KEY_LEFT},
+   {   21, KEY_OK},
+   {   20, KEY_RIGHT},
+   {   18, KEY_DOWN},
+   {   22, KEY_BACK},
+   { 0x02, KEY_MENU},
+   { 0x04, KEY_INFO},
+   { 0x05, KEY_VOLUMEUP},
+   { 0x06, KEY_VOLUMEDOWN},
+   { 0x03, KEY_MUTE},
+   { 0x07, KEY_CHANNELUP},
+   { 0x08, KEY_CHANNELDOWN},
+   { 0x0c, KEY_RECORD},
+   { 0x0e, KEY_STOP},
+   { 0x0a, KEY_REWIND},
+   { 0x0b, KEY_PLAY},
+   { 0x09, KEY_FASTFORWARD},
+   { 0x10, KEY_PREVIOUSSONG},
+   { 0x0d, KEY_PLAYPAUSE},
+   { 0x0f, KEY_NEXTSONG},
+   {   30, KEY_NUMERIC_1},
+   { 0x1f, KEY_NUMERIC_2},
+   { 0x20, KEY_NUMERIC_3},
+   { 0x21, KEY_NUMERIC_4},
+   { 0x22, KEY_NUMERIC_5},
+   { 0x23, KEY_NUMERIC_6},
+   { 0x24, KEY_NUMERIC_7},
+   { 0x25, KEY_NUMERIC_8},
+   { 0x26, KEY_NUMERIC_9},
+   { 0x2a, KEY_NUMERIC_STAR},
+   {   29, KEY_NUMERIC_0},
+   {   41, KEY_NUMERIC_POUND},
+   {   39, KEY_CLEAR},
+   { 0x34, KEY_ZOOM},
+   { 0x28, KEY_ENTER},
+   {   25, KEY_RED},
+   {   26, KEY_GREEN},
+   {   27, KEY_YELLOW},
+   {   28, KEY_BLUE},
+   {   24, KEY_TEXT},
+};
+
+static struct rc_keymap videomate_f_map = {
+   .map = {
+   .scan= videomate_f,
+   .size= ARRAY_SIZE(videomate_f),
+   .ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */
+   .name= RC_MAP_VIDEOMATE_F,
+   }
+};
+
+static int __init init_rc_map_videomate_f(void)
+{
+   return ir_register_map(&videomate_f_map);
+}
+
+static void __exit exit_rc_map_videomate_f(void)
+{
+   ir_unregister_map(&videomate_f_map);
+}
+
+module_init(init_rc_map_videomat

Re: TBS 6980 Dual Tuner PCI-e card.....not in Wiki at all?

2010-05-30 Thread Davor Emard
> hello, i can't comment on your questions about the Wiki, but i made
> the driver for TBS 6980 and i can ensure you that the driver will be
> released as open-source under GPL as soon as i have permission to do
> that, but compared to other cards at least even at the moment you can

Does this card need some firmware (and if it needs is it open or closed 
source)

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] Compro videomate T750F DVB-T mode works now

2010-05-28 Thread Davor Emard
> just for reference, here is a link about what we tried last summer.
> 
> The followups do have also some regspy logs.
> 
> http://www.mail-archive.com/linux-media@vger.kernel.org/msg07478.html
> 

HI, thanks I have see your posts about this but have not yet carefully 
studied this sniffage of what window$ does to the card. I think we have
to re-look at this and try to closely copy this GPIO activity in order
to more reliably initialize the card

Emard
 
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] Compro videomate T750F DVB-T mode works now

2010-05-28 Thread Davor Emard
On Thu, May 27, 2010 at 02:17:04PM -0300, Mauro Carvalho Chehab wrote:
> Em Sat, 8 May 2010 01:50:24 +0200
> Emard  escreveu:
> 
> > HI
> > 
> > ... tried to post this few times to thhis list I don't know if
> > it has made it maybe this time it will appear on the mailing list
> > 
> > I have european version of Compro Videomate T750F Vista
> > hybrid dvb-t + tv (PAL) + FM card. In kernels up to date (2.6.33.3)
> > it didn't want to initialize in analog mode (tuner xc2028 always failed).
> > 
> > Here's sligthly adapted patch from
> > http://www.linuxtv.org/pipermail/linux-dvb/2008-May/025945.html
> > that works for me. It disables analog tuner xc2028 which doesn't
> > work (maybe because current driver is only for ntsc version of the
> > card) and enables digital tuner that consists of zarlink 10353 and
> > qt1010. Tested and works on kernel 2.6.33.3
> 
> xc2028 tuner driver supports PAL standards as well. If it is not working fine,
> it is probably because the GPIO's are wrong. You need to run REGSPY.EXE 
> program,
> from DScaler project, to get the proper gpio values for your board.
> 
> Btw, please send your Signed-off-by: on your patches.
> > 
> > Best regards, Emard
> > 
> > --- linux-2.6.33.3/drivers/media/video/saa7134/saa7134-cards.c.orig 
> > 2010-05-02 00:06:45.0 +0200
> > +++ linux-2.6.33.3/drivers/media/video/saa7134/saa7134-cards.c  
> > 2010-05-02 01:20:50.0 +0200
> > @@ -4883,10 +4883,11 @@ struct saa7134_board saa7134_boards[] =
> > /* John Newbigin  */
> > .name   = "Compro VideoMate T750",
> > .audio_clock= 0x00187de7,
> > -   .tuner_type = TUNER_XC2028,
> > +   .tuner_type = TUNER_ABSENT,

HI!

Ignore this patch, this is early version that breaks analog part just
to get dvb-t working. 

I had posted improved patch (I called it v17, should be on this list as well) 
with early supports for both analog dvb-t and radio on 2.6.33.4 (also the 
remote, but the 
IR system had changed so we may fix remote later... but that's easy :). We
have another issues

Patch v17 which works on my case from cold reboot and at least first
time VDR is started. Subsequent restarts of VDR may prevent DVB-T tuner
from changing frequency - it stays and receives the previos frequency
at which VDR stopped. But sometimes after frew minutes VDR starts working
again tuning to different freq - strange behaviour really maybe it's not
only because of compro patch, could be firmware issue too)

While Samuel is testing this he had some positive results but so far but he 
needs 
to preinitialize the card with window$ before the firmware gets loaded :(.
I don't need this (anyway my motherboard removes PCI power for 2 seconds during 
restart so I even cannot try such intialization method)

Emard
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] Compro Videomate T750F Vista digital+analog support

2010-05-27 Thread Davor Emard
> The IR code suffered a major change during this development cycle. So, this 
> patch doesn't apply
> anymore.

OK, let's delay IR part for a while I'd like to try the new IR code,
mainly because of keystroke loss issue if the new code perhaps
works better.

In this patch is just my suggestion of remote key events to generate, 
(this a MCE alike remote) as you can see I avoided normal key events 
from ordinary keyboard (numeric 0-9) because now in the kernel are more 
suitable events for this for the OS to immediately recognize related 
keypress "1" and start the related application (e.g. TV viewer)

Emard
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] Compro Videomate T750F Vista digital+analog support

2010-05-27 Thread Davor Emard
Another idea:

compare syslog line 
May 27 14:33:42 emard kernel: saa7133[0]: board init: gpio is 84bf00

when trying to load firmware without preparing with windows and
after windows - see if there's a difference between bits of the hex
value (0x84bf00 in my case)

that's a probable clue to modify this 0x0008000 value to either
include the missing bits or remove the excess ones

Emard
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] Compro Videomate T750F Vista digital+analog support

2010-05-27 Thread Davor Emard
HI

This code is responsible to prepare the card to load the firmware
I have no true clue what it actually does, possible it is a
reset sequence for onboard tuner chips or just a matter of 
enabling some power to them. 

I have googled for compro 750 related discussions and seen various posts 
so I narrowed to this. Feel free to either comment out the code or
try slightly different values to see if they leat to more reliable
loading of the firmware at your hardware

+   case SAA7134_BOARD_VIDEOMATE_T750:
+   saa7134_set_gpio(dev, 20, 0);
+   msleep(10);
+   saa7134_set_gpio(dev, 20, 1);
+   break;

+   case SAA7134_BOARD_VIDEOMATE_T750:
+   dev->has_remote = SAA7134_REMOTE_GPIO;
+   saa_andorl(SAA7134_GPIO_GPMODE0 >> 2,   0x8000, 0x8000);
+   saa_andorl(SAA7134_GPIO_GPSTATUS0 >> 2, 0x8000, 0x8000);
+   break;

some similar cards use instead of 0x8000 use 0xC000
also it's possible to try other values if they can help on
your hardware (I tried a lots of them, some work, some don't 
but with not obvious improvement for my card so I left the 
minimum that works)

Emard
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Avermedia a800 suspend crash

2010-05-15 Thread davor emard
HI

Avermedia a800 usb2.0 crashes at 2.6.33.3 when the vdr is running
and laptop goes to suspend/hibernate

Davor
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] Compro Videomate T750F Vista digital+analog support

2010-05-11 Thread davor emard
HI

I tried to fix unreliable IR remote keys (cca 10% lost key presses),
the similar problem has been reported on the same card with
windows driver too and I had other saa7134 analog tv card also
loosing IR keys

I have tried modifying saa7134-input.c to use gpio polling with interval
of 15ms and 5ms but it did not help - always some IR key presses are
lost.

Is it any workarond possible for lost keys, that's pretty annoying?
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] Compro Videomate T750F Vista DVB-T support

2010-05-02 Thread davor emard
HI

I have european version of Compro Videomate T750F Vista
hybrid dvb-t + tv (PAL) + FM card. In kernels up to date (2.6.33.3)
it didn't want to initialize in analog mode (tuner xc2028 always failed).

Here's sligthly adapted patch from
http://www.linuxtv.org/pipermail/linux-dvb/2008-May/025945.html
that works for me. It disables analog tuner xc2028 which doesn't
work (maybe because current driver is only for ntsc version of the
card) and enables digital tuner that consists of zarlink 10353 and
qt1010. Tested and works on kernel 2.6.33.3

Best regards, Emard

--- linux-2.6.33.3/drivers/media/video/saa7134/saa7134-cards.c.orig
 2010-05-02 00:06:45.0 +0200
+++ linux-2.6.33.3/drivers/media/video/saa7134/saa7134-cards.c
2010-05-02 01:20:50.0 +0200
@@ -4883,10 +4883,11 @@ struct saa7134_board saa7134_boards[] =
/* John Newbigin  */
.name   = "Compro VideoMate T750",
.audio_clock= 0x00187de7,
-   .tuner_type = TUNER_XC2028,
+   .tuner_type = TUNER_ABSENT,
.radio_type = UNSET,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
+   .mpeg   = SAA7134_MPEG_DVB,
.inputs = {{
.name   = name_tv,
.vmux   = 3,
@@ -7192,6 +7193,7 @@ int saa7134_board_init2(struct saa7134_d
case SAA7134_BOARD_AVERMEDIA_SUPER_007:
case SAA7134_BOARD_TWINHAN_DTV_DVB_3056:
case SAA7134_BOARD_CREATIX_CTX953:
+case SAA7134_BOARD_VIDEOMATE_T750:
{
/* this is a hybrid board, initialize to analog mode
 * and configure firmware eeprom address
--- linux-2.6.33.3/drivers/media/video/saa7134/saa7134-dvb.c.orig
 2010-05-01 23:57:08.0 +0200
+++ linux-2.6.33.3/drivers/media/video/saa7134/saa7134-dvb.c
2010-05-02 00:51:44.0 +0200
@@ -55,6 +55,7 @@
 #include "tda8290.h"

 #include "zl10353.h"
+#include "qt1010.h"

 #include "zl10036.h"
 #include "zl10039.h"
@@ -886,6 +887,17 @@ static struct zl10353_config behold_x7_c
.disable_i2c_gate_ctrl = 1,
 };

+static struct zl10353_config videomate_t750_zl10353_config = {
+   .demod_address  = 0x0f,
+   .no_tuner = 1,
+   .parallel_ts = 1,
+};
+
+static struct qt1010_config videomate_t750_qt1010_config = {
+   .i2c_address = 0x62
+};
+
+
 /* ==
  * tda10086 based DVB-S cards, helper functions
  */
@@ -1556,6 +1568,26 @@ static int dvb_init(struct saa7134_dev *
__func__);

break;
+/*FIXME: What frontend does Videomate T750 use? */
+case SAA7134_BOARD_VIDEOMATE_T750:
+printk("Compro VideoMate T750 DVB setup\n");
+fe0->dvb.frontend = dvb_attach(zl10353_attach,
+&videomate_t750_zl10353_config,
+&dev->i2c_adap);
+if (fe0->dvb.frontend != NULL) {
+printk("Attaching pll\n");
+// if there is a gate function then the i2c
bus breaks.!
+fe0->dvb.frontend->ops.i2c_gate_ctrl = 0;
+
+if (dvb_attach(qt1010_attach,
+   fe0->dvb.frontend,
+   &dev->i2c_adap,
+   &videomate_t750_qt1010_config) == NULL)
+{
+wprintk("error attaching QT1010\n");
+}
+}
+break;
case SAA7134_BOARD_ZOLID_HYBRID_PCI:
fe0->dvb.frontend = dvb_attach(tda10048_attach,
   &zolid_tda10048_config,
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


kernel 2.6.28 oops with saa7124

2009-01-19 Thread davor emard
HI

I have compro videomate t750f and modprobe saa7134 creates
this kernel oops on 2.6.28

On 2.6.26.8 it didn't crash but it didn't want to tune TV nor radio
either I have PAL and probabley this xc3028 works only for australia?

Best regards, Davor
Jan 18 23:17:48 emard kernel: saa7130/34: v4l2 driver version 0.2.14 loaded
Jan 18 23:17:48 emard kernel: saa7134 :05:00.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
Jan 18 23:17:48 emard kernel: saa7133[0]: found at :05:00.0, rev: 209, irq: 16, latency: 64, mmio: 0xfebff800
Jan 18 23:17:48 emard kernel: saa7133[0]: subsystem: 185b:c900, board: Compro VideoMate T750 [card=139,autodetected]
Jan 18 23:17:48 emard kernel: saa7133[0]: board init: gpio is 84bf00
Jan 18 23:17:48 emard kernel: saa7133[0]: Oops: IR config error [card=139]
Jan 18 23:17:48 emard kernel: saa7133[0]: i2c eeprom 00: 5b 18 00 c9 54 20 1c 00 43 43 a9 1c 55 d2 b2 92
Jan 18 23:17:48 emard kernel: saa7133[0]: i2c eeprom 10: 00 ff 86 0f ff 20 ff ff ff ff ff ff ff ff ff ff
Jan 18 23:17:48 emard kernel: saa7133[0]: i2c eeprom 20: 01 40 01 02 02 01 03 01 08 ff 00 87 ff ff ff ff
Jan 18 23:17:48 emard kernel: saa7133[0]: i2c eeprom 30: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
Jan 18 23:17:48 emard kernel: saa7133[0]: i2c eeprom 40: ff d7 00 c4 86 1e 05 ff 02 c2 ff 01 c6 ff 05 ff
Jan 18 23:17:48 emard kernel: saa7133[0]: i2c eeprom 50: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff cb
Jan 18 23:17:48 emard kernel: saa7133[0]: i2c eeprom 60: 35 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
Jan 18 23:17:48 emard kernel: saa7133[0]: i2c eeprom 70: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
Jan 18 23:17:48 emard kernel: saa7133[0]: i2c eeprom 80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
Jan 18 23:17:48 emard kernel: saa7133[0]: i2c eeprom 90: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
Jan 18 23:17:48 emard kernel: saa7133[0]: i2c eeprom a0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
Jan 18 23:17:48 emard kernel: saa7133[0]: i2c eeprom b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
Jan 18 23:17:48 emard kernel: saa7133[0]: i2c eeprom c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
Jan 18 23:17:48 emard kernel: saa7133[0]: i2c eeprom d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
Jan 18 23:17:48 emard kernel: saa7133[0]: i2c eeprom e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
Jan 18 23:17:48 emard kernel: saa7133[0]: i2c eeprom f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
Jan 18 23:17:48 emard kernel: tuner' 4-0061: chip found @ 0xc2 (saa7133[0])
Jan 18 23:17:48 emard kernel: tuner' 4-0062: chip found @ 0xc4 (saa7133[0])
Jan 18 23:17:48 emard kernel: tuner' 4-0063: chip found @ 0xc6 (saa7133[0])
Jan 18 23:17:48 emard kernel: tuner' 4-0068: chip found @ 0xd0 (saa7133[0])
Jan 18 23:17:48 emard kernel: xc2028 4-0061: creating new instance
Jan 18 23:17:48 emard kernel: xc2028 4-0061: type set to XCeive xc2028/xc3028 tuner
Jan 18 23:17:48 emard kernel: BUG: unable to handle kernel NULL pointer dereference at 
Jan 18 23:17:48 emard kernel: IP: [<>] 0x0
Jan 18 23:17:48 emard kernel: PGD 70b8b067 PUD 7084f067 PMD 0 
Jan 18 23:17:48 emard kernel: Oops: 0010 [#1] PREEMPT SMP 
Jan 18 23:17:48 emard kernel: last sysfs file: /sys/devices/pci:00/:00:1e.0/:05:03.0/resource
Jan 18 23:17:48 emard kernel: CPU 2 
Jan 18 23:17:48 emard kernel: Modules linked in: tuner tea5767 tda8290 tuner_xc2028 xc5000 tda9887 tuner_simple tuner_types mt20xx tea5761 saa7134(+) ir_common compat_ioctl32 v4l2_common tveeprom rfcomm l2cap battery ppdev lp xt_hashlimit iptable_raw xt_comment xt_owner xt_recent xt_iprange xt_policy xt_multiport ipt_ULOG ipt_TTL ipt_ttl ipt_REJECT ipt_REDIRECT ipt_NETMAP ipt_MASQUERADE ipt_LOG ipt_ah ipt_addrtype xt_tcpmss xt_pkttype xt_NFQUEUE xt_MARK xt_mark xt_mac xt_limit xt_length xt_helper xt_conntrack xt_CONNMARK xt_connmark xt_CLASSIFY xt_tcpudp xt_state iptable_nat nf_nat iptable_mangle nfnetlink iptable_filter ip_tables x_tables fuse aes_x86_64 aes_generic coretemp hwmon_vid hwmon parport_pc parport tun kvm_intel kvm sbp2 hid_dell hid_pl hid_cypress hid_gyration hid_bright hid_sony hid_samsung hid_microsoft hid_monterey hid_ezkey hid_apple hid_a4tech hid_logitech hci_usb bluetooth hid_cherry hid_sunplus hid_petalynx hid_belkin hid_chicony usbhid hid dvb_ttpci lnbp21 l64781 saa7146_vv saa7146 videobu
Jan 18 23:17:48 emard kernel: _dma_sg videobuf_core snd_hda_intel videodev dvb_usb_a800 dvb_usb_dibusb_common dvb_pll v4l1_compat serio_raw mt2060 rtc_cmos rtc_core rtc_lib ves1820 tda8083 sp8870 stv0297 ves1x93 ttpci_eeprom dib3000mc dibx000_common stv0299 dvb_usb pcspkr snd_pcm_oss snd_mixer_oss dvb_core i2c_i801 snd_pcm iTCO_wdt iTCO_vendor_support snd_page_alloc snd_hwdep snd_seq_oss snd_seq_midi snd_rawmidi snd_seq_midi_event snd_seq snd_timer snd_seq_device snd button ohci1394 ieee1394 skge sky2 ehci_hcd uhci_hcd usbcore sg sr_mod cdrom thermal processor fan
Jan 18 23:17:48 emard kernel: Pid: 18900, c