* DTV2000 H Plus issues
@ 2010-01-02 16:10 Raena Lea-Shannon
2010-01-02 16:57 ` istvan_v
0 siblings, 1 reply; 17+ messages in thread
From: Raena Lea-Shannon @ 2010-01-02 16:10 UTC (permalink / raw)
To: linux-media
I have 2 TV Cards. The DTV2000 H Plus and a Technisat. The Technisat
works very well. I am trying to get the DVT working for other video
input devices such as VCR to make copies of old Videos and an inteface
for my N95 video out.
I do not seem to be able to get it to find a tuner. Seems to be problem
finding the card. Any suggestions wold be greatly appreciated.
Here is part of an mplayer -verbose output
Selected driver: v4l2
name: Video 4 Linux 2 input
author: Martin Olschewski <olschewski@zpr.uni-koeln.de>
comment: first try, more to come ;-)
Selected device: UNKNOWN/GENERIC
Capabilites: video capture VBI capture device read/write streaming
supported norms: 0 = NTSC-M; 1 = NTSC-M-JP; 2 = NTSC-443; 3 = PAL-BG;
4 = PAL-I; 5 = PAL-DK; 6 = PAL-M; 7 = PAL-N; 8 = PAL-Nc; 9 = PAL-60; 10
= SECAM-B; 11 = SECAM-G; 12 = SECAM-H; 13 = SECAM-DK; 14 = SECAM-L;
inputs: 0 = Composite1; 1 = Composite2; 2 = Composite3; 3 = Composite4;
I am running Kubuntu Karmic 2.6.31-16-generic on AMD64 quadcore. I have
latest mercurial of v4l installed.
Here is the Lspci info and dmesg etc
5:05.0 Network controller [0280]: Techsan Electronics Co Ltd B2C2
FlexCopII DVB chip / Technisat SkyStar2 DVB card [13d0:2103] (rev 02)
Subsystem: Techsan Electronics Co Ltd B2C2 FlexCopII DVB chip /
Technisat SkyStar2 DVB card [13d0:2103]
Flags: bus master, slow devsel, latency 64, IRQ 20
Memory at fbff0000 (32-bit, non-prefetchable) [size=64K]
I/O ports at ec00 [size=32]
Kernel driver in use: b2c2_flexcop_pci
Kernel modules: b2c2-flexcop-pci
05:06.0 Multimedia video controller [0400]: Conexant Systems, Inc.
CX23880/1/2/3 PCI Video and Audio Decoder [14f1:8800] (rev 05)
Subsystem: LeadTek Research Inc. Device [107d:6f42]
Flags: bus master, medium devsel, latency 64, IRQ 21
Memory at f8000000 (32-bit, non-prefetchable) [size=16M]
Capabilities: <access denied>
Kernel driver in use: cx8800
Kernel modules: cx8800
05:06.1 Multimedia controller [0480]: Conexant Systems, Inc.
CX23880/1/2/3 PCI Video and Audio Decoder [Audio Port] [14f1:8801] (rev 05)
Subsystem: LeadTek Research Inc. Device [107d:6f42]
Flags: bus master, medium devsel, latency 64, IRQ 21
Memory at f9000000 (32-bit, non-prefetchable) [size=16M]
Capabilities: <access denied>
Kernel driver in use: cx88_audio
Kernel modules: cx88-alsa
05:06.2 Multimedia controller [0480]: Conexant Systems, Inc.
CX23880/1/2/3 PCI Video and Audio Decoder [MPEG Port] [14f1:8802] (rev 05)
Subsystem: LeadTek Research Inc. Device [107d:6f42]
Flags: bus master, medium devsel, latency 64, IRQ 10
Memory at fa000000 (32-bit, non-prefetchable) [size=16M]
Capabilities: <access denied>
Kernel modules: cx8802
dmesg in part here:
[snip]
[ 20.387650] b2c2-flexcop: B2C2 FlexcopII/II(b)/III digital TV
receiver chip loaded successfully
[ 20.390596] EDAC MC: Ver: 2.1.0 Dec 8 2009
[ 20.392347] flexcop-pci: will use the HW PID filter.
[ 20.392351] flexcop-pci: card revision 2
[ 20.392359] alloc irq_desc for 20 on node 0
[ 20.392361] alloc kstat_irqs on node 0
[ 20.392366] b2c2_flexcop_pci 0000:05:05.0: PCI INT A -> GSI 20
(level, low) -> IRQ 20
[ 20.403400] EDAC amd64_edac: Ver: 3.2.0 Dec 8 2009
[ 20.404070] EDAC amd64: This node reports that Memory ECC is
currently disabled.
[ 20.404073] EDAC amd64: bit 0x400000 in register F3x44 of the
MISC_CONTROL device (0000:00:18.3) should be enabled
[ 20.404076] EDAC amd64: WARNING: ECC is NOT currently enabled by the
BIOS. Module will NOT be loaded.
[ 20.404077] Either Enable ECC in the BIOS, or use the
'ecc_enable_override' parameter.
[ 20.404078] Might be a BIOS bug, if BIOS says ECC is enabled
[ 20.404078] Use of the override can cause unknown side effects.
[ 20.404541] amd64_edac: probe of 0000:00:18.2 failed with error -22
[ 20.425278] HDA Intel 0000:00:14.2: PCI INT A -> GSI 16 (level, low)
-> IRQ 16
[ 20.430203] DVB: registering new adapter (FlexCop Digital TV device)
[ 20.431702] b2c2-flexcop: MAC address = 00:d0:d7:16:5d:8f
[ 20.432308] CX24123: cx24123_i2c_readreg: reg=0x0 (error=-121)
[ 20.432311] CX24123: wrong demod revision: 87
[ 20.547542] Linux video capture interface: v2.00
[ 20.555291] HDA Intel 0000:01:00.1: PCI INT B -> GSI 19 (level, low)
-> IRQ 19
[ 20.555310] HDA Intel 0000:01:00.1: setting latency timer to 64
[ 20.608776] EXT3 FS on sda1, internal journal
[ 20.857754] cx88/0: cx2388x v4l2 driver version 0.0.7 loaded
[ 20.859425] cx88/2: cx2388x MPEG-TS Driver Manager version 0.0.7
loaded
[ 20.859959] b2c2-flexcop: found 'Zarlink MT352 DVB-T' .
[ 20.859963] DVB: registering adapter 0 frontend 0 (Zarlink MT352
DVB-T)...
[ 20.860017] b2c2-flexcop: initialization of 'Air2PC/AirStar 2 DVB-T'
at the 'PCI' bus controlled by a 'FlexCopIIb' complete
[ 20.861717] cx2388x alsa driver version 0.0.7 loaded
[ 20.862371] alloc irq_desc for 21 on node 0
[ 20.862373] alloc kstat_irqs on node 0
[ 20.862379] cx8800 0000:05:06.0: PCI INT A -> GSI 21 (level, low) ->
IRQ 21
[ 20.862549] cx88[0]: Your board isn't known (yet) to the driver. You
can
[ 20.862550] cx88[0]: try to pick one of the existing card configs via
[ 20.862551] cx88[0]: card=<n> insmod option. Updating to the latest
[ 20.862552] cx88[0]: version might help as well.
[ 20.862554] cx88[0]: Here is a list of valid choices for the card=<n>
insmod option:
[ 20.862556] cx88[0]: card=0 -> UNKNOWN/GENERIC
[ 20.862558] cx88[0]: card=1 -> Hauppauge WinTV 34xxx models
[ 20.862559] cx88[0]: card=2 -> GDI Black Gold
[ 20.862561] cx88[0]: card=3 -> PixelView
[ 20.862562] cx88[0]: card=4 -> ATI TV Wonder Pro
[ 20.862563] cx88[0]: card=5 -> Leadtek Winfast 2000XP Expert
[ 20.862565] cx88[0]: card=6 -> AverTV Studio 303 (M126)
[ 20.862566] cx88[0]: card=7 -> MSI TV-@nywhere Master
[ 20.862568] cx88[0]: card=8 -> Leadtek Winfast DV2000
[ 20.862569] cx88[0]: card=9 -> Leadtek PVR 2000
[ 20.862571] cx88[0]: card=10 -> IODATA GV-VCP3/PCI
[ 20.862572] cx88[0]: card=11 -> Prolink PlayTV PVR
[ 20.862574] cx88[0]: card=12 -> ASUS PVR-416
[ 20.862575] cx88[0]: card=13 -> MSI TV-@nywhere
[ 20.862577] cx88[0]: card=14 -> KWorld/VStream XPert DVB-T
[ 20.862578] cx88[0]: card=15 -> DViCO FusionHDTV DVB-T1
[ 20.862580] cx88[0]: card=16 -> KWorld LTV883RF
[ 20.862581] cx88[0]: card=17 -> DViCO FusionHDTV 3 Gold-Q
[ 20.862583] cx88[0]: card=18 -> Hauppauge Nova-T DVB-T
[ 20.862584] cx88[0]: card=19 -> Conexant DVB-T reference design
[ 20.862586] cx88[0]: card=20 -> Provideo PV259
[ 20.862587] cx88[0]: card=21 -> DViCO FusionHDTV DVB-T Plus
[ 20.862589] cx88[0]: card=22 -> pcHDTV HD3000 HDTV
[ 20.862590] cx88[0]: card=23 -> digitalnow DNTV Live! DVB-T
[ 20.862592] cx88[0]: card=24 -> Hauppauge WinTV 28xxx (Roslyn)
models
[ 20.862593] cx88[0]: card=25 -> Digital-Logic MICROSPACE
Entertainment Center (MEC)
[ 20.862595] cx88[0]: card=26 -> IODATA GV/BCTV7E
[ 20.862597] cx88[0]: card=27 -> PixelView PlayTV Ultra Pro
(Stereo)
[ 20.862598] cx88[0]: card=28 -> DViCO FusionHDTV 3 Gold-T
[ 20.862600] cx88[0]: card=29 -> ADS Tech Instant TV DVB-T PCI
[ 20.862601] cx88[0]: card=30 -> TerraTec Cinergy 1400 DVB-T
[ 20.862603] cx88[0]: card=31 -> DViCO FusionHDTV 5 Gold
[ 20.862604] cx88[0]: card=32 -> AverMedia UltraTV Media Center PCI
550
[ 20.862606] cx88[0]: card=33 -> Kworld V-Stream Xpert DVD
[ 20.862607] cx88[0]: card=34 -> ATI HDTV Wonder
[ 20.862609] cx88[0]: card=35 -> WinFast DTV1000-T
[ 20.862610] cx88[0]: card=36 -> AVerTV 303 (M126)
[ 20.862611] cx88[0]: card=37 -> Hauppauge Nova-S-Plus DVB-S
[ 20.862613] cx88[0]: card=38 -> Hauppauge Nova-SE2 DVB-S
[ 20.862614] cx88[0]: card=39 -> KWorld DVB-S 100
[ 20.862616] cx88[0]: card=40 -> Hauppauge WinTV-HVR1100
DVB-T/Hybrid
[ 20.862618] cx88[0]: card=41 -> Hauppauge WinTV-HVR1100
DVB-T/Hybrid (Low Profile)
[ 20.862619] cx88[0]: card=42 -> digitalnow DNTV Live! DVB-T Pro
[ 20.862621] cx88[0]: card=43 -> KWorld/VStream XPert DVB-T with
cx22702
[ 20.862623] cx88[0]: card=44 -> DViCO FusionHDTV DVB-T Dual
Digital
[ 20.862624] cx88[0]: card=45 -> KWorld HardwareMpegTV XPert
[ 20.862626] cx88[0]: card=46 -> DViCO FusionHDTV DVB-T Hybrid
[ 20.862627] cx88[0]: card=47 -> pcHDTV HD5500 HDTV
[ 20.862628] cx88[0]: card=48 -> Kworld MCE 200 Deluxe
[ 20.862630] cx88[0]: card=49 -> PixelView PlayTV P7000
[ 20.862631] cx88[0]: card=50 -> NPG Tech Real TV FM Top 10
[ 20.862633] cx88[0]: card=51 -> WinFast DTV2000 H
[ 20.862634] cx88[0]: card=52 -> Geniatech DVB-S
[ 20.862636] cx88[0]: card=53 -> Hauppauge WinTV-HVR3000 TriMode
Analog/DVB-S/DVB-T
[ 20.862637] cx88[0]: card=54 -> Norwood Micro TV Tuner
[ 20.862639] cx88[0]: card=55 -> Shenzhen Tungsten Ages Tech
TE-DTV-250 / Swann OEM
[ 20.862641] cx88[0]: card=56 -> Hauppauge WinTV-HVR1300
DVB-T/Hybrid MPEG Encoder
[ 20.862643] cx88[0]: card=57 -> ADS Tech Instant Video PCI
[ 20.862644] cx88[0]: card=58 -> Pinnacle PCTV HD 800i
[ 20.862645] cx88[0]: card=59 -> DViCO FusionHDTV 5 PCI nano
[ 20.862647] cx88[0]: card=60 -> Pinnacle Hybrid PCTV
[ 20.862648] cx88[0]: card=61 -> Leadtek TV2000 XP Global
[ 20.862650] cx88[0]: card=62 -> PowerColor RA330
[ 20.862651] cx88[0]: card=63 -> Geniatech X8000-MT DVBT
[ 20.862653] cx88[0]: card=64 -> DViCO FusionHDTV DVB-T PRO
[ 20.862654] cx88[0]: card=65 -> DViCO FusionHDTV 7 Gold
[ 20.862656] cx88[0]: card=66 -> Prolink Pixelview MPEG 8000GT
[ 20.862657] cx88[0]: card=67 -> Kworld PlusTV HD PCI 120 (ATSC
120)
[ 20.862659] cx88[0]: card=68 -> Hauppauge WinTV-HVR4000
DVB-S/S2/T/Hybrid
[ 20.862661] cx88[0]: card=69 -> Hauppauge WinTV-HVR4000(Lite)
DVB-S/S2
[ 20.862662] cx88[0]: card=70 -> TeVii S460 DVB-S/S2
[ 20.862664] cx88[0]: card=71 -> Omicom SS4 DVB-S/S2 PCI
[ 20.862665] cx88[0]: card=72 -> TBS 8920 DVB-S/S2
[ 20.862666] cx88[0]: card=73 -> TeVii S420 DVB-S
[ 20.862668] cx88[0]: card=74 -> Prolink Pixelview Global Extreme
[ 20.862669] cx88[0]: card=75 -> PROF 7300 DVB-S/S2
[ 20.862671] cx88[0]: card=76 -> SATTRADE ST4200 DVB-S/S2
[ 20.862672] cx88[0]: card=77 -> TBS 8910 DVB-S
[ 20.862674] cx88[0]: card=78 -> Prof 6200 DVB-S
[ 20.862675] cx88[0]: card=79 -> Terratec Cinergy HT PCI MKII
[ 20.862677] cx88[0]: card=80 -> Hauppauge WinTV-IR Only
[ 20.862678] cx88[0]: card=81 -> Leadtek WinFast DTV1800 Hybrid
[ 20.862680] cx88[0]: card=82 -> WinFast DTV2000 H rev. J
[ 20.862681] cx88[0]: card=83 -> Prof 7301 DVB-S/S2
[ 20.862683] cx88[0]: subsystem: 107d:6f42, board: UNKNOWN/GENERIC
[card=0,autodetected], frontend(s): 0
[ 20.862685] cx88[0]: TV tuner type -1, Radio tuner type -1
[ 21.020478] tuner 3-0061: chip found @ 0xc2 (cx88[0])
[ 21.065392] cx88[0]/0: found at 0000:05:06.0, rev: 5, irq: 21,
latency: 64, mmio: 0xf8000000
[ 21.065403] IRQ 21/cx88[0]: IRQF_DISABLED is not guaranteed on shared
IRQs
[ 21.065461] cx88[0]/0: registered device video0 [v4l2]
[ 21.065480] cx88[0]/0: registered device vbi0
[ 21.065489] tuner 3-0061: tuner type not set
[ 21.074373] cx88[0]/2: cx2388x 8802 Driver Manager
[ 21.074759] cx88_audio 0000:05:06.1: PCI INT A -> GSI 21 (level, low)
-> IRQ 21
[ 21.074767] IRQ 21/cx88[0]: IRQF_DISABLED is not guaranteed on shared
IRQs
[ 21.074786] cx88[0]/1: CX88x/0: ALSA support for cx2388x boards
23.773910] tun: Universal TUN/TAP device driver, 1.6
[ 23.773912] tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>
[ 23.774358] tun0: Disabled Privacy Extensions
[snip]
162.841498] tuner 3-0061: tuner type not set
^ permalink raw reply [flat|nested] 17+ messages in thread
* DTV2000 H Plus issues
@ 2010-01-02 16:23 Raena Lea-Shannon
0 siblings, 0 replies; 17+ messages in thread
From: Raena Lea-Shannon @ 2010-01-02 16:23 UTC (permalink / raw)
To: linux-media
PS:
I have tried modprobe and insmode card=51 and card=82 and card=0 with no
luck.
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: DTV2000 H Plus issues
2010-01-02 16:10 Raena Lea-Shannon
@ 2010-01-02 16:57 ` istvan_v
2010-01-03 8:21 ` Raena Lea-Shannon
0 siblings, 1 reply; 17+ messages in thread
From: istvan_v @ 2010-01-02 16:57 UTC (permalink / raw)
To: linux-media
On 01/02/2010 05:10 PM, Raena Lea-Shannon wrote:
> I have 2 TV Cards. The DTV2000 H Plus and a Technisat. The Technisat
> works very well. I am trying to get the DVT working for other video
> input devices such as VCR to make copies of old Videos and an inteface
> for my N95 video out.
>
> I do not seem to be able to get it to find a tuner. Seems to be problem
> finding the card. Any suggestions wold be greatly appreciated.
This card uses an Xceive XC4000 tuner, which is not supported yet.
However, a driver for the tuner chip is being developed at
kernellabs.com, so the card may become supported in the future.
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: DTV2000 H Plus issues
2010-01-02 16:57 ` istvan_v
@ 2010-01-03 8:21 ` Raena Lea-Shannon
2010-01-03 11:31 ` Samuel Rakitnican
2010-01-04 16:48 ` istvan_v
0 siblings, 2 replies; 17+ messages in thread
From: Raena Lea-Shannon @ 2010-01-03 8:21 UTC (permalink / raw)
To: istvan_v@mailbox.hu; +Cc: linux-media
istvan_v@mailbox.hu wrote:
> On 01/02/2010 05:10 PM, Raena Lea-Shannon wrote:
>
>> I have 2 TV Cards. The DTV2000 H Plus and a Technisat. The Technisat
>> works very well. I am trying to get the DVT working for other video
>> input devices such as VCR to make copies of old Videos and an inteface
>> for my N95 video out.
>>
>> I do not seem to be able to get it to find a tuner. Seems to be problem
>> finding the card. Any suggestions wold be greatly appreciated.
>
> This card uses an Xceive XC4000 tuner, which is not supported yet.
> However, a driver for the tuner chip is being developed at
> kernellabs.com, so the card may become supported in the future.
> --
[snip]
That seems odd. This patch on the LinuxTv site
http://www.linuxtv.org/pipermail/linux-dvb/2008-June/026379.html
seems to be using the cx88 drivers?
Has anyone tried this patch?
Ta
Raena
# HG changeset patch
# User plr.vincent at gmail.com
# Date 1212398724 -7200
# Node ID 78a011dfba127b593b6d01ea6a0010fcc29c94ad
# Parent 398b07fdfe79ff66a8c1bf2874de424ce29b9c78
WinFast DTV2000 H: add support for missing analog inputs
From: Vincent Pelletier <plr.vincent at gmail.com>
Add support for the following inputs:
- radio tuner
- composite 1 & 2 (only 1 is physicaly available, but composite 2 is also
advertised by windows driver)
- svideo
Signed-off-by: Vincent Pelletier <plr.vincent at gmail.com>
diff -r 398b07fdfe79 -r 78a011dfba12
linux/drivers/media/video/cx88/cx88-cards.c
--- a/linux/drivers/media/video/cx88/cx88-cards.c Wed May 28
17:55:13 2008 -0300
+++ b/linux/drivers/media/video/cx88/cx88-cards.c Mon Jun 02
11:25:24 2008 +0200
@@ -1297,7 +1297,35 @@
.gpio1 = 0x00008203,
.gpio2 = 0x00017304,
.gpio3 = 0x02000000,
+ },{
+ .type = CX88_VMUX_COMPOSITE1,
+ .vmux = 1,
+ .gpio0 = 0x0001D701,
+ .gpio1 = 0x0000B207,
+ .gpio2 = 0x0001D701,
+ .gpio3 = 0x02000000,
+ },{
+ .type = CX88_VMUX_COMPOSITE2,
+ .vmux = 2,
+ .gpio0 = 0x0001D503,
+ .gpio1 = 0x0000B207,
+ .gpio2 = 0x0001D503,
+ .gpio3 = 0x02000000,
+ },{
+ .type = CX88_VMUX_SVIDEO,
+ .vmux = 3,
+ .gpio0 = 0x0001D701,
+ .gpio1 = 0x0000B207,
+ .gpio2 = 0x0001D701,
+ .gpio3 = 0x02000000,
}},
+ .radio = {
+ .type = CX88_RADIO,
+ .gpio0 = 0x00015702,
+ .gpio1 = 0x0000F207,
+ .gpio2 = 0x00015702,
+ .gpio3 = 0x02000000,
+ },
.mpeg = CX88_MPEG_DVB,
},
[CX88_BOARD_GENIATECH_DVBS] = {
>
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: DTV2000 H Plus issues
2010-01-03 8:21 ` Raena Lea-Shannon
@ 2010-01-03 11:31 ` Samuel Rakitnican
2010-01-04 13:01 ` Raena Lea-Shannon
2010-01-04 16:48 ` istvan_v
1 sibling, 1 reply; 17+ messages in thread
From: Samuel Rakitnican @ 2010-01-03 11:31 UTC (permalink / raw)
To: Raena Lea-Shannon; +Cc: linux-media
On Sun, 03 Jan 2010 09:21:21 +0100, Raena Lea-Shannon
<raen@internode.on.net> wrote:
>
>
> istvan_v@mailbox.hu wrote:
>> On 01/02/2010 05:10 PM, Raena Lea-Shannon wrote:
>>
>>> I have 2 TV Cards. The DTV2000 H Plus and a Technisat. The Technisat
>>> works very well. I am trying to get the DVT working for other video
>>> input devices such as VCR to make copies of old Videos and an inteface
>>> for my N95 video out.
>>>
>>> I do not seem to be able to get it to find a tuner. Seems to be problem
>>> finding the card. Any suggestions wold be greatly appreciated.
>> This card uses an Xceive XC4000 tuner, which is not supported yet.
>> However, a driver for the tuner chip is being developed at
>> kernellabs.com, so the card may become supported in the future.
>> --
> [snip]
>
> That seems odd. This patch on the LinuxTv site
> http://www.linuxtv.org/pipermail/linux-dvb/2008-June/026379.html
> seems to be using the cx88 drivers?
[...]
Hi,
I'm not a developer, but I think that your device uses both of these
chips. cx88 is the bridge chip, while the Xceive is the tuner chip. So,
both of them needs to be supported in order for a device to work properly.
Please see the following link for reference:
http://www.kernellabs.com/blog/?p=1045
Regards
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: DTV2000 H Plus issues
2010-01-03 11:31 ` Samuel Rakitnican
@ 2010-01-04 13:01 ` Raena Lea-Shannon
0 siblings, 0 replies; 17+ messages in thread
From: Raena Lea-Shannon @ 2010-01-04 13:01 UTC (permalink / raw)
To: Samuel Rakitnican; +Cc: linux-media
Samuel Rakitnican wrote:
> On Sun, 03 Jan 2010 09:21:21 +0100, Raena Lea-Shannon
> <raen@internode.on.net> wrote:
>
>>
>>
>> istvan_v@mailbox.hu wrote:
>>> On 01/02/2010 05:10 PM, Raena Lea-Shannon wrote:
>>>
>>>> I have 2 TV Cards. The DTV2000 H Plus and a Technisat. The Technisat
>>>> works very well. I am trying to get the DVT working for other video
>>>> input devices such as VCR to make copies of old Videos and an inteface
>>>> for my N95 video out.
>>>>
>>>> I do not seem to be able to get it to find a tuner. Seems to be problem
>>>> finding the card. Any suggestions wold be greatly appreciated.
>>> This card uses an Xceive XC4000 tuner, which is not supported yet.
>>> However, a driver for the tuner chip is being developed at
>>> kernellabs.com, so the card may become supported in the future.
>>> --
>> [snip]
>>
>> That seems odd. This patch on the LinuxTv site
>> http://www.linuxtv.org/pipermail/linux-dvb/2008-June/026379.html
>> seems to be using the cx88 drivers?
>
> [...]
>
> Hi,
>
> I'm not a developer, but I think that your device uses both of these
> chips. cx88 is the bridge chip, while the Xceive is the tuner chip. So,
> both of them needs to be supported in order for a device to work properly.
>
> Please see the following link for reference:
> http://www.kernellabs.com/blog/?p=1045
>
> Regards
> --
> 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
>
Thanks
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: DTV2000 H Plus issues
2010-01-03 8:21 ` Raena Lea-Shannon
2010-01-03 11:31 ` Samuel Rakitnican
@ 2010-01-04 16:48 ` istvan_v
2010-01-05 1:25 ` Raena Lea-Shannon
1 sibling, 1 reply; 17+ messages in thread
From: istvan_v @ 2010-01-04 16:48 UTC (permalink / raw)
To: linux-media
On 01/03/2010 09:21 AM, Raena Lea-Shannon wrote:
> That seems odd. This patch on the LinuxTv site
> http://www.linuxtv.org/pipermail/linux-dvb/2008-June/026379.html
> seems to be using the cx88 drivers?
Unfortunately, this patch is for the older DTV 2000H (not Plus)
card, which uses a Philips FMD1216 tuner. The main change on the
"Plus" card is the replacement of the tuner with the XC4000, and
that is why it is not supported yet. However, an XC4000 driver
is already under development, and - compiling V4L from source -
you could get the card working in the near future. In fact, code
that implements support for this card already exists, but it is
only for development/testing at the moment.
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: DTV2000 H Plus issues
2010-01-04 16:48 ` istvan_v
@ 2010-01-05 1:25 ` Raena Lea-Shannon
2010-01-07 19:49 ` istvan_v
0 siblings, 1 reply; 17+ messages in thread
From: Raena Lea-Shannon @ 2010-01-05 1:25 UTC (permalink / raw)
To: istvan_v@mailbox.hu; +Cc: linux-media
istvan_v@mailbox.hu wrote:
> On 01/03/2010 09:21 AM, Raena Lea-Shannon wrote:
>
>> That seems odd. This patch on the LinuxTv site
>> http://www.linuxtv.org/pipermail/linux-dvb/2008-June/026379.html
>> seems to be using the cx88 drivers?
>
> Unfortunately, this patch is for the older DTV 2000H (not Plus)
> card, which uses a Philips FMD1216 tuner. The main change on the
> "Plus" card is the replacement of the tuner with the XC4000, and
> that is why it is not supported yet. However, an XC4000 driver
> is already under development, and - compiling V4L from source -
> you could get the card working in the near future. In fact, code
> that implements support for this card already exists, but it is
> only for development/testing at the moment.
> --
> 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
>
Thanks. Will try again later.
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: DTV2000 H Plus issues
2010-01-05 1:25 ` Raena Lea-Shannon
@ 2010-01-07 19:49 ` istvan_v
2010-01-07 20:00 ` Devin Heitmueller
2010-02-09 17:35 ` istvan_v
0 siblings, 2 replies; 17+ messages in thread
From: istvan_v @ 2010-01-07 19:49 UTC (permalink / raw)
To: linux-media
On 01/05/2010 02:25 AM, Raena Lea-Shannon wrote:
> Thanks. Will try again later.
By the way, for those who would like to test it, here is a patch based
on Devin Heitmueller's XC4000 driver and Mirek Slugen's older patch,
that adds support for this card:
http://www.sharemation.com/IstvanV/v4l/dtv2000h+.patch
It can be applied to this version of the v4l-dvb code:
http://linuxtv.org/hg/v4l-dvb/archive/75c97b2d1a2a.tar.bz2
This is experimental code, so use it at your own risk. The analogue
parts (TV and FM radio) basically work, although there are some minor
issues to be fixed. Digital TV is not tested yet, but is theoretically
implemented; reports on whether it actually works are welcome.
The XC4000 driver also requires a firmware file:
http://www.sharemation.com/IstvanV/v4l/dvb-fe-xc4000-1.4.1.fw
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: DTV2000 H Plus issues
2010-01-07 19:49 ` istvan_v
@ 2010-01-07 20:00 ` Devin Heitmueller
2010-01-07 21:07 ` istvan_v
2010-02-09 17:35 ` istvan_v
1 sibling, 1 reply; 17+ messages in thread
From: Devin Heitmueller @ 2010-01-07 20:00 UTC (permalink / raw)
To: istvan_v@mailbox.hu; +Cc: linux-media
On Thu, Jan 7, 2010 at 2:49 PM, istvan_v@mailbox.hu <istvan_v@mailbox.hu> wrote:
> On 01/05/2010 02:25 AM, Raena Lea-Shannon wrote:
>
>> Thanks. Will try again later.
>
> By the way, for those who would like to test it, here is a patch based
> on Devin Heitmueller's XC4000 driver and Mirek Slugen's older patch,
> that adds support for this card:
> http://www.sharemation.com/IstvanV/v4l/dtv2000h+.patch
> It can be applied to this version of the v4l-dvb code:
> http://linuxtv.org/hg/v4l-dvb/archive/75c97b2d1a2a.tar.bz2
> This is experimental code, so use it at your own risk. The analogue
> parts (TV and FM radio) basically work, although there are some minor
> issues to be fixed. Digital TV is not tested yet, but is theoretically
> implemented; reports on whether it actually works are welcome.
> The XC4000 driver also requires a firmware file:
> http://www.sharemation.com/IstvanV/v4l/dvb-fe-xc4000-1.4.1.fw
> --
> 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
>
Istan_v,
Could you please do me a favor and rename your firmware file, both in
the patch and the file you are redistributing (perhaps as
dvb-fe-xc4000-1.4.1-istanv.fw)? I worry that by redistributing a file
with the exact same name as the "official" release, people are going
to get confused and it will make it harder for me to debug problems
given my assumptions about what firmware image they are using is
incorrect.
Thanks,
Devin
--
Devin J. Heitmueller - Kernel Labs
http://www.kernellabs.com
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: DTV2000 H Plus issues
2010-01-07 20:00 ` Devin Heitmueller
@ 2010-01-07 21:07 ` istvan_v
0 siblings, 0 replies; 17+ messages in thread
From: istvan_v @ 2010-01-07 21:07 UTC (permalink / raw)
To: Devin Heitmueller; +Cc: linux-media
On 01/07/2010 09:00 PM, Devin Heitmueller wrote:
> Could you please do me a favor and rename your firmware file, both in
> the patch and the file you are redistributing (perhaps as
> dvb-fe-xc4000-1.4.1-istanv.fw)? I worry that by redistributing a file
> with the exact same name as the "official" release, people are going
> to get confused and it will make it harder for me to debug problems
> given my assumptions about what firmware image they are using is
> incorrect.
OK, I have renamed the firmware file. The download links are now:
http://www.sharemation.com/IstvanV/v4l/dtv2000h+.patch
http://www.sharemation.com/IstvanV/v4l/xc4000-dtv2000hp-1.4.1.fw
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: DTV2000 H Plus issues
2010-01-07 19:49 ` istvan_v
2010-01-07 20:00 ` Devin Heitmueller
@ 2010-02-09 17:35 ` istvan_v
2010-02-11 19:16 ` istvan_v
1 sibling, 1 reply; 17+ messages in thread
From: istvan_v @ 2010-02-09 17:35 UTC (permalink / raw)
To: linux-media
I have an updated version now, with these changes:
- the firmware file name can be specified with the "firmware_name"
module parameter; it defaults to "xc4000.fw"
- there is another new module parameter ("audio_std") for configuring
the audio standard (NICAM, A2, etc.), and switching FM radio to
using input 1 (i.e. cable TV instead of FM antenna). This is an
integer value which can be the sum of:
1: use NICAM/B or A2/B instead of NICAM/A or A2/A
2: use A2 instead of NICAM or BTSC
4: use SECAM K3 instead of K1
8: in SECAM D/K mode, set the IF frequency and audio mode as for
SECAM-L (this hack fixed the one SECAM channel I can receive)
16: use FM radio input 1 instead of input 2
32: mono TV audio (does not seem to work, so it is useless)
- "struct xc4000_config" has a new member ("card_type") for specifying
the card type
- some code changes to allow for loading the new firmware files below
In addition to analog TV and FM radio, I have tested the IR as well, and
it apparently works. DVB-T is still untested, however.
There are two separate patches for v4l-dvb revision 28f5eca12bb0: the
first one adds the XC4000 driver, while the second one adds support for
the Leadtek WinFast DTV2000H Plus card in the CX88 driver.
http://www.sharemation.com/IstvanV/v4l/xc4000-28f5eca12bb0.patch
http://www.sharemation.com/IstvanV/v4l/cx88-dtv2000h+-28f5eca12bb0.patch
These new firmware files are more complete than the previous ones, but
are not compatible with the original driver. Both version 1.2 and 1.4
are available:
http://www.sharemation.com/IstvanV/v4l/xc4000-1.2.fw
http://www.sharemation.com/IstvanV/v4l/xc4000-1.4.fw
Note that the 1.4 firmware could have two different versions of DTV6,
which only differ in the audio mode register: 0x8002 (as in v1.2) vs.
0x8003. However, the above file includes only the latter one.
The following simple utility was used for creating the firmware files.
It can extract the firmware data from a Windows driver file (e.g.
hcw85bda.sys from Hauppauge, wfeaglxt.sys from Leadtek, etc.;
dvb7700all.sys from Pinnacle will not work, however), and supports both
v1.2 and v1.4 firmware. The tables at the beginning of the code are not
necessarily fully correct, though, and may need some fixing.
http://www.sharemation.com/IstvanV/v4l/xc4000fw.c
On 01/07/2010 08:49 PM, istvan_v@mailbox.hu wrote:
> On 01/05/2010 02:25 AM, Raena Lea-Shannon wrote:
>
>> Thanks. Will try again later.
>
> By the way, for those who would like to test it, here is a patch based
> on Devin Heitmueller's XC4000 driver and Mirek Slugen's older patch,
> that adds support for this card:
> http://www.sharemation.com/IstvanV/v4l/dtv2000h+.patch
> It can be applied to this version of the v4l-dvb code:
> http://linuxtv.org/hg/v4l-dvb/archive/75c97b2d1a2a.tar.bz2
> This is experimental code, so use it at your own risk. The analogue
> parts (TV and FM radio) basically work, although there are some minor
> issues to be fixed. Digital TV is not tested yet, but is theoretically
> implemented; reports on whether it actually works are welcome.
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: DTV2000 H Plus issues
2010-02-09 17:35 ` istvan_v
@ 2010-02-11 19:16 ` istvan_v
2010-02-11 19:21 ` Devin Heitmueller
2010-02-12 18:26 ` istvan_v
0 siblings, 2 replies; 17+ messages in thread
From: istvan_v @ 2010-02-11 19:16 UTC (permalink / raw)
To: linux-media
[-- Attachment #1: Type: text/plain, Size: 1103 bytes --]
Update: the following patch, which should be applied after the previous
ones, makes a few additional changes to the XC4000 driver:
- adds support for DTV7
- implements power management
- adds a mutex and locking for tuner operations
- some unused or unneeded code has been removed
On 02/09/2010 06:35 PM, istvan_v@mailbox.hu wrote:
> There are two separate patches for v4l-dvb revision 28f5eca12bb0: the
> first one adds the XC4000 driver, while the second one adds support for
> the Leadtek WinFast DTV2000H Plus card in the CX88 driver.
>
> http://www.sharemation.com/IstvanV/v4l/xc4000-28f5eca12bb0.patch
> http://www.sharemation.com/IstvanV/v4l/cx88-dtv2000h+-28f5eca12bb0.patch
>
> These new firmware files are more complete than the previous ones, but
> are not compatible with the original driver. Both version 1.2 and 1.4
> are available:
>
> http://www.sharemation.com/IstvanV/v4l/xc4000-1.2.fw
> http://www.sharemation.com/IstvanV/v4l/xc4000-1.4.fw
>
> The following simple utility was used for creating the firmware files.
>
> http://www.sharemation.com/IstvanV/v4l/xc4000fw.c
[-- Attachment #2: xc4000-2-28f5eca12bb0.patch --]
[-- Type: text/x-patch, Size: 15143 bytes --]
diff -r -d -N -U4 v4l-dvb-28f5eca12bb0.old/linux/drivers/media/common/tuners/xc4000.c v4l-dvb-28f5eca12bb0/linux/drivers/media/common/tuners/xc4000.c
--- v4l-dvb-28f5eca12bb0.old/linux/drivers/media/common/tuners/xc4000.c 2010-02-11 20:08:39.000000000 +0100
+++ v4l-dvb-28f5eca12bb0/linux/drivers/media/common/tuners/xc4000.c 2010-02-11 20:05:01.000000000 +0100
@@ -27,8 +27,9 @@
#include <linux/videodev2.h>
#include <linux/delay.h>
#include <linux/dvb/frontend.h>
#include <linux/i2c.h>
+#include <linux/mutex.h>
#include <asm/unaligned.h>
#include "dvb_frontend.h"
@@ -61,9 +62,9 @@
"The valid values are a sum of:\n"
" 1: use NICAM/B and A2/B instead of NICAM/A and A2/A\n"
" 2: use A2 instead of NICAM or BTSC\n"
" 4: use SECAM/K3 instead of K1\n"
- " 8: force SECAM-L audio\n"
+ " 8: use PAL-D/K audio for SECAM-D/K\n"
"16: use FM radio input 1 instead of input 2\n"
"32: use mono audio (the lower three bits are ignored)\n");
#define XC4000_DEFAULT_FIRMWARE "xc4000.fw"
@@ -108,18 +109,20 @@
u32 bandwidth;
u8 video_standard;
u8 rf_mode;
u8 card_type;
+ u8 ignore_i2c_write_errors;
/* struct xc2028_ctrl ctrl; */
struct firmware_properties cur_fw;
__u16 hwmodel;
__u16 hwvers;
- u8 ignore_i2c_write_errors;
+ struct mutex lock;
};
/* Misc Defines */
#define MAX_TV_STANDARD 24
#define XC_MAX_I2C_WRITE_LENGTH 64
+#define XC_POWERED_DOWN 0x80000000U
/* Signal Types */
#define XC_RF_MODE_AIR 0
#define XC_RF_MODE_CABLE 1
@@ -240,9 +243,9 @@
{"D/K-PAL-MONO", 0x0078, 0x8049, 6500},
{"D/K-SECAM-A2 DK1", 0x0000, 0x8049, 6340},
{"D/K-SECAM-A2 L/DK3", 0x0000, 0x8049, 6000},
{"D/K-SECAM-A2 MONO", 0x0078, 0x8049, 6500},
- {"D/K-SECAM-NICAM", 0x8080, 0x8049, 6200},
+ {"D/K-SECAM-NICAM", 0x0080, 0x8049, 6200},
{"L-SECAM-NICAM", 0x8080, 0x0009, 6200},
{"L'-SECAM-NICAM", 0x8080, 0x4009, 6200},
{"DTV6", 0x00C0, 0x8002, 0},
{"DTV8", 0x00C0, 0x800B, 0},
@@ -251,11 +254,8 @@
{"FM Radio-INPUT2", 0x0008, 0x9800,10700},
{"FM Radio-INPUT1", 0x0008, 0x9000,10700}
};
-#if 0
-static int xc4000_is_firmware_loaded(struct dvb_frontend *fe);
-#endif
static int xc4000_readreg(struct xc4000_priv *priv, u16 reg, u16 *val);
static int xc4000_TunerReset(struct dvb_frontend *fe);
static int xc_send_i2c_data(struct xc4000_priv *priv, u8 *buf, int len)
@@ -275,25 +275,8 @@
}
return XC_RESULT_SUCCESS;
}
-/* This routine is never used because the only time we read data from the
- i2c bus is when we read registers, and we want that to be an atomic i2c
- transaction in case we are on a multi-master bus */
-#if 0
-static int xc_read_i2c_data(struct xc4000_priv *priv, u8 *buf, int len)
-{
- struct i2c_msg msg = { .addr = priv->i2c_props.addr,
- .flags = I2C_M_RD, .buf = buf, .len = len };
-
- if (i2c_transfer(priv->i2c_props.adap, &msg, 1) != 1) {
- printk(KERN_ERR "xc4000 I2C read failed (len=%i)\n", len);
- return -EREMOTEIO;
- }
- return 0;
-}
-#endif
-
static void xc_wait(int wait_ms)
{
msleep(wait_ms);
}
@@ -444,17 +427,8 @@
only be used for fast scanning for channel lock) */
return xc_write_reg(priv, XREG_RF_FREQ, freq_code); /* WAS: XREG_FINERFREQ */
}
-#if 0
-/* We'll probably need these for analog support */
-static int xc_set_Xtal_frequency(struct xc4000_priv *priv, u32 xtalFreqInKHz)
-{
- u16 xtalRatio = (32000 * 0x8000)/xtalFreqInKHz;
- return xc_write_reg(priv, XREG_XTALFREQ, xtalRatio);
-}
-#endif
-
static int xc_get_ADC_Envelope(struct xc4000_priv *priv, u16 *adc_envelope)
{
return xc4000_readreg(priv, XREG_ADC_ENV, adc_envelope);
}
@@ -1134,8 +1108,11 @@
u16 quality;
u8 hw_majorversion = 0, hw_minorversion = 0;
u8 fw_majorversion = 0, fw_minorversion = 0;
+ if (!(priv->cur_fw.type & BASE))
+ return;
+
/* Wait for stats to stabilize.
* Frame Lines needs two frame times after initial lock
* before it is valid.
*/
@@ -1174,12 +1151,14 @@
struct dvb_frontend_parameters *params)
{
struct xc4000_priv *priv = fe->tuner_priv;
unsigned int type;
- int ret;
+ int ret = -EREMOTEIO;
dprintk(1, "%s() frequency=%d (Hz)\n", __func__, params->frequency);
+ mutex_lock(&priv->lock);
+
if (fe->ops.info.type == FE_ATSC) {
dprintk(1, "%s() ATSC\n", __func__);
switch (params->u.vsb.modulation) {
case VSB_8:
@@ -1201,9 +1180,10 @@
priv->video_standard = XC4000_DTV6;
type = DTV6;
break;
default:
- return -EINVAL;
+ ret = -EINVAL;
+ goto fail;
}
} else if (fe->ops.info.type == FE_OFDM) {
dprintk(1, "%s() OFDM\n", __func__);
switch (params->u.ofdm.bandwidth) {
@@ -1213,44 +1193,56 @@
priv->freq_hz = params->frequency - 1750000;
type = DTV6;
break;
case BANDWIDTH_7_MHZ:
- printk(KERN_ERR "xc4000 bandwidth 7MHz not supported\n");
+ priv->bandwidth = BANDWIDTH_7_MHZ;
+ priv->video_standard = XC4000_DTV7;
+ priv->freq_hz = params->frequency - 2250000;
type = DTV7;
- return -EINVAL;
+ break;
case BANDWIDTH_8_MHZ:
priv->bandwidth = BANDWIDTH_8_MHZ;
priv->video_standard = XC4000_DTV8;
priv->freq_hz = params->frequency - 2750000;
type = DTV8;
break;
+ case BANDWIDTH_AUTO:
+ if (params->frequency < 400000000) {
+ priv->bandwidth = BANDWIDTH_7_MHZ;
+ priv->freq_hz = params->frequency - 2250000;
+ } else {
+ priv->bandwidth = BANDWIDTH_8_MHZ;
+ priv->freq_hz = params->frequency - 2750000;
+ }
+ priv->video_standard = XC4000_DTV7_8;
+ type = DTV78;
+ break;
default:
printk(KERN_ERR "xc4000 bandwidth not set!\n");
- return -EINVAL;
+ ret = -EINVAL;
+ goto fail;
}
priv->rf_mode = XC_RF_MODE_AIR;
} else {
printk(KERN_ERR "xc4000 modulation type not supported!\n");
- return -EINVAL;
+ ret = -EINVAL;
+ goto fail;
}
dprintk(1, "%s() frequency=%d (compensated)\n",
__func__, priv->freq_hz);
/* Make sure the correct firmware type is loaded */
- if (check_firmware(fe, type, 0, priv->if_khz) != XC_RESULT_SUCCESS) {
- return -EREMOTEIO;
- }
+ if (check_firmware(fe, type, 0, priv->if_khz) != XC_RESULT_SUCCESS)
+ goto fail;
ret = xc_SetSignalSource(priv, priv->rf_mode);
if (ret != XC_RESULT_SUCCESS) {
printk(KERN_ERR
- "xc4000: xc_SetSignalSource(%d) failed\n",
- priv->rf_mode);
- return -EREMOTEIO;
- }
-
- {
+ "xc4000: xc_SetSignalSource(%d) failed\n",
+ priv->rf_mode);
+ goto fail;
+ } else {
u16 video_mode, audio_mode;
video_mode = XC4000_Standard[priv->video_standard].VideoMode;
audio_mode = XC4000_Standard[priv->video_standard].AudioMode;
if (type == DTV6 && priv->firm_version != 0x0102)
@@ -1258,79 +1250,52 @@
ret = xc_SetTVStandard(priv, video_mode, audio_mode);
if (ret != XC_RESULT_SUCCESS) {
printk(KERN_ERR "xc4000: xc_SetTVStandard failed\n");
/* DJH - do not return when it fails... */
- /* return -EREMOTEIO; */
+ /* goto fail; */
}
}
if (priv->card_type == XC4000_CARD_DTV2000H_PLUS) {
- ret = 0;
- if (xc_write_reg(priv, XREG_D_CODE, 0) != 0)
- ret = -EREMOTEIO;
+ if (xc_write_reg(priv, XREG_D_CODE, 0) == 0)
+ ret = 0;
if (xc_write_reg(priv, XREG_AMPLITUDE,
(priv->firm_version == 0x0102 ? 132 : 134))
!= 0)
ret = -EREMOTEIO;
if (xc_write_reg(priv, XREG_SMOOTHEDCVBS, 1) != 0)
ret = -EREMOTEIO;
if (ret != 0) {
printk(KERN_ERR "xc4000: setting registers failed\n");
- /* return ret; */
+ /* goto fail; */
}
}
-#ifdef DJH_DEBUG
- ret = xc_set_IF_frequency(priv, priv->if_khz);
- if (ret != XC_RESULT_SUCCESS) {
- printk(KERN_ERR "xc4000: xc_Set_IF_frequency(%d) failed\n",
- priv->if_khz);
- return -EIO;
- }
-#endif
xc_tune_channel(priv, priv->freq_hz, XC_TUNE_DIGITAL);
if (debug)
xc_debug_dump(priv);
+ ret = 0;
- return 0;
-}
-
-#if 0
-static int xc4000_is_firmware_loaded(struct dvb_frontend *fe)
-{
- struct xc4000_priv *priv = fe->tuner_priv;
- int ret;
- u16 id;
-
- ret = xc4000_readreg(priv, XREG_PRODUCT_ID, &id);
- if (ret == XC_RESULT_SUCCESS) {
- if (id == XC_PRODUCT_ID_FW_NOT_LOADED)
- ret = XC_RESULT_RESET_FAILURE;
- else
- ret = XC_RESULT_SUCCESS;
- }
+fail:
+ mutex_unlock(&priv->lock);
- dprintk(1, "%s() returns %s id = 0x%x\n", __func__,
- ret == XC_RESULT_SUCCESS ? "True" : "False", id);
return ret;
}
-#endif
static int xc4000_set_analog_params(struct dvb_frontend *fe,
struct analog_parameters *params)
{
struct xc4000_priv *priv = fe->tuner_priv;
unsigned int type = 0;
- int ret;
-
- /* Fix me: it could be air. */
- priv->rf_mode = XC_RF_MODE_CABLE;
+ int ret = -EREMOTEIO;
if (params->mode == V4L2_TUNER_RADIO) {
dprintk(1, "%s() frequency=%d (in units of 62.5Hz)\n",
__func__, params->frequency);
+ mutex_lock(&priv->lock);
+
params->std = 0;
priv->freq_hz = params->frequency * 125L / 2;
if (audio_std & XC4000_AUDIO_STD_INPUT1) {
@@ -1346,8 +1311,10 @@
dprintk(1, "%s() frequency=%d (in units of 62.5khz)\n",
__func__, params->frequency);
+ mutex_lock(&priv->lock);
+
/* params->frequency is in units of 62.5khz */
priv->freq_hz = params->frequency * 62500;
/* if std is not defined, choose one */
@@ -1454,24 +1421,24 @@
goto tune_channel;
}
tune_channel:
+ /* Fix me: it could be air. */
+ priv->rf_mode = XC_RF_MODE_CABLE;
if (check_firmware(fe, type, params->std,
XC4000_Standard[priv->video_standard].int_freq)
!= XC_RESULT_SUCCESS) {
- return -EREMOTEIO;
+ goto fail;
}
ret = xc_SetSignalSource(priv, priv->rf_mode);
if (ret != XC_RESULT_SUCCESS) {
printk(KERN_ERR
"xc4000: xc_SetSignalSource(%d) failed\n",
priv->rf_mode);
- return -EREMOTEIO;
- }
-
- {
+ goto fail;
+ } else {
u16 video_mode, audio_mode;
video_mode = XC4000_Standard[priv->video_standard].VideoMode;
audio_mode = XC4000_Standard[priv->video_standard].AudioMode;
if (priv->video_standard < XC4000_BG_PAL_A2) {
@@ -1486,49 +1453,58 @@
}
ret = xc_SetTVStandard(priv, video_mode, audio_mode);
if (ret != XC_RESULT_SUCCESS) {
printk(KERN_ERR "xc4000: xc_SetTVStandard failed\n");
- return -EREMOTEIO;
+ goto fail;
}
}
if (priv->card_type == XC4000_CARD_DTV2000H_PLUS) {
- ret = 0;
- if (xc_write_reg(priv, XREG_D_CODE, 0) != 0)
- ret = -EREMOTEIO;
+ if (xc_write_reg(priv, XREG_D_CODE, 0) == 0)
+ ret = 0;
if (xc_write_reg(priv, XREG_AMPLITUDE, 1) != 0)
ret = -EREMOTEIO;
if (xc_write_reg(priv, XREG_SMOOTHEDCVBS, 1) != 0)
ret = -EREMOTEIO;
if (ret != 0) {
printk(KERN_ERR "xc4000: setting registers failed\n");
- return ret;
+ goto fail;
}
}
xc_tune_channel(priv, priv->freq_hz, XC_TUNE_ANALOG);
if (debug)
xc_debug_dump(priv);
+ ret = 0;
- return 0;
+fail:
+ mutex_unlock(&priv->lock);
+
+ return ret;
}
static int xc4000_get_frequency(struct dvb_frontend *fe, u32 *freq)
{
struct xc4000_priv *priv = fe->tuner_priv;
*freq = priv->freq_hz;
- if (debug && (priv->cur_fw.type
- & (BASE | FM | DTV6 | DTV7 | DTV78 | DTV8)) == BASE) {
- u16 snr = 0;
- if (xc4000_readreg(priv, XREG_SNR, &snr) == 0) {
- dprintk(1, "%s() freq = %u, SNR = %d\n",
- __func__, *freq, snr);
- return 0;
+ if (debug) {
+ mutex_lock(&priv->lock);
+ if ((priv->cur_fw.type
+ & (BASE | FM | DTV6 | DTV7 | DTV78 | DTV8)) == BASE) {
+ u16 snr = 0;
+ if (xc4000_readreg(priv, XREG_SNR, &snr) == 0) {
+ mutex_unlock(&priv->lock);
+ dprintk(1, "%s() freq = %u, SNR = %d\n",
+ __func__, *freq, snr);
+ return 0;
+ }
}
+ mutex_unlock(&priv->lock);
}
+
dprintk(1, "%s()\n", __func__);
return 0;
}
@@ -1546,58 +1522,57 @@
{
struct xc4000_priv *priv = fe->tuner_priv;
u16 lock_status = 0;
- xc_get_lock_status(priv, &lock_status);
+ mutex_lock(&priv->lock);
- dprintk(2, "%s() lock_status = %d\n", __func__, lock_status);
+ if (priv->cur_fw.type & BASE)
+ xc_get_lock_status(priv, &lock_status);
*status = (lock_status == 1 ?
TUNER_STATUS_LOCKED | TUNER_STATUS_STEREO : 0);
+ if (priv->cur_fw.type & (DTV6 | DTV7 | DTV78 | DTV8))
+ *status &= (~TUNER_STATUS_STEREO);
+
+ mutex_unlock(&priv->lock);
+
+ dprintk(2, "%s() lock_status = %d\n", __func__, lock_status);
return 0;
}
static int xc4000_sleep(struct dvb_frontend *fe)
{
- /* FIXME: djh disable this for now... */
- return XC_RESULT_SUCCESS;
-#if 0
- int ret;
+ struct xc4000_priv *priv = fe->tuner_priv;
+ int ret = XC_RESULT_SUCCESS;
dprintk(1, "%s()\n", __func__);
+ mutex_lock(&priv->lock);
+
/* Avoid firmware reload on slow devices */
- if (no_poweroff)
- return 0;
+ if (!no_poweroff && priv->cur_fw.type != XC_POWERED_DOWN) {
+ /* force reset and firmware reload */
+ priv->cur_fw.type = XC_POWERED_DOWN;
- /* According to Xceive technical support, the "powerdown" register
- was removed in newer versions of the firmware. The "supported"
- way to sleep the tuner is to pull the reset pin low for 10ms */
- ret = xc4000_TunerReset(fe);
- if (ret != XC_RESULT_SUCCESS) {
- printk(KERN_ERR
- "xc4000: %s() unable to shutdown tuner\n",
- __func__);
- return -EREMOTEIO;
- } else
- return XC_RESULT_SUCCESS;
-#endif
+ if (xc_write_reg(priv, XREG_POWER_DOWN, 0)
+ != XC_RESULT_SUCCESS) {
+ printk(KERN_ERR
+ "xc4000: %s() unable to shutdown tuner\n",
+ __func__);
+ ret = -EREMOTEIO;
+ }
+ }
+
+ mutex_unlock(&priv->lock);
+
+ return ret;
}
static int xc4000_init(struct dvb_frontend *fe)
{
- struct xc4000_priv *priv = fe->tuner_priv;
dprintk(1, "%s()\n", __func__);
- if (check_firmware(fe, DTV8, 0, priv->if_khz) != XC_RESULT_SUCCESS) {
- printk(KERN_ERR "xc4000: Unable to initialise tuner\n");
- return -EREMOTEIO;
- }
-
- if (debug)
- xc_debug_dump(priv);
-
return 0;
}
static int xc4000_release(struct dvb_frontend *fe)
@@ -1641,10 +1616,10 @@
struct i2c_adapter *i2c,
struct xc4000_config *cfg)
{
struct xc4000_priv *priv = NULL;
- int instance;
- u16 id = 0;
+ int instance;
+ u16 id = 0;
if (cfg->card_type != XC4000_CARD_GENERIC) {
if (cfg->card_type == XC4000_CARD_DTV2000H_PLUS) {
cfg->i2c_address = 0x61;
@@ -1671,8 +1646,9 @@
break;
case 1:
/* new tuner instance */
priv->bandwidth = BANDWIDTH_6_MHZ;
+ mutex_init(&priv->lock);
fe->tuner_priv = priv;
break;
default:
/* existing tuner instance */
@@ -1690,10 +1666,17 @@
/* Check if firmware has been loaded. It is possible that another
instance of the driver has loaded the firmware.
*/
- if (xc4000_readreg(priv, XREG_PRODUCT_ID, &id) != XC_RESULT_SUCCESS)
+ if (instance == 1) {
+ if (xc4000_readreg(priv, XREG_PRODUCT_ID, &id)
+ != XC_RESULT_SUCCESS)
goto fail;
+ }
+ else {
+ id = ((priv->cur_fw.type & BASE) == 0 ?
+ XC_PRODUCT_ID_FW_NOT_LOADED : XC_PRODUCT_ID_FW_LOADED);
+ }
switch (id) {
case XC_PRODUCT_ID_FW_LOADED:
printk(KERN_INFO
@@ -1720,12 +1703,8 @@
memcpy(&fe->ops.tuner_ops, &xc4000_tuner_ops,
sizeof(struct dvb_tuner_ops));
- /* FIXME: For now, load the firmware at startup. We will remove this
- before the code goes to production... */
- check_firmware(fe, DTV8, 0, priv->if_khz);
-
return fe;
fail:
mutex_unlock(&xc4000_list_mutex);
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: DTV2000 H Plus issues
2010-02-11 19:16 ` istvan_v
@ 2010-02-11 19:21 ` Devin Heitmueller
2010-02-11 19:35 ` istvan_v
2010-02-12 18:26 ` istvan_v
1 sibling, 1 reply; 17+ messages in thread
From: Devin Heitmueller @ 2010-02-11 19:21 UTC (permalink / raw)
To: istvan_v@mailbox.hu; +Cc: linux-media
Hi Istanv,
On Thu, Feb 11, 2010 at 2:16 PM, istvan_v@mailbox.hu
<istvan_v@mailbox.hu> wrote:
> Update: the following patch, which should be applied after the previous
> ones, makes a few additional changes to the XC4000 driver:
> - adds support for DTV7
> - implements power management
> - adds a mutex and locking for tuner operations
> - some unused or unneeded code has been removed
Is the DTV7 support actually tested? Or are you just blindly adding
the code in the hope that it works? I'm just asking because the last
time I spoke to you, you actually didn't have access to a DVB-T signal
source.
Also, I'm not sure I'm comfortable with the way the mutex is
implemented here. Is this logic copied from some other driver (and if
so, which one), or did you come up with it yourself?
Devin
--
Devin J. Heitmueller - Kernel Labs
http://www.kernellabs.com
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: DTV2000 H Plus issues
2010-02-11 19:21 ` Devin Heitmueller
@ 2010-02-11 19:35 ` istvan_v
0 siblings, 0 replies; 17+ messages in thread
From: istvan_v @ 2010-02-11 19:35 UTC (permalink / raw)
To: linux-media
On 02/11/2010 08:21 PM, Devin Heitmueller wrote:
> Is the DTV7 support actually tested? Or are you just blindly adding
> the code in the hope that it works? I'm just asking because the last
> time I spoke to you, you actually didn't have access to a DVB-T signal
> source.
Hi! It is indeed not tested yet, and the other DTV modes are not
either. Is there anything that needs to be done additionally to make
the DTV7 mode work, other than the already added different frequency
offset ((-7000000/2)+1250000=-2250000), firmware type (DTV7), and
video standard (XC4000_DTV7) ?
> Also, I'm not sure I'm comfortable with the way the mutex is
> implemented here. Is this logic copied from some other driver (and if
> so, which one), or did you come up with it yourself?
The mutex idea is from the XC3028 driver. Since the code is organized
differently there, it is not implemented exactly the same way, but it
is similar.
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: DTV2000 H Plus issues
2010-02-11 19:16 ` istvan_v
2010-02-11 19:21 ` Devin Heitmueller
@ 2010-02-12 18:26 ` istvan_v
2010-02-12 18:34 ` istvan_v
1 sibling, 1 reply; 17+ messages in thread
From: istvan_v @ 2010-02-12 18:26 UTC (permalink / raw)
To: linux-media
[-- Attachment #1: Type: text/plain, Size: 128 bytes --]
Here is another patch, with a few minor changes. It depends on the
previously posted patches, so those should be applied first.
[-- Attachment #2: xc4000-3-28f5eca12bb0.patch --]
[-- Type: text/x-patch, Size: 5412 bytes --]
diff -r -d -N -U4 v4l-dvb-28f5eca12bb0.old/linux/drivers/media/common/tuners/xc4000.c v4l-dvb-28f5eca12bb0/linux/drivers/media/common/tuners/xc4000.c
--- v4l-dvb-28f5eca12bb0.old/linux/drivers/media/common/tuners/xc4000.c 2010-02-12 19:14:24.000000000 +0100
+++ v4l-dvb-28f5eca12bb0/linux/drivers/media/common/tuners/xc4000.c 2010-02-12 19:20:35.000000000 +0100
@@ -256,8 +256,9 @@
};
static int xc4000_readreg(struct xc4000_priv *priv, u16 reg, u16 *val);
static int xc4000_TunerReset(struct dvb_frontend *fe);
+static void xc_debug_dump(struct xc4000_priv *priv);
static int xc_send_i2c_data(struct xc4000_priv *priv, u8 *buf, int len)
{
struct i2c_msg msg = { .addr = priv->i2c_props.addr,
@@ -332,12 +333,14 @@
(i2c_sequence[index + 1] != 0xFF)) {
len = i2c_sequence[index] * 256 + i2c_sequence[index+1];
if (len == 0x0000) {
/* RESET command */
- result = xc4000_TunerReset(fe);
index += 2;
+#if 0 /* not needed, as already called by check_firmware() */
+ result = xc4000_TunerReset(fe);
if (result != XC_RESULT_SUCCESS)
return result;
+#endif
} else if (len & 0x8000) {
/* WAIT command */
xc_wait(len & 0x7FFF);
index += 2;
@@ -472,14 +475,8 @@
return 0;
}
-/* WAS THERE
-static int xc_get_buildversion(struct xc4000_priv *priv, u16 *buildrev)
-{
- return xc4000_readreg(priv, XREG_BUILD, buildrev);
-}*/
-
static int xc_get_hsync_freq(struct xc4000_priv *priv, u32 *hsync_freq_hz)
{
u16 regData;
int result;
@@ -516,14 +513,12 @@
}
return lockState;
}
-#define XC_TUNE_ANALOG 0
-#define XC_TUNE_DIGITAL 1
-static int xc_tune_channel(struct xc4000_priv *priv, u32 freq_hz, int mode)
+static int xc_tune_channel(struct xc4000_priv *priv, u32 freq_hz)
{
- int found = 0;
- int result = 0;
+ int found = 1;
+ int result;
dprintk(1, "%s(%u)\n", __func__, freq_hz);
/* Don't complain when the request fails because of i2c stretching */
@@ -533,13 +528,23 @@
if (result != XC_RESULT_SUCCESS)
return 0;
- if (mode == XC_TUNE_ANALOG) {
- if (WaitForLock(priv) == 1)
- found = 1;
+ /* wait for lock only in analog TV mode */
+ if ((priv->cur_fw.type & (FM | DTV6 | DTV7 | DTV78 | DTV8)) == 0) {
+ if (WaitForLock(priv) == 0)
+ found = 0;
}
+ /* Wait for stats to stabilize.
+ * Frame Lines needs two frame times after initial lock
+ * before it is valid.
+ */
+ xc_wait(debug ? 100 : 10);
+
+ if (debug)
+ xc_debug_dump(priv);
+
return found;
}
static int xc4000_readreg(struct xc4000_priv *priv, u16 reg, u16 *val)
@@ -1108,17 +1113,8 @@
u16 quality;
u8 hw_majorversion = 0, hw_minorversion = 0;
u8 fw_majorversion = 0, fw_minorversion = 0;
- if (!(priv->cur_fw.type & BASE))
- return;
-
- /* Wait for stats to stabilize.
- * Frame Lines needs two frame times after initial lock
- * before it is valid.
- */
- xc_wait(100);
-
xc_get_ADC_Envelope(priv, &adc_envelope);
dprintk(1, "*** ADC envelope (0-1023) = %d\n", adc_envelope);
xc_get_frequency_error(priv, &freq_error_hz);
@@ -1269,12 +1265,10 @@
/* goto fail; */
}
}
- xc_tune_channel(priv, priv->freq_hz, XC_TUNE_DIGITAL);
+ xc_tune_channel(priv, priv->freq_hz);
- if (debug)
- xc_debug_dump(priv);
ret = 0;
fail:
mutex_unlock(&priv->lock);
@@ -1470,12 +1464,10 @@
goto fail;
}
}
- xc_tune_channel(priv, priv->freq_hz, XC_TUNE_ANALOG);
+ xc_tune_channel(priv, priv->freq_hz);
- if (debug)
- xc_debug_dump(priv);
ret = 0;
fail:
mutex_unlock(&priv->lock);
@@ -1549,9 +1541,9 @@
mutex_lock(&priv->lock);
/* Avoid firmware reload on slow devices */
- if (!no_poweroff && priv->cur_fw.type != XC_POWERED_DOWN) {
+ if (!no_poweroff && (priv->cur_fw.type & BASE) != 0) {
/* force reset and firmware reload */
priv->cur_fw.type = XC_POWERED_DOWN;
if (xc_write_reg(priv, XREG_POWER_DOWN, 0)
@@ -1560,8 +1552,9 @@
"xc4000: %s() unable to shutdown tuner\n",
__func__);
ret = -EREMOTEIO;
}
+ xc_wait(20);
}
mutex_unlock(&priv->lock);
@@ -1638,9 +1631,10 @@
instance = hybrid_tuner_request_state(struct xc4000_priv, priv,
hybrid_tuner_instance_list,
i2c, cfg->i2c_address, "xc4000");
- priv->card_type = cfg->card_type;
+ if (cfg->card_type != XC4000_CARD_GENERIC)
+ priv->card_type = cfg->card_type;
switch (instance) {
case 0:
goto fail;
break;
@@ -1703,12 +1697,21 @@
memcpy(&fe->ops.tuner_ops, &xc4000_tuner_ops,
sizeof(struct dvb_tuner_ops));
+ if (instance == 1) {
+ int ret;
+ mutex_lock(&priv->lock);
+ ret = xc4000_fwupload(fe);
+ mutex_unlock(&priv->lock);
+ if (ret != XC_RESULT_SUCCESS)
+ goto fail2;
+ }
+
return fe;
fail:
mutex_unlock(&xc4000_list_mutex);
-
+fail2:
xc4000_release(fe);
return NULL;
}
EXPORT_SYMBOL(xc4000_attach);
diff -r -d -N -U4 v4l-dvb-28f5eca12bb0.old/linux/drivers/media/video/tuner-core.c v4l-dvb-28f5eca12bb0/linux/drivers/media/video/tuner-core.c
--- v4l-dvb-28f5eca12bb0.old/linux/drivers/media/video/tuner-core.c 2010-02-12 19:14:07.000000000 +0100
+++ v4l-dvb-28f5eca12bb0/linux/drivers/media/video/tuner-core.c 2010-02-12 19:15:07.000000000 +0100
@@ -441,8 +441,9 @@
break;
}
case TUNER_XC4000:
{
+ xc4000_cfg.card_type = XC4000_CARD_GENERIC;
xc4000_cfg.i2c_address = t->i2c->addr;
/* if_khz will be set when the digital dvb_attach() occurs */
xc4000_cfg.if_khz = 0;
if (!dvb_attach(xc4000_attach,
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: DTV2000 H Plus issues
2010-02-12 18:26 ` istvan_v
@ 2010-02-12 18:34 ` istvan_v
0 siblings, 0 replies; 17+ messages in thread
From: istvan_v @ 2010-02-12 18:34 UTC (permalink / raw)
To: linux-media
A correction to the previous post: this line:
if (WaitForLock(priv) == 0)
should actually be:
if (WaitForLock(priv) != 1)
It does not have an effect on the operation of the driver, though,
since the value set depending on this line is not used.
^ permalink raw reply [flat|nested] 17+ messages in thread
end of thread, other threads:[~2010-02-12 18:30 UTC | newest]
Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-02 16:23 DTV2000 H Plus issues Raena Lea-Shannon
-- strict thread matches above, loose matches on Subject: below --
2010-01-02 16:10 Raena Lea-Shannon
2010-01-02 16:57 ` istvan_v
2010-01-03 8:21 ` Raena Lea-Shannon
2010-01-03 11:31 ` Samuel Rakitnican
2010-01-04 13:01 ` Raena Lea-Shannon
2010-01-04 16:48 ` istvan_v
2010-01-05 1:25 ` Raena Lea-Shannon
2010-01-07 19:49 ` istvan_v
2010-01-07 20:00 ` Devin Heitmueller
2010-01-07 21:07 ` istvan_v
2010-02-09 17:35 ` istvan_v
2010-02-11 19:16 ` istvan_v
2010-02-11 19:21 ` Devin Heitmueller
2010-02-11 19:35 ` istvan_v
2010-02-12 18:26 ` istvan_v
2010-02-12 18:34 ` istvan_v
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox