Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 142454
b: refs/heads/master
c: 940088a
h: refs/heads/master
v: v3
  • Loading branch information
Hans Verkuil authored and Mauro Carvalho Chehab committed Apr 7, 2009
1 parent e780a01 commit 80f5fdd
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 14 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: 1792f68b0eb464a9bc84e7d182e2ab4d00541c8c
refs/heads/master: 940088a16221fa517f5b921266afa8e46f49b784
15 changes: 2 additions & 13 deletions trunk/drivers/media/video/bt8xx/bttv-cards.c
Original file line number Diff line number Diff line change
Expand Up @@ -3324,17 +3324,6 @@ void __devinit bttv_init_card1(struct bttv *btv)
/* initialization part two -- after registering i2c bus */
void __devinit bttv_init_card2(struct bttv *btv)
{
static const unsigned short tvaudio_addrs[] = {
I2C_ADDR_TDA8425 >> 1,
I2C_ADDR_TEA6300 >> 1,
I2C_ADDR_TEA6420 >> 1,
I2C_ADDR_TDA9840 >> 1,
I2C_ADDR_TDA985x_L >> 1,
I2C_ADDR_TDA985x_H >> 1,
I2C_ADDR_TDA9874 >> 1,
I2C_ADDR_PIC16C54 >> 1,
I2C_CLIENT_END
};
int addr=ADDR_UNSET;

btv->tuner_type = UNSET;
Expand Down Expand Up @@ -3621,7 +3610,7 @@ void __devinit bttv_init_card2(struct bttv *btv)
case 3: {
/* The user specified that we should probe for tvaudio */
btv->sd_tvaudio = v4l2_i2c_new_probed_subdev(&btv->c.v4l2_dev,
&btv->c.i2c_adap, "tvaudio", "tvaudio", tvaudio_addrs);
&btv->c.i2c_adap, "tvaudio", "tvaudio", tvaudio_addrs());
if (btv->sd_tvaudio)
return;
goto no_audio;
Expand Down Expand Up @@ -3667,7 +3656,7 @@ void __devinit bttv_init_card2(struct bttv *btv)

/* Now see if we can find one of the tvaudio devices. */
btv->sd_tvaudio = v4l2_i2c_new_probed_subdev(&btv->c.v4l2_dev,
&btv->c.i2c_adap, "tvaudio", "tvaudio", tvaudio_addrs);
&btv->c.i2c_adap, "tvaudio", "tvaudio", tvaudio_addrs());
if (btv->sd_tvaudio)
return;

Expand Down
19 changes: 19 additions & 0 deletions trunk/include/media/tvaudio.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,29 @@
#ifndef _TVAUDIO_H
#define _TVAUDIO_H

#include <media/i2c-addr.h>

/* The tvaudio module accepts the following inputs: */
#define TVAUDIO_INPUT_TUNER 0
#define TVAUDIO_INPUT_RADIO 1
#define TVAUDIO_INPUT_EXTERN 2
#define TVAUDIO_INPUT_INTERN 3

static inline const unsigned short *tvaudio_addrs(void)
{
static const unsigned short addrs[] = {
I2C_ADDR_TDA8425 >> 1,
I2C_ADDR_TEA6300 >> 1,
I2C_ADDR_TEA6420 >> 1,
I2C_ADDR_TDA9840 >> 1,
I2C_ADDR_TDA985x_L >> 1,
I2C_ADDR_TDA985x_H >> 1,
I2C_ADDR_TDA9874 >> 1,
I2C_ADDR_PIC16C54 >> 1,
I2C_CLIENT_END
};

return addrs;
}

#endif

0 comments on commit 80f5fdd

Please sign in to comment.