Commit 88981596 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
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
parents 9f24ff6f e631f578
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
    <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 −1
Original line number Diff line number Diff line
    <refentry id="V4L2-PIX-FMT-YUV420M">
      <refmeta>
	<refentrytitle>V4L2_PIX_FMT_YUV420M ('YU12M')</refentrytitle>
	<refentrytitle>V4L2_PIX_FMT_YUV420M ('YM12')</refentrytitle>
	&manvol;
      </refmeta>
      <refnamediv>
+35 −4
Original line number Diff line number Diff line
@@ -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;

+1 −0
Original line number Diff line number Diff line
@@ -34,6 +34,7 @@ struct xc5000_config {
	u8   i2c_address;
	u32  if_khz;
	u8   radio_input;
	u32  xtal_khz;

	int chip_id;
};
+24 −1
Original line number Diff line number Diff line
@@ -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.
Loading