Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 76347
b: refs/heads/master
c: 6c362c8
h: refs/heads/master
i:
  76345: f498276
  76343: 05bca91
v: v3
  • Loading branch information
Mauro Carvalho Chehab committed Jan 25, 2008
1 parent f94af53 commit 8b0cca9
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1808a698a87366f9d82945270355c2139df0a16d
refs/heads/master: 6c362c8e58da972728a3666a0a00b9c2f1574e1f
1 change: 1 addition & 0 deletions trunk/drivers/media/video/em28xx/em28xx-cards.c
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,7 @@ struct usb_device_id em28xx_id_table [] = {
{ USB_DEVICE(0x2040, 0x4200), .driver_info = EM2820_BOARD_HAUPPAUGE_WINTV_USB_2 },
{ USB_DEVICE(0x2304, 0x0207), .driver_info = EM2820_BOARD_PINNACLE_DVC_90 },
{ USB_DEVICE(0x2040, 0x6500), .driver_info = EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900 },
{ USB_DEVICE(0x2040, 0x6513), .driver_info = EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900 },
{ USB_DEVICE(0x0ccd, 0x0042), .driver_info = EM2880_BOARD_TERRATEC_HYBRID_XS },
{ USB_DEVICE(0x0ccd, 0x0047), .driver_info = EM2880_BOARD_TERRATEC_PRODIGY_XS },
{ },
Expand Down
23 changes: 23 additions & 0 deletions trunk/drivers/media/video/em28xx/em28xx-i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#include <linux/video_decoder.h>

#include "em28xx.h"
#include "tuner-xc2028.h"
#include <media/v4l2-common.h>
#include <media/tuner.h>

Expand Down Expand Up @@ -391,6 +392,26 @@ static u32 functionality(struct i2c_adapter *adap)
}


static int em28xx_tuner_callback(void *ptr, int command, int arg)
{
int rc = 0;
struct em28xx *dev = ptr;

if (dev->tuner_type != TUNER_XC2028)
return 0;

switch (command) {
case XC2028_TUNER_RESET:
/* FIXME: This is device-dependent */
dev->em28xx_write_regs_req(dev, 0x00, 0x48, "\x00", 1);
dev->em28xx_write_regs_req(dev, 0x00, 0x12, "\x67", 1);

msleep(140);
break;
}
return rc;
}

static int em28xx_set_tuner(int check_eeprom, struct i2c_client *client)
{
struct em28xx *dev = client->adapter->algo_data;
Expand All @@ -400,6 +421,8 @@ static int em28xx_set_tuner(int check_eeprom, struct i2c_client *client)
tun_setup.mode_mask = T_ANALOG_TV | T_RADIO;
tun_setup.type = dev->tuner_type;
tun_setup.addr = dev->tuner_addr;
tun_setup.tuner_callback = em28xx_tuner_callback;

em28xx_i2c_call_clients(dev, TUNER_SET_TYPE_ADDR, &tun_setup);
}

Expand Down

0 comments on commit 8b0cca9

Please sign in to comment.