Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 76766
b: refs/heads/master
c: ed08631
h: refs/heads/master
v: v3
  • Loading branch information
Mauro Carvalho Chehab committed Jan 25, 2008
1 parent 9e51da2 commit c18192e
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 27 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: 72e04f720f23cfa8d4400d832784f3a424379227
refs/heads/master: ed086314f4e41eb90a9107c7fb2737230686f668
29 changes: 7 additions & 22 deletions trunk/drivers/media/video/em28xx/em28xx-cards.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ struct em28xx_board em28xx_boards[] = {
.is_em2800 = 1,
.vchannels = 2,
.tda9887_conf = TDA9887_PRESENT,
.has_tuner = 1,
.decoder = EM28XX_SAA7113,
.input = { {
.type = EM28XX_VMUX_COMPOSITE1,
Expand All @@ -93,13 +92,14 @@ struct em28xx_board em28xx_boards[] = {
[EM2820_BOARD_UNKNOWN] = {
.name = "Unknown EM2750/28xx video grabber",
.is_em2800 = 0,
.tuner_type = TUNER_ABSENT,
},
[EM2820_BOARD_KWORLD_PVRTV2800RF] = {
.name = "Kworld PVR TV 2800 RF",
.is_em2800 = 0,
.vchannels = 2,
.tuner_type = TUNER_TEMIC_PAL,
.tda9887_conf = TDA9887_PRESENT,
.has_tuner = 1,
.decoder = EM28XX_SAA7113,
.input = { {
.type = EM28XX_VMUX_COMPOSITE1,
Expand All @@ -116,7 +116,6 @@ struct em28xx_board em28xx_boards[] = {
.vchannels = 3,
.tuner_type = TUNER_LG_PAL_NEW_TAPC,
.tda9887_conf = TDA9887_PRESENT,
.has_tuner = 1,
.decoder = EM28XX_SAA7113,
.input = { {
.type = EM28XX_VMUX_TELEVISION,
Expand All @@ -137,7 +136,6 @@ struct em28xx_board em28xx_boards[] = {
.vchannels = 3,
.tuner_type = TUNER_LG_PAL_NEW_TAPC,
.tda9887_conf = TDA9887_PRESENT,
.has_tuner = 1,
.decoder = EM28XX_SAA7113,
.input = { {
.type = EM28XX_VMUX_TELEVISION,
Expand All @@ -160,7 +158,6 @@ struct em28xx_board em28xx_boards[] = {
.tda9887_conf = TDA9887_PRESENT |
TDA9887_PORT1_ACTIVE|
TDA9887_PORT2_ACTIVE,
.has_tuner = 1,
.decoder = EM28XX_TVP5150,
.has_msp34xx = 1,
/*FIXME: S-Video not tested */
Expand All @@ -180,7 +177,6 @@ struct em28xx_board em28xx_boards[] = {
.vchannels = 3,
.tda9887_conf = TDA9887_PRESENT,
.tuner_type = TUNER_XC2028,
.has_tuner = 1,
.mts_firmware = 1,
.decoder = EM28XX_TVP5150,
.input = { {
Expand All @@ -202,7 +198,6 @@ struct em28xx_board em28xx_boards[] = {
.vchannels = 3,
.tda9887_conf = TDA9887_PRESENT,
.tuner_type = TUNER_XC2028,
.has_tuner = 1,
.mts_firmware = 1,
.has_12mhz_i2s = 1,
.decoder = EM28XX_TVP5150,
Expand All @@ -227,7 +222,6 @@ struct em28xx_board em28xx_boards[] = {
.name = "Terratec Hybrid XS",
.vchannels = 3,
.tda9887_conf = TDA9887_PRESENT,
.has_tuner = 1,
.tuner_type = TUNER_XC2028,
.decoder = EM28XX_TVP5150,
.input = { {
Expand All @@ -251,7 +245,6 @@ struct em28xx_board em28xx_boards[] = {
.name = "Terratec Prodigy XS",
.vchannels = 3,
.tda9887_conf = TDA9887_PRESENT,
.has_tuner = 1,
.tuner_type = TUNER_XC2028,
.decoder = EM28XX_TVP5150,
.input = { {
Expand All @@ -275,7 +268,6 @@ struct em28xx_board em28xx_boards[] = {
.tda9887_conf = TDA9887_PRESENT |
TDA9887_PORT1_ACTIVE |
TDA9887_PORT2_ACTIVE,
.has_tuner = 1,
.max_range_640_480 = 1,

.decoder = EM28XX_SAA7114,
Expand All @@ -299,7 +291,6 @@ struct em28xx_board em28xx_boards[] = {
.vchannels = 3,
.tuner_type = TUNER_LG_PAL_NEW_TAPC,
.tda9887_conf = TDA9887_PRESENT,
.has_tuner = 1,
.decoder = EM28XX_SAA7113,
.input = { {
.type = EM28XX_VMUX_TELEVISION,
Expand All @@ -321,7 +312,6 @@ struct em28xx_board em28xx_boards[] = {
.vchannels = 3,
.tuner_type = TUNER_LG_PAL_NEW_TAPC,
.tda9887_conf = TDA9887_PRESENT,
.has_tuner = 1,
.decoder = EM28XX_SAA7113,
.input = { {
.type = EM28XX_VMUX_TELEVISION,
Expand All @@ -343,7 +333,6 @@ struct em28xx_board em28xx_boards[] = {
.vchannels = 3,
.tuner_type = TUNER_PHILIPS_ATSC,
.tda9887_conf = TDA9887_PRESENT,
.has_tuner = 1,
.decoder = EM28XX_SAA7113,
.input = { {
.type = EM28XX_VMUX_TELEVISION,
Expand All @@ -362,7 +351,7 @@ struct em28xx_board em28xx_boards[] = {
[EM2820_BOARD_PINNACLE_DVC_90] = {
.name = "Pinnacle Dazzle DVC 90/DVC 100",
.vchannels = 3,
.has_tuner = 0,
.tuner_type = TUNER_ABSENT,
.decoder = EM28XX_SAA7113,
.input = { {
.type = EM28XX_VMUX_COMPOSITE1,
Expand All @@ -380,7 +369,6 @@ struct em28xx_board em28xx_boards[] = {
.vchannels = 3,
.tuner_type = TUNER_LG_PAL_NEW_TAPC,
.tda9887_conf = TDA9887_PRESENT,
.has_tuner = 1,
.decoder = EM28XX_SAA7113,
.input = { {
.type = EM28XX_VMUX_TELEVISION,
Expand All @@ -400,7 +388,7 @@ struct em28xx_board em28xx_boards[] = {
.name = "Pixelview Prolink PlayTV USB 2.0",
.vchannels = 3,
.tda9887_conf = TDA9887_PRESENT,
.has_tuner = 1,
.tuner_type = TUNER_YMEC_TVF_5533MF,
.decoder = EM28XX_SAA7113,
.input = { {
.type = EM28XX_VMUX_TELEVISION,
Expand Down Expand Up @@ -551,7 +539,7 @@ static void em28xx_config_tuner(struct em28xx *dev)
struct tuner_setup tun_setup;
struct v4l2_frequency f;

if (!dev->has_tuner)
if (dev->tuner_type == TUNER_ABSENT)
return;

tun_setup.mode_mask = T_ANALOG_TV | T_RADIO;
Expand Down Expand Up @@ -668,17 +656,13 @@ static int em28xx_hint_board(struct em28xx *dev)
static void em28xx_set_model(struct em28xx *dev)
{
dev->is_em2800 = em28xx_boards[dev->model].is_em2800;
dev->has_tuner = em28xx_boards[dev->model].has_tuner;
dev->has_msp34xx = em28xx_boards[dev->model].has_msp34xx;
dev->tda9887_conf = em28xx_boards[dev->model].tda9887_conf;
dev->decoder = em28xx_boards[dev->model].decoder;
dev->video_inputs = em28xx_boards[dev->model].vchannels;
dev->analog_gpio = em28xx_boards[dev->model].analog_gpio;
dev->has_12mhz_i2s = em28xx_boards[dev->model].has_12mhz_i2s;
dev->max_range_640_480 = em28xx_boards[dev->model].max_range_640_480;

if (!em28xx_boards[dev->model].has_tuner)
dev->tuner_type = UNSET;
}

/* ----------------------------------------------------------------------- */
Expand Down Expand Up @@ -745,6 +729,7 @@ void em28xx_card_setup(struct em28xx *dev)
tveeprom_hauppauge_analog(&dev->i2c_client, &tv, dev->eedata);

dev->tuner_type = tv.tuner_type;

if (tv.audio_processor == AUDIO_CHIP_MSP34XX) {
dev->i2s_speed = 2048000;
dev->has_msp34xx = 1;
Expand Down Expand Up @@ -777,7 +762,7 @@ void em28xx_card_setup(struct em28xx *dev)
request_module("saa7115");
if (dev->decoder == EM28XX_TVP5150)
request_module("tvp5150");
if (dev->has_tuner)
if (dev->tuner_type != TUNER_ABSENT)
request_module("tuner");
#endif

Expand Down
5 changes: 3 additions & 2 deletions trunk/drivers/media/video/em28xx/em28xx-video.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
#include "em28xx.h"
#include <media/v4l2-common.h>
#include <media/msp3400.h>
#include <media/tuner.h>

#define DRIVER_AUTHOR "Ludovico Cavedon <cavedon@sssup.it>, " \
"Markus Rechberger <mrechberger@gmail.com>, " \
Expand Down Expand Up @@ -928,7 +929,7 @@ static int vidioc_querycap(struct file *file, void *priv,
V4L2_CAP_AUDIO |
V4L2_CAP_READWRITE | V4L2_CAP_STREAMING;

if (dev->has_tuner)
if (dev->tuner_type != TUNER_ABSENT)
cap->capabilities |= V4L2_CAP_TUNER;

return 0;
Expand Down Expand Up @@ -1900,7 +1901,7 @@ static int em28xx_init_dev(struct em28xx **devhandle, struct usb_device *udev,
em28xx_errdev("cannot allocate video_device.\n");
goto fail_unreg;
}
if (dev->has_tuner)
if (dev->tuner_type != TUNER_ABSENT)
dev->vdev->type |= VID_TYPE_TUNER;

/* register v4l2 video video_device */
Expand Down
2 changes: 0 additions & 2 deletions trunk/drivers/media/video/em28xx/em28xx.h
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,6 @@ struct em28xx_board {
unsigned int tda9887_conf;

unsigned int is_em2800:1;
unsigned int has_tuner:1;
unsigned int has_msp34xx:1;
unsigned int mts_firmware:1;
unsigned int has_12mhz_i2s:1;
Expand Down Expand Up @@ -226,7 +225,6 @@ struct em28xx {
int devno; /* marks the number of this device */
unsigned int analog_gpio;
unsigned int is_em2800:1;
unsigned int has_tuner:1;
unsigned int has_msp34xx:1;
unsigned int has_tda9887:1;
unsigned int stream_on:1; /* Locks streams */
Expand Down

0 comments on commit c18192e

Please sign in to comment.