Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 124187
b: refs/heads/master
c: ebef13d
h: refs/heads/master
i:
  124185: a08cad9
  124183: 76cf67a
v: v3
  • Loading branch information
Devin Heitmueller authored and Mauro Carvalho Chehab committed Dec 29, 2008
1 parent 159d307 commit 9a8cc25
Show file tree
Hide file tree
Showing 3 changed files with 28 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: 24a613e4b08c4077b4c809bebab1d4a36d541fcc
refs/heads/master: ebef13d480f0223512963ee785bd93770d404fe3
18 changes: 18 additions & 0 deletions trunk/drivers/media/video/em28xx/em28xx-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,24 @@ int em28xx_colorlevels_set_default(struct em28xx *dev)
int em28xx_capture_start(struct em28xx *dev, int start)
{
int rc;

if (dev->chip_id == CHIP_ID_EM2874) {
/* The Transport Stream Enable Register moved in em2874 */
if (!start) {
rc = em28xx_write_reg_bits(dev, EM2874_R5F_TS_ENABLE,
0x00,
EM2874_TS1_CAPTURE_ENABLE);
return rc;
}

/* Enable Transport Stream */
rc = em28xx_write_reg_bits(dev, EM2874_R5F_TS_ENABLE,
EM2874_TS1_CAPTURE_ENABLE,
EM2874_TS1_CAPTURE_ENABLE);
return rc;
}


/* FIXME: which is the best order? */
/* video registers are sampled by VREF */
rc = em28xx_write_reg_bits(dev, EM28XX_R0C_USBSUSP,
Expand Down
9 changes: 9 additions & 0 deletions trunk/drivers/media/video/em28xx/em28xx-reg.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,17 @@
#define EM28XX_R14_VIDEO_AC97 0x14

/* em2874 registers */
#define EM2874_R5F_TS_ENABLE 0x5f
#define EM2874_R80_GPIO 0x80

/* em2874 Transport Stream Enable Register (0x5f) */
#define EM2874_TS1_CAPTURE_ENABLE (1 << 0)
#define EM2874_TS1_FILTER_ENABLE (1 << 1)
#define EM2874_TS1_NULL_DISCARD (1 << 2)
#define EM2874_TS2_CAPTURE_ENABLE (1 << 4)
#define EM2874_TS2_FILTER_ENABLE (1 << 5)
#define EM2874_TS2_NULL_DISCARD (1 << 6)

/* register settings */
#define EM2800_AUDIO_SRC_TUNER 0x0d
#define EM2800_AUDIO_SRC_LINE 0x0c
Expand Down

0 comments on commit 9a8cc25

Please sign in to comment.