I have been working on the driver over the past days and been making
some progress. Right now I am stuck with a small problem that I have
no idea how to deal with.

It seems that the fc0012 tuner supports V-Band and U-Band. To switch
between those modes a GPIO output value needs to be changed. In the
original Realtek driver this is done at the beginning of the
set_parameters callback. Is there a different callback that can be
used for this or is it ok to write a RTL2832u register from the
demodulator code?

Regards
Thomas

2012/4/12 Antti Palosaari <cr...@iki.fi>:
> 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+l...@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+l...@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/
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to