Re: cx18: Need information on SECAM-D/K problem with PVR-2100

2010-01-04 Thread Sergey Bolshakov
 Andy == Andy Walls awa...@radix.net writes:

  Sergey,
  On IRC you mentioned a problem of improper detection of SECAM-D/K with
  the Leadtek PVR2100 (XC2028 and CX23418) from an RF source.

It was some misunderstanding, i suppose, i do not have problems with
secam, i had improper detection of sound standard (and silence as
result) on pal channels. Later i've found, that fully-specified std
(pal-d instead of just pal) helps, so i can live with that.

Anyway, logs you requested (first STATUS CARD chunk for pal, second
for pal-d):

cx18:  Start initialization, version 1.2.0
cx18-0: Initializing card 0
cx18-0: Autodetected Leadtek WinFast PVR2100 card
cx18 :01:07.0: PCI INT A - Link[APC2] - GSI 17 (level, low) - IRQ 17
cx18-0: cx23418 revision 0101 (B)
cx18-0: Experimenters and photos needed for device to work well.
To help, mail the ivtv-devel list (www.ivtvdriver.org).
IRQ 17/cx18-0: IRQF_DISABLED is not guaranteed on shared IRQs
tuner 1-0061: Setting mode_mask to 0x0e
tuner 1-0061: chip found @ 0xc2 (cx18 i2c driver #0-1)
tuner 1-0061: tuner 0x61: Tuner type absent
tuner 1-0061: Calling set_type_addr for type=71, addr=0xff, mode=0x04, 
config=0x
tuner 1-0061: defining GPIO callback
xc2028: Xcv2028/3028 init called!
xc2028 1-0061: creating new instance
xc2028 1-0061: type set to XCeive xc2028/xc3028 tuner
tuner 1-0061: type set to Xceive XC3028
tuner 1-0061: cx18 i2c driver #0-1 tuner I2C addr 0xc2 with type 71 used for 
0x0e
xc2028 1-0061: xc2028_set_config called
cx18-0: Registered device video0 for encoder MPEG (64 x 32 kB)
cx18-0: Registered device video32 for encoder YUV (16 x 128 kB)
cx18-0: Registered device vbi0 for encoder VBI (20 x 51984 bytes)
cx18-0: Registered device video24 for encoder PCM audio (256 x 4 kB)
cx18-0: Registered device radio0 for encoder radio
cx18-0: Initialized card: Leadtek WinFast PVR2100
cx18:  End initialization
cx18 :01:07.0: firmware: requesting v4l-cx23418-cpu.fw
cx18-0: loaded v4l-cx23418-cpu.fw firmware (158332 bytes)
cx18 :01:07.0: firmware: requesting v4l-cx23418-apu.fw
cx18-0: loaded v4l-cx23418-apu.fw firmware V0012 (141200 bytes)
cx18-0: FW version: 0.0.74.0 (Release 2007/03/12)
cx18 :01:07.0: firmware: requesting v4l-cx23418-cpu.fw
cx18 :01:07.0: firmware: requesting v4l-cx23418-apu.fw
cx18 :01:07.0: firmware: requesting v4l-cx23418-dig.fw
cx18-0 843: loaded v4l-cx23418-dig.fw firmware (16382 bytes)
cx18-0 843: verified load of v4l-cx23418-dig.fw firmware (16382 bytes)
tuner 1-0061: switching to v4l2
tuner 1-0061: tv freq set to 400.00
xc2028 1-0061: xc2028_set_analog_freq called
xc2028 1-0061: generic_set_freq called
xc2028 1-0061: should set frequency 40 kHz
xc2028 1-0061: check_firmware called
xc2028 1-0061: load_all_firmwares called
xc2028 1-0061: Reading firmware xc3028-v27.fw
cx18 :01:07.0: firmware: requesting xc3028-v27.fw
xc2028 1-0061: Loading 80 firmware images from xc3028-v27.fw, type: xc2028 
firmware, ver 2.7
xc2028 1-0061: Reading firmware type BASE F8MHZ (3), id 0, size=8718.
xc2028 1-0061: Reading firmware type BASE F8MHZ MTS (7), id 0, size=8712.
xc2028 1-0061: Reading firmware type BASE FM (401), id 0, size=8562.
xc2028 1-0061: Reading firmware type BASE FM INPUT1 (c01), id 0, size=8576.
xc2028 1-0061: Reading firmware type BASE (1), id 0, size=8706.
xc2028 1-0061: Reading firmware type BASE MTS (5), id 0, size=8682.
xc2028 1-0061: Reading firmware type (0), id 10007, size=161.
xc2028 1-0061: Reading firmware type MTS (4), id 10007, size=169.
xc2028 1-0061: Reading firmware type (0), id 20007, size=161.
xc2028 1-0061: Reading firmware type MTS (4), id 20007, size=169.
xc2028 1-0061: Reading firmware type (0), id 40007, size=161.
xc2028 1-0061: Reading firmware type MTS (4), id 40007, size=169.
xc2028 1-0061: Reading firmware type (0), id 80007, size=161.
xc2028 1-0061: Reading firmware type MTS (4), id 80007, size=169.
xc2028 1-0061: Reading firmware type (0), id 300e0, size=161.
xc2028 1-0061: Reading firmware type MTS (4), id 300e0, size=169.
xc2028 1-0061: Reading firmware type (0), id c00e0, size=161.
xc2028 1-0061: Reading firmware type MTS (4), id c00e0, size=169.
xc2028 1-0061: Reading firmware type (0), id 20, size=161.
xc2028 1-0061: Reading firmware type MTS (4), id 20, size=169.
xc2028 1-0061: Reading firmware type (0), id 400, size=161.
xc2028 1-0061: Reading firmware type MTS (4), id 400, size=169.
xc2028 1-0061: Reading firmware type D2633 DTV6 ATSC (10030), id 0, size=149.
xc2028 1-0061: Reading firmware type D2620 DTV6 QAM (68), id 0, size=149.
xc2028 1-0061: Reading firmware type D2633 DTV6 QAM (70), id 0, size=149.
xc2028 1-0061: Reading firmware type D2620 DTV7 (88), id 0, size=149.
xc2028 1-0061: Reading firmware type D2633 DTV7 (90), id 0, size=149.
xc2028 1-0061: Reading firmware type D2620 DTV78 (108), id 0, size=149.
xc2028 1-0061: Reading firmware type D2633 DTV78 (110), id 0, size=149.
xc2028 

cx18: leadtec pvr 2100 card fix

2009-12-28 Thread Sergey Bolshakov

Hi.
Seems cx18 module has incorrect .xceive_pin value for card,
as i see lots of i2c errors in dmesg from xc2028.
i'm using 2.6.32.2, my hardware is:

# lspci -vnns 00:09.0
00:09.0 Multimedia video controller [0400]: Conexant Systems, Inc. CX23418 
Single-Chip MPEG-2 Encoder with Integrated Analog Video/Broadcast Audio Decoder 
[14f1:5b7a]
Subsystem: LeadTek Research Inc. Device [107d:6f27]
Flags: bus master, medium devsel, latency 64, IRQ 17
Memory at f000 (32-bit, non-prefetchable) [size=64M]
Capabilities: [44] Vital Product Data
Capabilities: [4c] Power Management version 2
Kernel driver in use: cx18
Kernel modules: cx18

Following fixes this problem for me, the rest seems working:

diff --git a/drivers/media/video/cx18/cx18-cards.c b/drivers/media/video/cx18/cx18-cards.c
index f11e47a..f808fb6 100644
--- a/drivers/media/video/cx18/cx18-cards.c
+++ b/drivers/media/video/cx18/cx18-cards.c
@@ -393,7 +393,7 @@ static const struct cx18_card cx18_card_leadtek_pvr2100 = {
 	.gpio_init.direction = 0x7,
 	.gpio_audio_input = { .mask   = 0x7,
 			  .tuner  = 0x6, .linein = 0x2, .radio  = 0x2 },
-	.xceive_pin = 15,
+	.xceive_pin = 1,
 	.pci_list = cx18_pci_leadtek_pvr2100,
 	.i2c = cx18_i2c_std,
 };

--