Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 65830
b: refs/heads/master
c: 4adad28
h: refs/heads/master
v: v3
  • Loading branch information
Michael Krufky authored and Mauro Carvalho Chehab committed Oct 10, 2007
1 parent 8350b5b commit ce674aa
Show file tree
Hide file tree
Showing 5 changed files with 237 additions and 113 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: 8d0936ed15f509c32e8f81849be3a1cee80e2225
refs/heads/master: 4adad287de82703fd504fdab7aebe760196bb786
17 changes: 14 additions & 3 deletions trunk/drivers/media/video/tuner-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,14 @@
#include <linux/init.h>
#include <linux/videodev.h>
#include <media/tuner.h>
#include <media/tuner-types.h>
#include <media/v4l2-common.h>
#include "tuner-driver.h"
#include "mt20xx.h"
#include "tda8290.h"
#include "tea5761.h"
#include "tea5767.h"
#include "tuner-simple.h"

#define UNSET (-1U)

Expand Down Expand Up @@ -213,6 +215,15 @@ static void attach_tda8290(struct tuner *t)
tda8290_attach(&t->fe, t->i2c.adapter, t->i2c.addr, &cfg);
}

static void attach_simple_tuner(struct tuner *t)
{
struct simple_tuner_config cfg = {
.type = t->type,
.tun = &tuners[t->type]
};
simple_tuner_attach(&t->fe, t->i2c.adapter, t->i2c.addr, &cfg);
}

static void set_type(struct i2c_client *c, unsigned int type,
unsigned int new_mode_mask, unsigned int new_config,
int (*tuner_callback) (void *dev, int command,int arg))
Expand Down Expand Up @@ -290,21 +301,21 @@ static void set_type(struct i2c_client *c, unsigned int type,
buffer[2] = 0x86;
buffer[3] = 0x54;
i2c_master_send(c, buffer, 4);
default_tuner_init(t);
attach_simple_tuner(t);
break;
case TUNER_PHILIPS_TD1316:
buffer[0] = 0x0b;
buffer[1] = 0xdc;
buffer[2] = 0x86;
buffer[3] = 0xa4;
i2c_master_send(c,buffer,4);
default_tuner_init(t);
attach_simple_tuner(t);
break;
case TUNER_TDA9887:
tda9887_tuner_init(t);
break;
default:
default_tuner_init(t);
attach_simple_tuner(t);
break;
}

Expand Down
2 changes: 0 additions & 2 deletions trunk/drivers/media/video/tuner-driver.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,6 @@ struct tuner {

/* ------------------------------------------------------------------------ */

extern int default_tuner_init(struct tuner *t);

extern int tda9887_tuner_init(struct tuner *t);

/* ------------------------------------------------------------------------ */
Expand Down
Loading

0 comments on commit ce674aa

Please sign in to comment.