Mailing List archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[linux-dvb] KWorld/VStream DVBt (this time with diffs)
All (or whomever's interested),
I've attached some diffs for work I've done to Chris
Pascoes branch of the dvb-kernel tree to try and
support the KWorld/VStream DVBt card.
For those impatient, it still doesn't work for me, but
others may have better luck (I've got a felling I'm
not able to tune to a channel).
The changes are a mix of adding direct support for the
KWorld card, and pulling in what looks useful from the
latest cvs.
The changes are in the files under the DVBICO
directory.
The way I build and run these is to:
1. Unpack Chris' cx88 drivers into a directory.
2. In the same directory create a directory called
linuxtv.
3. Inside the linuxtv directory, unpack Chris'
dvb-kernel tree.
4. Apply my diffs (you'll probably have to do that by
hand, sorry, I'm new to all this diffs stuff).
5. cd to the cx88 drivers directory
6. login as root
7. ./preload.sh
8. ./load.sh
I get the following output:
Jul 13 23:35:26 peeceelinux kernel: cx2388x v4l2
driver version 0.0.4 loaded
Jul 13 23:35:26 peeceelinux kernel: cx8800[0]: found
at 0000:00:09.0, rev: 5, irq: 9, latency: 32, mmio:
0xd5000000
Jul 13 23:35:26 peeceelinux kernel: cx8800[0]:
subsystem: 17de:08a6, board: KWorld/VStream XPert
DVB-T [card=11,autodetected]
Jul 13 23:35:26 peeceelinux kernel: cx8800[0]: i2c
register ok
Jul 13 23:35:26 peeceelinux kernel: cx8800[0]:
registered device video0 [v4l2]
Jul 13 23:35:26 peeceelinux kernel: cx8800[0]:
registered device vbi0
Jul 13 23:35:26 peeceelinux kernel: cx8800[0]:
couldn't register DVB module
Jul 13 23:35:26 peeceelinux kernel: cx8800:
Initialised TS code, frames_per_irq: 512,
frames_to_buffer: 10240
Jul 13 23:35:26 peeceelinux kernel:
cx88_register_dvb_module
Jul 13 23:35:26 peeceelinux kernel: Trying DVB attach
on card ddcf4800
Jul 13 23:35:26 peeceelinux kernel: DVB: registering
new adapter (cx8800[0]).
Jul 13 23:35:26 peeceelinux kernel: DVB attached to
dev ddcf4800, dvb: de79c400
Jul 13 23:35:26 peeceelinux kernel: DVB: registering
frontend 0:0 (KWorld/VStream XPert DVB-T)...
Then I'm able to use tzap to tune which results in:
soyeb@peeceelinux:/usr/share/doc/packages/dvb> tzap -c
channels.conf-dvbt-crystal-palace "BBC ONE"
using '/dev/dvb/adapter0/frontend0' and
'/dev/dvb/adapter0/demux0'
tuning to 505833333 Hz
video pid 0x0258, audio pid 0x0259
status 00 | signal fbc9 | snr 0000 | ber 00000000 |
unc 00000000 |
status 1f | signal fefe | snr d4d4 | ber 00000000 |
unc 00000000 | FE_HAS_LOCK
status 1f | signal ff01 | snr d5d5 | ber 00000000 |
unc 00000000 | FE_HAS_LOCK
status 1f | signal ff0a | snr d2d2 | ber 00000000 |
unc 00000000 | FE_HAS_LOCK
The last message repeats with varying signal and snr
values until I press ctrl-c.
At the same time I get a single message similar to:
Jul 13 23:35:49 peeceelinux kernel: Freq: 94166000,
offset: -176087, real: 94342087
I've tried mplayer and my results are this:
soyeb@peeceelinux:~> mplayer dvb://"BBC ONE"
MPlayer 1.0pre4-3.3.3 (C) 2000-2004 MPlayer Team
<snip loads of guff
Playing dvb://BBC ONE.
code taken from dvbstream for mplayer v0.4pre1 - (C)
Dave Chapman 2001
Released under the GPL.
Latest version available from http://www.linuxstb.org/
dvb_tune Freq: 505833333
dvb_streaming_read, attempt N. 6 failed with errno 0
when reading 2048 bytes
dvb_streaming_read, attempt N. 5 failed with errno 0
when reading 2048 bytes
dvb_streaming_read, attempt N. 4 failed with errno 0
when reading 2048 bytes
dvb_streaming_read, attempt N. 3 failed with errno 0
when reading 2048 bytes
dvb_streaming_read, attempt N. 2 failed with errno 0
when reading 2048 bytes
dvb_streaming_read, attempt N. 1 failed with errno 0
when reading 2048 bytes
dvb_streaming_read, return 0 bytes
MPlayer interrupted by signal 2 in module: demux_open
I also get an entry in the message log similar to:
Jul 13 23:36:43 peeceelinux kernel: Freq: -986768592,
offset: -174948, real: -986593644
As is apparent I'm not getting any picture out of the
card.
Could anyone point me in the direction of things to
try and experiment with. I've run out of ideas.
Regards,
Soyeb
=====
email: soyeb@btinternet.com
www: http://soyeb.homeip.net
work: http://www.tertio.com
)
soyeb@peeceelinux:~/dvb> diff -u cx88-0.0.4+dvb DVICO/cx88-0.0.4+dvb
diff -u cx88-0.0.4+dvb/cx88-cards.c DVICO/cx88-0.0.4+dvb/cx88-cards.c
--- cx88-0.0.4+dvb/cx88-cards.c 2004-06-29 12:25:21.000000000 +0100
+++ DVICO/cx88-0.0.4+dvb/cx88-cards.c 2004-07-11 11:28:03.000000000 +0100
@@ -217,6 +217,23 @@
.gpio0 = 0x00000101, /* Hooked to tuner reset bit */
}
},
+ [CX88_BOARD_KWORLD_DVBT] = {
+ .name = "KWorld/VStream XPert DVB-T",
+ .tuner_type = TUNER_ABSENT, /* No analog tuner */
+ .input = {{
+ .type = CX88_VMUX_COMPOSITE1,
+ .vmux = 0,
+ .gpio0 = 0x000027df,
+ },{
+ .type = CX88_VMUX_SVIDEO,
+ .vmux = 1,
+ .gpio0 = 0x000027df,
+ }},
+ .ts = {
+ .type = CX88_TS,
+ .gpio0 = 0x00000101, /* Hooked to tuner reset bit */
+ }
+ },
};
@@ -278,6 +295,10 @@
.subvendor = 0x18AC,
.subdevice = 0xDB00,
.card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T1,
+ },{
+ .subvendor = 0x17de,
+ .subdevice = 0x08a6,
+ .card = CX88_BOARD_KWORLD_DVBT,
}
};
const unsigned int cx88_idcount = ARRAY_SIZE(cx88_subids);
diff -u cx88-0.0.4+dvb/cx88.h DVICO/cx88-0.0.4+dvb/cx88.h
--- cx88-0.0.4+dvb/cx88.h 2004-06-29 12:39:32.000000000 +0100
+++ DVICO/cx88-0.0.4+dvb/cx88.h 2004-07-10 00:09:11.000000000 +0100
@@ -148,6 +148,7 @@
#define CX88_BOARD_WINFAST_DV2000 8
#define CX88_BOARD_LEADTEK_PVR2000 9
#define CX88_BOARD_DVICO_FUSIONHDTV_DVB_T1 10
+#define CX88_BOARD_KWORLD_DVBT 11
enum cx88_itype {
Common subdirectories: cx88-0.0.4+dvb/doc and DVICO/cx88-0.0.4+dvb/doc
Common subdirectories: cx88-0.0.4+dvb/linux and DVICO/cx88-0.0.4+dvb/linux
diff -u cx88-0.0.4+dvb/load.sh DVICO/cx88-0.0.4+dvb/load.sh
--- cx88-0.0.4+dvb/load.sh 2004-06-29 12:29:02.000000000 +0100
+++ DVICO/cx88-0.0.4+dvb/load.sh 2004-07-01 23:48:43.000000000 +0100
@@ -3,8 +3,8 @@
make || exit 1
sync
insmod ../linuxtv/dvb-kernel/build-2.6/dvb-core.ko dvb_shutdown_timeout=0
-insmod cx88xx.ko
-insmod cx8800.ko
+insmod ./cx88xx.ko
+insmod ./cx8800.ko
#insmod cx8800-dvb.ko ts_frames_per_irq=20 ts_frames_to_buffer=512
-insmod cx8800-dvb.ko
+insmod ./cx8800-dvb.ko
insmod ../linuxtv/dvb-kernel/build-2.6/mt352.ko
Common subdirectories: cx88-0.0.4+dvb/media and DVICO/cx88-0.0.4+dvb/media
Only in DVICO/cx88-0.0.4+dvb: .tmp_versions
soyeb@peeceelinux:~/dvb> diff -ru dvb-kernel-20040629+cjp DVICO/linuxtv/dvb-kernel
diff -ru dvb-kernel-20040629+cjp/build-2.6/insmod.sh DVICO/linuxtv/dvb-kernel/build-2.6/insmod.sh
--- dvb-kernel-20040629+cjp/build-2.6/insmod.sh 2004-06-29 13:03:38.000000000 +0100
+++ DVICO/linuxtv/dvb-kernel/build-2.6/insmod.sh 2004-07-01 22:40:24.000000000 +0100
@@ -82,13 +82,14 @@
insmod ./budget-av.ko
insmod ./dvb-ttusb-budget.ko
insmod ./mt312.ko
+ insmod ./mt352.ko
insmod ./skystar2.ko debug=1
insmod ./ttusb_dec.ko
echo
;;
unload)
echo "Deleting DVB modules from kernel"
- rmmod skystar2 mt312 dvb-ttpci budget budget-av budget-ci budget-core \
+ rmmod skystar2 mt312 mt352 dvb-ttpci budget budget-av budget-ci budget-core \
ttusb_dec dvb-ttusb-budget ttpci-eeprom \
ves1x93 alps_tdmb7 alps_tdlb7 stv0299 ves1820 \
tda1004x grundig_29504-401 grundig_29504-491 cx24110 \
diff -ru dvb-kernel-20040629+cjp/linux/drivers/media/dvb/frontends/mt352.c DVICO/linuxtv/dvb-kernel/linux/drivers/media/dvb/frontends/mt352.c
--- dvb-kernel-20040629+cjp/linux/drivers/media/dvb/frontends/mt352.c 2004-06-30 00:49:02.000000000 +0100
+++ DVICO/linuxtv/dvb-kernel/linux/drivers/media/dvb/frontends/mt352.c 2004-07-13 23:35:15.786695510 +0100
@@ -224,6 +224,38 @@
}
}
+static void kworlddvbt_freq_to_tuner(u32 freq, u8 *tuner_regs, u32 opts)
+{
+ default_freq_to_tuner(freq, tuner_regs, opts | FTT_CALC_FREQ_ONLY);
+
+ if (opts & FTT_CALC_FREQ_ONLY)
+ return;
+
+ freq /= 1000;
+
+ tuner_regs[2] = 0xcc; /* charge pump */
+
+ /* band select */
+ tuner_regs[3] = 0x00;
+
+ if ((freq >= 48000) && (freq <= 154000)) /* low band */
+ tuner_regs[3] = 0x09;
+
+ if ((freq >= 161000) && (freq <= 439000)) /* medium band */
+ tuner_regs[3] = 0x0a;
+
+ if ((freq >= 447000) && (freq <= 863000)) /* high band */
+ tuner_regs[3] = 0x08;
+}
+
+static u32 kworlddvbt_tuner_to_freq(u8 *tuner_regs, u32 opts)
+{
+ u16 div;
+
+ div = (tuner_regs[1] << 8) | tuner_regs[0];
+ return (500 * (div - IF_FREQUENCYx6) ) / 3 * 1000;
+}
+
struct i2c_init_msg {
u8 buflen:7; /* buffer length */
u8 delay_after:1; /* delay after message */
@@ -265,6 +297,13 @@
{ 2, 0, { 0xB5, 0x7A } }, /* ? Reserved register ? */
{ 0 } },
83333, avermedia771_freq_to_tuner, default_tuner_to_freq, },
+ { "KWorld/VStream XPert DVB-T", { 0xde, 0x17, 0xa6, 0x08 }, NULL,
+ 0x50, 0x04, 0x0F, 0xC2,
+ { 0x31, 0x05 }, { 0x72, 0x49 }, { 0x64, 0x00 }, { 0x55, 0xB7 },
+ { { 11, 1, { 0x67, 0x10, 0x23, 0x00, 0xFF, 0xFF, 0x00, 0xFF, 0x00, 0x40, 0x40 } }, /* AGC */
+ { 2, 0, { 0x8C, 0x33 } }, /* General purpose ports */
+ { 0 } },
+ 166667, kworlddvbt_freq_to_tuner, kworlddvbt_tuner_to_freq, },
{ "Unknown Zarlink MT352-based DVB-T card", { }, NULL,
0xFF, 0xFF, 0x0F, 0xC2,
{ 0x31, 0x05 }, { 0x72, 0x49 }, { 0x64, 0x00 }, { 0x55, 0xB7 },
@@ -272,15 +311,19 @@
{ 0 } },
166667, default_freq_to_tuner, default_tuner_to_freq },
};
+// { { 3, 0, { 0x67, 0x28, 0xA1 } }, /* AGC */
#define NCARDS (sizeof(cardlist) / sizeof(struct mt352_card_type))
static struct dvb_frontend_info mt352_info_template = {
.name = "DVB-T Zarlink MT352 demodulator driver",
.type = FE_OFDM,
- .frequency_min = 174000000, /* NIM of AV771 starts at 50MHz */
- .frequency_max = 862000000,
- .frequency_stepsize = 83333,
+ .frequency_min = 474000000, /* These ranges for KWorld? */
+ .frequency_max = 858000000,
+ .frequency_stepsize = 166667,
+// .frequency_min = 174000000, /* NIM of AV771 starts at 50MHz */
+// .frequency_max = 862000000,
+// .frequency_stepsize = 83333,
/*
.frequency_tolerance = 0,
.symbol_rate_min = 1000000,
@@ -305,7 +348,8 @@
* into this and the following registers.
*/
static u8 mt352_reset [] = { 0x50, 0x80 };
- static u8 mt352_clock_config [] = { 0x89, 0x38, 0x2d };
+ static u8 mt352_clock_config [] = { 0x89, 0x10, 0x2d }; /* for KWorld? */
+// static u8 mt352_clock_config [] = { 0x89, 0x38, 0x2d };
static u8 mt352_adc_ctl_1_cfg [] = { 0x8e, 0x40 };
static u8 mt352_acq_ctl [] = { 0x53, 0x50 };
static u8 mt352_ber_config [] = { 0x7c, 0x00, 0x3c }; /* Approx 100 million bits per BER reading */
soyeb@peeceelinux:~/dvb>
Home |
Main Index |
Thread Index