From: Antti Palosaari <crope@iki.fi>
To: Thomas Mair <thomas.mair86@googlemail.com>
Cc: Oliver Schinagl <oliver+list@schinagl.nl>, linux-media@vger.kernel.org
Subject: Re: RTL28XX driver
Date: Thu, 12 Apr 2012 16:12:24 +0300 [thread overview]
Message-ID: <4F86D4B8.8060005@iki.fi> (raw)
In-Reply-To: <CAKZ=SG95OA3pOvxM6eypsNaBvzX1wfjPR4tucc8725bnhE3FEg@mail.gmail.com>
On 12.04.2012 15:54, Thomas Mair wrote:
> It is not my driver ;) And at the beginning it looks quite scary but
> it may help together with the dump. You can find it
> here:https://github.com/tmair/DVB-Realtek-RTL2832U-2.2.2-10tuner-mod_kernel-3.0.0/blob/master/RTL2832-2.2.2_kernel-3.0.0/tuner_fc2580.c
>
> 2012/4/12 Oliver Schinagl<oliver+list@schinagl.nl>:
>> I accept the challenge :p but where is your fc2580 driver? And in that
>> thought, where is antti's stub driver :)
>>
>> That might help me get started :)
>>
>> On 12-04-12 14:18, Thomas Mair wrote:
>>>
>>> Hi Oliver,
>>>
>>> the Realtek driver sources I have also contain a fc2580 driver. Maybe
>>> the source code will help you together with the usb sniff.
>>>
>>> 2012/4/12 Oliver Schinagl<oliver+list@schinagl.nl>:
>>>>
>>>> Would love to, even tried a bit, but don't really know how to start,
>>>> what
>>>> to use as a template. I think I can extract the i2c messages from the
>>>> dreaded ugly af903 driver however, using src or usbsniff.
>>>>
>>>> On 11-04-12 23:57, Antti Palosaari wrote:
>>>>>
>>>>> On 12.04.2012 00:33, Oliver Schinagl wrote:
>>>>>>
>>>>>> On 04/11/12 21:12, Antti Palosaari wrote:
>>>>>>>
>>>>>>> I have some old stubbed drivers that just works for one frequency
>>>>>>> using
>>>>>>> combination of RTL2832U + FC2580. Also I have rather well commented
>>>>>>> USB
>>>>>>> sniff from that device. I can sent those if you wish.
>>>>>>>
>>>>>> FC2580? Do you have anything for/from that driver? My USB stick as an
>>>>>> AFA9035 based one, using that specific tuner.
>>>>>
>>>>>
>>>>> Nothing but stubbed driver that contains static register values taken
>>>>> from
>>>>> the sniff and it just tunes to one channel (IIRC 634 MHz / 8 MHz BW).
>>>>>
>>>>> Feel free to contribute new tuner driver in order to add support for
>>>>> your
>>>>> AF9035 device.
Here are my sniffs and stubbed driver etc. what I found from the HD.
Those well commented sniffs, both RTL2831U and RTL2832U, are surely most
valuable material.
http://palosaari.fi/linux/v4l-dvb/rtl283xu/
FC2580 can be found from both AF9035 and RTL2832U codes.
Generally, as coding new demod driver for example, you want to use that
kind of stubbed tuner "driver" for example:
/* FC0011: 634 MHz / BW 8 MHz */
struct {
u8 r[8];
int len;
} regs[] = {
{{ 0x07, 0x0f }, 2 },
{{ 0x08, 0x3e }, 2 },
{{ 0x0a, 0xb8 }, 2 },
{{ 0x0b, 0x80 }, 2 },
{{ 0x0d, 0x04 }, 2 },
{{ 0x00, 0x00, 0x05, 0x11, 0xf1, 0xc7, 0x0a, 0x30 }, 8 },
{{ 0x0e, 0x80 }, 2 },
{{ 0x0e, 0x00 }, 2 },
{{ 0x0e, 0x00 }, 2 },
{{ 0x0e }, 1 },
{{ 0x06, 0x30 }, 2 },
{{ 0x0d }, 1 },
{{ 0x0d, 0x14 }, 2 },
{{ 0x10, 0x0b }, 2 },
};
for (i = 0; i < ARRAY_SIZE(regs); i++) {
pr_debug("%s: i=%d len=%d data=%02x\n", __func__, i, regs[i].len,
regs[i].r[0]);
struct i2c_msg msg[1] = {
{
.addr = 0x60,
.flags = 0,
.len = regs[i].len,
.buf = regs[i].r,
}
};
ret = i2c_transfer(state->i2c, msg, 1);
if (ret != 1)
pr_debug("%s: I2C write failed i=%d len=%d data=%02x\n", __func__, i,
regs[i].len, regs[i].r[0]);
}
regards
Antti
--
http://palosaari.fi/
next prev parent reply other threads:[~2012-04-12 13:12 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-06 9:11 RTL28XX driver Thomas Mair
2012-04-06 9:36 ` Antti Palosaari
2012-04-07 7:25 ` poma
2012-04-07 14:19 ` Gianluca Gennari
2012-04-09 12:02 ` Thomas Mair
2012-04-09 15:09 ` Gianluca Gennari
2012-04-11 19:12 ` Antti Palosaari
2012-04-11 21:33 ` Oliver Schinagl
2012-04-11 21:57 ` Antti Palosaari
2012-04-12 12:11 ` Oliver Schinagl
2012-04-12 12:18 ` Thomas Mair
2012-04-12 12:43 ` Oliver Schinagl
2012-04-12 12:54 ` Thomas Mair
2012-04-12 13:12 ` Antti Palosaari [this message]
2012-04-18 17:18 ` Thomas Mair
2012-04-18 17:44 ` Antti Palosaari
2012-04-18 18:20 ` Thomas Mair
2012-04-18 18:35 ` Antti Palosaari
2012-04-18 20:00 ` Antti Palosaari
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4F86D4B8.8060005@iki.fi \
--to=crope@iki.fi \
--cc=linux-media@vger.kernel.org \
--cc=oliver+list@schinagl.nl \
--cc=thomas.mair86@googlemail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.