Re: [linux-dvb] First patch for Freecom DVB-T (with RTL2831U, usb id 14aa:0160)

2008-03-17 Thread Jan Hoogenraad
Mauro:

Most of the mail understood.

Can you put us into contact with the people who did the decoupling to 
the tuner for for example, with saa711x ?
We could re-use some of their work, and learn from them.

A similar thing goes for the IR devices.
Currently, these sticks are shipped with 3 different IR devices, with 
different (and sometimes conflicting) IR codes.

I see that there are two different mechanisms used in the drivers.

The cxusb.c driver shows how to switch based on the USB ID of the stick.

The hauppage driver, with ir-kbd-i2c.c and ir-keymaps.c shosw how to 
switch based on module parameters (mechanism similar to the debug=1).

Can you tell me if there is a roadmap for this (e.g. decoupling the 
mapping from the stick ID and putting the rc_query subroutines together) ?

In the next patch, I'll add a file
/linux/Documentation/dvb/README.rtl2831
with some data I got from Realtek.

Mauro Carvalho Chehab wrote:
> On Sat, 15 Mar 2008 23:23:51 +0100
> Jan Hoogenraad <[EMAIL PROTECTED]> wrote:
>  
>> I have some scripts to convert things I receive from Realtek.
>> I'll add the new directory names and Lindent at least.
> 
>>>
>>> There are other comments I want to do, about the integration with the tree. 
>>> I
>>> intend to do it later, after having a better understanding on how the driver
>>> works and what can be done to avoid code duplication with dvb core and to 
>>> allow
>>> the usage of the tuners by other drivers.
>> Some of us have studied this already, and communicated with Realtek on 
>> this, For example, they have an improved handling of the mt2060 tuner.
>> Decoupling the front end, setting this temporatily up as a new driver 
>> (would the naming there be something like mt2060_for_rtl2831 ?) and then 
>> integration have been on our wish list already.
> 
> We did this kind of things already (for example, with saa711x). While this is
> not the ideal way, we can handle this. 
> 
> 
>>> Also, I'll need help from other developers on this large task ;)
>> I at least have a lot of people interested already for testing.
>> I've cc-ed them.
> 
> Great. There are also the other guys from DVB ML that could also help on this.
> 
> Cheers,
> Mauro
> 
> 


-- 
Jan Hoogenraad
Hoogenraad Interface Services
Postbus 2717
3500 GS Utrecht

___
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb


Re: [linux-dvb] First patch for Freecom DVB-T (with RTL2831U, usb id 14aa:0160)

2008-03-16 Thread Jan Hoogenraad
Summary of this mail:

There is activity on the Freecom / Conceptronic / Realtek card on:
http://linuxtv.org/hg/~mchehab/rtl2831
Please help us improve.

Mauro Carvalho Chehab wrote:
> On Fri, 14 Mar 2008 22:24:46 +0100
> Jan Hoogenraad <[EMAIL PROTECTED]> wrote:
> 
>> Dear v4l maintainer:
> Please, just call me by my name ;)
OK. From the previous mail I could not discern if this was the same ...
> 
>> I have created a first version of the patch for the Freecom stick, based 
>> on the latest sources I received today from RealTek.
> 
> Due to several issues I've noticed at the driver, I opted, for now, to add it
> as a separate tree. This way, we can fix things there, without affecting the
> staging tree. I've made it available at:
>   http://linuxtv.org/hg/~mchehab/rtl2831
Thanks a lot. This way, the people involved have a place to focus on.
Now, I need to find a way to synchronise my tree with this directory.
I'll do some reading on the mercurial.

I have some scripts to convert things I receive from Realtek.
I'll add the new directory names and Lindent at least.
> 
> Also, I noticed that nobody, on RealTek signed it. It would be interesting if
> someone there could send us a SOB for the first changeset:
>   http://linuxtv.org/hg/~mchehab/rtl2831/rev/bb7749446173
Please explain the abbrreviation SOB, and if possible send the text.
Would you like to have a paper copy, or is e-mail confirmation to you 
sufficient ?
The text I added in the header is vetted by people from Realtek.
They are eager to work together, and willing to learn.
Unfortunately, I myself am completely new to linux development.
> 
> Ah, by convention, we name directories in lowercase. So, I've did an "sed"
> before applying your patch, as I've explained at the changeset comments.
thanks
> 
>> I have received several updates per week from them during the fixing 
>> time, so I expect some updates later on.
> 
> Ok.
> 
>> Mauro:
>>
>> Thanks for the help.
>> I agree that this is probably the best thing to do.
> 
> Ok, this is the Lindent changeset:
>   http://linuxtv.org/hg/~mchehab/rtl2831/rev/698c1894a3fd
> 
>> Unfortunately, Lindent does not fix errors that
>>   make checkpatch
>> reports like the two below.
>>
>> tuner_mxl5005s.h: In '// I2C birdge module demod argument setting':
>> tuner_mxl5005s.h:531: ERROR: do not use C99 // comments
> 
> I tried to quickfix this with a small perl script, like:
> 
> for i in *.c *.h; do perl -ne \
> 'if (s|//\s*(.*)\n|/* \1 */\n|) { s|/\*\s*\*/||; } print $_' \
> $i >/tmp/tmp; mv -f /tmp/tmp $i; done
> 
> However, this failed, since there are some comments with // inside. It doesn't
> seem to be hard to fix this by a close script.
So I found as well, using a similar sed code.
> 
>> tuner_mxl5005s.h: In 'void 
>> mxl5005s_SetI2cBridgeModuleTunerArg(TUNER_MODULE * pTuner);':
>> tuner_mxl5005s.h:532: ERROR: "foo * bar" should be "foo *bar"
> 
> True. Yet, this shows another thing that is forbidden on Linux CodingStyle: 
> the
> usage of typedef. While this is valid on a few cases, on most cases we prefer
> to use things like "struct foo *foo;".
> 
> ---
> 
> Due to the size of the driver, and the nature of it (a port from other OS), it
> is natural that we will have a large amount of issues. Before visiting the 
> code
> to check everything, maybe the better approach would be to do some general
> comments. 
> 
> I'll start commenting some things about CodingStyle. The better is if you 
> could
> read kernel Documentation/CodingStyle.
> 
> 1) Kernel already defines several types. Please use the already defined 
> typedefs.
> For example:
> 
> +typedef unsigned char U8Data;
> 
> use, instead __u8
> 
> +typedef unsigned int UData_t; /* type must be at least 32 bits */
> 
> use, instead __u32
> 
> +typedef int SData_t; /* type must be at least 32 bits */
> 
> use, instead __s32
> 
> +typedef void *Handle_t; /* memory pointer type 
> 
> Just use "void *"
I'll add those specific cases to my import script;
I think that script should (due to the nature of the driver) get a 
central role, as to keep updates automated.
> 
> 2) We don't use "typedef struct foo". Instead, just declare "struct foo" and
> replace all "foo *" to "struct foo *":
> 
> +typedef struct {
> + UData_t nAS_Algorithm;
> + UData_t f_ref;
> + UData_t f_in;
> + UData_t f_LO1;
> + UData_t f_if1_Center;
> + UData_t f_if1_Request;
> + UData_t f_if1_bw;
> + UData_t f_LO2;
> + UData_t f_out;
>

[linux-dvb] Help requested on removing behavior

2008-03-14 Thread Jan Hoogenraad

We are working now on the support for a new device (RTL2831U DVB-T 
USB2.0 DEVICE).
We get a lot of help from the tech support people.

Now they have asked me a question that I cannot answer, and I don't know 
if there is documentation on this.

The version now behaves as follows>
When the stick is inserted, the module is loaded (usage count 0 in lsmod).
When the stick is removed, the module stays loaded (usage count 0 in 
lsmod), and when it is re-inserted, the driver works again.

When Kaffeine is started with the driver in memory, but the stick 
unplugged, Kaffeine senses that the device is unplugged, and does not 
show the DVB capability.

When Kaffeine is running, and the stick is removed during that, the 
video freezes.
Re-instering the stick does not cause the video to become "live" again.
After re-inserting the stick, Kaffeine recognizes that it's there again, 
and functions again.

Can anybody confirm me that this is the specified behavior and/or send 
me the place where I can find these specifications ?

___
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb


Re: [linux-dvb] Driver source for Freecom DVB-T (with usb id 14aa:0160) v0.0.2 works

2008-03-10 Thread Jan Hoogenraad
Mauro:

Thanks a lot for the comments.
One clear problem with this particular driver is that the code that came 
from RealTek does not conform to the Linux C coding style.
Would that be an objection for the steps below ?

Furthermore, can you confirm linux-dvb@linuxtv.org as the submission 
address for the patch ?

Mauro Carvalho Chehab wrote:
> On Thu, 21 Feb 2008 00:10:41 +0100
> Jan Hoogenraad <[EMAIL PROTECTED]> wrote:
> 
>> Great.
>> I've compiled it, and found some compilation problems.
>> I've fixed those and put them into a zipped patch for the v4l hg 
>> management system.
>> I've sent it to a couple of people, but did not yet include some 
>> copyright message into it.
>> Does anybody know how to put it onto the v4l site ?
> 
> Sorry, I missed the original thread. 
> 
> The procedure is simple: after having it worked and tested, for its
> inclusion, you'll need to send it to the DVB ML (also, to V4L ML, if hybrid). 
> The better is to c/c me on the e-mail you submit it, for me to be
> aware of. After some days, if nobody complains, and if it looks ok, I'll 
> commit.
> 
> Cheers,
> Mauro
> 
> 


-- 
Jan Hoogenraad
Hoogenraad Interface Services
Postbus 2717
3500 GS Utrecht

___
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb


Re: [linux-dvb] Driver source for Freecom DVB-T (with usb id 14aa:0160) v0.0.2 works

2008-02-20 Thread Jan Hoogenraad
Great.
I've compiled it, and found some compilation problems.
I've fixed those and put them into a zipped patch for the v4l hg 
management system.
I've sent it to a couple of people, but did not yet include some 
copyright message into it.
Does anybody know how to put it onto the v4l site ?


  Thanks a lot Andy !


___
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb


[linux-dvb] Update on sticks using RealTek RTL2831U: Freecom rev 4 14aa:0160, Conceptronic DVB-T 14aa:0160 and RealTek 0bda:2831

2008-02-14 Thread Jan Hoogenraad
A group of people is putting effort into getting DVB-T USB sticks based 
on the rtl2831u chips working under Linux.
The group now consists of about 10 people working via this mailing list.

The current driver successfully compiles and loads on a modern Linux 
kernel, however it fails to communicate with the associated tuner chip.

We have just contacted RealTek for further help.
As soon as we know more, we'll let you know.
At that moment, we'll also send out more specific E-mails to those that 
own a similar stick and that have contacted either Barnaby or me.

I hope this E-mail with a status update is of help to you the readers of 
this list.


___
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb


Re: [linux-dvb] RTL2831U kernel driver

2008-01-27 Thread Jan Hoogenraad
Hi folks,

Barnaby is still ahead of me:
I now got as far as getting it to compile in the hg directory, however 
now I don't know how to make a patch for it.
I also added a header to each file, so that it can be identified as 
RTL2831 product.

I kind of understand now what's wrong.
Can any of you confirm the behaviour below ?

The communication between the RTL2831 and the tuner chip is broken.
error!! rtd2831_tuner_register_read: ( offset , data ) = ( 0x0 , 0x0 ) 
size != -32 bytes
The -32 clearly is an error message of some sort. My guess is:
#define USB_ST_STALL (-EPIPE) /* pipe stalled, also in urb->status*/

Therefore. the driver reports it has an MXL5005 onboard.
 From http://www.bttv-gallery.de/
we know it should have been a MT2060.
Furthermore the  MXL5005 code in the driver seems never used: it has no 
debugging traps in it, suggesting that is never endured debugging.

Thus I hardcoded the selector in tuner.c (now called tuner_2831.c in my 
archive). Still no connection, but many errors in the initial phase,
all originating from a failed rtd2831_tuner_register_read call.
Effects:
CDevice::SetMT2060Tuner -- begin
  Error hMT2060  Handle
In this part of the code, the subroutine TUNER_RI2C is used: the decoder 
is first set into a specific setting, and than the tuner is addressed.

Apparenlty, rtd2831_tuner_register_read (in tuner_demod_io.c) tries to 
get something from a place where little can be gotten.
Might it be that the 0x0300 address is wrong ?

Greetz,
Jan

---
Barnaby wrote:
 > The only thing stopping it building in v4l-dvb is the conflicting
filename tuner.o. Renaming the version form the driver lets it build ok.
 >Below is a patch for the complete RTL2831U driver against the current 
hg version of v4l-dvb.
 >http://bware.iware.co.uk/rtl2831u.patch

H Me wrote:
> The custom compiled kernel with Ubuntu (Gutsy 2.6.22) behaves similarly to 
> Barnaby's attempt.  The driver module loads, the device light comes on, and 
> it looks like it is scanning, but picks up no channels.
> 
> No joy...
> 
> http://ubuntuforums.org/showthread.php?t=665315
> 
> ----

-- 
Jan Hoogenraad
Hoogenraad Interface Services
Postbus 2717
3500 GS Utrecht

___
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb


Re: [linux-dvb] RTL2831U kernel driver

2008-01-26 Thread Jan Hoogenraad
Thank you Barnaby:

I now realize what the problem is:
I cannot find the tarball in the archive pages, and was subscribed via 
the digest functionality, that also discards attachments.

Therefore, I do not have the tarball.
Can you send me the tarball ?

Jan

bWare wrote:
> Hi Jan,
> 
> I am afraid I didn't do any integration work. The tarball previous 
> posted (23/01/08) to the linux-dvb list is pretty much ready to go 
> (documentation included). It just doesn't work for me, in fact no one 
> has actually said it works at all. I am also not a dev, so presumably I 
> can't checkin.
> 
> Note, I have now checked 2.6.24, however it is the same story, builds, 
> modprobes, creates dev entries, and promising dmesg, but no tuning.
> 
> Barnaby
> 
> Jan Hoogenraad wrote:
>> Barnaby:
>>
>> It seems you have got pretty far at integrating it into the framework.
>> Congratulations !
>>
>> I you want, I can test it at my machine, and help debug.
>> My stick is labeled "Conceptronic CTVDIGRCU", but otherwise it seems the 
>> same.
>> Conceptronic Support tells me this type is sold under different brands.
>>
>> Is it possible to put your code at the
>> V4L/DVB staging development repository
>> at http://linuxtv.org/hg/v4l-dvb
>>
>>
>>> Date: Sat, 26 Jan 2008 17:28:09 +
>>> From: Barnaby Shearer <[EMAIL PROTECTED]>
>>> Subject: Re: [linux-dvb] RTL2831U kernel driver
>>> To: linux-dvb@linuxtv.org
>>> Message-ID: <[EMAIL PROTECTED]>
>>> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>>>
>>> Did you have any luck?
>>>
>>> I have successfully built the drivers on 2.6.23 and 2.6.21 (which they 
>>> say they are for) on AMD64 and x86, they always compile cleanly and 
>>> modprobe successfully, creating the relevant devices. However I can't 
>>> get any further.
>>>
>> ..
>>> Barnaby
>>>
>>>
> 
> 
> ___
> linux-dvb mailing list
> linux-dvb@linuxtv.org
> http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
> 
> 


-- 
Jan Hoogenraad
Hoogenraad Interface Services
Postbus 2717
3500 GS Utrecht

___
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb


Re: [linux-dvb] RTL2831U kernel driver

2008-01-26 Thread Jan Hoogenraad
Barnaby:

It seems you have got pretty far at integrating it into the framework.
Congratulations !

I you want, I can test it at my machine, and help debug.
My stick is labeled "Conceptronic CTVDIGRCU", but otherwise it seems the 
same.
Conceptronic Support tells me this type is sold under different brands.

Is it possible to put your code at the
V4L/DVB staging development repository
at http://linuxtv.org/hg/v4l-dvb


> Date: Sat, 26 Jan 2008 17:28:09 +
> From: Barnaby Shearer <[EMAIL PROTECTED]>
> Subject: Re: [linux-dvb] RTL2831U kernel driver
> To: linux-dvb@linuxtv.org
> Message-ID: <[EMAIL PROTECTED]>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
> 
> Did you have any luck?
> 
> I have successfully built the drivers on 2.6.23 and 2.6.21 (which they 
> say they are for) on AMD64 and x86, they always compile cleanly and 
> modprobe successfully, creating the relevant devices. However I can't 
> get any further.
> 
..
> 
> Barnaby
> 
> 


___
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb


[linux-dvb] RTL2831U driver

2008-01-19 Thread Jan Hoogenraad
Adding stuff to the kernel seems straightforward:
I just downloaded the sources of V4L-DVB.

I first needed to install Mercurial.

It compiled right away, and just getting the drivers to recognize
0x14aa:0x0160 instead of another code was really easy.

Of course, then I needed the new code you've got 

___
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb