mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 14:11:52 +00:00
Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media
Pull media fixes from Mauro Carvalho Chehab: - Fixes a regression at DVB core when switching from DVB-S2 to DVB-S on Kaffeine (Fedora 16 Bugzilla #812895); - Fixes a mutex unlock at an error condition at drx-k; - Fix winbond-cir set mode; - mt9m032: Fix a compilation breakage with some random Kconfig; - mt9m032: fix two dead locks; - xc5000: don't require an special firmware (that won't be provided by the vendor) just because the xtal frequency is different; - V4L DocBook: fix some typos at multi-plane formats description. * 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: [media] xc5000: support 32MHz & 31.875MHz xtal using the 41.024.5 firmware [media] V4L: mt9m032: fix compilation breakage [media] V4L: DocBook: Fix typos in the multi-plane formats description [media] V4L: mt9m032: fix two dead-locks [media] rc-core: set mode for winbond-cir [media] drxk: Does not unlock mutex if sanity check failed in scu_command() [media] dvb_frontend: Fix a regression when switching back to DVB-S
This commit is contained in:
commit
8898159650
@ -1,6 +1,6 @@
|
||||
<refentry id="V4L2-PIX-FMT-NV12M">
|
||||
<refmeta>
|
||||
<refentrytitle>V4L2_PIX_FMT_NV12M ('NV12M')</refentrytitle>
|
||||
<refentrytitle>V4L2_PIX_FMT_NV12M ('NM12')</refentrytitle>
|
||||
&manvol;
|
||||
</refmeta>
|
||||
<refnamediv>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<refentry id="V4L2-PIX-FMT-YUV420M">
|
||||
<refmeta>
|
||||
<refentrytitle>V4L2_PIX_FMT_YUV420M ('YU12M')</refentrytitle>
|
||||
<refentrytitle>V4L2_PIX_FMT_YUV420M ('YM12')</refentrytitle>
|
||||
&manvol;
|
||||
</refmeta>
|
||||
<refnamediv>
|
||||
|
@ -54,6 +54,7 @@ struct xc5000_priv {
|
||||
struct list_head hybrid_tuner_instance_list;
|
||||
|
||||
u32 if_khz;
|
||||
u32 xtal_khz;
|
||||
u32 freq_hz;
|
||||
u32 bandwidth;
|
||||
u8 video_standard;
|
||||
@ -214,9 +215,9 @@ static const struct xc5000_fw_cfg xc5000a_1_6_114 = {
|
||||
.size = 12401,
|
||||
};
|
||||
|
||||
static const struct xc5000_fw_cfg xc5000c_41_024_5_31875 = {
|
||||
.name = "dvb-fe-xc5000c-41.024.5-31875.fw",
|
||||
.size = 16503,
|
||||
static const struct xc5000_fw_cfg xc5000c_41_024_5 = {
|
||||
.name = "dvb-fe-xc5000c-41.024.5.fw",
|
||||
.size = 16497,
|
||||
};
|
||||
|
||||
static inline const struct xc5000_fw_cfg *xc5000_assign_firmware(int chip_id)
|
||||
@ -226,7 +227,7 @@ static inline const struct xc5000_fw_cfg *xc5000_assign_firmware(int chip_id)
|
||||
case XC5000A:
|
||||
return &xc5000a_1_6_114;
|
||||
case XC5000C:
|
||||
return &xc5000c_41_024_5_31875;
|
||||
return &xc5000c_41_024_5;
|
||||
}
|
||||
}
|
||||
|
||||
@ -572,6 +573,31 @@ static int xc_tune_channel(struct xc5000_priv *priv, u32 freq_hz, int mode)
|
||||
return found;
|
||||
}
|
||||
|
||||
static int xc_set_xtal(struct dvb_frontend *fe)
|
||||
{
|
||||
struct xc5000_priv *priv = fe->tuner_priv;
|
||||
int ret = XC_RESULT_SUCCESS;
|
||||
|
||||
switch (priv->chip_id) {
|
||||
default:
|
||||
case XC5000A:
|
||||
/* 32.000 MHz xtal is default */
|
||||
break;
|
||||
case XC5000C:
|
||||
switch (priv->xtal_khz) {
|
||||
default:
|
||||
case 32000:
|
||||
/* 32.000 MHz xtal is default */
|
||||
break;
|
||||
case 31875:
|
||||
/* 31.875 MHz xtal configuration */
|
||||
ret = xc_write_reg(priv, 0x000f, 0x8081);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int xc5000_fwupload(struct dvb_frontend *fe)
|
||||
{
|
||||
@ -603,6 +629,8 @@ static int xc5000_fwupload(struct dvb_frontend *fe)
|
||||
} else {
|
||||
printk(KERN_INFO "xc5000: firmware uploading...\n");
|
||||
ret = xc_load_i2c_sequence(fe, fw->data);
|
||||
if (XC_RESULT_SUCCESS == ret)
|
||||
ret = xc_set_xtal(fe);
|
||||
printk(KERN_INFO "xc5000: firmware upload complete...\n");
|
||||
}
|
||||
|
||||
@ -1164,6 +1192,9 @@ struct dvb_frontend *xc5000_attach(struct dvb_frontend *fe,
|
||||
priv->if_khz = cfg->if_khz;
|
||||
}
|
||||
|
||||
if (priv->xtal_khz == 0)
|
||||
priv->xtal_khz = cfg->xtal_khz;
|
||||
|
||||
if (priv->radio_input == 0)
|
||||
priv->radio_input = cfg->radio_input;
|
||||
|
||||
|
@ -34,6 +34,7 @@ struct xc5000_config {
|
||||
u8 i2c_address;
|
||||
u32 if_khz;
|
||||
u8 radio_input;
|
||||
u32 xtal_khz;
|
||||
|
||||
int chip_id;
|
||||
};
|
||||
|
@ -1446,6 +1446,28 @@ static int set_delivery_system(struct dvb_frontend *fe, u32 desired_system)
|
||||
__func__);
|
||||
return -EINVAL;
|
||||
}
|
||||
/*
|
||||
* Get a delivery system that is compatible with DVBv3
|
||||
* NOTE: in order for this to work with softwares like Kaffeine that
|
||||
* uses a DVBv5 call for DVB-S2 and a DVBv3 call to go back to
|
||||
* DVB-S, drivers that support both should put the SYS_DVBS entry
|
||||
* before the SYS_DVBS2, otherwise it won't switch back to DVB-S.
|
||||
* The real fix is that userspace applications should not use DVBv3
|
||||
* and not trust on calling FE_SET_FRONTEND to switch the delivery
|
||||
* system.
|
||||
*/
|
||||
ncaps = 0;
|
||||
while (fe->ops.delsys[ncaps] && ncaps < MAX_DELSYS) {
|
||||
if (fe->ops.delsys[ncaps] == desired_system) {
|
||||
delsys = desired_system;
|
||||
break;
|
||||
}
|
||||
ncaps++;
|
||||
}
|
||||
if (delsys == SYS_UNDEFINED) {
|
||||
dprintk("%s() Couldn't find a delivery system that matches %d\n",
|
||||
__func__, desired_system);
|
||||
}
|
||||
} else {
|
||||
/*
|
||||
* This is a DVBv5 call. So, it likely knows the supported
|
||||
@ -1494,9 +1516,10 @@ static int set_delivery_system(struct dvb_frontend *fe, u32 desired_system)
|
||||
__func__);
|
||||
return -EINVAL;
|
||||
}
|
||||
c->delivery_system = delsys;
|
||||
}
|
||||
|
||||
c->delivery_system = delsys;
|
||||
|
||||
/*
|
||||
* The DVBv3 or DVBv5 call is requesting a different system. So,
|
||||
* emulation is needed.
|
||||
|
@ -1520,8 +1520,10 @@ static int scu_command(struct drxk_state *state,
|
||||
dprintk(1, "\n");
|
||||
|
||||
if ((cmd == 0) || ((parameterLen > 0) && (parameter == NULL)) ||
|
||||
((resultLen > 0) && (result == NULL)))
|
||||
goto error;
|
||||
((resultLen > 0) && (result == NULL))) {
|
||||
printk(KERN_ERR "drxk: Error %d on %s\n", status, __func__);
|
||||
return status;
|
||||
}
|
||||
|
||||
mutex_lock(&state->mutex);
|
||||
|
||||
|
@ -1046,6 +1046,7 @@ wbcir_probe(struct pnp_dev *device, const struct pnp_device_id *dev_id)
|
||||
goto exit_unregister_led;
|
||||
}
|
||||
|
||||
data->dev->driver_type = RC_DRIVER_IR_RAW;
|
||||
data->dev->driver_name = WBCIR_NAME;
|
||||
data->dev->input_name = WBCIR_NAME;
|
||||
data->dev->input_phys = "wbcir/cir0";
|
||||
|
@ -492,7 +492,7 @@ config VIDEO_VS6624
|
||||
|
||||
config VIDEO_MT9M032
|
||||
tristate "MT9M032 camera sensor support"
|
||||
depends on I2C && VIDEO_V4L2
|
||||
depends on I2C && VIDEO_V4L2 && VIDEO_V4L2_SUBDEV_API
|
||||
select VIDEO_APTINA_PLL
|
||||
---help---
|
||||
This driver supports MT9M032 camera sensors from Aptina, monochrome
|
||||
|
@ -392,10 +392,11 @@ static int mt9m032_set_pad_format(struct v4l2_subdev *subdev,
|
||||
}
|
||||
|
||||
/* Scaling is not supported, the format is thus fixed. */
|
||||
ret = mt9m032_get_pad_format(subdev, fh, fmt);
|
||||
fmt->format = *__mt9m032_get_pad_format(sensor, fh, fmt->which);
|
||||
ret = 0;
|
||||
|
||||
done:
|
||||
mutex_lock(&sensor->lock);
|
||||
mutex_unlock(&sensor->lock);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user