From: Mauro Carvalho Chehab <mchehab@redhat.com>
To: Stefan Ringel <stefan.ringel@arcor.de>
Cc: Devin Heitmueller <dheitmueller@kernellabs.com>,
linux-media@vger.kernel.org
Subject: Re: [PATCH] - tm6000 DVB support
Date: Mon, 01 Feb 2010 21:05:54 -0200 [thread overview]
Message-ID: <4B675E52.5040306@redhat.com> (raw)
In-Reply-To: <4B674EF9.3020800@arcor.de>
Stefan Ringel wrote:
> Am 01.02.2010 22:44, schrieb Devin Heitmueller:
>> On Mon, Feb 1, 2010 at 4:23 PM, Stefan Ringel <stefan.ringel@arcor.de> wrote:
>>
>>>> You should start by breaking it down into a patch series, so that the
>>>> incremental changes can be reviewed. That will allow you to explain
>>>> in the patch descriptions why all the individual changes you have made
>>>> are required.
>>>>
>>>>
>>>>
>>> how can I generate it?
>>>
>> You can use quilt to break it up into a patch series, or create a
>> local hg clone of v4l-dvb.
>>
>>
>>>> Why did you define a new callback for changing the tuner mode? We
>>>> have successfully provided infrastructure on other bridges to toggle
>>>> GPIOs when changing modes. For example, the em28xx has fields in the
>>>> board profile that allow you to toggle GPIOs when going back and forth
>>>> between digital and analog mode.
>>>>
>>>>
>>>>
>>> I don't know, how you mean it. I'm amateur programmer.
>>>
>> Look at how the ".dvb_gpio" and ".gpio" fields are used in the board
>> profiles in em28xx-cards.c. We toggle the GPIOs when switching the
>> from analog to digital mode, without the tuner having to do any sort
>> of callback.
>>
>>
> It's a bad example. em28xx use a reg-set, but tm6000 not !! It use a
> gpio usb request.
>
> tm6000_set_reg (dev, REQ_03_SET_GET_MCU_PIN, TM6010_GPIO_5, 1);
>
>
> I don't know, that it with the ".gpio" fields works. And when it switch
> from analog to digital, I don't see the way.
All devices with Xceive tuners need to reset the chip via GPIO, in order to load
the firmware. On em28xx, I wrote a patch that moved all specific init code to
a struct (basically used by gpio's), and a generic code to do the reset. It basically
contains what GPIO pins are used, and how many time it should wait.
For example:
/* Board Hauppauge WinTV HVR 900 digital */
static struct em28xx_reg_seq hauppauge_wintv_hvr_900_digital[] = {
{EM28XX_R08_GPIO, 0x2e, ~EM_GPIO_4, 10},
{EM2880_R04_GPO, 0x04, 0x0f, 10},
{EM2880_R04_GPO, 0x0c, 0x0f, 10},
{ -1, -1, -1, -1},
};
The first line of the above code will execute this logic:
a = read(EM28XXR08_GPIO) & ~0x2e;
write (a & ~EM_GPIO_4);
msleep(10);
So, it will basically preserve bits 8,7,6,4 and 1 of register 8,
and will clear bit 4 (EM_GPIO_4 is 1 << 4 - e. g. bit 4).
After that, it will sleep for 10 miliseconds, and will then do a
reset on bit 3 of Register 4 (writing 0, then 1 to the bit).
>
>>>> What function does the "tm6000" member in the zl10353 config do? It
>>>> doesn't seem to be used anywhere.
>>>>
>>>>
>>>>
>>> I'll switch it next week to demodulator module.
>>>
>> Are you saying the zl10353 isn't working right now in your patch? I'm
>> a bit confused. If it doesn't work, then your patch title is a bit
>> misleading since it suggests that your patch provides DVB support for
>> the tm6000. If it does work, then the tm6000 member shouldn't be
>> needed at all in the zl10353 config.
>>
>>
> I'm emulating it in hack.c and the zl10353 module doesn't work, if I
> switch to it.
the hack.c needs to be validated against the zl10353, in order to identify
what are the exact needs for tm6000. Some devices require serial mode, while
others require parallel mode.
I bet that playing with zl10353_config, we'll find the proper init values
required by tm6000.
--
Cheers,
Mauro
next prev parent reply other threads:[~2010-02-01 23:06 UTC|newest]
Thread overview: 55+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-01 20:20 [PATCH] - tm6000 DVB support Stefan Ringel
2010-02-01 20:35 ` Stefan Ringel
2010-02-01 20:52 ` Devin Heitmueller
2010-02-01 21:23 ` Stefan Ringel
2010-02-01 21:44 ` Devin Heitmueller
2010-02-01 22:00 ` Stefan Ringel
2010-02-01 23:05 ` Mauro Carvalho Chehab [this message]
2010-02-02 16:14 ` Stefan Ringel
2010-02-02 16:44 ` Mauro Carvalho Chehab
2010-02-02 17:38 ` Stefan Ringel
2010-02-02 20:05 ` Mauro Carvalho Chehab
2010-02-01 22:52 ` Mauro Carvalho Chehab
2010-02-02 17:24 ` Stefan Ringel
2010-02-02 20:03 ` Mauro Carvalho Chehab
2010-02-02 20:19 ` Stefan Ringel
2010-02-02 20:30 ` Mauro Carvalho Chehab
2010-02-02 20:42 ` Stefan Ringel
2010-02-02 20:52 ` Mauro Carvalho Chehab
2010-02-02 21:11 ` Stefan Ringel
2010-02-03 20:10 ` [PATCH 1/15] - tm6000 build hunk Stefan Ringel
2010-02-03 20:13 ` [PATCH 2/15] - tm6000 add Terratec Cinergy Hybrid XE Stefan Ringel
2010-02-03 20:15 ` [PATCH 3/15] - tm6000 bugfix hunk in init_dev Stefan Ringel
2010-02-03 20:22 ` Mauro Carvalho Chehab
2010-02-03 20:16 ` [PATCH 4/15] - tm6000.h Stefan Ringel
2010-02-03 20:25 ` Mauro Carvalho Chehab
2010-02-03 20:50 ` Stefan Ringel
2010-02-03 20:58 ` Devin Heitmueller
2010-02-03 21:31 ` Mauro Carvalho Chehab
2010-02-03 20:18 ` [PATCH 5/15] - tm6000 bugfix i2c transfer Stefan Ringel
2010-02-03 20:18 ` [PATCH 2/15] - tm6000 add Terratec Cinergy Hybrid XE Mauro Carvalho Chehab
2010-02-03 20:20 ` [PATCH 6/15] - tm6000 bugfix usb transfer in DVB mode Stefan Ringel
2010-02-03 20:22 ` [PATCH 7/15] - tm6000 Stefan Ringel
2010-02-03 20:23 ` [PATCH 2/15] - tm6000 bugfix Stefan Ringel
2010-02-03 20:25 ` [PATCH 9/15] - tm6000 analog digital switch Stefan Ringel
2010-02-03 20:40 ` Mauro Carvalho Chehab
2010-02-03 20:55 ` Stefan Ringel
2010-02-03 21:21 ` Mauro Carvalho Chehab
2010-02-03 20:27 ` [PATCH 2/15] - tm6000 add digital init for tm6010 Stefan Ringel
2010-02-03 20:29 ` [PATCH 11/15] - tm6000 add " Stefan Ringel
2010-02-03 20:31 ` [PATCH 12/15] - tm6000 bugfix tuner reset time and tuner param Stefan Ringel
2010-02-03 20:52 ` Devin Heitmueller
2010-02-03 21:15 ` Stefan Ringel
2010-02-03 20:36 ` [PATCH 13/15] - xc2028 bugfix for firmware 3.6 -> Zarlink use without shift in DTV8 or DTV78 Stefan Ringel
2010-02-03 20:45 ` Devin Heitmueller
2010-02-03 20:38 ` [PATCH 14/15] - zl10353 Stefan Ringel
2010-02-03 20:49 ` Devin Heitmueller
2010-02-03 21:07 ` Stefan Ringel
2010-02-04 2:43 ` Mauro Carvalho Chehab
2010-02-04 21:12 ` Stefan Ringel
2010-02-05 0:06 ` Mauro Carvalho Chehab
2010-02-03 20:40 ` [PATCH 15/15] - tm6000 hack with different demodulator parameter Stefan Ringel
2010-02-03 20:47 ` Devin Heitmueller
2010-02-03 20:16 ` [PATCH 1/15] - tm6000 build hunk Mauro Carvalho Chehab
2010-02-03 20:17 ` Devin Heitmueller
2010-02-03 21:48 ` Stefan Ringel
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=4B675E52.5040306@redhat.com \
--to=mchehab@redhat.com \
--cc=dheitmueller@kernellabs.com \
--cc=linux-media@vger.kernel.org \
--cc=stefan.ringel@arcor.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox