Help to make a driver. ISDB-Tb

Message ID 4DC179F6.1020905@netscape.net (mailing list archive)
State Superseded, archived
Headers

Commit Message

Alfredo Jesús Delaiti May 4, 2011, 4:08 p.m. UTC
  Hi

El 02/05/11 10:06, Mauro Carvalho Chehab escribió:
> From this message:
> [ 14.288626] Frontend revision 255 is unknown - aborting.
>
> I suspect that the I2C gate needed to access the frontend is at the wrong state. That's why you're
> getting 0xff (255) value there.
I changed the value ".demod_address = 0x19" by ".demod_address = 0x10" 
and resolved

dmesg:
<6>[   10.639380] cx23885 driver version 0.0.2 loaded
<6>[   10.640125] cx23885 0000:02:00.0: PCI INT A -> GSI 19 (level, low) 
-> IRQ 19
<6>[   10.640310] CORE cx23885[0]: subsystem: 14f1:8502, board: Mygica 
X8507 [card=30,autodetected]
<6>[   12.533349] cx25840 5-0044: loaded v4l-cx23885-avcore-01.fw 
firmware (16382 bytes)
<6>[   12.542333] tuner 4-0061: chip found @ 0xc2 (cx23885[0])
<6>[   12.582949] xc5000 4-0061: creating new instance
<6>[   12.583643] xc5000: Successfully identified at address 0x61
<6>[   12.583645] xc5000: Firmware has not been loaded previously
<6>[   12.583727] cx23885[0]/0: registered device video1 [v4l2]
<6>[   12.589183] xc5000: waiting for firmware upload 
(dvb-fe-xc5000-1.6.114.fw)...
<7>[   12.610081] xc5000: firmware read 12401 bytes.
<6>[   12.610083] xc5000: firmware uploading...
<6>[   13.982005] xc5000: firmware upload complete...
<6>[   14.604101] cx23885_dvb_register() allocating 1 frontend(s)
<6>[   14.604106] cx23885[0]: cx23885 based dvb card
<7>[   14.631169] mb86a20s: mb86a20s_attach:
<6>[   14.631656] Detected a Fujitsu mb86a20s frontend
<6>[   14.631726] xc5000 4-0061: attaching existing instance
<6>[   14.632425] xc5000: Successfully identified at address 0x61
<6>[   14.632427] xc5000: Firmware has been loaded previously
<6>[   14.632431] DVB: registering new adapter (cx23885[0])
<4>[   14.632434] DVB: registering adapter 1 frontend 0 (Fujitsu 
mb86A20s)...
<6>[   14.632811] cx23885_dev_checkrevision() Hardware revision = 0xb0
<6>[   14.632819] cx23885[0]/0: found at 0000:02:00.0, rev: 2, irq: 19, 
latency: 0, mmio: 0xfd600000
<7>[   14.632827] cx23885 0000:02:00.0: setting latency timer to 64
<7>[   14.632918] cx23885 0000:02:00.0: irq 44 for MSI/MSI-X

Attached list of changes I made.


Results:

Analog TV can be seen, but no sound.
If I use xawtv or VLC the image is in the middle of the screen and there 
are stripes, as if interference. If I use tvtime will look good.

Digital television: not tune any channels with w-scan or gnome-dvb-setup.
But with the latter, it captures 2 weak signals, but I can not know 
which is.
Under windows also capture 2 channel and I'm in a place where the signal 
is low.
I'll try to have more signal strength.

If I run dmesg after scan channels I get the following:

[ 3474.858537] mb86a20s: mb86a20s_set_frontend:
[ 3474.858541] mb86a20s: mb86a20s_set_frontend: Calling tuner set parameters
[ 3474.981157] mb86a20s: mb86a20s_read_status:
[ 3474.981649] mb86a20s: mb86a20s_read_status: val = 2, status = 0x01
[ 3475.081746] mb86a20s: mb86a20s_read_status:
[ 3475.082241] mb86a20s: mb86a20s_read_status: val = 2, status = 0x01
[ 3475.182336] mb86a20s: mb86a20s_read_status:
[ 3475.182829] mb86a20s: mb86a20s_read_status: val = 2, status = 0x01

When detected signal with gnome-dvb-setup, sometimes gives this warning:

Message from syslogd@linux at May 4 01:48:38 ...
kernel:[ 3359.202289] do_IRQ: 2.145 No irq handler for vector (irq -1)


Thank you very much,

Alfredo
  

Comments

Alfredo Jesús Delaiti May 16, 2011, 11:42 p.m. UTC | #1
Hi
>
> Digital television: not tune any channels with w-scan or gnome-dvb-setup.
> But with the latter, it captures 2 weak signals, but I can not know 
> which is.
> Under windows also capture 2 channel and I'm in a place where the 
> signal is low.
> I'll try to have more signal strength.
>
> If I run dmesg after scan channels I get the following:
>
> [ 3474.858537] mb86a20s: mb86a20s_set_frontend:
> [ 3474.858541] mb86a20s: mb86a20s_set_frontend: Calling tuner set 
> parameters
> [ 3474.981157] mb86a20s: mb86a20s_read_status:
> [ 3474.981649] mb86a20s: mb86a20s_read_status: val = 2, status = 0x01

I improved the antenna signal and I've got this:

alfredo@linux:~> mplayer -dumpstream dvb://'C5N HD' -dumpfile 
mplayer-dumpfile.ts
MPlayer dev-SVN-r33321-4.5-openSUSE Linux 11.4 (x86_64)-Packman (C) 
2000-2011 MPlayer Team
Can't open joystick device /dev/input/js0: No such file or directory
Can't init input joystick
mplayer: could not open config files /home/alfredo/.lircrc and 
/etc/lirc/lircrc
mplayer: No such file or directory
Failed to read LIRC config file ~/.lircrc.
Loading extension-related profile 'vo.vdpau'

Playing dvb://C5N HD.
dvb_tune Freq: 551142857
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
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
Core dumped ;)

Exiting... (End of file)

dmesg

[11359.790188] cx23885[0]/0: restarting queue
[11359.790197] cx23885[0]/0: queue is empty - first active
[11359.790202] cx23885[0]/0: cx23885_start_dma() w: 752, h: 32, f: 2
[11359.790209] cx23885[0]/0: cx23885_sram_channel_setup() Configuring 
channel [TS1 B]
[11359.790423] cx23885[0]/0: cx23885_start_dma() enabling TS int's and DMA
[11359.790436] cx23885[0]/0: [ffff880058342e00/0] cx23885_buf_queue - 
first active
[11359.790441] cx23885[0]/0: queue is not empty - append to active
[11359.790445] cx23885[0]/0: [ffff88002d4fba00/1] cx23885_buf_queue - 
append to active
[11359.790449] cx23885[0]/0: queue is not empty - append to active
[11359.790453] cx23885[0]/0: [ffff88003758ae00/2] cx23885_buf_queue - 
append to active
[11359.790457] cx23885[0]/0: queue is not empty - append to active
[11359.790460] cx23885[0]/0: [ffff88005815f800/3] cx23885_buf_queue - 
append to active
[11359.790464] cx23885[0]/0: queue is not empty - append to active
[11359.790468] cx23885[0]/0: [ffff88003758ac00/4] cx23885_buf_queue - 
append to active
[11359.790472] cx23885[0]/0: queue is not empty - append to active
[11359.790476] cx23885[0]/0: [ffff88005ae15600/5] cx23885_buf_queue - 
append to active
[11359.790480] cx23885[0]/0: queue is not empty - append to active
[11359.790484] cx23885[0]/0: [ffff88005ae15000/6] cx23885_buf_queue - 
append to active
[11359.790488] cx23885[0]/0: queue is not empty - append to active
[11359.790492] cx23885[0]/0: [ffff88005ae15400/7] cx23885_buf_queue - 
append to active
[11359.790496] cx23885[0]/0: queue is not empty - append to active
[11359.790499] cx23885[0]/0: [ffff88005a0ce000/8] cx23885_buf_queue - 
append to active
[11359.790503] cx23885[0]/0: queue is not empty - append to active
[11359.790507] cx23885[0]/0: [ffff88005a0cea00/9] cx23885_buf_queue - 
append to active
[11359.790511] cx23885[0]/0: queue is not empty - append to active
[11359.790515] cx23885[0]/0: [ffff88005a0cee00/10] cx23885_buf_queue - 
append to active
[11359.790519] cx23885[0]/0: queue is not empty - append to active
[11359.790523] cx23885[0]/0: [ffff8800374ffe00/11] cx23885_buf_queue - 
append to active
[11359.790527] cx23885[0]/0: queue is not empty - append to active
[11359.790531] cx23885[0]/0: [ffff8800582a0c00/12] cx23885_buf_queue - 
append to active
[11359.790535] cx23885[0]/0: queue is not empty - append to active
[11359.790539] cx23885[0]/0: [ffff8800582a0600/13] cx23885_buf_queue - 
append to active
[11359.790543] cx23885[0]/0: queue is not empty - append to active
[11359.790547] cx23885[0]/0: [ffff8800582a0000/14] cx23885_buf_queue - 
append to active
[11359.790551] cx23885[0]/0: queue is not empty - append to active
[11359.790554] cx23885[0]/0: [ffff8800582a0a00/15] cx23885_buf_queue - 
append to active
[11359.790558] cx23885[0]/0: queue is not empty - append to active
[11359.790562] cx23885[0]/0: [ffff8800582a0200/16] cx23885_buf_queue - 
append to active
[11359.790566] cx23885[0]/0: queue is not empty - append to active
[11359.790570] cx23885[0]/0: [ffff8800582a0800/17] cx23885_buf_queue - 
append to active
[11359.790578] cx23885[0]/0: queue is not empty - append to active
[11359.790582] cx23885[0]/0: [ffff88005ae14400/18] cx23885_buf_queue - 
append to active
[11359.790586] cx23885[0]/0: queue is not empty - append to active
[11359.790590] cx23885[0]/0: [ffff88005ae14e00/19] cx23885_buf_queue - 
append to active
[11359.790594] cx23885[0]/0: queue is not empty - append to active
[11359.790598] cx23885[0]/0: [ffff88005ae14600/20] cx23885_buf_queue - 
append to active
[11359.790602] cx23885[0]/0: queue is not empty - append to active
[11359.790605] cx23885[0]/0: [ffff88005ae14c00/21] cx23885_buf_queue - 
append to active
[11359.790609] cx23885[0]/0: queue is not empty - append to active
[11359.790613] cx23885[0]/0: [ffff88005ae14a00/22] cx23885_buf_queue - 
append to active
[11359.790617] cx23885[0]/0: queue is not empty - append to active
[11359.790621] cx23885[0]/0: [ffff88005ae14000/23] cx23885_buf_queue - 
append to active
[11359.790625] cx23885[0]/0: queue is not empty - append to active
[11359.790629] cx23885[0]/0: [ffff880037511a00/24] cx23885_buf_queue - 
append to active
[11359.790633] cx23885[0]/0: queue is not empty - append to active
[11359.790637] cx23885[0]/0: [ffff880037511c00/25] cx23885_buf_queue - 
append to active
[11359.790641] cx23885[0]/0: queue is not empty - append to active
[11359.790645] cx23885[0]/0: [ffff880037511e00/26] cx23885_buf_queue - 
append to active
[11359.790649] cx23885[0]/0: queue is not empty - append to active
[11359.790652] cx23885[0]/0: [ffff880037683c00/27] cx23885_buf_queue - 
append to active
[11359.790656] cx23885[0]/0: queue is not empty - append to active
[11359.790660] cx23885[0]/0: [ffff880037683800/28] cx23885_buf_queue - 
append to active
[11359.790664] cx23885[0]/0: queue is not empty - append to active
[11359.790668] cx23885[0]/0: [ffff880037683000/29] cx23885_buf_queue - 
append to active
[11359.790672] cx23885[0]/0: queue is not empty - append to active
[11359.790676] cx23885[0]/0: [ffff880037683e00/30] cx23885_buf_queue - 
append to active
[11359.790680] cx23885[0]/0: queue is not empty - append to active
[11359.790684] cx23885[0]/0: [ffff880037748400/31] cx23885_buf_queue - 
append to active
[11360.064047] mb86a20s: mb86a20s_read_status:
[11360.064533] mb86a20s: mb86a20s_read_status: val = 4, status = 0x03
[11360.064541] mb86a20s: mb86a20s_set_frontend:
[11360.064544] mb86a20s: mb86a20s_set_frontend: Calling tuner set parameters
[11360.490076] mb86a20s: mb86a20s_read_status:
[11360.490562] mb86a20s: mb86a20s_read_status: val = 5, status = 0x07
[11360.490571] mb86a20s: mb86a20s_set_frontend:
[11360.490574] mb86a20s: mb86a20s_set_frontend: Calling tuner set parameters
[11360.792038] cx23885[0]/0: cx23885_timeout()
[11360.792045] cx23885[0]/0: cx23885_stop_dma()
[11360.792058] cx23885[0]/0: [ffff880058342e00/0] timeout - dma=0x03bbf000
[11360.792063] cx23885[0]/0: [ffff88002d4fba00/1] timeout - dma=0x02ec9000
[11360.792068] cx23885[0]/0: [ffff88003758ae00/2] timeout - dma=0x02ec7000
[11360.792072] cx23885[0]/0: [ffff88005815f800/3] timeout - dma=0x18792000
[11360.792076] cx23885[0]/0: [ffff88003758ac00/4] timeout - dma=0x038b2000
[11360.792081] cx23885[0]/0: [ffff88005ae15600/5] timeout - dma=0x02eb1000
[11360.792085] cx23885[0]/0: [ffff88005ae15000/6] timeout - dma=0x03a4b000
[11360.792089] cx23885[0]/0: [ffff88005ae15400/7] timeout - dma=0x18510000
[11360.792094] cx23885[0]/0: [ffff88005a0ce000/8] timeout - dma=0x02ee5000
[11360.792098] cx23885[0]/0: [ffff88005a0cea00/9] timeout - dma=0x02ee1000
[11360.792103] cx23885[0]/0: [ffff88005a0cee00/10] timeout - dma=0x09dc5000
[11360.792107] cx23885[0]/0: [ffff8800374ffe00/11] timeout - dma=0x594a5000
[11360.792112] cx23885[0]/0: [ffff8800582a0c00/12] timeout - dma=0x1a04b000
[11360.792116] cx23885[0]/0: [ffff8800582a0600/13] timeout - dma=0x19dcc000
[11360.792121] cx23885[0]/0: [ffff8800582a0000/14] timeout - dma=0x19d17000
[11360.792125] cx23885[0]/0: [ffff8800582a0a00/15] timeout - dma=0x02ef3000
[11360.792129] cx23885[0]/0: [ffff8800582a0200/16] timeout - dma=0x02ee9000
[11360.792134] cx23885[0]/0: [ffff8800582a0800/17] timeout - dma=0x03b7f000
[11360.792138] cx23885[0]/0: [ffff88005ae14400/18] timeout - dma=0x02c8f000
[11360.792143] cx23885[0]/0: [ffff88005ae14e00/19] timeout - dma=0x02c93000
[11360.792147] cx23885[0]/0: [ffff88005ae14600/20] timeout - dma=0x02c9b000
[11360.792151] cx23885[0]/0: [ffff88005ae14c00/21] timeout - dma=0x02ca3000
[11360.792156] cx23885[0]/0: [ffff88005ae14a00/22] timeout - dma=0x02cab000
[11360.792160] cx23885[0]/0: [ffff88005ae14000/23] timeout - dma=0x02cb3000
[11360.792164] cx23885[0]/0: [ffff880037511a00/24] timeout - dma=0x02cbb000
[11360.792169] cx23885[0]/0: [ffff880037511c00/25] timeout - dma=0x02cc3000
[11360.792173] cx23885[0]/0: [ffff880037511e00/26] timeout - dma=0x02ccb000
[11360.792177] cx23885[0]/0: [ffff880037683c00/27] timeout - dma=0x02cd3000
[11360.792182] cx23885[0]/0: [ffff880037683800/28] timeout - dma=0x02cdb000
[11360.792186] cx23885[0]/0: [ffff880037683000/29] timeout - dma=0x02ce3000
[11360.792191] cx23885[0]/0: [ffff880037683e00/30] timeout - dma=0x02ceb000
[11360.792195] cx23885[0]/0: [ffff880037748400/31] timeout - dma=0x02cf4000
[11360.792198] cx23885[0]/0: restarting queue

As there is little sign, I asked another person to try and got this:

$femon -H
FE: Fujitsu mb86A20s (DVBT)
Problem retrieving frontend information: Operation not supported
status SCVYL | signal 6% | snr 71% | ber -1217255176 | unc -1217744071 | 
FE_HAS_LOCK
Problem retrieving frontend information: Operation not supported
status SCVYL | signal 12% | snr 71% | ber -1217255176 | unc -1217744071 
| FE_HAS_LOCK
Problem retrieving frontend information: Operation not supported
status SCVYL | signal 12% | snr 71% | ber -1217255176 | unc -1217744071 
| FE_HAS_LOCK

and this:

[ 397.962795] mb86a20s: mb86a20s_read_status: val = 9, status = 0x1f
[ 397.962798] mb86a20s: mb86a20s_read_signal_strength:
[ 397.983108] mb86a20s: mb86a20s_read_signal_strength: signal strength = 
4096
[ 398.019975] mb86a20s: mb86a20s_read_status:
[ 398.020461] mb86a20s: mb86a20s_read_status: val = 9, status = 0x1f

I think these values ??would have to watch TV, but no.

Suggestions are welcome

Thanks in advance

Alfredo
  

Patch

--- ../../../../../../usr/src/linux/drivers/media/video/cx23885/cx23885-video.c	2011-05-02 17:22:28.000000000 -0300
+++ ../cx23885-video.c	2011-04-29 14:07:33.000000000 -0300
@@ -409,6 +409,13 @@ 
 			cx23885_gpio_clear(dev, GPIO_0);
 	}
 
+	if (dev->board == CX23885_BOARD_MYGICA_X8507 ||
+		dev->board == CX23885_BOARD_MAGICPRO_PROHDTVE2) {
+		/* Select Analog TV */
+		if (INPUT(input)->type == CX23885_VMUX_TELEVISION)
+			cx23885_gpio_clear(dev, GPIO_0);
+	}
+
 	/* Tell the internal A/V decoder */
 	v4l2_subdev_call(dev->sd_cx25840, video, s_routing,
 			INPUT(input)->vmux, 0, 0);