diff options
author | Oliver Endriss <o.endriss@gmx.de> | 2006-03-17 03:29:15 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-21 11:53:55 -0500 |
commit | 4caba4261f2649215710ac0298bd7814080000ad (patch) | |
tree | 13f37c47560cb8692ac0ee5f6187647f576da932 | |
parent | 265366e8fb8c31706711aea5f79d763816a968db (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>
-rw-r--r-- | drivers/media/dvb/ttpci/av7110.c | 13 | ||||
-rw-r--r-- | drivers/media/dvb/ttpci/av7110_v4l.c | 11 |
2 files changed, 17 insertions, 7 deletions
diff --git a/drivers/media/dvb/ttpci/av7110.c b/drivers/media/dvb/ttpci/av7110.c index 5cf5b7d044ff..840efec32cb6 100644 --- a/drivers/media/dvb/ttpci/av7110.c +++ b/drivers/media/dvb/ttpci/av7110.c | |||
@@ -85,6 +85,8 @@ static int hw_sections; | |||
85 | static int rgb_on; | 85 | static int rgb_on; |
86 | static int volume = 255; | 86 | static int volume = 255; |
87 | static int budgetpatch; | 87 | static int budgetpatch; |
88 | static int wss_cfg_4_3 = 0x4008; | ||
89 | static int wss_cfg_16_9 = 0x0007; | ||
88 | 90 | ||
89 | module_param_named(debug, av7110_debug, int, 0644); | 91 | module_param_named(debug, av7110_debug, int, 0644); |
90 | MODULE_PARM_DESC(debug, "debug level (bitmask, default 0)"); | 92 | MODULE_PARM_DESC(debug, "debug level (bitmask, default 0)"); |
@@ -103,6 +105,10 @@ module_param(volume, int, 0444); | |||
103 | MODULE_PARM_DESC(volume, "initial volume: default 255 (range 0-255)"); | 105 | MODULE_PARM_DESC(volume, "initial volume: default 255 (range 0-255)"); |
104 | module_param(budgetpatch, int, 0444); | 106 | module_param(budgetpatch, int, 0444); |
105 | MODULE_PARM_DESC(budgetpatch, "use budget-patch hardware modification: default 0 (0 no, 1 autodetect, 2 always)"); | 107 | MODULE_PARM_DESC(budgetpatch, "use budget-patch hardware modification: default 0 (0 no, 1 autodetect, 2 always)"); |
108 | module_param(wss_cfg_4_3, int, 0444); | ||
109 | MODULE_PARM_DESC(wss_cfg_4_3, "WSS 4:3 - default 0x4008 - bit 15: disable, 14: burst mode, 13..0: wss data"); | ||
110 | module_param(wss_cfg_16_9, int, 0444); | ||
111 | MODULE_PARM_DESC(wss_cfg_16_9, "WSS 16:9 - default 0x0007 - bit 15: disable, 14: burst mode, 13..0: wss data"); | ||
106 | 112 | ||
107 | static void restart_feeds(struct av7110 *av7110); | 113 | static void restart_feeds(struct av7110 *av7110); |
108 | 114 | ||
@@ -128,6 +134,13 @@ static void init_av7110_av(struct av7110 *av7110) | |||
128 | if (ret < 0) | 134 | if (ret < 0) |
129 | printk("dvb-ttpci:cannot set internal volume to maximum:%d\n",ret); | 135 | printk("dvb-ttpci:cannot set internal volume to maximum:%d\n",ret); |
130 | 136 | ||
137 | ret = av7110_fw_cmd(av7110, COMTYPE_ENCODER, SetWSSConfig, 2, 2, wss_cfg_4_3); | ||
138 | if (ret < 0) | ||
139 | printk("dvb-ttpci: unable to configure 4:3 wss\n"); | ||
140 | ret = av7110_fw_cmd(av7110, COMTYPE_ENCODER, SetWSSConfig, 2, 3, wss_cfg_16_9); | ||
141 | if (ret < 0) | ||
142 | printk("dvb-ttpci: unable to configure 16:9 wss\n"); | ||
143 | |||
131 | ret = av7710_set_video_mode(av7110, vidmode); | 144 | ret = av7710_set_video_mode(av7110, vidmode); |
132 | if (ret < 0) | 145 | if (ret < 0) |
133 | printk("dvb-ttpci:cannot set video mode:%d\n",ret); | 146 | 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 94cf38c7e8a8..2f23ceab8d44 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 | |||
579 | return -EFAULT; | 579 | return -EFAULT; |
580 | if ((d.id != 0 && d.id != V4L2_SLICED_WSS_625) || d.field != 0 || d.line != 23) | 580 | if ((d.id != 0 && d.id != V4L2_SLICED_WSS_625) || d.field != 0 || d.line != 23) |
581 | return -EINVAL; | 581 | return -EINVAL; |
582 | if (d.id) { | 582 | if (d.id) |
583 | av7110->wssData = ((d.data[1] << 8) & 0x3f00) | d.data[0]; | 583 | av7110->wssData = ((d.data[1] << 8) & 0x3f00) | d.data[0]; |
584 | rc = av7110_fw_cmd(av7110, COMTYPE_ENCODER, SetWSSConfig, | 584 | else |
585 | 2, 1, av7110->wssData); | 585 | av7110->wssData = 0x8000; |
586 | } else { | 586 | rc = av7110_fw_cmd(av7110, COMTYPE_ENCODER, SetWSSConfig, 2, 1, av7110->wssData); |
587 | av7110->wssData = 0; | ||
588 | rc = av7110_fw_cmd(av7110, COMTYPE_ENCODER, SetWSSConfig, 1, 0); | ||
589 | } | ||
590 | return (rc < 0) ? rc : count; | 587 | return (rc < 0) ? rc : count; |
591 | } | 588 | } |
592 | 589 | ||