All of lore.kernel.org
 help / color / mirror / Atom feed
* em28xx/xc3028 - kernel driver vs. Markus Rechberger's driver
@ 2010-06-22 21:25 Thorsten Hirsch
  2010-06-22 21:52 ` Devin Heitmueller
  0 siblings, 1 reply; 15+ messages in thread
From: Thorsten Hirsch @ 2010-06-22 21:25 UTC (permalink / raw)
  To: linux-media

Hi,

as far as I know there's been some trouble in the past regarding
Markus Rechberger's em28xx driver (em28xx-new) and the official
development line, resulting in the current situation:

- M. Rechberger isn't developing his driver anymore
- kernel driver doesn't support em28xx/xc3028 based usb sticks
(cinergy usb t xs)

Can I help to solve the situation?

So far I opened a bug report on launchpad
(https://bugs.launchpad.net/ubuntu/+source/linux/+bug/460636)
describing the situation with both drivers. I also tried to update M.
Rechberger's driver making it work in more recent kernels. This worked
for a short while, but then my usb stick lost its official (terratec
branded) usb id and I couldn't manage to make it work again since. The
current situation for my patched version of M. Rechberger's driver is,
that everything seems to work fine except for locking channels / some
tuning stuff ...well, I don't know exactly, I just see that kaffeine
detects the device and can scan for channels. While the 2 signal bars
(snr/quality) are pretty active and even the green tuning led (in
kaffeine) is very often active, there is just no channel entering the
list.

Regarding the official em28xx driver my usb stick is far away from
working. It stops as soon as when the firmware is being loaded:

[  576.009547] xc2028 5-0060: Incorrect readback of firmware version

I already wrote an email to Mauro Carvalho Chehab (the author of the
em28xx driver) and he told me that my firmware file must be corrupted.
That's xc3028-v27.fw. My version is from Ubuntu's nonfree firmware
package. But it's the same file as when I follow Mauro's description
of how to extract the firmware from the Windows driver
(extract_xc3028.pl). So it looks as if the Cinergy USB T XS needs a
different xc3028-v27.fw file.

What about the firmware in M. Rechberger's driver? Well, it doesn't
depend on an external firmware file, because the firmware is included
in xc3028/xc3028_firmwares.h, which has the following copyright note:
(c) 2006, Xceive Corporation. Looks like the official one, so I guess
it should work. And since my device was already working with that
firmware a while ago when Markus was still developing his driver I
guess I should focus on the following question:

=> How can I extract the firmware from Xceive's official
xc3028/xc3028_firmwares.h and making it work with the em28xx driver
(vanilla kernel)?

I wrote a perl script for this job ...well, at least for extraction.
Now I've got 48 firmware files:

XC3028_base_firmware_i2c_files_base_firmwares_8mhz_init_SEQUENCE
XC3028_base_firmware_i2c_files_base_firmwares_8mhz_mts_init_SEQUENCE
XC3028_base_firmware_i2c_files_base_firmwares_fm_init_SEQUENCE
XC3028_base_firmware_i2c_files_base_firmwares_fm_input1_init_SEQUENCE
XC3028_base_firmware_i2c_files_base_firmwares_init_SEQUENCE
XC3028_base_firmware_i2c_files_base_firmwares_mts_init_SEQUENCE
XC3028_std_firmware_bg_pal_a2_a_SEQUENCE
XC3028_std_firmware_bg_pal_a2_a_mts_SEQUENCE
XC3028_std_firmware_bg_pal_a2_b_SEQUENCE
XC3028_std_firmware_bg_pal_a2_b_mts_SEQUENCE
XC3028_std_firmware_bg_pal_nicam_a_SEQUENCE
XC3028_std_firmware_bg_pal_nicam_a_mts_SEQUENCE
XC3028_std_firmware_bg_pal_nicam_b_SEQUENCE
XC3028_std_firmware_bg_pal_nicam_b_mts_SEQUENCE
XC3028_std_firmware_dk_pal_a2_SEQUENCE
XC3028_std_firmware_dk_pal_a2_mts_SEQUENCE
XC3028_std_firmware_dk_pal_nicam_SEQUENCE
XC3028_std_firmware_dk_pal_nicam_mts_SEQUENCE
XC3028_std_firmware_dk_secam_a2_dk1_SEQUENCE
XC3028_std_firmware_dk_secam_a2_dk1_mts_SEQUENCE
XC3028_std_firmware_dk_secam_a2_l_dk3_SEQUENCE
XC3028_std_firmware_dk_secam_a2_l_dk3_mts_SEQUENCE
XC3028_std_firmware_dtv6_atsc_2633_SEQUENCE
XC3028_std_firmware_dtv6_qam_2620_SEQUENCE
XC3028_std_firmware_dtv6_qam_2633_SEQUENCE
XC3028_std_firmware_dtv7_2620_SEQUENCE
XC3028_std_firmware_dtv7_2633_SEQUENCE
XC3028_std_firmware_dtv78_2620_SEQUENCE
XC3028_std_firmware_dtv78_2633_SEQUENCE
XC3028_std_firmware_dtv8_2620_SEQUENCE
XC3028_std_firmware_dtv8_2633_SEQUENCE
XC3028_std_firmware_fm_SEQUENCE
XC3028_std_firmware_i_pal_nicam_SEQUENCE
XC3028_std_firmware_i_pal_nicam_mts_SEQUENCE
XC3028_std_firmware_l_secam_am_SEQUENCE
XC3028_std_firmware_l_secam_nicam_SEQUENCE
XC3028_std_firmware_lp_secam_nicam_SEQUENCE
XC3028_std_firmware_mn_ntscpal_a2_SEQUENCE
XC3028_std_firmware_mn_ntscpal_a2_lcd_SEQUENCE
XC3028_std_firmware_mn_ntscpal_a2_lcd_nogd_SEQUENCE
XC3028_std_firmware_mn_ntscpal_a2_mts_SEQUENCE
XC3028_std_firmware_mn_ntscpal_btsc_SEQUENCE
XC3028_std_firmware_mn_ntscpal_btsc_lcd_SEQUENCE
XC3028_std_firmware_mn_ntscpal_btsc_lcd_nogd_SEQUENCE
XC3028_std_firmware_mn_ntscpal_eiaj_SEQUENCE
XC3028_std_firmware_mn_ntscpal_mts_SEQUENCE
XC3028_std_firmware_mn_ntscpal_mts_lcd_SEQUENCE
XC3028_std_firmware_mn_ntscpal_mts_lcd_nogd_SEQUENCE

What do I do now? How can I pack them into 1 firmware file that is
compatible with the kernel's em28xx driver?

Thorsten

P.S.: There's also another thing I was trying - I have the Windows BDA
driver's emBDA.sys file that consists of the firmware. Unfortunately
Mauro's extract_xc3028.pl doesn't work with it, because it works with
fixed offsets, thus it is tightly bound to the HVR driver Mauro was
using for extraction, which is hcw85bda.sys. I tried to find the same
hex patterns in my emBDA.sys that I could see at the offsets in
hcw85bda.sys, but I was not very successful. I think I could find 4
base firmware files and ~30 std firmware files, but I don't know their
sizes and ~10 offsets (or more) are still missing.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: em28xx/xc3028 - kernel driver vs. Markus Rechberger's driver
  2010-06-22 21:25 em28xx/xc3028 - kernel driver vs. Markus Rechberger's driver Thorsten Hirsch
@ 2010-06-22 21:52 ` Devin Heitmueller
  2010-06-22 22:15   ` Mauro Carvalho Chehab
  0 siblings, 1 reply; 15+ messages in thread
From: Devin Heitmueller @ 2010-06-22 21:52 UTC (permalink / raw)
  To: Thorsten Hirsch; +Cc: linux-media

On Tue, Jun 22, 2010 at 5:25 PM, Thorsten Hirsch <t.hirsch@web.de> wrote:
> Hi,
>
> as far as I know there's been some trouble in the past regarding
> Markus Rechberger's em28xx driver (em28xx-new) and the official
> development line, resulting in the current situation:
>
> - M. Rechberger isn't developing his driver anymore
> - kernel driver doesn't support em28xx/xc3028 based usb sticks
> (cinergy usb t xs)
>
> Can I help to solve the situation?
>
> So far I opened a bug report on launchpad
> (https://bugs.launchpad.net/ubuntu/+source/linux/+bug/460636)
> describing the situation with both drivers. I also tried to update M.
> Rechberger's driver making it work in more recent kernels. This worked
> for a short while, but then my usb stick lost its official (terratec
> branded) usb id and I couldn't manage to make it work again since. The
> current situation for my patched version of M. Rechberger's driver is,
> that everything seems to work fine except for locking channels / some
> tuning stuff ...well, I don't know exactly, I just see that kaffeine
> detects the device and can scan for channels. While the 2 signal bars
> (snr/quality) are pretty active and even the green tuning led (in
> kaffeine) is very often active, there is just no channel entering the
> list.
>
> Regarding the official em28xx driver my usb stick is far away from
> working. It stops as soon as when the firmware is being loaded:
>
> [  576.009547] xc2028 5-0060: Incorrect readback of firmware version
>
> I already wrote an email to Mauro Carvalho Chehab (the author of the
> em28xx driver) and he told me that my firmware file must be corrupted.
> That's xc3028-v27.fw. My version is from Ubuntu's nonfree firmware
> package. But it's the same file as when I follow Mauro's description
> of how to extract the firmware from the Windows driver
> (extract_xc3028.pl). So it looks as if the Cinergy USB T XS needs a
> different xc3028-v27.fw file.
>
> What about the firmware in M. Rechberger's driver? Well, it doesn't
> depend on an external firmware file, because the firmware is included
> in xc3028/xc3028_firmwares.h, which has the following copyright note:
> (c) 2006, Xceive Corporation. Looks like the official one, so I guess
> it should work. And since my device was already working with that
> firmware a while ago when Markus was still developing his driver I
> guess I should focus on the following question:
>
> => How can I extract the firmware from Xceive's official
> xc3028/xc3028_firmwares.h and making it work with the em28xx driver
> (vanilla kernel)?

I hate to say that "you're totally on the wrong track", except that's
almost certainly the case.

You've got the right firmware already (and there isn't a 'different
v.27').  That error occurs if the driver is unable to read back the
version from the chip after loading the firmware.  It's most likely
the board profile isn't setup properly to bring the chip out of reset.

The firmware is separated out because the Linux kernel process does
permit firmware embedding.  It *must* be provided as a separate blob.
Also, Xceive hasn't granted permission to redistribute the xc3028
firmware, which is why it usually has to be extracted from the Windows
driver (unlike the xc4000 and xc5000 where they have explicitly
granted redistribution rights).

Regarding the statement that the "kernel driver doesn't support
em28xx/xc3028 based usb sticks", this is simply incorrect.  The
current kernel supports a variety of devices that have a combination
of the em28xx and xc3028.  A board profile needs to be added for the
device in question (I have the board but haven't had a chance to do
the necessary work).

Exactly what is the USB ID of the board you have (there are a variety
different versions of the board with that name).  I probably have the
board already, but I want to be sure.

In the end, it's probably something like 12 lines of code need to be
added to the current driver.

Devin

-- 
Devin J. Heitmueller - Kernel Labs
http://www.kernellabs.com

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: em28xx/xc3028 - kernel driver vs. Markus Rechberger's driver
  2010-06-22 21:52 ` Devin Heitmueller
@ 2010-06-22 22:15   ` Mauro Carvalho Chehab
  2010-06-22 22:36     ` Thorsten Hirsch
  2010-06-29 13:42     ` Torsten Krah
  0 siblings, 2 replies; 15+ messages in thread
From: Mauro Carvalho Chehab @ 2010-06-22 22:15 UTC (permalink / raw)
  To: Devin Heitmueller; +Cc: Thorsten Hirsch, linux-media

Em 22-06-2010 18:52, Devin Heitmueller escreveu:
> On Tue, Jun 22, 2010 at 5:25 PM, Thorsten Hirsch <t.hirsch@web.de> wrote:
>> Hi,
>>
>> as far as I know there's been some trouble in the past regarding
>> Markus Rechberger's em28xx driver (em28xx-new) and the official
>> development line, resulting in the current situation:
>>
>> - M. Rechberger isn't developing his driver anymore
>> - kernel driver doesn't support em28xx/xc3028 based usb sticks
>> (cinergy usb t xs)
>>
>> Can I help to solve the situation?
>>
>> So far I opened a bug report on launchpad
>> (https://bugs.launchpad.net/ubuntu/+source/linux/+bug/460636)
>> describing the situation with both drivers. I also tried to update M.
>> Rechberger's driver making it work in more recent kernels. This worked
>> for a short while, but then my usb stick lost its official (terratec
>> branded) usb id and I couldn't manage to make it work again since.

You probably damaged the contents of the device's eeprom. If you have the
logs with the previous eeprom contents somewhere, it is possible to recover
it. There's an util at v4l-utils that allows re-writing the information at
the eeprom.
>> The
>> current situation for my patched version of M. Rechberger's driver is,
>> that everything seems to work fine except for locking channels / some
>> tuning stuff ...well, I don't know exactly, I just see that kaffeine
>> detects the device and can scan for channels. While the 2 signal bars
>> (snr/quality) are pretty active and even the green tuning led (in
>> kaffeine) is very often active, there is just no channel entering the
>> list.
>>
>> Regarding the official em28xx driver my usb stick is far away from
>> working. It stops as soon as when the firmware is being loaded:
>>
>> [  576.009547] xc2028 5-0060: Incorrect readback of firmware version
>>
>> I already wrote an email to Mauro Carvalho Chehab (the author of the
>> em28xx driver) and he told me that my firmware file must be corrupted.
>> That's xc3028-v27.fw. My version is from Ubuntu's nonfree firmware
>> package. But it's the same file as when I follow Mauro's description
>> of how to extract the firmware from the Windows driver
>> (extract_xc3028.pl). So it looks as if the Cinergy USB T XS needs a
>> different xc3028-v27.fw file.
>>
>> What about the firmware in M. Rechberger's driver? Well, it doesn't
>> depend on an external firmware file, because the firmware is included
>> in xc3028/xc3028_firmwares.h, which has the following copyright note:
>> (c) 2006, Xceive Corporation. Looks like the official one, so I guess
>> it should work. And since my device was already working with that
>> firmware a while ago when Markus was still developing his driver I
>> guess I should focus on the following question:
>>
>> => How can I extract the firmware from Xceive's official
>> xc3028/xc3028_firmwares.h and making it work with the em28xx driver
>> (vanilla kernel)?

> I hate to say that "you're totally on the wrong track", except that's
> almost certainly the case.
> 
> You've got the right firmware already (and there isn't a 'different
> v.27').  That error occurs if the driver is unable to read back the
> version from the chip after loading the firmware.  It's most likely
> the board profile isn't setup properly to bring the chip out of reset.

I agree with the diagnosis. 

As you're now saying that the eeprom contents of your board got
damaged (different USB ID), this means that it is using the wrong setup
for the GPIO pins. One (or two) pins are required to poweron/reset the
xc3028 device. If the pin configuration is wrong, the firmware won't load
at xc3028, and the device won't work.

> The firmware is separated out because the Linux kernel process does
> permit firmware embedding.  It *must* be provided as a separate blob.

Due to GPL licensing for the kernel drivers, the only legal way for a 
firmware to be inside the kernel (or inside a kernel driver) is if the 
firmware is also provided as GPL. That's why a separate file is required.

> Also, Xceive hasn't granted permission to redistribute the xc3028
> firmware, which is why it usually has to be extracted from the Windows
> driver (unlike the xc4000 and xc5000 where they have explicitly
> granted redistribution rights).
> 
> Regarding the statement that the "kernel driver doesn't support
> em28xx/xc3028 based usb sticks", this is simply incorrect.  The
> current kernel supports a variety of devices that have a combination
> of the em28xx and xc3028.  A board profile needs to be added for the
> device in question (I have the board but haven't had a chance to do
> the necessary work).
> 
> Exactly what is the USB ID of the board you have (there are a variety
> different versions of the board with that name).  I probably have the
> board already, but I want to be sure.
> 
> In the end, it's probably something like 12 lines of code need to be
> added to the current driver.
> 
> Devin
> 


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: em28xx/xc3028 - kernel driver vs. Markus Rechberger's driver
  2010-06-22 22:15   ` Mauro Carvalho Chehab
@ 2010-06-22 22:36     ` Thorsten Hirsch
  2010-06-29 13:42     ` Torsten Krah
  1 sibling, 0 replies; 15+ messages in thread
From: Thorsten Hirsch @ 2010-06-22 22:36 UTC (permalink / raw)
  To: linux-media

Thank you, Devin and Mauro.

Unfortunately I don't have the eeprom data. I can only tell you what
happened to the usb id:

original: 0ccd:0043 TerraTec Electronic GmbH
now: eb1a:2871 eMPIA Technology, Inc.

With 2 lines added to em28xx-cards.c (see the diff at the end of this
mail) I was hoping to get back the old behavior. But you're right -
it's not sufficient. Guess I really need to recover the eeprom.

So... Devin, do you have the very same board?

Thorsten


diff --git a/drivers/media/video/em28xx/em28xx-cards.c
b/drivers/media/video/em28xx/em28xx-cards.c
index b0fb083..ef2ecd7 100644
--- a/drivers/media/video/em28xx/em28xx-cards.c
+++ b/drivers/media/video/em28xx/em28xx-cards.c
@@ -1720,6 +1720,8 @@ struct usb_device_id em28xx_id_table[] = {
                        .driver_info = EM2880_BOARD_TERRATEC_HYBRID_XS },
        { USB_DEVICE(0x0ccd, 0x0043),
                        .driver_info = EM2870_BOARD_TERRATEC_XS },
+       { USB_DEVICE(0xeb1a, 0x2871),
+                       .driver_info = EM2870_BOARD_TERRATEC_XS },
        { USB_DEVICE(0x0ccd, 0x0047),
                        .driver_info = EM2880_BOARD_TERRATEC_PRODIGY_XS },
        { USB_DEVICE(0x0ccd, 0x0084),

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* Re: em28xx/xc3028 - kernel driver vs. Markus Rechberger's driver
  2010-06-22 22:15   ` Mauro Carvalho Chehab
  2010-06-22 22:36     ` Thorsten Hirsch
@ 2010-06-29 13:42     ` Torsten Krah
  2010-06-29 14:20       ` Douglas Schilling Landgraf
  1 sibling, 1 reply; 15+ messages in thread
From: Torsten Krah @ 2010-06-29 13:42 UTC (permalink / raw)
  To: linux-media; +Cc: Mauro Carvalho Chehab, Devin Heitmueller, Thorsten Hirsch

[-- Attachment #1: Type: Text/Plain, Size: 1045 bytes --]

Am Mittwoch, 23. Juni 2010, um 00:15:36 schrieb Mauro Carvalho Chehab:
> You probably damaged the contents of the device's eeprom. If you have the
> logs with the previous eeprom contents somewhere, it is possible to recover
> it. There's an util at v4l-utils that allows re-writing the information at
> the eeprom.

Hi,

can you tell me which util and how it can be done.
I am too affected and damaged the eeprom (don't know how) - but my usb id did 
change too from e1ba:2870 to eb1a:2871. 

Still need to find a old dmesg log for my stick but it should be this:

http://www.mail-archive.com/linux-media@vger.kernel.org/msg14758.html

Is this "output" enough to rewrite the correct eeprom date back to my "borked" 
stick or is something else needed?

thx

Torsten

-- 
Bitte senden Sie mir keine Word- oder PowerPoint-Anhänge.
Siehe http://www.gnu.org/philosophy/no-word-attachments.de.html

Really, I'm not out to destroy Microsoft. That will just be a 
completely unintentional side effect."
	-- Linus Torvalds

[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 1996 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: em28xx/xc3028 - kernel driver vs. Markus Rechberger's driver
  2010-06-29 13:42     ` Torsten Krah
@ 2010-06-29 14:20       ` Douglas Schilling Landgraf
  2010-06-29 19:42         ` Torsten Krah
  0 siblings, 1 reply; 15+ messages in thread
From: Douglas Schilling Landgraf @ 2010-06-29 14:20 UTC (permalink / raw)
  To: tkrah
  Cc: linux-media, Mauro Carvalho Chehab, Devin Heitmueller, Thorsten Hirsch

Hello Torsten,

On Tue, Jun 29, 2010 at 10:42 AM, Torsten Krah
<tkrah@fachschaft.imn.htwk-leipzig.de> wrote:
> Am Mittwoch, 23. Juni 2010, um 00:15:36 schrieb Mauro Carvalho Chehab:
>> You probably damaged the contents of the device's eeprom. If you have the
>> logs with the previous eeprom contents somewhere, it is possible to recover
>> it. There's an util at v4l-utils that allows re-writing the information at
>> the eeprom.
>
> Hi,
>
> can you tell me which util and how it can be done.
> I am too affected and damaged the eeprom (don't know how) - but my usb id did
> change too from e1ba:2870 to eb1a:2871.
>
> Still need to find a old dmesg log for my stick but it should be this:
>
> http://www.mail-archive.com/linux-media@vger.kernel.org/msg14758.html
>
> Is this "output" enough to rewrite the correct eeprom date back to my "borked"
> stick or is something else needed?


Yes, I think it's enough, of course if it's not the right one, you
always can re-write until you
get the right eeprom. Good luck!

The rewrite_eeprom.pl is available under git.utils tree:
http://git.linuxtv.org/v4l-utils.git

All instructions are available into the source code. Let me know if
you have any problem with such tool.

BTW, maybe is a good idea to create at wikipage a page for EEPROMs.

Cheers
Douglas

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: em28xx/xc3028 - kernel driver vs. Markus Rechberger's driver
  2010-06-29 14:20       ` Douglas Schilling Landgraf
@ 2010-06-29 19:42         ` Torsten Krah
  2010-06-29 20:29           ` Douglas Schilling Landgraf
  0 siblings, 1 reply; 15+ messages in thread
From: Torsten Krah @ 2010-06-29 19:42 UTC (permalink / raw)
  To: Douglas Schilling Landgraf
  Cc: linux-media, Mauro Carvalho Chehab, Devin Heitmueller, Thorsten Hirsch

[-- Attachment #1: Type: Text/Plain, Size: 977 bytes --]

Am Dienstag, 29. Juni 2010 schrieb Douglas Schilling Landgraf:
> The rewrite_eeprom.pl is available under git.utils tree:
> http://git.linuxtv.org/v4l-utils.git
> 
> All instructions are available into the source code. Let me know if
> you have any problem with such tool.

Hi, yes i have problems with the tool :-).

Connected my "broken" device:

lsusb:
Bus 001 Device 002: ID eb1a:2871 eMPIA Technology, Inc.

dmesg:
[  455.348172] usb 1-1: new high speed USB device using ehci_hcd and address 2
[  455.481791] usb 1-1: configuration #1 chosen from 1 choice
[  455.609668] usbcore: registered new interface driver snd-usb-audio


Running the script which does generate the recover script does work.
But running this one fails with:

Could not detect i2c bus from any device, run again ./rewrite_eeprom.pl. Did 
you forget to connect the device?
Modules supported: em28xx saa7134

Device is connected.

Anything what i can do?

thx

Torsten

[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 1996 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: em28xx/xc3028 - kernel driver vs. Markus Rechberger's driver
  2010-06-29 19:42         ` Torsten Krah
@ 2010-06-29 20:29           ` Douglas Schilling Landgraf
  2010-06-29 21:07             ` Thorsten Hirsch
  2010-06-30 19:16             ` Torsten Krah
  0 siblings, 2 replies; 15+ messages in thread
From: Douglas Schilling Landgraf @ 2010-06-29 20:29 UTC (permalink / raw)
  To: tkrah
  Cc: linux-media, Mauro Carvalho Chehab, Devin Heitmueller,
	Thorsten Hirsch, Douglas Schilling Landgraf

Hello,

On Tue, Jun 29, 2010 at 4:42 PM, Torsten Krah
<tkrah@fachschaft.imn.htwk-leipzig.de> wrote:
> Am Dienstag, 29. Juni 2010 schrieb Douglas Schilling Landgraf:
>> The rewrite_eeprom.pl is available under git.utils tree:
>> http://git.linuxtv.org/v4l-utils.git
>>
>> All instructions are available into the source code. Let me know if
>> you have any problem with such tool.
>
> Hi, yes i have problems with the tool :-).
>
> Connected my "broken" device:
>
> lsusb:
> Bus 001 Device 002: ID eb1a:2871 eMPIA Technology, Inc.
>
> dmesg:
> [  455.348172] usb 1-1: new high speed USB device using ehci_hcd and address 2
> [  455.481791] usb 1-1: configuration #1 chosen from 1 choice
> [  455.609668] usbcore: registered new interface driver snd-usb-audio
>
>
> Running the script which does generate the recover script does work.
> But running this one fails with:
>
> Could not detect i2c bus from any device, run again ./rewrite_eeprom.pl. Did
> you forget to connect the device?
> Modules supported: em28xx saa7134
>
> Device is connected.
>
> Anything what i can do?

Could you please verify if you have  the module i2c-dev loaded?

Example:

#lsmod | grep i2c_dev
i2c_dev                 6976  0
i2c_core               21104  11
i2c_dev,lgdt330x,tuner_xc2028,tuner,tvp5150,saa7115,em28xx,v4l2_common,videodev,tveeprom,i2c_i801

If yes, please give us the output of:

#i2cdetect -l
i2c-0	smbus     	SMBus I801 adapter at ece0      	SMBus adapter
i2c-1	smbus     	em28xx #0                       	SMBus adapter
                                           ^ here my device/driver

Basically, in your case the tool is not able to recognize your device
by i2cdetect.This may happen because i2c_dev module was not able to
load?
If the module is not loaded, please load it manually and give a new try.

I did right now a test with i2c-tools 3.0.0 and 3.0.2.
http://dl.lm-sensors.org/i2c-tools/releases/

Let us know the results.

Cheers
Douglas

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: em28xx/xc3028 - kernel driver vs. Markus Rechberger's driver
  2010-06-29 20:29           ` Douglas Schilling Landgraf
@ 2010-06-29 21:07             ` Thorsten Hirsch
  2010-06-30 19:16             ` Torsten Krah
  1 sibling, 0 replies; 15+ messages in thread
From: Thorsten Hirsch @ 2010-06-29 21:07 UTC (permalink / raw)
  To: linux-media

Hi,

success! I could recover my eeprom with Mauro's rewrite_eeprom.pl.
@Torsten: I also had to modprobe i2c-dev manually. And I even
modprobed i2c-smbus.

Unfortunately the driver (kernel 2.6.34) still doesn't work. There's
no /dev/dvb (even after loading em28xx_dvb manually as it has not been
loaded automatically.

Please have another look at the attached dmesg output.

Thorsten


[ 3481.670969] usb 2-3: new high speed USB device using ehci_hcd and address 5
[ 3481.829797] em28xx: New device TerraTec Electronic GmbH Cinergy T
USB XS @ 480 Mbps (0ccd:0043, interface 0, class 0)
[ 3481.829956] em28xx #0: chip ID is em2870
[ 3481.983457] em28xx #0: i2c eeprom 00: 1a eb 67 95 cd 0c 43 00 c0 12
81 00 6a 24 8e 34
[ 3481.983483] em28xx #0: i2c eeprom 10: 00 00 06 57 02 0c 00 00 00 00
00 00 00 00 00 00
[ 3481.983504] em28xx #0: i2c eeprom 20: 44 00 00 00 f0 10 01 00 00 00
00 00 5b 00 00 00
[ 3481.983525] em28xx #0: i2c eeprom 30: 00 00 20 40 20 80 02 20 01 01
00 00 26 3c e3 49
[ 3481.983547] em28xx #0: i2c eeprom 40: 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00
[ 3481.983568] em28xx #0: i2c eeprom 50: 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00
[ 3481.983589] em28xx #0: i2c eeprom 60: 00 00 00 00 00 00 00 00 00 00
24 03 43 00 69 00
[ 3481.983611] em28xx #0: i2c eeprom 70: 6e 00 65 00 72 00 67 00 79 00
20 00 54 00 20 00
[ 3481.983632] em28xx #0: i2c eeprom 80: 55 00 53 00 42 00 20 00 58 00
53 00 00 00 34 03
[ 3481.983653] em28xx #0: i2c eeprom 90: 54 00 65 00 72 00 72 00 61 00
54 00 65 00 63 00
[ 3481.983675] em28xx #0: i2c eeprom a0: 20 00 45 00 6c 00 65 00 63 00
74 00 72 00 6f 00
[ 3481.983696] em28xx #0: i2c eeprom b0: 6e 00 69 00 63 00 20 00 47 00
6d 00 62 00 48 00
[ 3481.983717] em28xx #0: i2c eeprom c0: 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00
[ 3481.983738] em28xx #0: i2c eeprom d0: 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00
[ 3481.983759] em28xx #0: i2c eeprom e0: 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00
[ 3481.983781] em28xx #0: i2c eeprom f0: 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00
[ 3481.983805] em28xx #0: EEPROM ID= 0x9567eb1a, EEPROM hash = 0x5a1fc1df
[ 3481.983810] em28xx #0: EEPROM info:
[ 3481.983814] em28xx #0:       No audio on board.
[ 3481.983817] em28xx #0:       500mA max power
[ 3481.983823] em28xx #0:       Table at 0x06, strings=0x246a, 0x348e, 0x0000
[ 3481.984942] em28xx #0: Identified as Terratec Cinergy T XS (card=43)
[ 3481.984947] em28xx #0:
[ 3481.984949]
[ 3481.984953] em28xx #0: The support for this board weren't valid yet.
[ 3481.984958] em28xx #0: Please send a report of having this working
[ 3481.984962] em28xx #0: not to V4L mailing list (and/or to other addresses)
[ 3481.984965]
[ 3481.990805] Chip ID is not zero. It is not a TEA5767
[ 3481.990980] tuner 5-0060: chip found @ 0xc0 (em28xx #0)
[ 3481.991163] xc2028 5-0060: creating new instance
[ 3481.991169] xc2028 5-0060: type set to XCeive xc2028/xc3028 tuner
[ 3481.991182] usb 2-3: firmware: requesting xc3028-v27.fw
[ 3481.998357] xc2028 5-0060: Loading 80 firmware images from
xc3028-v27.fw, type: xc2028 firmware, ver 2.7
[ 3482.052776] xc2028 5-0060: Loading firmware for type=BASE (1), id
0000000000000000.
[ 3483.003956] xc2028 5-0060: Loading firmware for type=(0), id
000000000000b700.
[ 3483.018947] SCODE (20000000), id 000000000000b700:
[ 3483.018961] xc2028 5-0060: Loading SCODE for type=MONO SCODE
HAS_IF_4320 (60008000), id 0000000000008000.
[ 3483.054451] xc2028 5-0060: Returned an incorrect version. However,
read is not reliable enough. Ignoring it.
[ 3483.220169] em28xx #0: v4l2 driver version 0.1.2
[ 3483.225202] em28xx #0: V4L2 video device registered as video1
[ 3508.137491] Em28xx: Initialized (Em28xx dvb Extension) extension

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: em28xx/xc3028 - kernel driver vs. Markus Rechberger's driver
  2010-06-29 20:29           ` Douglas Schilling Landgraf
  2010-06-29 21:07             ` Thorsten Hirsch
@ 2010-06-30 19:16             ` Torsten Krah
  2010-07-02  0:59               ` Douglas Schilling Landgraf
  1 sibling, 1 reply; 15+ messages in thread
From: Torsten Krah @ 2010-06-30 19:16 UTC (permalink / raw)
  To: Douglas Schilling Landgraf
  Cc: linux-media, Mauro Carvalho Chehab, Devin Heitmueller, Thorsten Hirsch

[-- Attachment #1: Type: Text/Plain, Size: 1385 bytes --]

Am Dienstag, 29. Juni 2010 schrieben Sie:
> Could you please verify if you have  the module i2c-dev loaded?

Yes it is.

> 
> Example:
> 
> #lsmod | grep i2c_dev
> i2c_dev                 6976  0
> i2c_core               21104  11
> i2c_dev,lgdt330x,tuner_xc2028,tuner,tvp5150,saa7115,em28xx,v4l2_common,vide
> odev,tveeprom,i2c_i801

#lsmod | grep i2c
i2c_dev                 4970  0 
i2c_algo_bit            5028  1 radeon


> 
> If yes, please give us the output of:
> 
> #i2cdetect -l
> i2c-0   smbus           SMBus I801 adapter at ece0              SMBus
> adapter i2c-1   smbus           em28xx
> #0                               SMBus adapter ^ here my device/driver

Thats the output:

# i2cdetect -l
i2c-0	i2c       	                                	I2C adapter


> 
> Basically, in your case the tool is not able to recognize your device
> by i2cdetect.This may happen because i2c_dev module was not able to
> load?

Its loaded.

> If the module is not loaded, please load it manually and give a new try.

Did that but still no success.

> 
> I did right now a test with i2c-tools 3.0.0 and 3.0.2.
> http://dl.lm-sensors.org/i2c-tools/releases/

I am using version 3.0.2.

> 
> Let us know the results.


Did what you told but still no success using the tool - any other hints or 
things i can do?

thx


Torsten

[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 1996 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: em28xx/xc3028 - kernel driver vs. Markus Rechberger's driver
  2010-06-30 19:16             ` Torsten Krah
@ 2010-07-02  0:59               ` Douglas Schilling Landgraf
  2010-07-02 13:47                 ` Torsten Krah
  0 siblings, 1 reply; 15+ messages in thread
From: Douglas Schilling Landgraf @ 2010-07-02  0:59 UTC (permalink / raw)
  To: tkrah
  Cc: linux-media, Mauro Carvalho Chehab, Devin Heitmueller, Thorsten Hirsch

Hi,

On Wed, Jun 30, 2010 at 4:16 PM, Torsten Krah
<tkrah@fachschaft.imn.htwk-leipzig.de> wrote:
> Am Dienstag, 29. Juni 2010 schrieben Sie:
>> Could you please verify if you have  the module i2c-dev loaded?
>
> Yes it is.
>
>>
>> Example:
>>
>> #lsmod | grep i2c_dev
>> i2c_dev                 6976  0
>> i2c_core               21104  11
>> i2c_dev,lgdt330x,tuner_xc2028,tuner,tvp5150,saa7115,em28xx,v4l2_common,vide
>> odev,tveeprom,i2c_i801
>
> #lsmod | grep i2c
> i2c_dev                 4970  0
> i2c_algo_bit            5028  1 radeon
>
>
>>
>> If yes, please give us the output of:
>>
>> #i2cdetect -l
>> i2c-0   smbus           SMBus I801 adapter at ece0              SMBus
>> adapter i2c-1   smbus           em28xx
>> #0                               SMBus adapter ^ here my device/driver
>
> Thats the output:
>
> # i2cdetect -l
> i2c-0   i2c                                                     I2C adapter
>
>
>>
>> Basically, in your case the tool is not able to recognize your device
>> by i2cdetect.This may happen because i2c_dev module was not able to
>> load?
>
> Its loaded.
>
>> If the module is not loaded, please load it manually and give a new try.
>
> Did that but still no success.
>
>>
>> I did right now a test with i2c-tools 3.0.0 and 3.0.2.
>> http://dl.lm-sensors.org/i2c-tools/releases/
>
> I am using version 3.0.2.
>
>>
>> Let us know the results.
>
>
> Did what you told but still no success using the tool - any other hints or
> things i can do?

humm, not really :-/ Are you sure em28xx/device get loaded when your
device is plugged?

A good test:

- unplug your device
- dmesg -c  (clear the dmesg)
- plug your device
- check your dmesg, see if there is any error or message and please
send to us the output.
- lsmod could help also.
- if it's ok, load the i2c modules

What's the message of rewirte_eeprom.pl? The same as Throsten?

@Thorsten, in my case never needed to load modprobed i2c-smbus also.
That's why rewrite_eeprom failed to you, the script is not looking
to load this module. Thanks for the feedback.

Cheers
Douglas

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: em28xx/xc3028 - kernel driver vs. Markus Rechberger's driver
  2010-07-02  0:59               ` Douglas Schilling Landgraf
@ 2010-07-02 13:47                 ` Torsten Krah
  2010-07-04 12:20                   ` Douglas Schilling Landgraf
  0 siblings, 1 reply; 15+ messages in thread
From: Torsten Krah @ 2010-07-02 13:47 UTC (permalink / raw)
  To: Douglas Schilling Landgraf, Thorsten Hirsch; +Cc: linux-media

[-- Attachment #1: Type: Text/Plain, Size: 1744 bytes --]

Am Freitag, 2. Juli 2010, um 02:59:57 schrieb Douglas Schilling Landgraf:
> humm, not really :-/ Are you sure em28xx/device get loaded when your
> device is plugged?
> 
> A good test:
> 
> - unplug your device
> - dmesg -c  (clear the dmesg)
> - plug your device
> - check your dmesg, see if there is any error or message and please
> send to us the output.
> - lsmod could help also.
> - if it's ok, load the i2c modules

The em28xx device gets not loaded because the usb id has changed and e1ba:2871 
is not associated to the em28xx-cards.
the usb id is wrong like i mentioned before - that may be the cause.
I provide you with dmesg later on.

Maybe i need the patch Thorsten did too, to patch the em28xx-cards.c to get 
the "new" wrong usb id regognized as a em28xx device so that i can reflash the 
eeprom of the device. I might give this a try later this day.

@Thorsten: Did you reflash the device eeprom with your patched em28xx driver 
or without the patch?

> 
> What's the message of rewirte_eeprom.pl? The same as Throsten?

No, all ok.My distribution is lacking any i2c_smbus module - can't load this 
one. Maybe Ubuntu does not build or 2.6.32 does not habe this one (looking 
through the source i did not find it yet - maybe i missed that).

> 
> @Thorsten, in my case never needed to load modprobed i2c-smbus also.
> That's why rewrite_eeprom failed to you, the script is not looking
> to load this module. Thanks for the feedback.


-- 
Bitte senden Sie mir keine Word- oder PowerPoint-Anhänge.
Siehe http://www.gnu.org/philosophy/no-word-attachments.de.html

Really, I'm not out to destroy Microsoft. That will just be a 
completely unintentional side effect."
	-- Linus Torvalds

[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 1996 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: em28xx/xc3028 - kernel driver vs. Markus Rechberger's driver
  2010-07-02 13:47                 ` Torsten Krah
@ 2010-07-04 12:20                   ` Douglas Schilling Landgraf
  2010-07-09 19:52                     ` Thorsten Hirsch
  2010-07-12 13:27                     ` Torsten Krah
  0 siblings, 2 replies; 15+ messages in thread
From: Douglas Schilling Landgraf @ 2010-07-04 12:20 UTC (permalink / raw)
  To: tkrah; +Cc: Thorsten Hirsch, linux-media

Hello,

On Fri, Jul 2, 2010 at 10:47 AM, Torsten Krah
<tkrah@fachschaft.imn.htwk-leipzig.de> wrote:
> Am Freitag, 2. Juli 2010, um 02:59:57 schrieb Douglas Schilling Landgraf:
>> humm, not really :-/ Are you sure em28xx/device get loaded when your
>> device is plugged?
>>
>> A good test:
>>
>> - unplug your device
>> - dmesg -c  (clear the dmesg)
>> - plug your device
>> - check your dmesg, see if there is any error or message and please
>> send to us the output.
>> - lsmod could help also.
>> - if it's ok, load the i2c modules
>
> The em28xx device gets not loaded because the usb id has changed and e1ba:2871
> is not associated to the em28xx-cards.
> the usb id is wrong like i mentioned before - that may be the cause.
> I provide you with dmesg later on.
>
> Maybe i need the patch Thorsten did too, to patch the em28xx-cards.c to get
> the "new" wrong usb id regognized as a em28xx device so that i can reflash the
> eeprom of the device. I might give this a try later this day.

Please try it, should be the root cause.

> @Thorsten: Did you reflash the device eeprom with your patched em28xx driver
> or without the patch?
>
>>
>> What's the message of rewirte_eeprom.pl? The same as Throsten?
>
> No, all ok.My distribution is lacking any i2c_smbus module - can't load this
> one. Maybe Ubuntu does not build or 2.6.32 does not habe this one (looking
> through the source i did not find it yet - maybe i missed that).

Well,in my tests never needed to  load i2c_smbus.

Let me know if you need any additional help.

Cheers
Douglas

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: em28xx/xc3028 - kernel driver vs. Markus Rechberger's driver
  2010-07-04 12:20                   ` Douglas Schilling Landgraf
@ 2010-07-09 19:52                     ` Thorsten Hirsch
  2010-07-12 13:27                     ` Torsten Krah
  1 sibling, 0 replies; 15+ messages in thread
From: Thorsten Hirsch @ 2010-07-09 19:52 UTC (permalink / raw)
  To: Douglas Schilling Landgraf; +Cc: tkrah, linux-media

Oh, sorry for the long delay.
Yes, I was using my fake-id patch.

@Torsten: just open
linux-2.6/drivers/media/video/em28xx/em28xx-cards.c and search for
"EM2870_BOARD_TERRATEC_XS". Then copy this line and the one above it,
and finally change the usb id in the copied line according to the
output of lsusb.

Thorsten

>> Maybe i need the patch Thorsten did too, to patch the em28xx-cards.c to get
>> the "new" wrong usb id regognized as a em28xx device so that i can reflash the
>> eeprom of the device. I might give this a try later this day.
>
> Please try it, should be the root cause.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: em28xx/xc3028 - kernel driver vs. Markus Rechberger's driver
  2010-07-04 12:20                   ` Douglas Schilling Landgraf
  2010-07-09 19:52                     ` Thorsten Hirsch
@ 2010-07-12 13:27                     ` Torsten Krah
  1 sibling, 0 replies; 15+ messages in thread
From: Torsten Krah @ 2010-07-12 13:27 UTC (permalink / raw)
  To: Douglas Schilling Landgraf; +Cc: linux-media

[-- Attachment #1: Type: Text/Plain, Size: 440 bytes --]

Am Sonntag, 4. Juli 2010 schrieben Sie:
> Please try it, should be the root cause.

Did patch my v4l-dvb source tree too and modified it according to my usbid to 
be a PCTV device :-)

After rewriting the eeprom it is a e1ba:2870 device again (70e) but still not 
working with the recent kernel, but thats a know problem.

Thx for help getting the eeprom rewritten :-)  - now the stick may be usable 
some time again.

Torsten

[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 1996 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2010-07-12 13:27 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-22 21:25 em28xx/xc3028 - kernel driver vs. Markus Rechberger's driver Thorsten Hirsch
2010-06-22 21:52 ` Devin Heitmueller
2010-06-22 22:15   ` Mauro Carvalho Chehab
2010-06-22 22:36     ` Thorsten Hirsch
2010-06-29 13:42     ` Torsten Krah
2010-06-29 14:20       ` Douglas Schilling Landgraf
2010-06-29 19:42         ` Torsten Krah
2010-06-29 20:29           ` Douglas Schilling Landgraf
2010-06-29 21:07             ` Thorsten Hirsch
2010-06-30 19:16             ` Torsten Krah
2010-07-02  0:59               ` Douglas Schilling Landgraf
2010-07-02 13:47                 ` Torsten Krah
2010-07-04 12:20                   ` Douglas Schilling Landgraf
2010-07-09 19:52                     ` Thorsten Hirsch
2010-07-12 13:27                     ` Torsten Krah

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.