Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 76702
b: refs/heads/master
c: a495013
h: refs/heads/master
v: v3
  • Loading branch information
Mauro Carvalho Chehab committed Jan 25, 2008
1 parent 898c38c commit bdccf0e
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 16 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 11fcd4703004fc8c9030ba45dda8ad74a431d235
refs/heads/master: a4950134d46f0b83745f05ea37987785a3905eba
34 changes: 19 additions & 15 deletions trunk/drivers/media/video/em28xx/em28xx-cards.c
Original file line number Diff line number Diff line change
Expand Up @@ -485,27 +485,31 @@ static int em28xx_tuner_callback(void *ptr, int command, int arg)
switch (command) {
case XC2028_TUNER_RESET:
{
char gpio0, gpio1, gpio4;

/* GPIO and initialization codes for analog TV */
gpio0 = dev->analog_gpio & 0xff;
gpio1 = (dev->analog_gpio >> 8) & 0xff;
gpio4 = dev->analog_gpio >> 24;
/* GPIO and initialization codes for analog TV and radio
This code should be complemented for DTV, since reset
codes are different.
*/

dev->em28xx_write_regs_req(dev, 0x00, 0x48, "\x00", 1);
dev->em28xx_write_regs_req(dev, 0x00, 0x12, "\x67", 1);

if (gpio4) {
dev->em28xx_write_regs(dev, 0x04, &gpio4, 1);
msleep(140);
if (dev->analog_gpio) {
char gpio0 = dev->analog_gpio & 0xff;
char gpio1 = (dev->analog_gpio >> 8) & 0xff;
char gpio4 = dev->analog_gpio >> 24;

if (gpio4) {
dev->em28xx_write_regs(dev, 0x04, &gpio4, 1);
msleep(140);
}

msleep(6);
dev->em28xx_write_regs(dev, 0x08, &gpio0, 1);
msleep(10);
dev->em28xx_write_regs(dev, 0x08, &gpio1, 1);
msleep(5);
}

msleep(6);
dev->em28xx_write_regs(dev, 0x08, &gpio0, 1);
msleep(10);
dev->em28xx_write_regs(dev, 0x08, &gpio1, 1);
msleep(5);

break;
}
}
Expand Down

0 comments on commit bdccf0e

Please sign in to comment.