Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 186770
Collapse All | Expand All

(-)a/linux/drivers/media/dvb/dvb-usb/dib0700.h (+2 lines)
Lines 37-42 struct dib0700_state { Link Here
37
	u16 mt2060_if1[2];
37
	u16 mt2060_if1[2];
38
38
39
	u8 is_dib7000pc;
39
	u8 is_dib7000pc;
40
41
	int (*streaming_ctrl)  (struct dvb_usb_adapter *, int);
40
};
42
};
41
43
42
extern int dib0700_set_gpio(struct dvb_usb_device *, enum dib07x0_gpios gpio, u8 gpio_dir, u8 gpio_val);
44
extern int dib0700_set_gpio(struct dvb_usb_device *, enum dib07x0_gpios gpio, u8 gpio_dir, u8 gpio_val);
(-)a/linux/drivers/media/dvb/dvb-usb/dib0700_devices.c (-2 / +15 lines)
Lines 84-89 static int bristol_frontend_attach(struc Link Here
84
		}
84
		}
85
	}
85
	}
86
	st->mt2060_if1[adap->id] = 1220;
86
	st->mt2060_if1[adap->id] = 1220;
87
	st->streaming_ctrl = dib0700_streaming_ctrl;
87
	return (adap->fe = dvb_attach(dib3000mc_attach, &adap->dev->i2c_adap,
88
	return (adap->fe = dvb_attach(dib3000mc_attach, &adap->dev->i2c_adap,
88
		(10 + adap->id) << 1, &bristol_dib3000mc_config[adap->id])) == NULL ? -ENODEV : 0;
89
		(10 + adap->id) << 1, &bristol_dib3000mc_config[adap->id])) == NULL ? -ENODEV : 0;
89
}
90
}
Lines 307-312 MODULE_DEVICE_TABLE(usb, dib0700_usb_id_ Link Here
307
		} \
308
		} \
308
	}
309
	}
309
310
311
#define DIB0700_STREAMING_CONFIG_500(ep) \
312
	.stream = { \
313
		.type = USB_BULK, \
314
		.count = 4, \
315
		.endpoint = ep, \
316
		.u = { \
317
			.bulk = { \
318
				.buffersize = 39480, \
319
			} \
320
		} \
321
	}
322
310
struct dvb_usb_device_properties dib0700_devices[] = {
323
struct dvb_usb_device_properties dib0700_devices[] = {
311
	{
324
	{
312
		DIB0700_DEFAULT_DEVICE_PROPERTIES,
325
		DIB0700_DEFAULT_DEVICE_PROPERTIES,
Lines 356-367 struct dvb_usb_device_properties dib0700 Link Here
356
				.frontend_attach  = bristol_frontend_attach,
369
				.frontend_attach  = bristol_frontend_attach,
357
				.tuner_attach     = bristol_tuner_attach,
370
				.tuner_attach     = bristol_tuner_attach,
358
371
359
				DIB0700_DEFAULT_STREAMING_CONFIG(0x02),
372
				DIB0700_STREAMING_CONFIG_500(0x02),
360
			}, {
373
			}, {
361
				.frontend_attach  = bristol_frontend_attach,
374
				.frontend_attach  = bristol_frontend_attach,
362
				.tuner_attach     = bristol_tuner_attach,
375
				.tuner_attach     = bristol_tuner_attach,
363
376
364
				DIB0700_DEFAULT_STREAMING_CONFIG(0x03),
377
				DIB0700_STREAMING_CONFIG_500(0x03),
365
			}
378
			}
366
		},
379
		},
367
380
(-)a/linux/drivers/media/dvb/frontends/dib3000mc.c (+14 lines)
Lines 22-30 Link Here
22
22
23
#include "dib3000mc.h"
23
#include "dib3000mc.h"
24
24
25
#include "dib0700.h"
26
25
static int debug;
27
static int debug;
26
module_param(debug, int, 0644);
28
module_param(debug, int, 0644);
27
MODULE_PARM_DESC(debug, "turn on debugging (default: 0)");
29
MODULE_PARM_DESC(debug, "turn on debugging (default: 0)");
30
31
#undef dprintk
28
32
29
#define dprintk(args...) do { if (debug) { printk(KERN_DEBUG "DiB3000MC/P:"); printk(args); } } while (0)
33
#define dprintk(args...) do { if (debug) { printk(KERN_DEBUG "DiB3000MC/P:"); printk(args); } } while (0)
30
34
Lines 316-321 static int dib3000mc_init(struct dvb_fro Link Here
316
{
320
{
317
	struct dib3000mc_state *state = demod->demodulator_priv;
321
	struct dib3000mc_state *state = demod->demodulator_priv;
318
	struct dibx000_agc_config *agc = state->cfg->agc;
322
	struct dibx000_agc_config *agc = state->cfg->agc;
323
	struct dvb_usb_adapter *adap = demod->dvb->priv;
324
	struct dib0700_state *st = adap->dev->priv;
319
325
320
	// Restart Configuration
326
	// Restart Configuration
321
	dib3000mc_write_word(state, 1027, 0x8000);
327
	dib3000mc_write_word(state, 1027, 0x8000);
Lines 429-440 static int dib3000mc_init(struct dvb_fro Link Here
429
	/* close the i2c-gate */
435
	/* close the i2c-gate */
430
	dib3000mc_write_word(state, 769, (1 << 7) );
436
	dib3000mc_write_word(state, 769, (1 << 7) );
431
437
438
	if (!strcmp (adap->dev->props.devices[0].name, "Hauppauge Nova-T 500 Dual DVB-T"))
439
		st->streaming_ctrl(adap,1);
440
432
	return 0;
441
	return 0;
433
}
442
}
434
443
435
static int dib3000mc_sleep(struct dvb_frontend *demod)
444
static int dib3000mc_sleep(struct dvb_frontend *demod)
436
{
445
{
437
	struct dib3000mc_state *state = demod->demodulator_priv;
446
	struct dib3000mc_state *state = demod->demodulator_priv;
447
	struct dvb_usb_adapter *adap = demod->dvb->priv;
448
	struct dib0700_state *st = adap->dev->priv;
449
450
	if (!strcmp (adap->dev->props.devices[0].name, "Hauppauge Nova-T 500 Dual DVB-T"))
451
		st->streaming_ctrl(adap,0);
438
452
439
	dib3000mc_write_word(state, 1031, 0xFFFF);
453
	dib3000mc_write_word(state, 1031, 0xFFFF);
440
	dib3000mc_write_word(state, 1032, 0xFFFF);
454
	dib3000mc_write_word(state, 1032, 0xFFFF);

Return to bug 186770