diff options
Diffstat (limited to 'drivers/media/dvb')
-rw-r--r-- | drivers/media/dvb/b2c2/flexcop-fe-tuner.c | 1 | ||||
-rw-r--r-- | drivers/media/dvb/dvb-core/dmxdev.c | 16 | ||||
-rw-r--r-- | drivers/media/dvb/dvb-core/dvb_demux.c | 16 | ||||
-rw-r--r-- | drivers/media/dvb/frontends/s5h1420.c | 11 | ||||
-rw-r--r-- | drivers/media/dvb/frontends/s5h1420.h | 8 | ||||
-rw-r--r-- | drivers/media/dvb/siano/sms-cards.c | 4 |
6 files changed, 35 insertions, 21 deletions
diff --git a/drivers/media/dvb/b2c2/flexcop-fe-tuner.c b/drivers/media/dvb/b2c2/flexcop-fe-tuner.c index 4eed783f4bce..a127a4175c40 100644 --- a/drivers/media/dvb/b2c2/flexcop-fe-tuner.c +++ b/drivers/media/dvb/b2c2/flexcop-fe-tuner.c | |||
@@ -491,6 +491,7 @@ static struct s5h1420_config skystar2_rev2_7_s5h1420_config = { | |||
491 | .demod_address = 0x53, | 491 | .demod_address = 0x53, |
492 | .invert = 1, | 492 | .invert = 1, |
493 | .repeated_start_workaround = 1, | 493 | .repeated_start_workaround = 1, |
494 | .serial_mpeg = 1, | ||
494 | }; | 495 | }; |
495 | 496 | ||
496 | static struct itd1000_config skystar2_rev2_7_itd1000_config = { | 497 | static struct itd1000_config skystar2_rev2_7_itd1000_config = { |
diff --git a/drivers/media/dvb/dvb-core/dmxdev.c b/drivers/media/dvb/dvb-core/dmxdev.c index 069d847ba887..0c733c66a441 100644 --- a/drivers/media/dvb/dvb-core/dmxdev.c +++ b/drivers/media/dvb/dvb-core/dmxdev.c | |||
@@ -364,15 +364,16 @@ static int dvb_dmxdev_section_callback(const u8 *buffer1, size_t buffer1_len, | |||
364 | enum dmx_success success) | 364 | enum dmx_success success) |
365 | { | 365 | { |
366 | struct dmxdev_filter *dmxdevfilter = filter->priv; | 366 | struct dmxdev_filter *dmxdevfilter = filter->priv; |
367 | unsigned long flags; | ||
367 | int ret; | 368 | int ret; |
368 | 369 | ||
369 | if (dmxdevfilter->buffer.error) { | 370 | if (dmxdevfilter->buffer.error) { |
370 | wake_up(&dmxdevfilter->buffer.queue); | 371 | wake_up(&dmxdevfilter->buffer.queue); |
371 | return 0; | 372 | return 0; |
372 | } | 373 | } |
373 | spin_lock(&dmxdevfilter->dev->lock); | 374 | spin_lock_irqsave(&dmxdevfilter->dev->lock, flags); |
374 | if (dmxdevfilter->state != DMXDEV_STATE_GO) { | 375 | if (dmxdevfilter->state != DMXDEV_STATE_GO) { |
375 | spin_unlock(&dmxdevfilter->dev->lock); | 376 | spin_unlock_irqrestore(&dmxdevfilter->dev->lock, flags); |
376 | return 0; | 377 | return 0; |
377 | } | 378 | } |
378 | del_timer(&dmxdevfilter->timer); | 379 | del_timer(&dmxdevfilter->timer); |
@@ -391,7 +392,7 @@ static int dvb_dmxdev_section_callback(const u8 *buffer1, size_t buffer1_len, | |||
391 | } | 392 | } |
392 | if (dmxdevfilter->params.sec.flags & DMX_ONESHOT) | 393 | if (dmxdevfilter->params.sec.flags & DMX_ONESHOT) |
393 | dmxdevfilter->state = DMXDEV_STATE_DONE; | 394 | dmxdevfilter->state = DMXDEV_STATE_DONE; |
394 | spin_unlock(&dmxdevfilter->dev->lock); | 395 | spin_unlock_irqrestore(&dmxdevfilter->dev->lock, flags); |
395 | wake_up(&dmxdevfilter->buffer.queue); | 396 | wake_up(&dmxdevfilter->buffer.queue); |
396 | return 0; | 397 | return 0; |
397 | } | 398 | } |
@@ -403,11 +404,12 @@ static int dvb_dmxdev_ts_callback(const u8 *buffer1, size_t buffer1_len, | |||
403 | { | 404 | { |
404 | struct dmxdev_filter *dmxdevfilter = feed->priv; | 405 | struct dmxdev_filter *dmxdevfilter = feed->priv; |
405 | struct dvb_ringbuffer *buffer; | 406 | struct dvb_ringbuffer *buffer; |
407 | unsigned long flags; | ||
406 | int ret; | 408 | int ret; |
407 | 409 | ||
408 | spin_lock(&dmxdevfilter->dev->lock); | 410 | spin_lock_irqsave(&dmxdevfilter->dev->lock, flags); |
409 | if (dmxdevfilter->params.pes.output == DMX_OUT_DECODER) { | 411 | if (dmxdevfilter->params.pes.output == DMX_OUT_DECODER) { |
410 | spin_unlock(&dmxdevfilter->dev->lock); | 412 | spin_unlock_irqrestore(&dmxdevfilter->dev->lock, flags); |
411 | return 0; | 413 | return 0; |
412 | } | 414 | } |
413 | 415 | ||
@@ -417,7 +419,7 @@ static int dvb_dmxdev_ts_callback(const u8 *buffer1, size_t buffer1_len, | |||
417 | else | 419 | else |
418 | buffer = &dmxdevfilter->dev->dvr_buffer; | 420 | buffer = &dmxdevfilter->dev->dvr_buffer; |
419 | if (buffer->error) { | 421 | if (buffer->error) { |
420 | spin_unlock(&dmxdevfilter->dev->lock); | 422 | spin_unlock_irqrestore(&dmxdevfilter->dev->lock, flags); |
421 | wake_up(&buffer->queue); | 423 | wake_up(&buffer->queue); |
422 | return 0; | 424 | return 0; |
423 | } | 425 | } |
@@ -428,7 +430,7 @@ static int dvb_dmxdev_ts_callback(const u8 *buffer1, size_t buffer1_len, | |||
428 | dvb_ringbuffer_flush(buffer); | 430 | dvb_ringbuffer_flush(buffer); |
429 | buffer->error = ret; | 431 | buffer->error = ret; |
430 | } | 432 | } |
431 | spin_unlock(&dmxdevfilter->dev->lock); | 433 | spin_unlock_irqrestore(&dmxdevfilter->dev->lock, flags); |
432 | wake_up(&buffer->queue); | 434 | wake_up(&buffer->queue); |
433 | return 0; | 435 | return 0; |
434 | } | 436 | } |
diff --git a/drivers/media/dvb/dvb-core/dvb_demux.c b/drivers/media/dvb/dvb-core/dvb_demux.c index e2eca0b1fe7c..a2c1fd5d2f67 100644 --- a/drivers/media/dvb/dvb-core/dvb_demux.c +++ b/drivers/media/dvb/dvb-core/dvb_demux.c | |||
@@ -399,7 +399,9 @@ static void dvb_dmx_swfilter_packet(struct dvb_demux *demux, const u8 *buf) | |||
399 | void dvb_dmx_swfilter_packets(struct dvb_demux *demux, const u8 *buf, | 399 | void dvb_dmx_swfilter_packets(struct dvb_demux *demux, const u8 *buf, |
400 | size_t count) | 400 | size_t count) |
401 | { | 401 | { |
402 | spin_lock(&demux->lock); | 402 | unsigned long flags; |
403 | |||
404 | spin_lock_irqsave(&demux->lock, flags); | ||
403 | 405 | ||
404 | while (count--) { | 406 | while (count--) { |
405 | if (buf[0] == 0x47) | 407 | if (buf[0] == 0x47) |
@@ -407,16 +409,17 @@ void dvb_dmx_swfilter_packets(struct dvb_demux *demux, const u8 *buf, | |||
407 | buf += 188; | 409 | buf += 188; |
408 | } | 410 | } |
409 | 411 | ||
410 | spin_unlock(&demux->lock); | 412 | spin_unlock_irqrestore(&demux->lock, flags); |
411 | } | 413 | } |
412 | 414 | ||
413 | EXPORT_SYMBOL(dvb_dmx_swfilter_packets); | 415 | EXPORT_SYMBOL(dvb_dmx_swfilter_packets); |
414 | 416 | ||
415 | void dvb_dmx_swfilter(struct dvb_demux *demux, const u8 *buf, size_t count) | 417 | void dvb_dmx_swfilter(struct dvb_demux *demux, const u8 *buf, size_t count) |
416 | { | 418 | { |
419 | unsigned long flags; | ||
417 | int p = 0, i, j; | 420 | int p = 0, i, j; |
418 | 421 | ||
419 | spin_lock(&demux->lock); | 422 | spin_lock_irqsave(&demux->lock, flags); |
420 | 423 | ||
421 | if (demux->tsbufp) { | 424 | if (demux->tsbufp) { |
422 | i = demux->tsbufp; | 425 | i = demux->tsbufp; |
@@ -449,17 +452,18 @@ void dvb_dmx_swfilter(struct dvb_demux *demux, const u8 *buf, size_t count) | |||
449 | } | 452 | } |
450 | 453 | ||
451 | bailout: | 454 | bailout: |
452 | spin_unlock(&demux->lock); | 455 | spin_unlock_irqrestore(&demux->lock, flags); |
453 | } | 456 | } |
454 | 457 | ||
455 | EXPORT_SYMBOL(dvb_dmx_swfilter); | 458 | EXPORT_SYMBOL(dvb_dmx_swfilter); |
456 | 459 | ||
457 | void dvb_dmx_swfilter_204(struct dvb_demux *demux, const u8 *buf, size_t count) | 460 | void dvb_dmx_swfilter_204(struct dvb_demux *demux, const u8 *buf, size_t count) |
458 | { | 461 | { |
462 | unsigned long flags; | ||
459 | int p = 0, i, j; | 463 | int p = 0, i, j; |
460 | u8 tmppack[188]; | 464 | u8 tmppack[188]; |
461 | 465 | ||
462 | spin_lock(&demux->lock); | 466 | spin_lock_irqsave(&demux->lock, flags); |
463 | 467 | ||
464 | if (demux->tsbufp) { | 468 | if (demux->tsbufp) { |
465 | i = demux->tsbufp; | 469 | i = demux->tsbufp; |
@@ -500,7 +504,7 @@ void dvb_dmx_swfilter_204(struct dvb_demux *demux, const u8 *buf, size_t count) | |||
500 | } | 504 | } |
501 | 505 | ||
502 | bailout: | 506 | bailout: |
503 | spin_unlock(&demux->lock); | 507 | spin_unlock_irqrestore(&demux->lock, flags); |
504 | } | 508 | } |
505 | 509 | ||
506 | EXPORT_SYMBOL(dvb_dmx_swfilter_204); | 510 | EXPORT_SYMBOL(dvb_dmx_swfilter_204); |
diff --git a/drivers/media/dvb/frontends/s5h1420.c b/drivers/media/dvb/frontends/s5h1420.c index 747d3fa2e5e5..2e9fd2893ede 100644 --- a/drivers/media/dvb/frontends/s5h1420.c +++ b/drivers/media/dvb/frontends/s5h1420.c | |||
@@ -59,7 +59,7 @@ struct s5h1420_state { | |||
59 | * it does not support repeated-start, workaround: write addr-1 | 59 | * it does not support repeated-start, workaround: write addr-1 |
60 | * and then read | 60 | * and then read |
61 | */ | 61 | */ |
62 | u8 shadow[255]; | 62 | u8 shadow[256]; |
63 | }; | 63 | }; |
64 | 64 | ||
65 | static u32 s5h1420_getsymbolrate(struct s5h1420_state* state); | 65 | static u32 s5h1420_getsymbolrate(struct s5h1420_state* state); |
@@ -94,8 +94,11 @@ static u8 s5h1420_readreg(struct s5h1420_state *state, u8 reg) | |||
94 | if (ret != 3) | 94 | if (ret != 3) |
95 | return ret; | 95 | return ret; |
96 | } else { | 96 | } else { |
97 | ret = i2c_transfer(state->i2c, &msg[1], 2); | 97 | ret = i2c_transfer(state->i2c, &msg[1], 1); |
98 | if (ret != 2) | 98 | if (ret != 1) |
99 | return ret; | ||
100 | ret = i2c_transfer(state->i2c, &msg[2], 1); | ||
101 | if (ret != 1) | ||
99 | return ret; | 102 | return ret; |
100 | } | 103 | } |
101 | 104 | ||
@@ -823,7 +826,7 @@ static int s5h1420_init (struct dvb_frontend* fe) | |||
823 | struct s5h1420_state* state = fe->demodulator_priv; | 826 | struct s5h1420_state* state = fe->demodulator_priv; |
824 | 827 | ||
825 | /* disable power down and do reset */ | 828 | /* disable power down and do reset */ |
826 | state->CON_1_val = 0x10; | 829 | state->CON_1_val = state->config->serial_mpeg << 4; |
827 | s5h1420_writereg(state, 0x02, state->CON_1_val); | 830 | s5h1420_writereg(state, 0x02, state->CON_1_val); |
828 | msleep(10); | 831 | msleep(10); |
829 | s5h1420_reset(state); | 832 | s5h1420_reset(state); |
diff --git a/drivers/media/dvb/frontends/s5h1420.h b/drivers/media/dvb/frontends/s5h1420.h index 4c913f142bc4..ff308136d865 100644 --- a/drivers/media/dvb/frontends/s5h1420.h +++ b/drivers/media/dvb/frontends/s5h1420.h | |||
@@ -32,10 +32,12 @@ struct s5h1420_config | |||
32 | u8 demod_address; | 32 | u8 demod_address; |
33 | 33 | ||
34 | /* does the inversion require inversion? */ | 34 | /* does the inversion require inversion? */ |
35 | u8 invert : 1; | 35 | u8 invert:1; |
36 | 36 | ||
37 | u8 repeated_start_workaround : 1; | 37 | u8 repeated_start_workaround:1; |
38 | u8 cdclk_polarity : 1; /* 1 == falling edge, 0 == raising edge */ | 38 | u8 cdclk_polarity:1; /* 1 == falling edge, 0 == raising edge */ |
39 | |||
40 | u8 serial_mpeg:1; | ||
39 | }; | 41 | }; |
40 | 42 | ||
41 | #if defined(CONFIG_DVB_S5H1420) || (defined(CONFIG_DVB_S5H1420_MODULE) && defined(MODULE)) | 43 | #if defined(CONFIG_DVB_S5H1420) || (defined(CONFIG_DVB_S5H1420_MODULE) && defined(MODULE)) |
diff --git a/drivers/media/dvb/siano/sms-cards.c b/drivers/media/dvb/siano/sms-cards.c index cc5efb643f33..9da260fe3fd1 100644 --- a/drivers/media/dvb/siano/sms-cards.c +++ b/drivers/media/dvb/siano/sms-cards.c | |||
@@ -40,6 +40,8 @@ struct usb_device_id smsusb_id_table[] = { | |||
40 | .driver_info = SMS1XXX_BOARD_HAUPPAUGE_OKEMO_B }, | 40 | .driver_info = SMS1XXX_BOARD_HAUPPAUGE_OKEMO_B }, |
41 | { USB_DEVICE(0x2040, 0x5500), | 41 | { USB_DEVICE(0x2040, 0x5500), |
42 | .driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM }, | 42 | .driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM }, |
43 | { USB_DEVICE(0x2040, 0x5510), | ||
44 | .driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM }, | ||
43 | { USB_DEVICE(0x2040, 0x5580), | 45 | { USB_DEVICE(0x2040, 0x5580), |
44 | .driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM }, | 46 | .driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM }, |
45 | { USB_DEVICE(0x2040, 0x5590), | 47 | { USB_DEVICE(0x2040, 0x5590), |
@@ -87,7 +89,7 @@ static struct sms_board sms_boards[] = { | |||
87 | .fw[DEVICE_MODE_DVBT_BDA] = "sms1xxx-nova-b-dvbt-01.fw", | 89 | .fw[DEVICE_MODE_DVBT_BDA] = "sms1xxx-nova-b-dvbt-01.fw", |
88 | }, | 90 | }, |
89 | [SMS1XXX_BOARD_HAUPPAUGE_WINDHAM] = { | 91 | [SMS1XXX_BOARD_HAUPPAUGE_WINDHAM] = { |
90 | .name = "Hauppauge WinTV-Nova-T-MiniStick", | 92 | .name = "Hauppauge WinTV MiniStick", |
91 | .type = SMS_NOVA_B0, | 93 | .type = SMS_NOVA_B0, |
92 | .fw[DEVICE_MODE_DVBT_BDA] = "sms1xxx-hcw-55xxx-dvbt-01.fw", | 94 | .fw[DEVICE_MODE_DVBT_BDA] = "sms1xxx-hcw-55xxx-dvbt-01.fw", |
93 | }, | 95 | }, |