Michael,
I've attached a patch for ivtv-firmware.c. I'm curious what the results
will be. To be continued tomorrow...
Hans
On Monday 02 January 2006 01:15, [EMAIL PROTECTED] wrote:
> Hans,
>
> Your guess was bang on - reverting to the "old way" of loading the
> firmware results in success. Something in the hotplug is causing
> grief.
>
> If you can give me a hand with the C, I can attempt the summations
> that you have requested. It would be nice to get to the bottom of
> this one.. I'm probably not the only one that has run into this
> problem.
>
> Cheers,
>
> Michael
>
> Quoting Hans Verkuil <[EMAIL PROTECTED]>:
> > On Monday 02 January 2006 00:27, [EMAIL PROTECTED] wrote:
> > > Hans,
> > >
> > > I've performed the operations as requested, and achieve the same
> > > result - I assume this removes zero padding on the firmware file?
> >
> > correct
> >
> > > [ 307.521854] ivtv0: loaded v4l-cx2341x-enc.fw firmware (262144
> > > bytes) [ 307.753271] ivtv0 warning: Encoder mailbox not found
> > > [ 307.784732] ivtv0 warning: Decoder mailbox not found
> > > [ 307.784735] ivtv0: Error locating firmware.
> > > [ 307.791075] ivtv0: Error -12 on initialization
> > > [ 307.791084] ivtv: probe of 0000:02:06.0 failed with error -12
> > > [ 307.791090] ivtv: ==================== END INIT IVTV
> > > ====================
> > >
> > > To be certain that the firmware was correct, I reloaded 0.4.0
> > > using the shortened firmware file and was able to watch tv once
> > > again.
> > >
> > > I believe we have ruled out the firmware.. could there be
> > > something in ivtv 0.4.1/2 that is causing the grief? Is there
> > > some means of enabling more verbose debug messages? I don't mind
> > > recompiling...
> >
> > Well, ivtv-0.4.1 switched to the hotplug mechanism. My guess the
> > problem is with that.
> >
> > Edit ivtv-firmware.c, look for CONFIG_FW_LOADER and replace that
> > #if with #if 0. Do the same in ivtv-driver.h and cx25840.h.
> >
> > Recompile, install and test. If it now works again, then it is the
> > new hotplug stuff that breaks things. But why don't I get the same
> > problems? Weird.
> >
> > If it is hotplug related and if you are handy with C, then can you
> > perhaps do some tests? I was thinking of hacking ivtv-firmware.c so
> > that the firmware load routines so a simple sum of all the bytes in
> > the firmware and then show the grand total when done. I'd be very
> > interested to see if there are any difference between the hotplug
> > and non-hotplug cases.
--- i.c 2006-01-02 01:24:02.000000000 +0100
+++ ivtv-firmware.c 2006-01-02 01:31:30.000000000 +0100
@@ -105,6 +105,8 @@
const struct firmware *fw = NULL;
struct pci_dev *pdev = itv->dev;
int retval = -ENOMEM;
+ u32 sum = 0;
+ int i;
if (request_firmware(&fw, fn, FWDEV(pdev)) == 0) {
if (fw->size >= size) {
@@ -114,8 +116,10 @@
retval = fw->size;
memcpy(mem, fw->data, fw->size);
}
+ for (i = 0; i < size; i++)
+ sum += ((u8 *)fw->data)[i];
release_firmware(fw);
- IVTV_INFO("loaded %s firmware (%d bytes)\n", fn, retval);
+ IVTV_INFO("loaded %s firmware (%d bytes, sum = %08x)\n", fn, retval, sum);
} else {
IVTV_INFO("unable to open firmware %s\n", fn);
IVTV_INFO("did you put the firmware in the hotplug firmware directory?\n");
@@ -152,6 +156,9 @@
static int ivtv_enc_firmware_copy(struct ivtv *itv)
{
+ u32 sum = 0;
+ int i;
+
IVTV_DEBUG_INFO("Loading encoder image\n");
if (load_fw_direct(ivtv_efw?ivtv_efw:IVTV_FIRM_ENC_FILENAME,
@@ -160,6 +167,10 @@
IVTV_DEBUG_WARN("failed loading encoder firmware\n");
return -3;
}
+ for (i = 0; i < IVTV_FIRM_IMAGE_SIZE; i++)
+ sum += ((u8 *)itv->enc_mem)[i];
+ IVTV_INFO("firmware checksum = %08x\n", sum);
+
return 0;
}
_______________________________________________
ivtv-users mailing list
[email protected]
http://ivtvdriver.org/mailman/listinfo/ivtv-users