* Driver for GL861+AF9003+MT2060]
@ 2009-04-01 16:04 C Khmer1
2009-04-01 16:33 ` Antti Palosaari
0 siblings, 1 reply; 5+ messages in thread
From: C Khmer1 @ 2009-04-01 16:04 UTC (permalink / raw)
To: linux-media
Hello,
I'm trying to write a linux driver for my A-Data DT1 USB2 DVB-T card.
This card has the GL861+AF9003+MT2060 chips.
I've the specification of AF9002/3/5 family, and there is a linux driver
for AF9005 chip that is an USB back-end plus AF9003 front-end.
There is already a front-end driver for AF9003 inside the AF9005 code
(should be the file AF9005-fe.c in the linux kernel tree).
The real problem is that i don't know how to perform the boot process
because it is different from AF9005 and how to handle the chip GL861
+AF9003 together.
I've seen the GL861 linux driver code. It is very simple and support
only two commands_
C0 02 for reading
40 01 for writing
Sniffing the USB data using windows driver I've discovered that the
windows driver is using following commands:
40 01
40 03
40 05
c0 02
c0 08
I don't know what do they mean and how I should use it.
Maybe with the GL861 specification I can understand. Sadly I've no
specification for GL861.
Also the commands '40 01' and 'c0 02' are used in a different way not
foreseen from the GL861 driver (the GL861 driver support up to 2 bytes
to write but I see more data to write).
I'm trying to understand the USB data before to writing the GL861 code
to handle the AF9003 front-end (demod).
Could someone help me?
Thanks
Claudio
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Driver for GL861+AF9003+MT2060]
2009-04-01 16:04 Driver for GL861+AF9003+MT2060] C Khmer1
@ 2009-04-01 16:33 ` Antti Palosaari
2009-04-02 20:29 ` Claudio Chimera
0 siblings, 1 reply; 5+ messages in thread
From: Antti Palosaari @ 2009-04-01 16:33 UTC (permalink / raw)
To: C Khmer1; +Cc: linux-media
C Khmer1 wrote:
> Hello,
> I'm trying to write a linux driver for my A-Data DT1 USB2 DVB-T card.
> This card has the GL861+AF9003+MT2060 chips.
> I've the specification of AF9002/3/5 family, and there is a linux driver
> for AF9005 chip that is an USB back-end plus AF9003 front-end.
> There is already a front-end driver for AF9003 inside the AF9005 code
> (should be the file AF9005-fe.c in the linux kernel tree).
> The real problem is that i don't know how to perform the boot process
> because it is different from AF9005 and how to handle the chip GL861
> +AF9003 together.
It is not mission impossible. Basically all chips are supported. The
biggest you have to is split demodulator code to own module. Very
similar situation is used by af9015+af9013. You can look example from there.
> I've seen the GL861 linux driver code. It is very simple and support
> only two commands_
>
> C0 02 for reading
> 40 01 for writing
>
> Sniffing the USB data using windows driver I've discovered that the
> windows driver is using following commands:
>
> 40 01
> 40 03
> 40 05
> c0 02
> c0 08
4 x read and 2 x write. There is IR-table which can be uploaded to the
gl861, since one or two commands are probably for that. Should be easy
to detect, for example comparing IR-table from driver to data seen in
sniffs.
Other possibilities could be for example GPIO, streaming control,
USB-controller register/memory read/write, eeprom... Look existing
dvb-usb -drivers for some hints about used commands.
> I don't know what do they mean and how I should use it.
First "emulate" as Windows driver does (seen from sniff). After you get
picture you can test whether or not all commands are needed and what is
effect of commands. For example remove one command and remote does not
work => should be remote command.
> Maybe with the GL861 specification I can understand. Sadly I've no
> specification for GL861.
DVB-USB -protocols are typically rather easy to reverse-engineer and
guess. :) GL861 is one of the simplest ones.
> Also the commands '40 01' and 'c0 02' are used in a different way not
> foreseen from the GL861 driver (the GL861 driver support up to 2 bytes
> to write but I see more data to write).
You should add multibyte i2c support then. Many existing drivers to see
help.
> I'm trying to understand the USB data before to writing the GL861 code
> to handle the AF9003 front-end (demod).
> Could someone help me?
There was someone else with similar device some months ago. Look ML
archives and put your helping hands together.
If you post one simple sniff to me I can try to look.
regards
Antti
--
http://palosaari.fi/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Driver for GL861+AF9003+MT2060]
2009-04-01 16:33 ` Antti Palosaari
@ 2009-04-02 20:29 ` Claudio Chimera
2009-04-02 22:03 ` Antti Palosaari
0 siblings, 1 reply; 5+ messages in thread
From: Claudio Chimera @ 2009-04-02 20:29 UTC (permalink / raw)
To: Antti Palosaari; +Cc: linux-media
[-- Attachment #1: Type: text/plain, Size: 3779 bytes --]
Hello Antti,
Il giorno mer, 01/04/2009 alle 19.33 +0300, Antti Palosaari ha scritto:
> C Khmer1 wrote:
> > Hello,
> > I'm trying to write a linux driver for my A-Data DT1 USB2 DVB-T card.
> > This card has the GL861+AF9003+MT2060 chips.
> > I've the specification of AF9002/3/5 family, and there is a linux driver
> > for AF9005 chip that is an USB back-end plus AF9003 front-end.
> > There is already a front-end driver for AF9003 inside the AF9005 code
> > (should be the file AF9005-fe.c in the linux kernel tree).
> > The real problem is that i don't know how to perform the boot process
> > because it is different from AF9005 and how to handle the chip GL861
> > +AF9003 together.
>
> It is not mission impossible. Basically all chips are supported. The
> biggest you have to is split demodulator code to own module. Very
> similar situation is used by af9015+af9013. You can look example from there.
You are right. I've checked the af90015+af9013 driver. what i've
understood is that the demoduletor (frontend) needs following interface
functions:
.release = af9003_release,
.init = af9003_init,
.sleep = af9003_sleep,
.i2c_gate_ctrl = af9003_i2c_gate_ctrl,
.set_frontend = af9003_set_frontend,
.get_frontend = af9003_get_frontend,
.get_tune_settings = af9003_get_tune_settings,
.read_status = af9003_read_status,
.read_ber = af9003_read_ber,
.read_signal_strength = af9003_read_signal_strength,
.read_snr = af9003_read_snr,
.read_ucblocks = af9003_read_ucblocks,
These functions are almost inside the af9005-fe.c file from the the
af9005 driver. I've taken some missing one from the af9013 driver.
>
> > I've seen the GL861 linux driver code. It is very simple and support
> > only two commands_
> >
> > C0 02 for reading
> > 40 01 for writing
> >
> > Sniffing the USB data using windows driver I've discovered that the
> > windows driver is using following commands:
> >
> > 40 01
> > 40 03
> > 40 05
> > c0 02
> > c0 08
>
> 4 x read and 2 x write. There is IR-table which can be uploaded to the
> gl861, since one or two commands are probably for that. Should be easy
> to detect, for example comparing IR-table from driver to data seen in
> sniffs.
> Other possibilities could be for example GPIO, streaming control,
> USB-controller register/memory read/write, eeprom... Look existing
> dvb-usb -drivers for some hints about used commands.
>
> > I don't know what do they mean and how I should use it.
>
> First "emulate" as Windows driver does (seen from sniff). After you get
> picture you can test whether or not all commands are needed and what is
> effect of commands. For example remove one command and remote does not
> work => should be remote command.
I'll try to do that.
>
> > Maybe with the GL861 specification I can understand. Sadly I've no
> > specification for GL861.
>
> DVB-USB -protocols are typically rather easy to reverse-engineer and
> guess. :) GL861 is one of the simplest ones.
>
> > Also the commands '40 01' and 'c0 02' are used in a different way not
> > foreseen from the GL861 driver (the GL861 driver support up to 2 bytes
> > to write but I see more data to write).
>
> You should add multibyte i2c support then. Many existing drivers to see
> help.
Could you please suggest me some driver to check?
>
> > I'm trying to understand the USB data before to writing the GL861 code
> > to handle the AF9003 front-end (demod).
> > Could someone help me?
>
> There was someone else with similar device some months ago. Look ML
> archives and put your helping hands together.
I didn't find anything about af9003 in the ML.
>
> If you post one simple sniff to me I can try to look.
Please find attached the simplest log file, just plug the DVB-T in and
out.
>
> regards
> Antti
Thanks
Claudio
[-- Attachment #2: UsbSnoop_081230.log.gz --]
[-- Type: application/x-gzip, Size: 161903 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Driver for GL861+AF9003+MT2060]
2009-04-02 20:29 ` Claudio Chimera
@ 2009-04-02 22:03 ` Antti Palosaari
2009-04-05 16:53 ` Luca Olivetti
0 siblings, 1 reply; 5+ messages in thread
From: Antti Palosaari @ 2009-04-02 22:03 UTC (permalink / raw)
To: Claudio Chimera, Vortice Rosso; +Cc: linux-media
heis Claudio and Vortice,
I added Vortice since he was also asking that driver some months ago.
Claudio Chimera wrote:
> Hello Antti,
>
> Il giorno mer, 01/04/2009 alle 19.33 +0300, Antti Palosaari ha scritto:
>> C Khmer1 wrote:
>>> Hello,
>>> I'm trying to write a linux driver for my A-Data DT1 USB2 DVB-T card.
>>> This card has the GL861+AF9003+MT2060 chips.
>>> I've the specification of AF9002/3/5 family, and there is a linux driver
>>> for AF9005 chip that is an USB back-end plus AF9003 front-end.
>>> There is already a front-end driver for AF9003 inside the AF9005 code
>>> (should be the file AF9005-fe.c in the linux kernel tree).
>>> The real problem is that i don't know how to perform the boot process
>>> because it is different from AF9005 and how to handle the chip GL861
>>> +AF9003 together.
>> It is not mission impossible. Basically all chips are supported. The
>> biggest you have to is split demodulator code to own module. Very
>> similar situation is used by af9015+af9013. You can look example from there.
>
> You are right. I've checked the af90015+af9013 driver. what i've
> understood is that the demoduletor (frontend) needs following interface
> functions:
>
> .release = af9003_release,
>
> .init = af9003_init,
> .sleep = af9003_sleep,
> .i2c_gate_ctrl = af9003_i2c_gate_ctrl,
>
> .set_frontend = af9003_set_frontend,
> .get_frontend = af9003_get_frontend,
>
> .get_tune_settings = af9003_get_tune_settings,
>
> .read_status = af9003_read_status,
> .read_ber = af9003_read_ber,
> .read_signal_strength = af9003_read_signal_strength,
> .read_snr = af9003_read_snr,
> .read_ucblocks = af9003_read_ucblocks,
>
>
> These functions are almost inside the af9005-fe.c file from the the
> af9005 driver. I've taken some missing one from the af9013 driver.
You don't need to implement all those in most cases.
read_ber, read_signal_strength, read_snr, read_ucblocks and get_frontend
are not obligatory *required* in any? case.
>>> I've seen the GL861 linux driver code. It is very simple and support
>>> only two commands_
>>>
>>> C0 02 for reading
>>> 40 01 for writing
>>>
>>> Sniffing the USB data using windows driver I've discovered that the
>>> windows driver is using following commands:
>>>
>>> 40 01
>>> 40 03
>>> 40 05
>>> c0 02
>>> c0 08
>> 4 x read and 2 x write. There is IR-table which can be uploaded to the
>> gl861, since one or two commands are probably for that. Should be easy
>> to detect, for example comparing IR-table from driver to data seen in
>> sniffs.
>> Other possibilities could be for example GPIO, streaming control,
>> USB-controller register/memory read/write, eeprom... Look existing
>> dvb-usb -drivers for some hints about used commands.
>>
>>> I don't know what do they mean and how I should use it.
>> First "emulate" as Windows driver does (seen from sniff). After you get
>> picture you can test whether or not all commands are needed and what is
>> effect of commands. For example remove one command and remote does not
>> work => should be remote command.
>
> I'll try to do that.
>>> Maybe with the GL861 specification I can understand. Sadly I've no
>>> specification for GL861.
>> DVB-USB -protocols are typically rather easy to reverse-engineer and
>> guess. :) GL861 is one of the simplest ones.
>>
>>> Also the commands '40 01' and 'c0 02' are used in a different way not
>>> foreseen from the GL861 driver (the GL861 driver support up to 2 bytes
>>> to write but I see more data to write).
>> You should add multibyte i2c support then. Many existing drivers to see
>> help.
>
> Could you please suggest me some driver to check?
ce6230.
>>> I'm trying to understand the USB data before to writing the GL861 code
>>> to handle the AF9003 front-end (demod).
>>> Could someone help me?
>> There was someone else with similar device some months ago. Look ML
>> archives and put your helping hands together.
>
> I didn't find anything about af9003 in the ML.
>
>> If you post one simple sniff to me I can try to look.
>
> Please find attached the simplest log file, just plug the DVB-T in and
> out.
hmm, It looks a little bit weird :o I will try when got some more time...
regards
Antti
--
http://palosaari.fi/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Driver for GL861+AF9003+MT2060]
2009-04-02 22:03 ` Antti Palosaari
@ 2009-04-05 16:53 ` Luca Olivetti
0 siblings, 0 replies; 5+ messages in thread
From: Luca Olivetti @ 2009-04-05 16:53 UTC (permalink / raw)
To: Antti Palosaari; +Cc: Claudio Chimera, Vortice Rosso, linux-media
El Fri, 03 Apr 2009 01:03:23 +0300
Antti Palosaari <crope@iki.fi> escribió:
> You don't need to implement all those in most cases.
> read_ber, read_signal_strength, read_snr, read_ucblocks and
> get_frontend are not obligatory *required* in any? case.
Besides, IIRC, not all signal information functions were implemented
in the af9005 (I didn't know all the details of the chipset and the
expected scale in the dvb driver).
They're nice to have but not indispensable.
Bye
--
Luca
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2009-04-05 16:53 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-01 16:04 Driver for GL861+AF9003+MT2060] C Khmer1
2009-04-01 16:33 ` Antti Palosaari
2009-04-02 20:29 ` Claudio Chimera
2009-04-02 22:03 ` Antti Palosaari
2009-04-05 16:53 ` Luca Olivetti
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox