From: Timo Teras <timo.teras@iki.fi>
To: Timo Teras <timo.teras@iki.fi>
Cc: "Frank Schäfer" <fschaefer.oss@googlemail.com>,
"Mauro Carvalho Chehab" <mchehab@redhat.com>,
"Linux Media Mailing List" <linux-media@vger.kernel.org>
Subject: Re: Terratec Grabby hwrev 2
Date: Fri, 3 May 2013 08:50:25 +0300 [thread overview]
Message-ID: <20130503085025.0a989c42@vostro> (raw)
In-Reply-To: <20130429152618.6795bae7@vostro>
On Mon, 29 Apr 2013 15:26:18 +0300
Timo Teras <timo.teras@iki.fi> wrote:
> > > When comparing these two picture, you see that the frame is offset
> > > with one or two pixels in x-direction. Perhaps this is a byte
> > > offset, and in RGB format causes color values to be connected to
> > > wrong pixel.
> > >
> > > As final note, now I hooked the device on faster machine, and the
> > > AC97 detection seems random. It seemed to work with the slower
> > > machine reliably after I had it do the saa7113 initialization. So
> > > sounds like some sort of timing issue.
> >
> > More details please. ;)
> > Do you mean that "Config register raw data" (see dmesg output) value
> > varies ?
>
> I traced the USB init sequence that windows does. It is as follows
> (simplified by removing some other register / eeprom reads):
> em28xx_write_reg(dev, EM28XX_R08_GPIO, 0xff);
> msleep(20);
> em28xx_write_reg(dev, EM28XX_R08_GPIO, 0xfd);
> msleep(100);
> em28xx_write_reg(dev, EM28XX_R08_GPIO, 0x7d);
> msleep(60);
> em28xx_write_reg(dev, EM28XX_R12_VINENABLE, 0x24);
> em28xx_write_reg(dev, 0x0d, 0x42);
>
> Will test if it makes the detection of the audio chip more reliable.
The patch added is below. Seems that detecting the audio chip is now a
lot more reliable. So far I have not seen failures. Not sure if the
GPIO twidling drives something - or if it's just the additional delay
fixing things.
--- a/drivers/media/usb/em28xx/em28xx-cards.c
+++ b/drivers/media/usb/em28xx/em28xx-cards.c
@@ -2479,6 +2479,19 @@
em28xx_write_reg(dev, EM28XX_R08_GPIO, 0xfd);
msleep(70);
break;
+
+ case EM2860_BOARD_TERRATEC_GRABBY:
+ em28xx_write_reg(dev, EM28XX_R08_GPIO, 0xff);
+ msleep(20);
+ em28xx_write_reg(dev, EM28XX_R08_GPIO, 0xfd);
+ msleep(100);
+ em28xx_write_reg(dev, EM28XX_R08_GPIO, 0xfd);
+ msleep(100);
+ em28xx_write_reg(dev, EM28XX_R08_GPIO, 0x7d);
+ msleep(60);
+ em28xx_write_reg(dev, EM28XX_R12_VINENABLE, 0x24);
+ em28xx_write_reg(dev, 0x0d, 0x42);
+ break;
}
em28xx_gpio_set(dev, dev->board.tuner_gpio);
next prev parent reply other threads:[~2013-05-03 5:49 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-25 17:08 Terratec Grabby hwrev 2 Timo Teras
2013-03-25 17:36 ` Mauro Carvalho Chehab
2013-03-25 17:48 ` Timo Teras
2013-03-25 18:32 ` Mauro Carvalho Chehab
2013-03-25 19:12 ` Timo Teras
2013-03-26 8:20 ` Timo Teras
2013-03-27 14:10 ` Timo Teras
2013-03-28 8:52 ` Timo Teras
2013-03-28 12:40 ` Mauro Carvalho Chehab
2013-03-28 13:35 ` Timo Teras
2013-03-28 14:54 ` Timo Teras
2013-05-01 17:11 ` Jon Arne Jørgensen
2013-05-02 7:04 ` Timo Teras
2013-05-03 5:47 ` Timo Teras
2013-05-03 9:13 ` Jon Arne Jørgensen
2013-05-03 11:12 ` Ezequiel Garcia
2013-03-28 15:22 ` Mauro Carvalho Chehab
2013-03-30 9:54 ` Timo Teras
2013-04-01 17:26 ` Frank Schäfer
2013-04-02 5:43 ` Timo Teras
2013-04-02 16:39 ` Frank Schäfer
2013-04-03 8:27 ` Timo Teras
2013-04-05 15:33 ` Frank Schäfer
2013-04-29 12:26 ` Timo Teras
2013-05-03 5:50 ` Timo Teras [this message]
2013-05-10 11:04 ` Tomasz Moń
2013-03-27 17:37 ` Frank Schäfer
2013-03-27 17:57 ` Timo Teras
2013-03-27 18:04 ` Timo Teras
2013-03-27 20:12 ` Frank Schäfer
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=20130503085025.0a989c42@vostro \
--to=timo.teras@iki.fi \
--cc=fschaefer.oss@googlemail.com \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox