aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/dvb')
-rw-r--r--drivers/media/dvb/bt8xx/Kconfig1
-rw-r--r--drivers/media/dvb/dvb-core/dmxdev.c12
-rw-r--r--drivers/media/dvb/dvb-core/dvb_frontend.c18
-rw-r--r--drivers/media/dvb/dvb-core/dvb_frontend.h2
-rw-r--r--drivers/media/dvb/dvb-usb/cxusb.c54
-rw-r--r--drivers/media/dvb/dvb-usb/dtt200u.c47
-rw-r--r--drivers/media/dvb/dvb-usb/dvb-usb-ids.h2
-rw-r--r--drivers/media/dvb/dvb-usb/vp702x-fe.c5
-rw-r--r--drivers/media/dvb/frontends/Kconfig12
-rw-r--r--drivers/media/dvb/frontends/tda1004x.c12
-rw-r--r--drivers/media/dvb/ttpci/av7110.c8
-rw-r--r--drivers/media/dvb/ttpci/av7110_av.c2
-rw-r--r--drivers/media/dvb/ttpci/budget-av.c13
-rw-r--r--drivers/media/dvb/ttpci/budget-core.c78
-rw-r--r--drivers/media/dvb/ttpci/budget-patch.c24
-rw-r--r--drivers/media/dvb/ttpci/budget.h13
16 files changed, 243 insertions, 60 deletions
diff --git a/drivers/media/dvb/bt8xx/Kconfig b/drivers/media/dvb/bt8xx/Kconfig
index 2337b41714e0..376ca48f1d1d 100644
--- a/drivers/media/dvb/bt8xx/Kconfig
+++ b/drivers/media/dvb/bt8xx/Kconfig
@@ -7,6 +7,7 @@ config DVB_BT8XX
7 select DVB_CX24110 7 select DVB_CX24110
8 select DVB_OR51211 8 select DVB_OR51211
9 select DVB_LGDT330X 9 select DVB_LGDT330X
10 select FW_LOADER
10 help 11 help
11 Support for PCI cards based on the Bt8xx PCI bridge. Examples are 12 Support for PCI cards based on the Bt8xx PCI bridge. Examples are
12 the Nebula cards, the Pinnacle PCTV cards, the Twinhan DST cards, 13 the Nebula cards, the Pinnacle PCTV cards, the Twinhan DST cards,
diff --git a/drivers/media/dvb/dvb-core/dmxdev.c b/drivers/media/dvb/dvb-core/dmxdev.c
index 09e96e9ddbdf..04578df3f249 100644
--- a/drivers/media/dvb/dvb-core/dmxdev.c
+++ b/drivers/media/dvb/dvb-core/dmxdev.c
@@ -141,12 +141,18 @@ static int dvb_dvr_open(struct inode *inode, struct file *file)
141 } 141 }
142 142
143 if ((file->f_flags & O_ACCMODE) == O_RDONLY) { 143 if ((file->f_flags & O_ACCMODE) == O_RDONLY) {
144 void *mem = vmalloc(DVR_BUFFER_SIZE); 144 void *mem;
145 if (!dvbdev->readers) {
146 mutex_unlock(&dmxdev->mutex);
147 return -EBUSY;
148 }
149 mem = vmalloc(DVR_BUFFER_SIZE);
145 if (!mem) { 150 if (!mem) {
146 mutex_unlock(&dmxdev->mutex); 151 mutex_unlock(&dmxdev->mutex);
147 return -ENOMEM; 152 return -ENOMEM;
148 } 153 }
149 dvb_ringbuffer_init(&dmxdev->dvr_buffer, mem, DVR_BUFFER_SIZE); 154 dvb_ringbuffer_init(&dmxdev->dvr_buffer, mem, DVR_BUFFER_SIZE);
155 dvbdev->readers--;
150 } 156 }
151 157
152 if ((file->f_flags & O_ACCMODE) == O_WRONLY) { 158 if ((file->f_flags & O_ACCMODE) == O_WRONLY) {
@@ -184,6 +190,7 @@ static int dvb_dvr_release(struct inode *inode, struct file *file)
184 dmxdev->dvr_orig_fe); 190 dmxdev->dvr_orig_fe);
185 } 191 }
186 if ((file->f_flags & O_ACCMODE) == O_RDONLY) { 192 if ((file->f_flags & O_ACCMODE) == O_RDONLY) {
193 dvbdev->readers++;
187 if (dmxdev->dvr_buffer.data) { 194 if (dmxdev->dvr_buffer.data) {
188 void *mem = dmxdev->dvr_buffer.data; 195 void *mem = dmxdev->dvr_buffer.data;
189 mb(); 196 mb();
@@ -1029,8 +1036,7 @@ static struct file_operations dvb_dvr_fops = {
1029 1036
1030static struct dvb_device dvbdev_dvr = { 1037static struct dvb_device dvbdev_dvr = {
1031 .priv = NULL, 1038 .priv = NULL,
1032 .users = 1, 1039 .readers = 1,
1033 .writers = 1,
1034 .fops = &dvb_dvr_fops 1040 .fops = &dvb_dvr_fops
1035}; 1041};
1036 1042
diff --git a/drivers/media/dvb/dvb-core/dvb_frontend.c b/drivers/media/dvb/dvb-core/dvb_frontend.c
index 2c3ea8f95dcd..4f8f257e6795 100644
--- a/drivers/media/dvb/dvb-core/dvb_frontend.c
+++ b/drivers/media/dvb/dvb-core/dvb_frontend.c
@@ -105,6 +105,7 @@ struct dvb_frontend_private {
105 fe_status_t status; 105 fe_status_t status;
106 unsigned long tune_mode_flags; 106 unsigned long tune_mode_flags;
107 unsigned int delay; 107 unsigned int delay;
108 unsigned int reinitialise;
108 109
109 /* swzigzag values */ 110 /* swzigzag values */
110 unsigned int state; 111 unsigned int state;
@@ -121,6 +122,7 @@ struct dvb_frontend_private {
121 unsigned int check_wrapped; 122 unsigned int check_wrapped;
122}; 123};
123 124
125static void dvb_frontend_wakeup(struct dvb_frontend *fe);
124 126
125static void dvb_frontend_add_event(struct dvb_frontend *fe, fe_status_t status) 127static void dvb_frontend_add_event(struct dvb_frontend *fe, fe_status_t status)
126{ 128{
@@ -213,6 +215,15 @@ static void dvb_frontend_init(struct dvb_frontend *fe)
213 fe->ops->init(fe); 215 fe->ops->init(fe);
214} 216}
215 217
218void dvb_frontend_reinitialise(struct dvb_frontend *fe)
219{
220 struct dvb_frontend_private *fepriv = fe->frontend_priv;
221
222 fepriv->reinitialise = 1;
223 dvb_frontend_wakeup(fe);
224}
225EXPORT_SYMBOL(dvb_frontend_reinitialise);
226
216static void dvb_frontend_swzigzag_update_delay(struct dvb_frontend_private *fepriv, int locked) 227static void dvb_frontend_swzigzag_update_delay(struct dvb_frontend_private *fepriv, int locked)
217{ 228{
218 int q2; 229 int q2;
@@ -505,8 +516,8 @@ static int dvb_frontend_thread(void *data)
505 fepriv->quality = 0; 516 fepriv->quality = 0;
506 fepriv->delay = 3*HZ; 517 fepriv->delay = 3*HZ;
507 fepriv->status = 0; 518 fepriv->status = 0;
508 dvb_frontend_init(fe);
509 fepriv->wakeup = 0; 519 fepriv->wakeup = 0;
520 fepriv->reinitialise = 1;
510 521
511 while (1) { 522 while (1) {
512 up(&fepriv->sem); /* is locked when we enter the thread... */ 523 up(&fepriv->sem); /* is locked when we enter the thread... */
@@ -524,6 +535,11 @@ static int dvb_frontend_thread(void *data)
524 if (down_interruptible(&fepriv->sem)) 535 if (down_interruptible(&fepriv->sem))
525 break; 536 break;
526 537
538 if (fepriv->reinitialise) {
539 dvb_frontend_init(fe);
540 fepriv->reinitialise = 0;
541 }
542
527 /* do an iteration of the tuning loop */ 543 /* do an iteration of the tuning loop */
528 if (fe->ops->tune) { 544 if (fe->ops->tune) {
529 /* have we been asked to retune? */ 545 /* have we been asked to retune? */
diff --git a/drivers/media/dvb/dvb-core/dvb_frontend.h b/drivers/media/dvb/dvb-core/dvb_frontend.h
index d5aee5ad67a0..5926a3b745c9 100644
--- a/drivers/media/dvb/dvb-core/dvb_frontend.h
+++ b/drivers/media/dvb/dvb-core/dvb_frontend.h
@@ -112,6 +112,8 @@ extern int dvb_register_frontend(struct dvb_adapter* dvb,
112 112
113extern int dvb_unregister_frontend(struct dvb_frontend* fe); 113extern int dvb_unregister_frontend(struct dvb_frontend* fe);
114 114
115extern void dvb_frontend_reinitialise(struct dvb_frontend *fe);
116
115extern void dvb_frontend_sleep_until(struct timeval *waketime, u32 add_usec); 117extern void dvb_frontend_sleep_until(struct timeval *waketime, u32 add_usec);
116extern s32 timeval_usec_diff(struct timeval lasttime, struct timeval curtime); 118extern s32 timeval_usec_diff(struct timeval lasttime, struct timeval curtime);
117 119
diff --git a/drivers/media/dvb/dvb-usb/cxusb.c b/drivers/media/dvb/dvb-usb/cxusb.c
index a14e737ec848..7edd6362b9cc 100644
--- a/drivers/media/dvb/dvb-usb/cxusb.c
+++ b/drivers/media/dvb/dvb-usb/cxusb.c
@@ -233,6 +233,45 @@ static struct dvb_usb_rc_key dvico_mce_rc_keys[] = {
233 { 0xfe, 0x4e, KEY_POWER }, 233 { 0xfe, 0x4e, KEY_POWER },
234}; 234};
235 235
236static struct dvb_usb_rc_key dvico_portable_rc_keys[] = {
237 { 0xfc, 0x02, KEY_SETUP }, /* Profile */
238 { 0xfc, 0x43, KEY_POWER2 },
239 { 0xfc, 0x06, KEY_EPG },
240 { 0xfc, 0x5a, KEY_BACK },
241 { 0xfc, 0x05, KEY_MENU },
242 { 0xfc, 0x47, KEY_INFO },
243 { 0xfc, 0x01, KEY_TAB },
244 { 0xfc, 0x42, KEY_PREVIOUSSONG },/* Replay */
245 { 0xfc, 0x49, KEY_VOLUMEUP },
246 { 0xfc, 0x09, KEY_VOLUMEDOWN },
247 { 0xfc, 0x54, KEY_CHANNELUP },
248 { 0xfc, 0x0b, KEY_CHANNELDOWN },
249 { 0xfc, 0x16, KEY_CAMERA },
250 { 0xfc, 0x40, KEY_TUNER }, /* ATV/DTV */
251 { 0xfc, 0x45, KEY_OPEN },
252 { 0xfc, 0x19, KEY_1 },
253 { 0xfc, 0x18, KEY_2 },
254 { 0xfc, 0x1b, KEY_3 },
255 { 0xfc, 0x1a, KEY_4 },
256 { 0xfc, 0x58, KEY_5 },
257 { 0xfc, 0x59, KEY_6 },
258 { 0xfc, 0x15, KEY_7 },
259 { 0xfc, 0x14, KEY_8 },
260 { 0xfc, 0x17, KEY_9 },
261 { 0xfc, 0x44, KEY_ANGLE }, /* Aspect */
262 { 0xfc, 0x55, KEY_0 },
263 { 0xfc, 0x07, KEY_ZOOM },
264 { 0xfc, 0x0a, KEY_REWIND },
265 { 0xfc, 0x08, KEY_PLAYPAUSE },
266 { 0xfc, 0x4b, KEY_FASTFORWARD },
267 { 0xfc, 0x5b, KEY_MUTE },
268 { 0xfc, 0x04, KEY_STOP },
269 { 0xfc, 0x56, KEY_RECORD },
270 { 0xfc, 0x57, KEY_POWER },
271 { 0xfc, 0x41, KEY_UNKNOWN }, /* INPUT */
272 { 0xfc, 0x00, KEY_UNKNOWN }, /* HD */
273};
274
236static int cxusb_dee1601_demod_init(struct dvb_frontend* fe) 275static int cxusb_dee1601_demod_init(struct dvb_frontend* fe)
237{ 276{
238 static u8 clock_config [] = { CLOCK_CTL, 0x38, 0x28 }; 277 static u8 clock_config [] = { CLOCK_CTL, 0x38, 0x28 };
@@ -511,6 +550,11 @@ static struct dvb_usb_properties cxusb_bluebird_lgh064f_properties = {
511 550
512 .i2c_algo = &cxusb_i2c_algo, 551 .i2c_algo = &cxusb_i2c_algo,
513 552
553 .rc_interval = 100,
554 .rc_key_map = dvico_portable_rc_keys,
555 .rc_key_map_size = ARRAY_SIZE(dvico_portable_rc_keys),
556 .rc_query = cxusb_rc_query,
557
514 .generic_bulk_ctrl_endpoint = 0x01, 558 .generic_bulk_ctrl_endpoint = 0x01,
515 /* parameter for the MPEG2-data transfer */ 559 /* parameter for the MPEG2-data transfer */
516 .urb = { 560 .urb = {
@@ -600,6 +644,11 @@ static struct dvb_usb_properties cxusb_bluebird_lgz201_properties = {
600 644
601 .i2c_algo = &cxusb_i2c_algo, 645 .i2c_algo = &cxusb_i2c_algo,
602 646
647 .rc_interval = 100,
648 .rc_key_map = dvico_portable_rc_keys,
649 .rc_key_map_size = ARRAY_SIZE(dvico_portable_rc_keys),
650 .rc_query = cxusb_rc_query,
651
603 .generic_bulk_ctrl_endpoint = 0x01, 652 .generic_bulk_ctrl_endpoint = 0x01,
604 /* parameter for the MPEG2-data transfer */ 653 /* parameter for the MPEG2-data transfer */
605 .urb = { 654 .urb = {
@@ -640,6 +689,11 @@ static struct dvb_usb_properties cxusb_bluebird_dtt7579_properties = {
640 689
641 .i2c_algo = &cxusb_i2c_algo, 690 .i2c_algo = &cxusb_i2c_algo,
642 691
692 .rc_interval = 100,
693 .rc_key_map = dvico_portable_rc_keys,
694 .rc_key_map_size = ARRAY_SIZE(dvico_portable_rc_keys),
695 .rc_query = cxusb_rc_query,
696
643 .generic_bulk_ctrl_endpoint = 0x01, 697 .generic_bulk_ctrl_endpoint = 0x01,
644 /* parameter for the MPEG2-data transfer */ 698 /* parameter for the MPEG2-data transfer */
645 .urb = { 699 .urb = {
diff --git a/drivers/media/dvb/dvb-usb/dtt200u.c b/drivers/media/dvb/dvb-usb/dtt200u.c
index 12ebaf8bddca..70afcfd141ca 100644
--- a/drivers/media/dvb/dvb-usb/dtt200u.c
+++ b/drivers/media/dvb/dvb-usb/dtt200u.c
@@ -94,12 +94,14 @@ static int dtt200u_frontend_attach(struct dvb_usb_device *d)
94 94
95static struct dvb_usb_properties dtt200u_properties; 95static struct dvb_usb_properties dtt200u_properties;
96static struct dvb_usb_properties wt220u_properties; 96static struct dvb_usb_properties wt220u_properties;
97static struct dvb_usb_properties wt220u_zl0353_properties;
97 98
98static int dtt200u_usb_probe(struct usb_interface *intf, 99static int dtt200u_usb_probe(struct usb_interface *intf,
99 const struct usb_device_id *id) 100 const struct usb_device_id *id)
100{ 101{
101 if (dvb_usb_device_init(intf,&dtt200u_properties,THIS_MODULE,NULL) == 0 || 102 if (dvb_usb_device_init(intf,&dtt200u_properties,THIS_MODULE,NULL) == 0 ||
102 dvb_usb_device_init(intf,&wt220u_properties,THIS_MODULE,NULL) == 0) 103 dvb_usb_device_init(intf,&wt220u_properties,THIS_MODULE,NULL) == 0 ||
104 dvb_usb_device_init(intf,&wt220u_zl0353_properties,THIS_MODULE,NULL) == 0)
103 return 0; 105 return 0;
104 106
105 return -ENODEV; 107 return -ENODEV;
@@ -110,6 +112,8 @@ static struct usb_device_id dtt200u_usb_table [] = {
110 { USB_DEVICE(USB_VID_WIDEVIEW, USB_PID_DTT200U_WARM) }, 112 { USB_DEVICE(USB_VID_WIDEVIEW, USB_PID_DTT200U_WARM) },
111 { USB_DEVICE(USB_VID_WIDEVIEW, USB_PID_WT220U_COLD) }, 113 { USB_DEVICE(USB_VID_WIDEVIEW, USB_PID_WT220U_COLD) },
112 { USB_DEVICE(USB_VID_WIDEVIEW, USB_PID_WT220U_WARM) }, 114 { USB_DEVICE(USB_VID_WIDEVIEW, USB_PID_WT220U_WARM) },
115 { USB_DEVICE(USB_VID_WIDEVIEW, USB_PID_WT220U_ZL0353_COLD) },
116 { USB_DEVICE(USB_VID_WIDEVIEW, USB_PID_WT220U_ZL0353_WARM) },
113 { 0 }, 117 { 0 },
114}; 118};
115MODULE_DEVICE_TABLE(usb, dtt200u_usb_table); 119MODULE_DEVICE_TABLE(usb, dtt200u_usb_table);
@@ -196,6 +200,47 @@ static struct dvb_usb_properties wt220u_properties = {
196 } 200 }
197}; 201};
198 202
203static struct dvb_usb_properties wt220u_zl0353_properties = {
204 .caps = DVB_USB_HAS_PID_FILTER | DVB_USB_NEED_PID_FILTERING,
205 .pid_filter_count = 15,
206
207 .usb_ctrl = CYPRESS_FX2,
208 .firmware = "dvb-usb-wt220u-zl0353-01.fw",
209
210 .power_ctrl = dtt200u_power_ctrl,
211 .streaming_ctrl = dtt200u_streaming_ctrl,
212 .pid_filter = dtt200u_pid_filter,
213 .frontend_attach = dtt200u_frontend_attach,
214
215 .rc_interval = 300,
216 .rc_key_map = dtt200u_rc_keys,
217 .rc_key_map_size = ARRAY_SIZE(dtt200u_rc_keys),
218 .rc_query = dtt200u_rc_query,
219
220 .generic_bulk_ctrl_endpoint = 0x01,
221
222 /* parameter for the MPEG2-data transfer */
223 .urb = {
224 .type = DVB_USB_BULK,
225 .count = 7,
226 .endpoint = 0x02,
227 .u = {
228 .bulk = {
229 .buffersize = 4096,
230 }
231 }
232 },
233
234 .num_device_descs = 1,
235 .devices = {
236 { .name = "WideView WT-220U PenType Receiver (based on ZL353)",
237 .cold_ids = { &dtt200u_usb_table[4], NULL },
238 .warm_ids = { &dtt200u_usb_table[5], NULL },
239 },
240 { NULL },
241 }
242};
243
199/* usb specific object needed to register this driver with the usb subsystem */ 244/* usb specific object needed to register this driver with the usb subsystem */
200static struct usb_driver dtt200u_usb_driver = { 245static struct usb_driver dtt200u_usb_driver = {
201 .name = "dvb_usb_dtt200u", 246 .name = "dvb_usb_dtt200u",
diff --git a/drivers/media/dvb/dvb-usb/dvb-usb-ids.h b/drivers/media/dvb/dvb-usb/dvb-usb-ids.h
index 4a1b9e77e339..cb239049b098 100644
--- a/drivers/media/dvb/dvb-usb/dvb-usb-ids.h
+++ b/drivers/media/dvb/dvb-usb/dvb-usb-ids.h
@@ -83,6 +83,8 @@
83#define USB_PID_DTT200U_WARM 0x0301 83#define USB_PID_DTT200U_WARM 0x0301
84#define USB_PID_WT220U_COLD 0x0222 84#define USB_PID_WT220U_COLD 0x0222
85#define USB_PID_WT220U_WARM 0x0221 85#define USB_PID_WT220U_WARM 0x0221
86#define USB_PID_WT220U_ZL0353_COLD 0x022a
87#define USB_PID_WT220U_ZL0353_WARM 0x022b
86#define USB_PID_WINTV_NOVA_T_USB2_COLD 0x9300 88#define USB_PID_WINTV_NOVA_T_USB2_COLD 0x9300
87#define USB_PID_WINTV_NOVA_T_USB2_WARM 0x9301 89#define USB_PID_WINTV_NOVA_T_USB2_WARM 0x9301
88#define USB_PID_NEBULA_DIGITV 0x0201 90#define USB_PID_NEBULA_DIGITV 0x0201
diff --git a/drivers/media/dvb/dvb-usb/vp702x-fe.c b/drivers/media/dvb/dvb-usb/vp702x-fe.c
index b6d95e1c9c52..2a89f8c5da99 100644
--- a/drivers/media/dvb/dvb-usb/vp702x-fe.c
+++ b/drivers/media/dvb/dvb-usb/vp702x-fe.c
@@ -147,8 +147,9 @@ static int vp702x_fe_set_frontend(struct dvb_frontend* fe,
147 cmd[4] = (sr >> 4) & 0xff; 147 cmd[4] = (sr >> 4) & 0xff;
148 cmd[5] = (sr << 4) & 0xf0; 148 cmd[5] = (sr << 4) & 0xf0;
149 149
150 deb_fe("setting frontend to: %u -> %u (%x) LNB-based GHz, symbolrate: %d -> %Lu (%Lx)\n", 150 deb_fe("setting frontend to: %u -> %u (%x) LNB-based GHz, symbolrate: %d -> %lu (%lx)\n",
151 fep->frequency,freq,freq, fep->u.qpsk.symbol_rate, sr, sr); 151 fep->frequency,freq,freq, fep->u.qpsk.symbol_rate,
152 (unsigned long) sr, (unsigned long) sr);
152 153
153/* if (fep->inversion == INVERSION_ON) 154/* if (fep->inversion == INVERSION_ON)
154 cmd[6] |= 0x80; */ 155 cmd[6] |= 0x80; */
diff --git a/drivers/media/dvb/frontends/Kconfig b/drivers/media/dvb/frontends/Kconfig
index 94233168d241..37d5e0af1683 100644
--- a/drivers/media/dvb/frontends/Kconfig
+++ b/drivers/media/dvb/frontends/Kconfig
@@ -181,6 +181,11 @@ config DVB_OR51211
181 help 181 help
182 An ATSC 8VSB tuner module. Say Y when you want to support this frontend. 182 An ATSC 8VSB tuner module. Say Y when you want to support this frontend.
183 183
184 This driver needs external firmware. Please use the command
185 "<kerneldir>/Documentation/dvb/get_dvb_firmware or51211" to
186 download it, and then copy it to /usr/lib/hotplug/firmware
187 or /lib/firmware (depending on configuration of firmware hotplug).
188
184config DVB_OR51132 189config DVB_OR51132
185 tristate "Oren OR51132 based" 190 tristate "Oren OR51132 based"
186 depends on DVB_CORE 191 depends on DVB_CORE
@@ -189,6 +194,13 @@ config DVB_OR51132
189 An ATSC 8VSB and QAM64/256 tuner module. Say Y when you want 194 An ATSC 8VSB and QAM64/256 tuner module. Say Y when you want
190 to support this frontend. 195 to support this frontend.
191 196
197 This driver needs external firmware. Please use the commands
198 "<kerneldir>/Documentation/dvb/get_dvb_firmware or51132_vsb" and/or
199 "<kerneldir>/Documentation/dvb/get_dvb_firmware or51132_qam" to
200 download firmwares for 8VSB and QAM64/256, respectively. Copy them to
201 /usr/lib/hotplug/firmware or /lib/firmware (depending on
202 configuration of firmware hotplug).
203
192config DVB_BCM3510 204config DVB_BCM3510
193 tristate "Broadcom BCM3510" 205 tristate "Broadcom BCM3510"
194 depends on DVB_CORE 206 depends on DVB_CORE
diff --git a/drivers/media/dvb/frontends/tda1004x.c b/drivers/media/dvb/frontends/tda1004x.c
index 8e8df7b4ca0e..b83dafa4e12c 100644
--- a/drivers/media/dvb/frontends/tda1004x.c
+++ b/drivers/media/dvb/frontends/tda1004x.c
@@ -52,7 +52,6 @@ struct tda1004x_state {
52 struct dvb_frontend frontend; 52 struct dvb_frontend frontend;
53 53
54 /* private demod data */ 54 /* private demod data */
55 u8 initialised;
56 enum tda1004x_demod demod_type; 55 enum tda1004x_demod demod_type;
57}; 56};
58 57
@@ -594,9 +593,6 @@ static int tda10045_init(struct dvb_frontend* fe)
594 593
595 dprintk("%s\n", __FUNCTION__); 594 dprintk("%s\n", __FUNCTION__);
596 595
597 if (state->initialised)
598 return 0;
599
600 if (tda10045_fwupload(fe)) { 596 if (tda10045_fwupload(fe)) {
601 printk("tda1004x: firmware upload failed\n"); 597 printk("tda1004x: firmware upload failed\n");
602 return -EIO; 598 return -EIO;
@@ -626,7 +622,6 @@ static int tda10045_init(struct dvb_frontend* fe)
626 622
627 tda1004x_write_mask(state, 0x1f, 0x01, state->config->invert_oclk); 623 tda1004x_write_mask(state, 0x1f, 0x01, state->config->invert_oclk);
628 624
629 state->initialised = 1;
630 return 0; 625 return 0;
631} 626}
632 627
@@ -635,9 +630,6 @@ static int tda10046_init(struct dvb_frontend* fe)
635 struct tda1004x_state* state = fe->demodulator_priv; 630 struct tda1004x_state* state = fe->demodulator_priv;
636 dprintk("%s\n", __FUNCTION__); 631 dprintk("%s\n", __FUNCTION__);
637 632
638 if (state->initialised)
639 return 0;
640
641 if (tda10046_fwupload(fe)) { 633 if (tda10046_fwupload(fe)) {
642 printk("tda1004x: firmware upload failed\n"); 634 printk("tda1004x: firmware upload failed\n");
643 return -EIO; 635 return -EIO;
@@ -697,7 +689,6 @@ static int tda10046_init(struct dvb_frontend* fe)
697 // tda1004x_write_mask(state, 0x50, 0x80, 0x80); // handle out of guard echoes 689 // tda1004x_write_mask(state, 0x50, 0x80, 0x80); // handle out of guard echoes
698 tda1004x_write_mask(state, 0x3a, 0x80, state->config->invert_oclk << 7); 690 tda1004x_write_mask(state, 0x3a, 0x80, state->config->invert_oclk << 7);
699 691
700 state->initialised = 1;
701 return 0; 692 return 0;
702} 693}
703 694
@@ -1207,7 +1198,6 @@ static int tda1004x_sleep(struct dvb_frontend* fe)
1207 tda1004x_write_mask(state, TDA1004X_CONFC4, 1, 1); 1198 tda1004x_write_mask(state, TDA1004X_CONFC4, 1, 1);
1208 break; 1199 break;
1209 } 1200 }
1210 state->initialised = 0;
1211 1201
1212 return 0; 1202 return 0;
1213} 1203}
@@ -1271,7 +1261,6 @@ struct dvb_frontend* tda10045_attach(const struct tda1004x_config* config,
1271 state->config = config; 1261 state->config = config;
1272 state->i2c = i2c; 1262 state->i2c = i2c;
1273 memcpy(&state->ops, &tda10045_ops, sizeof(struct dvb_frontend_ops)); 1263 memcpy(&state->ops, &tda10045_ops, sizeof(struct dvb_frontend_ops));
1274 state->initialised = 0;
1275 state->demod_type = TDA1004X_DEMOD_TDA10045; 1264 state->demod_type = TDA1004X_DEMOD_TDA10045;
1276 1265
1277 /* check if the demod is there */ 1266 /* check if the demod is there */
@@ -1330,7 +1319,6 @@ struct dvb_frontend* tda10046_attach(const struct tda1004x_config* config,
1330 state->config = config; 1319 state->config = config;
1331 state->i2c = i2c; 1320 state->i2c = i2c;
1332 memcpy(&state->ops, &tda10046_ops, sizeof(struct dvb_frontend_ops)); 1321 memcpy(&state->ops, &tda10046_ops, sizeof(struct dvb_frontend_ops));
1333 state->initialised = 0;
1334 state->demod_type = TDA1004X_DEMOD_TDA10046; 1322 state->demod_type = TDA1004X_DEMOD_TDA10046;
1335 1323
1336 /* check if the demod is there */ 1324 /* check if the demod is there */
diff --git a/drivers/media/dvb/ttpci/av7110.c b/drivers/media/dvb/ttpci/av7110.c
index 840efec32cb6..d028245c8eed 100644
--- a/drivers/media/dvb/ttpci/av7110.c
+++ b/drivers/media/dvb/ttpci/av7110.c
@@ -87,6 +87,7 @@ static int volume = 255;
87static int budgetpatch; 87static int budgetpatch;
88static int wss_cfg_4_3 = 0x4008; 88static int wss_cfg_4_3 = 0x4008;
89static int wss_cfg_16_9 = 0x0007; 89static int wss_cfg_16_9 = 0x0007;
90static int tv_standard;
90 91
91module_param_named(debug, av7110_debug, int, 0644); 92module_param_named(debug, av7110_debug, int, 0644);
92MODULE_PARM_DESC(debug, "debug level (bitmask, default 0)"); 93MODULE_PARM_DESC(debug, "debug level (bitmask, default 0)");
@@ -109,6 +110,8 @@ module_param(wss_cfg_4_3, int, 0444);
109MODULE_PARM_DESC(wss_cfg_4_3, "WSS 4:3 - default 0x4008 - bit 15: disable, 14: burst mode, 13..0: wss data"); 110MODULE_PARM_DESC(wss_cfg_4_3, "WSS 4:3 - default 0x4008 - bit 15: disable, 14: burst mode, 13..0: wss data");
110module_param(wss_cfg_16_9, int, 0444); 111module_param(wss_cfg_16_9, int, 0444);
111MODULE_PARM_DESC(wss_cfg_16_9, "WSS 16:9 - default 0x0007 - bit 15: disable, 14: burst mode, 13..0: wss data"); 112MODULE_PARM_DESC(wss_cfg_16_9, "WSS 16:9 - default 0x0007 - bit 15: disable, 14: burst mode, 13..0: wss data");
113module_param(tv_standard, int, 0444);
114MODULE_PARM_DESC(tv_standard, "TV standard: 0 PAL (default), 1 NTSC");
112 115
113static void restart_feeds(struct av7110 *av7110); 116static void restart_feeds(struct av7110 *av7110);
114 117
@@ -2123,7 +2126,7 @@ static int frontend_init(struct av7110 *av7110)
2123 read_pwm(av7110)); 2126 read_pwm(av7110));
2124 break; 2127 break;
2125 case 0x0003: 2128 case 0x0003:
2126 /* Haupauge DVB-C 2.1 VES1820/ALPS TDBE2 */ 2129 /* Hauppauge DVB-C 2.1 VES1820/ALPS TDBE2 */
2127 av7110->fe = ves1820_attach(&alps_tdbe2_config, &av7110->i2c_adap, 2130 av7110->fe = ves1820_attach(&alps_tdbe2_config, &av7110->i2c_adap,
2128 read_pwm(av7110)); 2131 read_pwm(av7110));
2129 break; 2132 break;
@@ -2543,6 +2546,9 @@ static int __devinit av7110_attach(struct saa7146_dev* dev,
2543 av7110->osdwin = 1; 2546 av7110->osdwin = 1;
2544 mutex_init(&av7110->osd_mutex); 2547 mutex_init(&av7110->osd_mutex);
2545 2548
2549 /* TV standard */
2550 av7110->vidmode = tv_standard == 1 ? VIDEO_MODE_NTSC : VIDEO_MODE_PAL;
2551
2546 /* ARM "watchdog" */ 2552 /* ARM "watchdog" */
2547 init_waitqueue_head(&av7110->arm_wait); 2553 init_waitqueue_head(&av7110->arm_wait);
2548 av7110->arm_thread = NULL; 2554 av7110->arm_thread = NULL;
diff --git a/drivers/media/dvb/ttpci/av7110_av.c b/drivers/media/dvb/ttpci/av7110_av.c
index 400facec7407..2eff09f638d3 100644
--- a/drivers/media/dvb/ttpci/av7110_av.c
+++ b/drivers/media/dvb/ttpci/av7110_av.c
@@ -1479,8 +1479,6 @@ int av7110_av_init(struct av7110 *av7110)
1479 void (*play[])(u8 *, int, void *) = { play_audio_cb, play_video_cb }; 1479 void (*play[])(u8 *, int, void *) = { play_audio_cb, play_video_cb };
1480 int i, ret; 1480 int i, ret;
1481 1481
1482 av7110->vidmode = VIDEO_MODE_PAL;
1483
1484 for (i = 0; i < 2; i++) { 1482 for (i = 0; i < 2; i++) {
1485 struct ipack *ipack = av7110->ipack + i; 1483 struct ipack *ipack = av7110->ipack + i;
1486 1484
diff --git a/drivers/media/dvb/ttpci/budget-av.c b/drivers/media/dvb/ttpci/budget-av.c
index 9dd4745f5312..8efe3ce5f66c 100644
--- a/drivers/media/dvb/ttpci/budget-av.c
+++ b/drivers/media/dvb/ttpci/budget-av.c
@@ -60,11 +60,11 @@ struct budget_av {
60 struct dvb_ca_en50221 ca; 60 struct dvb_ca_en50221 ca;
61}; 61};
62 62
63/* GPIO CI Connections: 63/* GPIO Connections:
64 * 0 - Vcc/Reset (Reset is controlled by capacitor) 64 * 0 - Vcc/Reset (Reset is controlled by capacitor). Resets the frontend *AS WELL*!
65 * 1 - Attribute Memory 65 * 1 - CI memory select 0=>IO memory, 1=>Attribute Memory
66 * 2 - Card Enable (Active Low) 66 * 2 - CI Card Enable (Active Low)
67 * 3 - Card Detect 67 * 3 - CI Card Detect
68 */ 68 */
69 69
70/**************************************************************************** 70/****************************************************************************
@@ -214,6 +214,9 @@ static int ciintf_slot_reset(struct dvb_ca_en50221 *ca, int slot)
214 while (--timeout > 0 && ciintf_read_attribute_mem(ca, slot, 0) != 0x1d) 214 while (--timeout > 0 && ciintf_read_attribute_mem(ca, slot, 0) != 0x1d)
215 msleep(100); 215 msleep(100);
216 216
217 /* reinitialise the frontend */
218 dvb_frontend_reinitialise(budget_av->budget.dvb_frontend);
219
217 if (timeout <= 0) 220 if (timeout <= 0)
218 { 221 {
219 printk(KERN_ERR "budget-av: cam reset failed (timeout).\n"); 222 printk(KERN_ERR "budget-av: cam reset failed (timeout).\n");
diff --git a/drivers/media/dvb/ttpci/budget-core.c b/drivers/media/dvb/ttpci/budget-core.c
index 633e68c341c8..ea2066d461fc 100644
--- a/drivers/media/dvb/ttpci/budget-core.c
+++ b/drivers/media/dvb/ttpci/budget-core.c
@@ -39,9 +39,21 @@
39#include "budget.h" 39#include "budget.h"
40#include "ttpci-eeprom.h" 40#include "ttpci-eeprom.h"
41 41
42#define TS_WIDTH (2 * TS_SIZE)
43#define TS_WIDTH_ACTIVY TS_SIZE
44#define TS_HEIGHT_MASK 0xf00
45#define TS_HEIGHT_MASK_ACTIVY 0xc00
46#define TS_MIN_BUFSIZE_K 188
47#define TS_MAX_BUFSIZE_K 1410
48#define TS_MAX_BUFSIZE_K_ACTIVY 564
49#define BUFFER_WARNING_WAIT (30*HZ)
50
42int budget_debug; 51int budget_debug;
52static int dma_buffer_size = TS_MIN_BUFSIZE_K;
43module_param_named(debug, budget_debug, int, 0644); 53module_param_named(debug, budget_debug, int, 0644);
54module_param_named(bufsize, dma_buffer_size, int, 0444);
44MODULE_PARM_DESC(debug, "Turn on/off budget debugging (default:off)."); 55MODULE_PARM_DESC(debug, "Turn on/off budget debugging (default:off).");
56MODULE_PARM_DESC(bufsize, "DMA buffer size in KB, default: 188, min: 188, max: 1410 (Activy: 564)");
45 57
46/**************************************************************************** 58/****************************************************************************
47 * TT budget / WinTV Nova 59 * TT budget / WinTV Nova
@@ -70,11 +82,10 @@ static int start_ts_capture(struct budget *budget)
70 82
71 saa7146_write(dev, MC1, MASK_20); // DMA3 off 83 saa7146_write(dev, MC1, MASK_20); // DMA3 off
72 84
73 memset(budget->grabbing, 0x00, TS_HEIGHT * TS_WIDTH); 85 memset(budget->grabbing, 0x00, budget->buffer_size);
74 86
75 saa7146_write(dev, PCI_BT_V1, 0x001c0000 | (saa7146_read(dev, PCI_BT_V1) & ~0x001f0000)); 87 saa7146_write(dev, PCI_BT_V1, 0x001c0000 | (saa7146_read(dev, PCI_BT_V1) & ~0x001f0000));
76 88
77 budget->tsf = 0xff;
78 budget->ttbp = 0; 89 budget->ttbp = 0;
79 90
80 /* 91 /*
@@ -115,16 +126,12 @@ static int start_ts_capture(struct budget *budget)
115 126
116 saa7146_write(dev, BASE_ODD3, 0); 127 saa7146_write(dev, BASE_ODD3, 0);
117 saa7146_write(dev, BASE_EVEN3, 0); 128 saa7146_write(dev, BASE_EVEN3, 0);
118 saa7146_write(dev, PROT_ADDR3, TS_WIDTH * TS_HEIGHT); 129 saa7146_write(dev, PROT_ADDR3, budget->buffer_size);
119 saa7146_write(dev, BASE_PAGE3, budget->pt.dma | ME1 | 0x90); 130 saa7146_write(dev, BASE_PAGE3, budget->pt.dma | ME1 | 0x90);
120 131
121 if (budget->card->type == BUDGET_FS_ACTIVY) { 132 saa7146_write(dev, PITCH3, budget->buffer_width);
122 saa7146_write(dev, PITCH3, TS_WIDTH / 2); 133 saa7146_write(dev, NUM_LINE_BYTE3,
123 saa7146_write(dev, NUM_LINE_BYTE3, ((TS_HEIGHT * 2) << 16) | (TS_WIDTH / 2)); 134 (budget->buffer_height << 16) | budget->buffer_width);
124 } else {
125 saa7146_write(dev, PITCH3, TS_WIDTH);
126 saa7146_write(dev, NUM_LINE_BYTE3, (TS_HEIGHT << 16) | TS_WIDTH);
127 }
128 135
129 saa7146_write(dev, MC2, (MASK_04 | MASK_20)); 136 saa7146_write(dev, MC2, (MASK_04 | MASK_20));
130 137
@@ -141,11 +148,12 @@ static void vpeirq(unsigned long data)
141 u8 *mem = (u8 *) (budget->grabbing); 148 u8 *mem = (u8 *) (budget->grabbing);
142 u32 olddma = budget->ttbp; 149 u32 olddma = budget->ttbp;
143 u32 newdma = saa7146_read(budget->dev, PCI_VDP3); 150 u32 newdma = saa7146_read(budget->dev, PCI_VDP3);
151 u32 count;
144 152
145 /* nearest lower position divisible by 188 */ 153 /* nearest lower position divisible by 188 */
146 newdma -= newdma % 188; 154 newdma -= newdma % 188;
147 155
148 if (newdma >= TS_BUFLEN) 156 if (newdma >= budget->buffer_size)
149 return; 157 return;
150 158
151 budget->ttbp = newdma; 159 budget->ttbp = newdma;
@@ -154,11 +162,24 @@ static void vpeirq(unsigned long data)
154 return; 162 return;
155 163
156 if (newdma > olddma) { /* no wraparound, dump olddma..newdma */ 164 if (newdma > olddma) { /* no wraparound, dump olddma..newdma */
157 dvb_dmx_swfilter_packets(&budget->demux, mem + olddma, (newdma - olddma) / 188); 165 count = newdma - olddma;
166 dvb_dmx_swfilter_packets(&budget->demux, mem + olddma, count / 188);
158 } else { /* wraparound, dump olddma..buflen and 0..newdma */ 167 } else { /* wraparound, dump olddma..buflen and 0..newdma */
159 dvb_dmx_swfilter_packets(&budget->demux, mem + olddma, (TS_BUFLEN - olddma) / 188); 168 count = budget->buffer_size - olddma;
169 dvb_dmx_swfilter_packets(&budget->demux, mem + olddma, count / 188);
170 count += newdma;
160 dvb_dmx_swfilter_packets(&budget->demux, mem, newdma / 188); 171 dvb_dmx_swfilter_packets(&budget->demux, mem, newdma / 188);
161 } 172 }
173
174 if (count > budget->buffer_warning_threshold)
175 budget->buffer_warnings++;
176
177 if (budget->buffer_warnings && time_after(jiffies, budget->buffer_warning_time)) {
178 printk("%s %s: used %d times >80%% of buffer (%u bytes now)\n",
179 budget->dev->name, __FUNCTION__, budget->buffer_warnings, count);
180 budget->buffer_warning_time = jiffies + BUFFER_WARNING_WAIT;
181 budget->buffer_warnings = 0;
182 }
162} 183}
163 184
164 185
@@ -341,9 +362,10 @@ int ttpci_budget_init(struct budget *budget, struct saa7146_dev *dev,
341 struct saa7146_pci_extension_data *info, 362 struct saa7146_pci_extension_data *info,
342 struct module *owner) 363 struct module *owner)
343{ 364{
344 int length = TS_WIDTH * TS_HEIGHT;
345 int ret = 0; 365 int ret = 0;
346 struct budget_info *bi = info->ext_priv; 366 struct budget_info *bi = info->ext_priv;
367 int max_bufsize;
368 int height_mask;
347 369
348 memset(budget, 0, sizeof(struct budget)); 370 memset(budget, 0, sizeof(struct budget));
349 371
@@ -352,6 +374,32 @@ int ttpci_budget_init(struct budget *budget, struct saa7146_dev *dev,
352 budget->card = bi; 374 budget->card = bi;
353 budget->dev = (struct saa7146_dev *) dev; 375 budget->dev = (struct saa7146_dev *) dev;
354 376
377 if (budget->card->type == BUDGET_FS_ACTIVY) {
378 budget->buffer_width = TS_WIDTH_ACTIVY;
379 max_bufsize = TS_MAX_BUFSIZE_K_ACTIVY;
380 height_mask = TS_HEIGHT_MASK_ACTIVY;
381 } else {
382 budget->buffer_width = TS_WIDTH;
383 max_bufsize = TS_MAX_BUFSIZE_K;
384 height_mask = TS_HEIGHT_MASK;
385 }
386
387 if (dma_buffer_size < TS_MIN_BUFSIZE_K)
388 dma_buffer_size = TS_MIN_BUFSIZE_K;
389 else if (dma_buffer_size > max_bufsize)
390 dma_buffer_size = max_bufsize;
391
392 budget->buffer_height = dma_buffer_size * 1024 / budget->buffer_width;
393 budget->buffer_height &= height_mask;
394 budget->buffer_size = budget->buffer_height * budget->buffer_width;
395 budget->buffer_warning_threshold = budget->buffer_size * 80/100;
396 budget->buffer_warnings = 0;
397 budget->buffer_warning_time = jiffies;
398
399 dprintk(2, "%s: width = %d, height = %d\n",
400 budget->dev->name, budget->buffer_width, budget->buffer_height);
401 printk("%s: dma buffer size %u\n", budget->dev->name, budget->buffer_size);
402
355 dvb_register_adapter(&budget->dvb_adapter, budget->card->name, owner); 403 dvb_register_adapter(&budget->dvb_adapter, budget->card->name, owner);
356 404
357 /* set dd1 stream a & b */ 405 /* set dd1 stream a & b */
@@ -392,7 +440,7 @@ int ttpci_budget_init(struct budget *budget, struct saa7146_dev *dev,
392 ttpci_eeprom_parse_mac(&budget->i2c_adap, budget->dvb_adapter.proposed_mac); 440 ttpci_eeprom_parse_mac(&budget->i2c_adap, budget->dvb_adapter.proposed_mac);
393 441
394 if (NULL == 442 if (NULL ==
395 (budget->grabbing = saa7146_vmalloc_build_pgtable(dev->pci, length, &budget->pt))) { 443 (budget->grabbing = saa7146_vmalloc_build_pgtable(dev->pci, budget->buffer_size, &budget->pt))) {
396 ret = -ENOMEM; 444 ret = -ENOMEM;
397 goto err; 445 goto err;
398 } 446 }
diff --git a/drivers/media/dvb/ttpci/budget-patch.c b/drivers/media/dvb/ttpci/budget-patch.c
index 9fc9185a8426..1b3aaac5e763 100644
--- a/drivers/media/dvb/ttpci/budget-patch.c
+++ b/drivers/media/dvb/ttpci/budget-patch.c
@@ -577,6 +577,17 @@ static int budget_patch_attach (struct saa7146_dev* dev, struct saa7146_pci_exte
577 saa7146_setgpio(dev, 3, SAA7146_GPIO_OUTLO); 577 saa7146_setgpio(dev, 3, SAA7146_GPIO_OUTLO);
578 // Set RPS1 Address register to point to RPS code (r108 p42) 578 // Set RPS1 Address register to point to RPS code (r108 p42)
579 saa7146_write(dev, RPS_ADDR1, dev->d_rps1.dma_handle); 579 saa7146_write(dev, RPS_ADDR1, dev->d_rps1.dma_handle);
580
581 if (!(budget = kmalloc (sizeof(struct budget_patch), GFP_KERNEL)))
582 return -ENOMEM;
583
584 dprintk(2, "budget: %p\n", budget);
585
586 if ((err = ttpci_budget_init (budget, dev, info, THIS_MODULE))) {
587 kfree (budget);
588 return err;
589 }
590
580 // Set Source Line Counter Threshold, using BRS (rCC p43) 591 // Set Source Line Counter Threshold, using BRS (rCC p43)
581 // It generates HS event every TS_HEIGHT lines 592 // It generates HS event every TS_HEIGHT lines
582 // this is related to TS_WIDTH set in register 593 // this is related to TS_WIDTH set in register
@@ -585,24 +596,13 @@ static int budget_patch_attach (struct saa7146_dev* dev, struct saa7146_pci_exte
585 //,then RPS_THRESH1 596 //,then RPS_THRESH1
586 // should be set to trigger every TS_HEIGHT (512) lines. 597 // should be set to trigger every TS_HEIGHT (512) lines.
587 // 598 //
588 saa7146_write(dev, RPS_THRESH1, (TS_HEIGHT*1) | MASK_12 ); 599 saa7146_write(dev, RPS_THRESH1, budget->buffer_height | MASK_12 );
589 600
590 // saa7146_write(dev, RPS_THRESH0, ((TS_HEIGHT/2)<<16) |MASK_28| (TS_HEIGHT/2) |MASK_12 ); 601 // saa7146_write(dev, RPS_THRESH0, ((TS_HEIGHT/2)<<16) |MASK_28| (TS_HEIGHT/2) |MASK_12 );
591 // Enable RPS1 (rFC p33) 602 // Enable RPS1 (rFC p33)
592 saa7146_write(dev, MC1, (MASK_13 | MASK_29)); 603 saa7146_write(dev, MC1, (MASK_13 | MASK_29));
593 604
594 605
595 if (!(budget = kmalloc (sizeof(struct budget_patch), GFP_KERNEL)))
596 return -ENOMEM;
597
598 dprintk(2, "budget: %p\n", budget);
599
600 if ((err = ttpci_budget_init (budget, dev, info, THIS_MODULE))) {
601 kfree (budget);
602 return err;
603 }
604
605
606 dev->ext_priv = budget; 606 dev->ext_priv = budget;
607 607
608 budget->dvb_adapter.priv = budget; 608 budget->dvb_adapter.priv = budget;
diff --git a/drivers/media/dvb/ttpci/budget.h b/drivers/media/dvb/ttpci/budget.h
index 4ac0f4d08025..ecea3a13030e 100644
--- a/drivers/media/dvb/ttpci/budget.h
+++ b/drivers/media/dvb/ttpci/budget.h
@@ -58,7 +58,13 @@ struct budget {
58 int ci_present; 58 int ci_present;
59 int video_port; 59 int video_port;
60 60
61 u8 tsf; 61 u32 buffer_width;
62 u32 buffer_height;
63 u32 buffer_size;
64 u32 buffer_warning_threshold;
65 u32 buffer_warnings;
66 unsigned long buffer_warning_time;
67
62 u32 ttbp; 68 u32 ttbp;
63 int feeding; 69 int feeding;
64 70
@@ -79,11 +85,6 @@ static struct saa7146_pci_extension_data x_var = { \
79 .ext_priv = &x_var ## _info, \ 85 .ext_priv = &x_var ## _info, \
80 .ext = &budget_extension }; 86 .ext = &budget_extension };
81 87
82#define TS_WIDTH (376)
83#define TS_HEIGHT (512)
84#define TS_BUFLEN (TS_WIDTH*TS_HEIGHT)
85#define TS_MAX_PACKETS (TS_BUFLEN/TS_SIZE)
86
87#define BUDGET_TT 0 88#define BUDGET_TT 0
88#define BUDGET_TT_HW_DISEQC 1 89#define BUDGET_TT_HW_DISEQC 1
89#define BUDGET_PATCH 3 90#define BUDGET_PATCH 3