* AverMedia A306 (cx23385, xc3028, af9013) (A577 too ?)
[not found] <S932606Ab1ESVJJ/20110519210909Z+86@vger.kernel.org>
@ 2011-05-19 21:13 ` wallak
2011-05-19 21:50 ` Antti Palosaari
2011-06-03 16:42 ` Daniel Gimpelevich
0 siblings, 2 replies; 5+ messages in thread
From: wallak @ 2011-05-19 21:13 UTC (permalink / raw)
To: linux-media
Hello All,
I've tried to use my A306 board on my system. All the main chips are fully
supported by linux.
At this stage the CX23385 and the tuner: xc3028 seem to respond properly. But
the DVB-T chip (af9013) is silent. Nevertheless both chips are visible on the
I2C bus.
I've no full datasheet of theses chips. with exception of the af9013 where this
information is available:
http://wenku.baidu.com/view/42240f72f242336c1eb95e08.html
At this stage the CLK signal of the DVB-T chip may be missing or something is
wrong elsewhere.
If you have the datasheets... Any help will be appreciated.
Best Regards,
Wallak.
diff -u -r -b -B -w -x '*.o' -x '*.cmd' -x '*.ko' -x '*.mod.c' -x 'modules.*'
tmp/linux-2.6.37.6/drivers/media/common/tuners/tuner-xc2028.c
linux-2.6.37.6-mdf/drivers/media/common/tuners/tuner-xc2028.c
--- linux-2.6.37.6/drivers/media/common/tuners/tuner-xc2028.c 2011-03-27
21:01:41.000000000 +0200
+++ linux-2.6.37.6-mdf/drivers/media/common/tuners/tuner-xc2028.c 2011-05-07
23:30:20.000000000 +0200
@@ -813,6 +813,10 @@
hwmodel, (version & 0xf000) >> 12, (version & 0xf00) >> 8,
(version & 0xf0) >> 4, version & 0xf);
+ {
+ void af9013_execdebug(struct dvb_frontend *fe);
+ af9013_execdebug(fe);
+ }
if (priv->ctrl.read_not_reliable)
goto read_not_reliable;
diff -u -r -b -B -w -x '*.o' -x '*.cmd' -x '*.ko' -x '*.mod.c' -x 'modules.*'
tmp/linux-2.6.37.6/drivers/media/dvb/frontends/af9013.c
linux-2.6.37.6-mdf/drivers/media/dvb/frontends/af9013.c
--- linux-2.6.37.6/drivers/media/dvb/frontends/af9013.c 2011-03-27
21:01:41.000000000 +0200
+++ linux-2.6.37.6-mdf/drivers/media/dvb/frontends/af9013.c 2011-05-15
02:58:34.000000000 +0200
@@ -69,6 +69,8 @@
buf[2] = mbox;
memcpy(&buf[3], val, len);
+ printk(KERN_DEBUG "af9013_write_regs(%02x, %02x %02x
%02x)\n",state->config.demod_address,buf[0],buf[1],buf[2]);
+
if (i2c_transfer(state->i2c, &msg, 1) != 1) {
warn("I2C write failed reg:%04x len:%d", reg, len);
return -EREMOTEIO;
@@ -119,6 +121,10 @@
warn("I2C read failed reg:%04x", reg);
return -EREMOTEIO;
}
+
+ printk(KERN_DEBUG "af9013_read_reg(%02x, %02x %02x %02x)
=%02x\n",state->config.demod_address,reg >> 8,reg & 0xff, 0, ibuf[0]);
+
+
*val = ibuf[0];
return 0;
}
@@ -1448,6 +1454,22 @@
kfree(state);
}
+void af9013_execdebug(struct dvb_frontend *fe)
+{
+ struct af9013_state *state = fe->demodulator_priv;
+ u8 val;
+ u8 buf[4];
+ int ret, i;
+
+ ret = af9013_read_reg(state, 0x98be, &val);
+ printk(KERN_DEBUG "(0x0c) running = %02x, ret=%02x\n",val, ret);
+
+ ret = af9013_read_reg_bits(state, 0xd733, 4, 4, &buf[2]);
+ for (i = 0; i < 2; i++) { ret = af9013_read_reg(state, 0x116b + i, &buf[i]);
}
+ printk(KERN_DEBUG "%s: chip version:%d ROM version:%d.%d (ret=%d)\n",
__func__, buf[2], buf[0], buf[1], ret);
+}
+EXPORT_SYMBOL(af9013_execdebug);
+
static struct dvb_frontend_ops af9013_ops;
struct dvb_frontend *af9013_attach(const struct af9013_config *config,
@@ -1484,7 +1506,18 @@
if (state->config.output_mode != AF9013_OUTPUT_MODE_USB) {
ret = af9013_download_firmware(state);
if (ret)
- goto error;
+ {
+ deb_info("%s: continue...\n", __func__);
+
+ /* create dvb_frontend */
+ memcpy(&state->frontend.ops, &af9013_ops,
+ sizeof(struct dvb_frontend_ops));
+ state->frontend.demodulator_priv = state;
+
+ return &state->frontend;
+
+ //goto error;
+ }
}
/* firmware version */
diff -u -r -b -B -w -x '*.o' -x '*.cmd' -x '*.ko' -x '*.mod.c' -x 'modules.*'
tmp/linux-2.6.37.6/drivers/media/video/cx23885/cx23885-cards.c
linux-2.6.37.6-mdf/drivers/media/video/cx23885/cx23885-cards.c
--- linux-2.6.37.6/drivers/media/video/cx23885/cx23885-cards.c 2011-03-27
21:01:41.000000000 +0200
+++ linux-2.6.37.6-mdf/drivers/media/video/cx23885/cx23885-cards.c 2011-05-15
04:12:20.000000000 +0200
@@ -275,6 +275,10 @@
.name = "Compro VideoMate E800",
.portc = CX23885_MPEG_DVB,
},
+ [CX23885_BOARD_AVERMEDIA_A306] = {
+ .name = "Avermedia A306",
+ .portc = CX23885_MPEG_DVB,
+ },
[CX23885_BOARD_HAUPPAUGE_HVR1290] = {
.name = "Hauppauge WinTV-HVR1290",
.portc = CX23885_MPEG_DVB,
@@ -485,6 +489,10 @@
.subdevice = 0xe800,
.card = CX23885_BOARD_COMPRO_VIDEOMATE_E800,
}, {
+ .subvendor = 0x1461,
+ .subdevice = 0xc139,
+ .card = CX23885_BOARD_AVERMEDIA_A306,
+ }, {
.subvendor = 0x0070,
.subdevice = 0x8551,
.card = CX23885_BOARD_HAUPPAUGE_HVR1290,
@@ -967,6 +975,31 @@
/* CX24228 GPIO */
/* Connected to IF / Mux */
break;
+ case CX23885_BOARD_AVERMEDIA_A306:
+ // ?? PIO0: 1:on 0:nothing work
+ // ?? PIO1: demodulator address 1: 0x1c, 0:0x1d ??
+ // ?? PIO2: tuner reset ?
+ // ?? PIO3: demodulator reset ?
+ printk(KERN_INFO "gpio...\n");
+
+ cx_set(GP0_IO, 0x000f0000);
+ mdelay(100);
+ cx_clear(GP0_IO, 0x0000000f);
+ mdelay(100);
+
+
+ cx_set(GP0_IO, 0x000f0000 | (1<<3) | (1<<2) | (1<<1) | (0<<0));
+ mdelay(100);
+ //cx_clear(GP0_IO, 0x00000000 | (1<<3) | (1<<2));
+ cx_set(GP0_IO, 0x000f0000 | (1<<3) | (0<<2) | (1<<1) | (0<<0));
+ mdelay(100);
+ cx_set(GP0_IO, 0x000f0000 | (1<<3) | (0<<2) | (1<<1) | (1<<0));
+ //cx_clear(GP0_IO, 0x0000000f);
+ //cx_set(GP0_IO, 0x00000003);
+ //cx_clear(GP0_IO, 0x00000002);
+ mdelay(100);
+
+ break;
}
}
@@ -1012,6 +1045,7 @@
case CX23885_BOARD_HAUPPAUGE_HVR1275:
case CX23885_BOARD_HAUPPAUGE_HVR1255:
case CX23885_BOARD_HAUPPAUGE_HVR1210:
+ case CX23885_BOARD_AVERMEDIA_A306:
/* FIXME: Implement me */
break;
case CX23885_BOARD_HAUPPAUGE_HVR1850:
@@ -1258,6 +1292,7 @@
/* AUX-PLL 27MHz CLK */
switch (dev->board) {
case CX23885_BOARD_NETUP_DUAL_DVBS2_CI:
+ //case CX23885_BOARD_AVERMEDIA_A306:
netup_initialize(dev);
break;
}
diff -u -r -b -B -w -x '*.o' -x '*.cmd' -x '*.ko' -x '*.mod.c' -x 'modules.*'
tmp/linux-2.6.37.6/drivers/media/video/cx23885/cx23885-dvb.c
linux-2.6.37.6-mdf/drivers/media/video/cx23885/cx23885-dvb.c
--- linux-2.6.37.6/drivers/media/video/cx23885/cx23885-dvb.c 2011-03-27
21:01:41.000000000 +0200
+++ linux-2.6.37.6-mdf/drivers/media/video/cx23885/cx23885-dvb.c 2011-05-15
04:03:54.000000000 +0200
@@ -48,6 +48,7 @@
#include "stv0900.h"
#include "stv0900_reg.h"
#include "stv6110.h"
+#include "af9013.h"
#include "lnbh24.h"
#include "cx24116.h"
#include "cimax2.h"
@@ -571,6 +572,14 @@
.osc_clk = 20
};
+static struct af9013_config af9013_config = {
+ .demod_address = (0x1c << 1), /* #define
AF9015_I2C_DEMOD 0x38 */ /*0x1c or 0x1d*/
+ .output_mode = AF9013_OUTPUT_MODE_PARALLEL,
+ .api_version = { 0, 1, 9, 0 },
+ /*.gpio[0] = AF9013_GPIO_TUNER_ON,
+ .gpio[1] = AF9013_GPIO_LO,*/
+};
+
static int dvb_register(struct cx23885_tsport *port)
{
struct cx23885_dev *dev = port->dev;
@@ -966,6 +975,34 @@
break;
}
break;
+ case CX23885_BOARD_AVERMEDIA_A306:
+ printk("# %d\n", port->nr - 1);
+ i2c_bus = &dev->i2c_bus[0];
+
+ fe0->dvb.frontend = dvb_attach(af9013_attach,
+ &af9013_config,
+ &i2c_bus->i2c_adap);
+
+ if (fe0->dvb.frontend != NULL || 1) {
+ struct dvb_frontend *fe;
+ struct xc2028_config cfg = {
+ .i2c_adap = &dev->i2c_bus[1].i2c_adap,
+ .i2c_addr = 0x61,
+ };
+ static struct xc2028_ctrl ctl = {
+ .fname = XC2028_DEFAULT_FIRMWARE,
+ .max_len = 64,
+ .demod = XC3028_FE_ZARLINK456 /*XC3028_FE_OREN538: Loading
SCODE for type=DTV6 ATSC OREN538 SCODE HAS_IF_5580 (60110020)*/,
+ };
+
+ printk(KERN_INFO "xc2028_attach %p\n", fe0->dvb.frontend);
+ fe = dvb_attach(xc2028_attach, fe0->dvb.frontend, &cfg);
+ printk(KERN_INFO "xc2028_attach %p\n", fe);
+ if (fe != NULL && fe->ops.tuner_ops.set_config != NULL) {
+ fe->ops.tuner_ops.set_config(fe, &ctl);
+ }
+ }
+ break;
default:
printk(KERN_INFO "%s: The frontend of your DVB/ATSC card "
diff -u -r -b -B -w -x '*.o' -x '*.cmd' -x '*.ko' -x '*.mod.c' -x 'modules.*'
tmp/linux-2.6.37.6/drivers/media/video/cx23885/cx23885.h
linux-2.6.37.6-mdf/drivers/media/video/cx23885/cx23885.h
--- linux-2.6.37.6/drivers/media/video/cx23885/cx23885.h 2011-03-27
21:01:41.000000000 +0200
+++ linux-2.6.37.6-mdf/drivers/media/video/cx23885/cx23885.h 2011-05-05
02:58:01.000000000 +0200
@@ -84,6 +84,7 @@
#define CX23885_BOARD_HAUPPAUGE_HVR1290 26
#define CX23885_BOARD_MYGICA_X8558PRO 27
#define CX23885_BOARD_LEADTEK_WINFAST_PXTV1200 28
+#define CX23885_BOARD_AVERMEDIA_A306 29
#define GPIO_0 0x00000001
#define GPIO_1 0x00000002
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: AverMedia A306 (cx23385, xc3028, af9013) (A577 too ?)
2011-05-19 21:13 ` AverMedia A306 (cx23385, xc3028, af9013) (A577 too ?) wallak
@ 2011-05-19 21:50 ` Antti Palosaari
2011-06-03 16:42 ` Daniel Gimpelevich
1 sibling, 0 replies; 5+ messages in thread
From: Antti Palosaari @ 2011-05-19 21:50 UTC (permalink / raw)
To: wallak; +Cc: linux-media
On 05/20/2011 12:13 AM, wallak@free.fr wrote:
> I've tried to use my A306 board on my system. All the main chips are fully
> supported by linux.
>
> At this stage the CX23385 and the tuner: xc3028 seem to respond properly. But
> the DVB-T chip (af9013) is silent. Nevertheless both chips are visible on the
> I2C bus.
You should get I2C connection to chip and after that load firmware.
> I've no full datasheet of theses chips. with exception of the af9013 where this
> information is available:
> http://wenku.baidu.com/view/42240f72f242336c1eb95e08.html
Those documents are rather useless. There is few versions of Linux
AF9015 driver around the net, which are rather near sample SDK code. Try
to find one.
> At this stage the CLK signal of the DVB-T chip may be missing or something is
> wrong elsewhere.
>
> If you have the datasheets... Any help will be appreciated.
>
>
> Best Regards,
> Wallak.
>
Antti
--
http://palosaari.fi/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: AverMedia A306 (cx23385, xc3028, af9013) (A577 too ?)
2011-05-19 21:13 ` AverMedia A306 (cx23385, xc3028, af9013) (A577 too ?) wallak
2011-05-19 21:50 ` Antti Palosaari
@ 2011-06-03 16:42 ` Daniel Gimpelevich
2011-06-04 15:37 ` wallak
1 sibling, 1 reply; 5+ messages in thread
From: Daniel Gimpelevich @ 2011-06-03 16:42 UTC (permalink / raw)
To: linux-media
On Thu, 2011-05-19 at 23:13 +0200, wallak@free.fr wrote:
> I've tried to use my A306 board on my system. All the main chips are
> fully
> supported by linux.
I have the A307 (product ID 0xc939) and I'd like to coordinate with you
regarding adapting your A306 support for it. If you use IRC at all, just
tell me when to be in #linuxtv, and if not, we'll keep this on-list.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: AverMedia A306 (cx23385, xc3028, af9013) (A577 too ?)
2011-06-03 16:42 ` Daniel Gimpelevich
@ 2011-06-04 15:37 ` wallak
2011-06-04 18:03 ` Daniel Gimpelevich
0 siblings, 1 reply; 5+ messages in thread
From: wallak @ 2011-06-04 15:37 UTC (permalink / raw)
To: Daniel Gimpelevich; +Cc: linux-media
A307 may be close to the A306 board. I've found the following chips: cx23385,
xc[34]?, lg3303). The demodulator is not the same, and follows the ATSC standard
(The A306 is DVB-T compatible).
Coordinating our works may be helpful, for example for the initialization and
the proper reset of the I2C chips. By email that will be OK.
Wallak.
Quoting Daniel Gimpelevich <daniel@gimpelevich.san-francisco.ca.us>:
> On Thu, 2011-05-19 at 23:13 +0200, wallak@free.fr wrote:
> > I've tried to use my A306 board on my system. All the main chips are
> > fully
> > supported by linux.
>
> I have the A307 (product ID 0xc939) and I'd like to coordinate with you
> regarding adapting your A306 support for it. If you use IRC at all, just
> tell me when to be in #linuxtv, and if not, we'll keep this on-list.
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-media" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: AverMedia A306 (cx23385, xc3028, af9013) (A577 too ?)
2011-06-04 15:37 ` wallak
@ 2011-06-04 18:03 ` Daniel Gimpelevich
0 siblings, 0 replies; 5+ messages in thread
From: Daniel Gimpelevich @ 2011-06-04 18:03 UTC (permalink / raw)
To: wallak; +Cc: linux-media
[-- Attachment #1: Type: text/plain, Size: 1183 bytes --]
On Sat, 2011-06-04 at 17:37 +0200, wallak@free.fr wrote:
> A307 may be close to the A306 board. I've found the following chips: cx23385,
> xc[34]?, lg3303). The demodulator is not the same, and follows the ATSC standard
> (The A306 is DVB-T compatible).
> Coordinating our works may be helpful, for example for the initialization and
> the proper reset of the I2C chips. By email that will be OK.
>
> Wallak.
We can take this discussion off-list whenever you are ready. The card is
in the machine on which I am typing this, so I cannot remove it and look
on the underside at this time, but IIRC there indeed is an LG chip
there. The markings on the tuner chip are covered by a thermal compound,
so I cannot read them at all, but my best guess based on the card's
specs is that it is an XC5000. I would like there to be some way to
identify the tuner programmatically, though. However, before beginning
work on the card, I would strongly prefer to verify the functionality of
its baseband inputs, and I lack the cable to attach to the baseband
connector on the card. Can you by any chance determine the pinout, so
that I could have such a cable made? Thank you.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-06-04 18:03 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <S932606Ab1ESVJJ/20110519210909Z+86@vger.kernel.org>
2011-05-19 21:13 ` AverMedia A306 (cx23385, xc3028, af9013) (A577 too ?) wallak
2011-05-19 21:50 ` Antti Palosaari
2011-06-03 16:42 ` Daniel Gimpelevich
2011-06-04 15:37 ` wallak
2011-06-04 18:03 ` Daniel Gimpelevich
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox