From: Emard <davoremard@gmail.com>
To: linux-media@vger.kernel.org
Subject: [PATCH] Compro Videomate T750F Vista digital+analog support
Date: Sat, 8 May 2010 18:06:28 +0200 [thread overview]
Message-ID: <20100508160628.GA6050@z60m> (raw)
HI
I've been fixing this driver a bit in order to unify dvb-t and
loading of xc2028 firmware for analog tv and fm radio without
failure when cold booted directly to linux
(some say that xc2028 would load if card is "prepared" by previously
boothing window$ but franky I was too bothered to go this far)
So this is my v07 of the patch that even registers IR remote device
(I copied the code for compro S350)
but it recognizes remote IR keypresses but all keys are the same -
generate the same GPIO value thus having same keycode 0x3f so it's
not too useable right now if you want a remote with more than one
button.
Can someone knowlegeable of saa7134 remotes review the code and suggest
some fix?
--- linux-2.6.33.3/drivers/media/video/saa7134/saa7134-cards.c.orig 2010-05-08 16:13:28.000000000 +0200
+++ linux-2.6.33.3/drivers/media/video/saa7134/saa7134-cards.c 2010-05-08 16:46:19.000000000 +0200
@@ -4885,8 +4885,9 @@ struct saa7134_board saa7134_boards[] =
.audio_clock = 0x00187de7,
.tuner_type = TUNER_XC2028,
.radio_type = UNSET,
- .tuner_addr = ADDR_UNSET,
+ .tuner_addr = 0x61,
.radio_addr = ADDR_UNSET,
+ .mpeg = SAA7134_MPEG_DVB,
.inputs = {{
.name = name_tv,
.vmux = 3,
@@ -6550,6 +6551,11 @@ static int saa7134_xc2028_callback(struc
msleep(10);
saa7134_set_gpio(dev, 18, 1);
break;
+ case SAA7134_BOARD_VIDEOMATE_T750:
+ saa7134_set_gpio(dev, 20, 0);
+ msleep(10);
+ saa7134_set_gpio(dev, 20, 1);
+ break;
}
return 0;
}
@@ -6956,6 +6962,11 @@ int saa7134_board_init1(struct saa7134_d
saa_andorl(SAA7134_GPIO_GPMODE0 >> 2, 0x00008000, 0x00008000);
saa_andorl(SAA7134_GPIO_GPSTATUS0 >> 2, 0x00008000, 0x00008000);
break;
+ case SAA7134_BOARD_VIDEOMATE_T750:
+ dev->has_remote = SAA7134_REMOTE_GPIO;
+ saa_andorl(SAA7134_GPIO_GPMODE0 >> 2, 0x00008000, 0x00008000);
+ saa_andorl(SAA7134_GPIO_GPSTATUS0 >> 2, 0x00008000, 0x00008000);
+ break;
}
return 0;
}
@@ -7192,6 +7203,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-08 16:20:12.000000000 +0200
+++ linux-2.6.33.3/drivers/media/video/saa7134/saa7134-dvb.c 2010-05-08 16:21:10.000000000 +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,
--- linux-2.6.33.3/drivers/media/video/saa7134/saa7134-input.c.orig 2010-05-08 16:52:20.000000000 +0200
+++ linux-2.6.33.3/drivers/media/video/saa7134/saa7134-input.c 2010-05-08 17:28:48.000000000 +0200
@@ -671,6 +671,11 @@ int saa7134_input_init1(struct saa7134_d
mask_keycode = 0x003f00;
mask_keydown = 0x040000;
break;
+ case SAA7134_BOARD_VIDEOMATE_T750:
+ ir_codes = &ir_codes_videomate_s350_table;
+ mask_keycode = 0x003f00;
+ mask_keydown = 0x040000;
+ break;
case SAA7134_BOARD_LEADTEK_WINFAST_DTV1000S:
ir_codes = &ir_codes_winfast_table;
mask_keycode = 0x5f00;
next reply other threads:[~2010-05-08 16:06 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-08 16:06 Emard [this message]
[not found] ` <op.vceiu5q13xmt7q@crni>
[not found] ` <AANLkTinMYcgG6Ac73Vgdx8NMYocW8Net6_-dMC3yEflQ@mail.gmail.com>
[not found] ` <AANLkTikbpZ0LM5rK70abVuJS27j0lT7iZs12DrSKB9wI@mail.gmail.com>
[not found] ` <op.vcfoxwnq3xmt7q@crni>
[not found] ` <20100509173243.GA8227@z60m>
2010-05-09 18:35 ` [PATCH] Compro Videomate T750F Vista digital+analog support Samuel Rakitničan
2010-05-09 18:48 ` Emard
2010-05-27 17:18 ` Mauro Carvalho Chehab
2010-05-28 6:48 ` Davor Emard
2010-05-09 23:15 ` Emard
2010-05-16 10:38 ` semiRocket
2010-05-16 10:41 ` Samuel Rakitničan
2010-05-23 17:40 ` Samuel Rakitničan
2010-05-27 16:55 ` Davor Emard
2010-05-27 17:15 ` Davor Emard
2010-05-30 23:48 ` Davor Emard
2010-05-31 0:27 ` hermann pitton
2010-05-31 0:33 ` hermann pitton
2010-05-31 1:07 ` Davor Emard
2010-05-31 7:52 ` Davor Emard
2010-06-02 11:28 ` semiRocket
2010-06-02 17:22 ` Davor Emard
2010-06-02 18:27 ` Davor Emard
2010-06-02 22:50 ` Samuel Rakitničan
2010-06-03 14:04 ` Davor Emard
2010-06-03 17:17 ` semiRocket
2010-06-03 17:15 ` semiRocket
2010-05-31 1:21 ` Davor Emard
2010-05-11 22:35 ` davor emard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100508160628.GA6050@z60m \
--to=davoremard@gmail.com \
--cc=linux-media@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).