Skip to content

Commit

Permalink
Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel…
Browse files Browse the repository at this point in the history
…/git/mchehab/linux-2.6

* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6: (62 commits)
  V4L/DVB (12131): BUGFIX: An incorrect Carrier Recovery Loop optimization table was being
  V4L/DVB (12130): Fix a redundant compiler warning
  V4L/DVB (12003): v4l2: Move bounding code outside I2C ifdef block
  V4L/DVB (11913): cx231xx: TRY_FMT should not actually set anything
  V4L/DVB (11912): em28xx: Use v4l bounding/alignment function
  V4L/DVB (11911): cx231xx: Use v4l bounding/alignment function
  V4L/DVB (11910): mt9: Use v4l bounding/alignment function
  V4L/DVB (11909): cx23885: Use v4l bounding/alignment function
  V4L/DVB (11908): w8968cf: Use v4l bounding/alignment function
  V4L/DVB (11907): cx88: Use v4l bounding/alignment function
  V4L/DVB (11906): saa7134: Use v4l bounding/alignment function
  V4L/DVB (11905): vivi: Use v4l bounding/alignment function
  V4L/DVB (11904): zoran: Use v4l bounding/alignment functiob
  V4L/DVB (11903): sh_mobile_ceu_camera: Use v4l bounding/alignment function
  V4L/DVB (11902): pxa-camera: Use v4l bounding/alignment function
  V4L/DVB (11901): v4l2: Create helper function for bounding and aligning images
  V4L/DVB (12128): v4l2: update framework documentation.
  V4L/DVB (12125): v4l2: add new s_config subdev ops and v4l2_i2c_new_subdev_cfg/board calls
  V4L/DVB (12122): pvrusb2: De-obfuscate code which handles routing schemes
  V4L/DVB (12121): pvrusb2: Improve handling of routing schemes
  ...
  • Loading branch information
Linus Torvalds committed Jun 23, 2009
2 parents 811e42c + eebf8d8 commit 135aae3
Show file tree
Hide file tree
Showing 59 changed files with 2,322 additions and 489 deletions.
6 changes: 3 additions & 3 deletions Documentation/video4linux/CARDLIST.cx88
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
5 -> Leadtek Winfast 2000XP Expert [107d:6611,107d:6613]
6 -> AverTV Studio 303 (M126) [1461:000b]
7 -> MSI TV-@nywhere Master [1462:8606]
8 -> Leadtek Winfast DV2000 [107d:6620]
9 -> Leadtek PVR 2000 [107d:663b,107d:663c,107d:6632]
8 -> Leadtek Winfast DV2000 [107d:6620,107d:6621]
9 -> Leadtek PVR 2000 [107d:663b,107d:663c,107d:6632,107d:6630,107d:6638,107d:6631,107d:6637,107d:663d]
10 -> IODATA GV-VCP3/PCI [10fc:d003]
11 -> Prolink PlayTV PVR
12 -> ASUS PVR-416 [1043:4823,1461:c111]
Expand Down Expand Up @@ -59,7 +59,7 @@
58 -> Pinnacle PCTV HD 800i [11bd:0051]
59 -> DViCO FusionHDTV 5 PCI nano [18ac:d530]
60 -> Pinnacle Hybrid PCTV [12ab:1788]
61 -> Winfast TV2000 XP Global [107d:6f18]
61 -> Leadtek TV2000 XP Global [107d:6f18,107d:6618]
62 -> PowerColor RA330 [14f1:ea3d]
63 -> Geniatech X8000-MT DVBT [14f1:8852]
64 -> DViCO FusionHDTV DVB-T PRO [18ac:db30]
Expand Down
1 change: 1 addition & 0 deletions Documentation/video4linux/CARDLIST.em28xx
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,4 @@
67 -> Terratec Grabby (em2860) [0ccd:0096]
68 -> Terratec AV350 (em2860) [0ccd:0084]
69 -> KWorld ATSC 315U HDTV TV Box (em2882) [eb1a:a313]
70 -> Evga inDtube (em2882)
24 changes: 24 additions & 0 deletions Documentation/video4linux/v4l2-framework.txt
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,30 @@ later date. It differs between i2c drivers and as such can be confusing.
To see which chip variants are supported you can look in the i2c driver code
for the i2c_device_id table. This lists all the possibilities.

There are two more helper functions:

v4l2_i2c_new_subdev_cfg: this function adds new irq and platform_data
arguments and has both 'addr' and 'probed_addrs' arguments: if addr is not
0 then that will be used (non-probing variant), otherwise the probed_addrs
are probed.

For example: this will probe for address 0x10:

struct v4l2_subdev *sd = v4l2_i2c_new_subdev_cfg(v4l2_dev, adapter,
"module_foo", "chipid", 0, NULL, 0, I2C_ADDRS(0x10));

v4l2_i2c_new_subdev_board uses an i2c_board_info struct which is passed
to the i2c driver and replaces the irq, platform_data and addr arguments.

If the subdev supports the s_config core ops, then that op is called with
the irq and platform_data arguments after the subdev was setup. The older
v4l2_i2c_new_(probed_)subdev functions will call s_config as well, but with
irq set to 0 and platform_data set to NULL.

Note that in the next kernel release the functions v4l2_i2c_new_subdev,
v4l2_i2c_new_probed_subdev and v4l2_i2c_new_probed_subdev_addr will all be
replaced by a single v4l2_i2c_new_subdev that is identical to
v4l2_i2c_new_subdev_cfg but without the irq and platform_data arguments.

struct video_device
-------------------
Expand Down
23 changes: 23 additions & 0 deletions drivers/media/common/ir-keymaps.c
Original file line number Diff line number Diff line change
Expand Up @@ -2750,3 +2750,26 @@ IR_KEYTAB_TYPE ir_codes_dm1105_nec[IR_KEYTAB_SIZE] = {
[0x1b] = KEY_B, /*recall*/
};
EXPORT_SYMBOL_GPL(ir_codes_dm1105_nec);

/* EVGA inDtube
Devin Heitmueller <devin.heitmueller@gmail.com>
*/
IR_KEYTAB_TYPE ir_codes_evga_indtube[IR_KEYTAB_SIZE] = {
[0x12] = KEY_POWER,
[0x02] = KEY_MODE, /* TV */
[0x14] = KEY_MUTE,
[0x1a] = KEY_CHANNELUP,
[0x16] = KEY_TV2, /* PIP */
[0x1d] = KEY_VOLUMEUP,
[0x05] = KEY_CHANNELDOWN,
[0x0f] = KEY_PLAYPAUSE,
[0x19] = KEY_VOLUMEDOWN,
[0x1c] = KEY_REWIND,
[0x0d] = KEY_RECORD,
[0x18] = KEY_FORWARD,
[0x1e] = KEY_PREVIOUS,
[0x1b] = KEY_STOP,
[0x1f] = KEY_NEXT,
[0x13] = KEY_CAMERA,
};
EXPORT_SYMBOL_GPL(ir_codes_evga_indtube);
7 changes: 6 additions & 1 deletion drivers/media/dvb/frontends/stv0900.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@
#include <linux/dvb/frontend.h>
#include "dvb_frontend.h"

struct stv0900_reg {
u16 addr;
u8 val;
};

struct stv0900_config {
u8 demod_address;
u32 xtal;
Expand All @@ -38,7 +43,7 @@ struct stv0900_config {

u8 path1_mode;
u8 path2_mode;

struct stv0900_reg *ts_config_regs;
u8 tun1_maddress;/* 0, 1, 2, 3 for 0xc0, 0xc2, 0xc4, 0xc6 */
u8 tun2_maddress;
u8 tun1_adc;/* 1 for stv6110, 2 for stb6100 */
Expand Down
100 changes: 78 additions & 22 deletions drivers/media/dvb/frontends/stv0900_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -149,31 +149,31 @@ void stv0900_write_reg(struct stv0900_internal *i_params, u16 reg_addr,
dprintk(KERN_ERR "%s: i2c error %d\n", __func__, ret);
}

u8 stv0900_read_reg(struct stv0900_internal *i_params, u16 reg_addr)
u8 stv0900_read_reg(struct stv0900_internal *i_params, u16 reg)
{
u8 data[2];
int ret;
struct i2c_msg i2cmsg = {
.addr = i_params->i2c_addr,
.flags = 0,
.len = 2,
.buf = data,
u8 b0[] = { MSB(reg), LSB(reg) };
u8 buf = 0;
struct i2c_msg msg[] = {
{
.addr = i_params->i2c_addr,
.flags = 0,
.buf = b0,
.len = 2,
}, {
.addr = i_params->i2c_addr,
.flags = I2C_M_RD,
.buf = &buf,
.len = 1,
},
};

data[0] = MSB(reg_addr);
data[1] = LSB(reg_addr);

ret = i2c_transfer(i_params->i2c_adap, &i2cmsg, 1);
if (ret != 1)
dprintk(KERN_ERR "%s: i2c error %d\n", __func__, ret);

i2cmsg.flags = I2C_M_RD;
i2cmsg.len = 1;
ret = i2c_transfer(i_params->i2c_adap, &i2cmsg, 1);
if (ret != 1)
dprintk(KERN_ERR "%s: i2c error %d\n", __func__, ret);
ret = i2c_transfer(i_params->i2c_adap, msg, 2);
if (ret != 2)
dprintk(KERN_ERR "%s: i2c error %d, reg[0x%02x]\n",
__func__, ret, reg);

return data[0];
return buf;
}

void extract_mask_pos(u32 label, u8 *mask, u8 *pos)
Expand Down Expand Up @@ -712,6 +712,44 @@ static s32 stv0900_carr_get_quality(struct dvb_frontend *fe,
return c_n;
}

static int stv0900_read_ucblocks(struct dvb_frontend *fe, u32 * ucblocks)
{
struct stv0900_state *state = fe->demodulator_priv;
struct stv0900_internal *i_params = state->internal;
enum fe_stv0900_demod_num demod = state->demod;
u8 err_val1, err_val0;
s32 err_field1, err_field0;
u32 header_err_val = 0;

*ucblocks = 0x0;
if (stv0900_get_standard(fe, demod) == STV0900_DVBS2_STANDARD) {
/* DVB-S2 delineator errors count */

/* retreiving number for errnous headers */
dmd_reg(err_field0, R0900_P1_BBFCRCKO0,
R0900_P2_BBFCRCKO0);
dmd_reg(err_field1, R0900_P1_BBFCRCKO1,
R0900_P2_BBFCRCKO1);

err_val1 = stv0900_read_reg(i_params, err_field1);
err_val0 = stv0900_read_reg(i_params, err_field0);
header_err_val = (err_val1<<8) | err_val0;

/* retreiving number for errnous packets */
dmd_reg(err_field0, R0900_P1_UPCRCKO0,
R0900_P2_UPCRCKO0);
dmd_reg(err_field1, R0900_P1_UPCRCKO1,
R0900_P2_UPCRCKO1);

err_val1 = stv0900_read_reg(i_params, err_field1);
err_val0 = stv0900_read_reg(i_params, err_field0);
*ucblocks = (err_val1<<8) | err_val0;
*ucblocks += header_err_val;
}

return 0;
}

static int stv0900_read_snr(struct dvb_frontend *fe, u16 *snr)
{
*snr = stv0900_carr_get_quality(fe,
Expand Down Expand Up @@ -1355,7 +1393,7 @@ static enum fe_stv0900_error stv0900_init_internal(struct dvb_frontend *fe,
struct stv0900_state *state = fe->demodulator_priv;
enum fe_stv0900_error error = STV0900_NO_ERROR;
enum fe_stv0900_error demodError = STV0900_NO_ERROR;
int selosci;
int selosci, i;

struct stv0900_inode *temp_int = find_inode(state->i2c_adap,
state->config->demod_address);
Expand Down Expand Up @@ -1402,7 +1440,23 @@ static enum fe_stv0900_error stv0900_init_internal(struct dvb_frontend *fe,
stv0900_write_bits(state->internal, F0900_P1_ROLLOFF_CONTROL, p_init->rolloff);
stv0900_write_bits(state->internal, F0900_P2_ROLLOFF_CONTROL, p_init->rolloff);

stv0900_set_ts_parallel_serial(state->internal, p_init->path1_ts_clock, p_init->path2_ts_clock);
state->internal->ts_config = p_init->ts_config;
if (state->internal->ts_config == NULL)
stv0900_set_ts_parallel_serial(state->internal,
p_init->path1_ts_clock,
p_init->path2_ts_clock);
else {
for (i = 0; state->internal->ts_config[i].addr != 0xffff; i++)
stv0900_write_reg(state->internal,
state->internal->ts_config[i].addr,
state->internal->ts_config[i].val);

stv0900_write_bits(state->internal, F0900_P2_RST_HWARE, 1);
stv0900_write_bits(state->internal, F0900_P2_RST_HWARE, 0);
stv0900_write_bits(state->internal, F0900_P1_RST_HWARE, 1);
stv0900_write_bits(state->internal, F0900_P1_RST_HWARE, 0);
}

stv0900_write_bits(state->internal, F0900_P1_TUN_MADDRESS, p_init->tun1_maddress);
switch (p_init->tuner1_adc) {
case 1:
Expand Down Expand Up @@ -1882,6 +1936,7 @@ static struct dvb_frontend_ops stv0900_ops = {
.read_ber = stv0900_read_ber,
.read_signal_strength = stv0900_read_signal_strength,
.read_snr = stv0900_read_snr,
.read_ucblocks = stv0900_read_ucblocks,
};

struct dvb_frontend *stv0900_attach(const struct stv0900_config *config,
Expand Down Expand Up @@ -1915,6 +1970,7 @@ struct dvb_frontend *stv0900_attach(const struct stv0900_config *config,
init_params.tun1_iq_inversion = STV0900_IQ_NORMAL;
init_params.tuner1_adc = config->tun1_adc;
init_params.path2_ts_clock = config->path2_mode;
init_params.ts_config = config->ts_config_regs;
init_params.tun2_maddress = config->tun2_maddress;
init_params.tuner2_adc = config->tun2_adc;
init_params.tun2_iq_inversion = STV0900_IQ_SWAPPED;
Expand Down
2 changes: 2 additions & 0 deletions drivers/media/dvb/frontends/stv0900_priv.h
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,7 @@ struct stv0900_init_params{

/* IQ from the tuner2 to the demod */
enum stv0900_iq_inversion tun2_iq_inversion;
struct stv0900_reg *ts_config;
};

struct stv0900_search_params {
Expand Down Expand Up @@ -363,6 +364,7 @@ struct stv0900_internal{
u8 i2c_addr;
u8 clkmode;/* 0 for CLKI, 2 for XTALI */
u8 chip_id;
struct stv0900_reg *ts_config;
enum fe_stv0900_error errs;
int dmds_used;
};
Expand Down
11 changes: 7 additions & 4 deletions drivers/media/dvb/frontends/stv090x.c
Original file line number Diff line number Diff line change
Expand Up @@ -2674,7 +2674,7 @@ static u8 stv090x_optimize_carloop(struct stv090x_state *state, enum stv090x_mod

static u8 stv090x_optimize_carloop_short(struct stv090x_state *state)
{
struct stv090x_short_frame_crloop *short_crl;
struct stv090x_short_frame_crloop *short_crl = NULL;
s32 index = 0;
u8 aclc = 0x0b;

Expand All @@ -2694,10 +2694,13 @@ static u8 stv090x_optimize_carloop_short(struct stv090x_state *state)
break;
}

if (state->dev_ver >= 0x30)
short_crl = stv090x_s2_short_crl_cut20;
else if (state->dev_ver >= 0x20)
if (state->dev_ver >= 0x30) {
/* Cut 3.0 and up */
short_crl = stv090x_s2_short_crl_cut30;
} else {
/* Cut 2.0 and up: we don't support cuts older than 2.0 */
short_crl = stv090x_s2_short_crl_cut20;
}

if (state->srate <= 3000000)
aclc = short_crl[index].crl_2;
Expand Down
1 change: 1 addition & 0 deletions drivers/media/dvb/frontends/tda10048.c
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ static struct pll_tab {
{ TDA10048_CLK_4000, TDA10048_IF_36130, 10, 0, 0 },
{ TDA10048_CLK_16000, TDA10048_IF_3300, 10, 3, 0 },
{ TDA10048_CLK_16000, TDA10048_IF_3500, 10, 3, 0 },
{ TDA10048_CLK_16000, TDA10048_IF_3800, 10, 3, 0 },
{ TDA10048_CLK_16000, TDA10048_IF_4000, 10, 3, 0 },
{ TDA10048_CLK_16000, TDA10048_IF_4300, 10, 3, 0 },
{ TDA10048_CLK_16000, TDA10048_IF_36130, 10, 3, 0 },
Expand Down
4 changes: 2 additions & 2 deletions drivers/media/dvb/siano/smscoreapi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1422,8 +1422,8 @@ int smscore_gpio_configure(struct smscore_device_t *coredev, u8 PinNum,
struct smscore_gpio_config *pGpioConfig) {

u32 totalLen;
u32 TranslatedPinNum;
u32 GroupNum;
u32 TranslatedPinNum = 0;
u32 GroupNum = 0;
u32 ElectricChar;
u32 groupCfg;
void *buffer;
Expand Down
4 changes: 3 additions & 1 deletion drivers/media/radio/radio-tea5764.c
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,9 @@ static int vidioc_g_tuner(struct file *file, void *priv,
v->rangehigh = FREQ_MAX * FREQ_MUL;
v->capability = V4L2_TUNER_CAP_LOW | V4L2_TUNER_CAP_STEREO;
if (r->tunchk & TEA5764_TUNCHK_STEREO)
v->rxsubchans = V4L2_TUNER_SUB_STEREO;
v->rxsubchans = V4L2_TUNER_SUB_STEREO;
else
v->rxsubchans = V4L2_TUNER_SUB_MONO;
v->audmode = tea5764_get_audout_mode(radio);
v->signal = TEA5764_TUNCHK_LEVEL(r->tunchk) * 0xffff / 0xf;
v->afc = TEA5764_TUNCHK_IFCNT(r->tunchk);
Expand Down
6 changes: 5 additions & 1 deletion drivers/media/video/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -866,9 +866,13 @@ config USB_W9968CF
module will be called w9968cf.

config USB_OV511
tristate "USB OV511 Camera support"
tristate "USB OV511 Camera support (DEPRECATED)"
depends on VIDEO_V4L1
---help---
This driver is DEPRECATED please use the gspca ov519 module
instead. Note that for the ov511 / ov518 support of the gspca module
you need atleast version 0.6.0 of libv4l.

Say Y here if you want to connect this type of camera to your
computer's USB port. See <file:Documentation/video4linux/ov511.txt>
for more information and for a list of supported cameras.
Expand Down
2 changes: 2 additions & 0 deletions drivers/media/video/cx18/cx18-controls.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ int cx18_queryctrl(struct file *file, void *fh, struct v4l2_queryctrl *qctrl)

switch (qctrl->id) {
/* Standard V4L2 controls */
case V4L2_CID_USER_CLASS:
return v4l2_ctrl_query_fill(qctrl, 0, 0, 0, 0);
case V4L2_CID_BRIGHTNESS:
case V4L2_CID_HUE:
case V4L2_CID_SATURATION:
Expand Down
19 changes: 5 additions & 14 deletions drivers/media/video/cx231xx/cx231xx-avcore.c
Original file line number Diff line number Diff line change
Expand Up @@ -1052,22 +1052,13 @@ int cx231xx_set_audio_decoder_input(struct cx231xx *dev,
/* Set resolution of the video */
int cx231xx_resolution_set(struct cx231xx *dev)
{
int width, height;
u32 hscale, vscale;
int status = 0;

width = dev->width;
height = dev->height;

get_scale(dev, width, height, &hscale, &vscale);

/* set horzontal scale */
status = vid_blk_write_word(dev, HSCALE_CTRL, hscale);
int status = vid_blk_write_word(dev, HSCALE_CTRL, dev->hscale);
if (status)
return status;

/* set vertical scale */
status = vid_blk_write_word(dev, VSCALE_CTRL, vscale);

return status;
return vid_blk_write_word(dev, VSCALE_CTRL, dev->vscale);
}

/******************************************************************************
Expand Down Expand Up @@ -2055,7 +2046,7 @@ int cx231xx_initialize_stream_xfer(struct cx231xx *dev, u32 media_type)

int cx231xx_capture_start(struct cx231xx *dev, int start, u8 media_type)
{
int rc;
int rc = -1;
u32 ep_mask = -1;
struct pcb_config *pcb_config;

Expand Down
Loading

0 comments on commit 135aae3

Please sign in to comment.