Log in Register FAQ Memberlist Search pcHDTV Forum Index
pcHDTV Forum

pcHDTV Forum Index -> HD-2000/3000 drivers -> Inkling's i2c patch ported to 2.6.16.2, 2.6.16.3 Goto page 1, 2  Next
Post new topic  Reply to topic View previous topic :: View next topic 
Inkling's i2c patch ported to 2.6.16.2, 2.6.16.3
PostPosted: Sun Apr 09, 2006 1:08 pm Reply with quote
GrepTar
 
Joined: 10 Jan 2005
Posts: 51




I got a clean copy of kernel 2.6.16.2 from www.kernel.org and applied inkling's patch to it. 2 of the files didn't patch, so I manually merged them. Here is the reult: a patch to apply to the kernel 2.6.16.2 download to get inkling's i2c code:

http://www.greptar.com/2.6.16.2_pchdtvr_patch.txt

cd to the top of your kernel source tree and do:
patch -p1 < [wherever you put that file]

Hope this helps. Many thanks to inkling.

Edit: Also patches and compiles cleanly on 2.6.16.3, but I haven't used it yet.


Last edited by GrepTar on Sun Apr 09, 2006 5:23 pm; edited 1 time in total
View user's profile Send private message
avoiding possible NTSC user complaints
PostPosted: Wed Apr 12, 2006 12:36 am Reply with quote
inkling
 
Joined: 05 Feb 2004
Posts: 342




Hey Grep,

That patch may still be set for ATSC super-FIFO only. If you have not already done so, you might want to find this in cx88-core.c:

/* 0 is NTSC and ATSC, 1 is ATSC super-FIFO */
cx88_sram_select(core, 1);

and change core,1 to core,0

That way none of the NTSC users will have any reason to give you any grief about it breaking their No Two Same Colors television. As far as I know, nothing else I did would break anything to do with NTSC, but I don't use NTSC, so I can't say for sure.

I'm actually still collecting data on whether or not the giant ATSC FIFO provides any real benefits. The "seems to" hunch I have is not really a valid data point, in my own personal opinion.

Hope it works out OK for you.

-ink
View user's profile Send private message
PostPosted: Wed Apr 12, 2006 6:53 am Reply with quote
GrepTar
 
Joined: 10 Jan 2005
Posts: 51




Is there a driver lockup issue when doing NTSC? If not, why would they want to patch?

I still don't understand why people would use this card for ntsc. For about the same price, get a pvr500 and have dual tuners and onboard encoders. If you want to compress via software, they surely make something cheaper than this card that will do the same thing for ntsc.

Anyway, if I have any complaints, I'll make a different patch if they are polite about it.

Everything is working great so far. Thanks a bunch for all of your hard work and insight.
View user's profile Send private message
Re: avoiding possible NTSC user complaints
PostPosted: Wed Apr 12, 2006 10:50 pm Reply with quote
xyzzy
 
Joined: 12 Feb 2006
Posts: 225




inkling wrote:

I'm actually still collecting data on whether or not the giant ATSC FIFO provides any real benefits. The "seems to" hunch I have is not really a valid data point, in my own personal opinion.

Are you sure the FIFO is actually getting used? It looks like the driver sets up something for each "line" that fits in the SRAM FIFO, for up to 6 lines. For MPEG-TS, a line is something like 4 packets, so it can't use more than 4.5 kB of FIFO. At least that's what it looks like, I just gave the code a cursory glance.

Anyway, if you look at the data rate, the default FIFO is plenty large and there is no way you should get FIFO overflows unless your PCI bus is totally saturated. I turned on the FIFO overflow counter, and never had one occur.

GrepTar wrote:

I still don't understand why people would use this card for ntsc.

Because they get both NTSC and ATSC? Why buy two cards and split the signal between them when you can use one?
View user's profile Send private message
Re: avoiding possible NTSC user complaints
PostPosted: Thu Apr 13, 2006 9:47 am Reply with quote
GrepTar
 
Joined: 10 Jan 2005
Posts: 51




xyzzy wrote:

GrepTar wrote:

I still don't understand why people would use this card for ntsc.

Because they get both NTSC and ATSC? Why buy two cards and split the signal between them when you can use one?


Yes, I know that, but that doesn't help me any. What is the practical use? Maybe if you are in an area that doesn't have all stations broadcasting on atsc yet is all I can think of.

Also, is there anything out there smart enough to switch between the two modes based on a recording schedule?
View user's profile Send private message
PostPosted: Thu Apr 13, 2006 11:04 am Reply with quote
waterhead
 
Joined: 24 Apr 2005
Posts: 299




My local PBS station does not simulcast it's NTSC on ATSC. On ATSC they show a 3-hour delay of the NTSC programs. That being said, I still wouldn't record the analog signal. On the pchdtv-3000 the analog picture is grainy and unsuitable for recording.

I have a Windows Media Center box with a WinTV-250 card, and the analog picture is much better. I would put it in my MythTV box, but WMCE requires the presence of an analog tuner in order for the digital tuner (All-in Wonder) to work. I don't record any analog programs on that box either.

I guess I've been spoiled by the crispness of the digital picture, even the standard definition shows.

_________________
Mythbuntu 8.04
Intel D875PBZ main board
Pentium4 3.06Ghz
1024GB RAM
nVidia 6600GT
pcHDTV HD-3000
Air2PC PCI
MythTV 0.21
View user's profile Send private message
patch leads to firmware load error
PostPosted: Wed Apr 19, 2006 1:06 pm Reply with quote
theyneverknew
 
Joined: 19 Apr 2006
Posts: 12




I've applied the patch to the debian linux-source-2.6.16 kernel and it compiles fine. However, it fails to load the firmware properly when trying to use azap to tune to a channel.
Prior to this patch firmware loaded fine and the card was working great as long as I first recorded a stream and watched it at a later time, so I'm pretty sure that it's not an issue with firmware location. Here's the relevant dmesg section:

cx2388x dvb driver version 0.0.5 loaded
CORE cx88[0]: subsystem: 7063:3000, board: pcHDTV HD3000 HDTV [card=22,autodetected]
TV tuner 52 at 0x1fe, Radio tuner -1 at 0x1fe
cx88[0]: cx88_sram_select ATSC FIFO SRAM
tuner 2-0061: chip found @ 0xc2 (cx88[0])
tuner 2-0061: type set to 52 (Thomson DTT 7610 (ATSC/NTSC))
tda9887 2-0043: chip found @ 0x86 (cx88[0])
cx88[0]: i2c sw register ok
ACPI: PCI Interrupt 0000:02:0c.2[A] -> GSI 17 (level, low) -> IRQ 20
cx88[0]/2: found at 0000:02:0c.2, rev: 5, irq: 20, latency: 32, mmio: 0xfd000000
cx88[0]/2: i2c sw unregister ok
cx88[0]/2: i2c hw register ok
cx88[0]/2: cx2388x based dvb card
DVB: registering new adapter (cx88[0]).
DVB: registering frontend 0 (Oren OR51132 VSB/QAM Frontend)...
or51132[0]: or51132_reset #1
or51132[0]: read_status1 Modulation type (0) UNSUPPORTED
or51132[0]: or51132_read_snr
or51132[0]: read_status1 Modulation type (0) UNSUPPORTED
or51132[0]: Waiting for firmware upload(dvb-fe-or51132-qam.fw)...
or51132[0]: I2C WR x15 FAIL -121
or51132[0]: load_firmware error 1
or51132[0]: Writing firmware to device failed!
cx88[0]/2: cx8802_timeout
cx88[0]/2: do_cancel_buffers
or51132[0]: read_status1 Modulation type (0) UNSUPPORTED
or51132[0]: Waiting for firmware upload(dvb-fe-or51132-qam.fw)...
or51132[0]: I2C WR x15 FAIL -121
or51132[0]: load_firmware error 1
or51132[0]: Writing firmware to device failed!
cx88[0]/2: cx8802_timeout
cx88[0]/2: do_cancel_buffers
or51132[0]: read_status1 Modulation type (0) UNSUPPORTED
or51132[0]: read_status1 Modulation type (0) UNSUPPORTED
or51132[0]: read_status1 Modulation type (0) UNSUPPORTED
or51132[0]: Waiting for firmware upload(dvb-fe-or51132-qam.fw)...
or51132[0]: I2C WR x15 FAIL -121or51132[0]: load_firmware error 1
or51132[0]: Writing firmware to device failed!
cx88[0]/2: cx8802_timeout
cx88[0]/2: do_cancel_buffers
or51132[0]: read_status1 Modulation type (0) UNSUPPORTED
or51132[0]: Waiting for firmware upload(dvb-fe-or51132-qam.fw)...
or51132[0]: I2C WR x15 FAIL -121
or51132[0]: load_firmware error 1
or51132[0]: Writing firmware to device failed!
or51132[0]: read_status1 Modulation type (0) UNSUPPORTED
or51132[0]: Waiting for firmware upload(dvb-fe-or51132-qam.fw)...
or51132[0]: I2C WR x15 FAIL -121
or51132[0]: load_firmware error 1
or51132[0]: Writing firmware to device failed!
or51132[0]: read_status1 Modulation type (0) UNSUPPORTED
or51132[0]: Waiting for firmware upload(dvb-fe-or51132-qam.fw)...
or51132[0]: I2C WR x15 FAIL -121
or51132[0]: load_firmware error 1
or51132[0]: Writing firmware to device failed!


From looking at the source this error appears to come while trying to upload firmwareA at line 209 in or51132.c. Looking at the patch file I don't see any major differences in the or51132_load_firware function up to that point so I'm assuming the error is somewhere higher up in the stack. Thanks for any help you can give.
View user's profile Send private message
PostPosted: Wed Apr 19, 2006 6:15 pm Reply with quote
GrepTar
 
Joined: 10 Jan 2005
Posts: 51




I had problems with that too, but I thought it was just switching to a different kernel.

I made /lib/firmware a link to /usr/lib/hotplug/firmware, so you can:

cd /lib
mv firmware firmware.bak
ln -s /usr/lib/hotplug/firmware .

and if there is anything in firmware.bak, copy it to the new location. It was empty in my case.

Don't know if it will change anything, but you can try. If it doesn't, you can always remove the link and put back the old directory.
View user's profile Send private message
PostPosted: Wed Apr 19, 2006 7:46 pm Reply with quote
theyneverknew
 
Joined: 19 Apr 2006
Posts: 12




No luck there, still the same errors.
View user's profile Send private message
PostPosted: Thu Apr 20, 2006 9:18 am Reply with quote
GrepTar
 
Joined: 10 Jan 2005
Posts: 51




Now that I look more closely at your errors, I notice the modulation type unsupported errors. I'm pretty sure I didn't have those when the firmware wasn't loading.

I'm sorry it didn't work for you. My wild guess is that it is a 32/64 bit issue. I'm using a 32 bit processor.
View user's profile Send private message
PostPosted: Thu Apr 20, 2006 9:27 am Reply with quote
theyneverknew
 
Joined: 19 Apr 2006
Posts: 12




I'm also using a 32 bit processor. From what I've been able to tell so far the Modulation type unsupported errors appear to be coming from or51132_reset, and I don't think they're a problem but I might be wrong. I think these 4 lines are the issue:

or51132[0]: Waiting for firmware upload(dvb-fe-or51132-qam.fw)...
or51132[0]: I2C WR x15 FAIL -121
or51132[0]: load_firmware error 1
or51132[0]: Writing firmware to device failed!

It seems that the very first call to i2c_writebytes in or51132_load_firmware is failing, but I don't know what FAIL -121 is so I can't figure out much beyond that.
View user's profile Send private message
PostPosted: Sun Apr 23, 2006 6:26 pm Reply with quote
PeterKnaggs
 
Joined: 21 Mar 2005
Posts: 54




Thanks for the patch!

I'm using Debian sid here. After rebooting with GrepTar's patch applied to
a vanilla kernel 2.6.16.9, I get a similar message when I launch pchdtvr:

or51132[0]: I2C WR x15 FAIL -121

and the dmesg shows the same firmware load problem messages.
If I reload the modules as follows just after rebooting, then pchdtvr works as normal.

modprobe -rv cx88_blackbird
modprobe -rv cx88-dvb
modprobe -rv cx8800
modprobe -v cx88-dvb

I also needed to do
modprobe mousedev
otherwise X wouldn't start (it couldn't find /dev/input/mice).
View user's profile Send private message Visit poster's website
PostPosted: Mon Apr 24, 2006 7:22 am Reply with quote
GrepTar
 
Joined: 10 Jan 2005
Posts: 51




All I did was turn inkling's patch into a current kernel patch. He did all the real work.

I also only do a modprobe on cx88-dvb. If other modules (maybe the NTSC side?) are installed, maybe that is where the problem is for the other guy.
View user's profile Send private message
PostPosted: Wed Apr 26, 2006 1:54 pm Reply with quote
patman
 
Joined: 30 Mar 2006
Posts: 8
Location: Portland, OR




PeterKnaggs wrote:

or51132[0]: I2C WR x15 FAIL -121

and the dmesg shows the same firmware load problem messages.
If I reload the modules as follows just after rebooting, then pchdtvr works as normal.

modprobe -rv cx88_blackbird
modprobe -rv cx88-dvb
modprobe -rv cx8800
modprobe -v cx88-dvb


I hit this too, on FC5 based system with 2.6.16.11 + the patch.

There must be a timing issue.

Then, even after a succesful load of the firmware, no data was sent to the dvb device (cat of it or using mplayer read no data), though azap displayed good values for signal strength and snr.

Directly playing via mplayer dvb://channel also failed.

-- Patrick
View user's profile Send private message Visit poster's website
PeterKnaggs modprobe trick worked!
PostPosted: Mon Sep 11, 2006 7:52 pm Reply with quote
nspring
 
Joined: 11 Sep 2006
Posts: 1




The modprobe removal of the other drivers and replacement of cx88 allowed the driver to load for me. Debian etch, 2.6.17.13, x86_64, and two hd-3000's. Now to see if the driver stops wedging.
View user's profile Send private message
Inkling's i2c patch ported to 2.6.16.2, 2.6.16.3
  pcHDTV Forum Index -> HD-2000/3000 drivers
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 7 Hours  
Page 1 of 2  
Goto page 1, 2  Next
  
  
 Post new topic  Reply to topic  


Powered by phpBB © 2001-2003 phpBB Group
Theme created by Vjacheslav Trushkin