aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorOliver Endriss <o.endriss@gmx.de>2006-03-17 05:29:15 -0300
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-21 08:53:55 -0800
commit4caba4261f2649215710ac0298bd7814080000ad (patch)
tree13f37c47560cb8692ac0ee5f6187647f576da932 /drivers
parent265366e8fb8c31706711aea5f79d763816a968db (diff)
V4L/DVB (3533): Add WSS (wide screen signalling) module parameters
Add wss_cfg_4_3 and wss_cfg_16_9 configuration options. Firmware 2623 or later required. Both parameters are bit masks: - bit 15: disable WSS - bit 14: send short WSS burst, then turn off WSS - bit 13..0: WSS bits as specified by the standard These parameters are useful if you own a broken tv set which does not handle wss correctly. Default settings: - wss_cfg_4_3: 0x4008 - wss_cfg_16_9: 0x0007 These should work with most devices. Signed-off-by: Oliver Endriss <o.endriss@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/dvb/ttpci/av7110.c13
-rw-r--r--drivers/media/dvb/ttpci/av7110_v4l.c11
2 files changed, 17 insertions, 7 deletions
diff --git a/drivers/media/dvb/ttpci/av7110.c b/drivers/media/dvb/ttpci/av7110.c
index 5cf5b7d044f..840efec32cb 100644
--- a/drivers/media/dvb/ttpci/av7110.c
+++ b/drivers/media/dvb/ttpci/av7110.c
@@ -85,6 +85,8 @@ static int hw_sections;
static int rgb_on;
static int volume = 255;
static int budgetpatch;
+static int wss_cfg_4_3 = 0x4008;
+static int wss_cfg_16_9 = 0x0007;
module_param_named(debug, av7110_debug, int, 0644);
MODULE_PARM_DESC(debug, "debug level (bitmask, default 0)");
@@ -103,6 +105,10 @@ module_param(volume, int, 0444);
MODULE_PARM_DESC(volume, "initial volume: default 255 (range 0-255)");
module_param(budgetpatch, int, 0444);
MODULE_PARM_DESC(budgetpatch, "use budget-patch hardware modification: default 0 (0 no, 1 autodetect, 2 always)");
+module_param(wss_cfg_4_3, int, 0444);
+MODULE_PARM_DESC(wss_cfg_4_3, "WSS 4:3 - default 0x4008 - bit 15: disable, 14: burst mode, 13..0: wss data");
+module_param(wss_cfg_16_9, int, 0444);
+MODULE_PARM_DESC(wss_cfg_16_9, "WSS 16:9 - default 0x0007 - bit 15: disable, 14: burst mode, 13..0: wss data");
static void restart_feeds(struct av7110 *av7110);
@@ -128,6 +134,13 @@ static void init_av7110_av(struct av7110 *av7110)
if (ret < 0)
printk("dvb-ttpci:cannot set internal volume to maximum:%d\n",ret);
+ ret = av7110_fw_cmd(av7110, COMTYPE_ENCODER, SetWSSConfig, 2, 2, wss_cfg_4_3);
+ if (ret < 0)
+ printk("dvb-ttpci: unable to configure 4:3 wss\n");
+ ret = av7110_fw_cmd(av7110, COMTYPE_ENCODER, SetWSSConfig, 2, 3, wss_cfg_16_9);
+ if (ret < 0)
+ printk("dvb-ttpci: unable to configure 16:9 wss\n");
+
ret = av7710_set_video_mode(av7110, vidmode);
if (ret < 0)
printk("dvb-ttpci:cannot set video mode:%d\n",ret);
diff --git a/drivers/media/dvb/ttpci/av7110_v4l.c b/drivers/media/dvb/ttpci/av7110_v4l.c
index 94cf38c7e8a..2f23ceab8d4 100644
--- a/drivers/media/dvb/ttpci/av7110_v4l.c
+++ b/drivers/media/dvb/ttpci/av7110_v4l.c
@@ -579,14 +579,11 @@ static ssize_t av7110_vbi_write(struct file *file, const char __user *data, size
return -EFAULT;
if ((d.id != 0 && d.id != V4L2_SLICED_WSS_625) || d.field != 0 || d.line != 23)
return -EINVAL;
- if (d.id) {
+ if (d.id)
av7110->wssData = ((d.data[1] << 8) & 0x3f00) | d.data[0];
- rc = av7110_fw_cmd(av7110, COMTYPE_ENCODER, SetWSSConfig,
- 2, 1, av7110->wssData);
- } else {
- av7110->wssData = 0;
- rc = av7110_fw_cmd(av7110, COMTYPE_ENCODER, SetWSSConfig, 1, 0);
- }
+ else
+ av7110->wssData = 0x8000;
+ rc = av7110_fw_cmd(av7110, COMTYPE_ENCODER, SetWSSConfig, 2, 1, av7110->wssData);
return (rc < 0) ? rc : count;
}