diff options
Diffstat (limited to 'drivers')
27 files changed, 135 insertions, 69 deletions
diff --git a/drivers/media/common/tuners/tda18271-fe.c b/drivers/media/common/tuners/tda18271-fe.c index 64595112000d..3a50ce96fcb9 100644 --- a/drivers/media/common/tuners/tda18271-fe.c +++ b/drivers/media/common/tuners/tda18271-fe.c | |||
@@ -616,13 +616,13 @@ static int tda18271_rf_tracking_filters_init(struct dvb_frontend *fe, u32 freq) | |||
616 | case RF2: | 616 | case RF2: |
617 | map[i].rf_a1 = (prog_cal[RF2] - prog_tab[RF2] - | 617 | map[i].rf_a1 = (prog_cal[RF2] - prog_tab[RF2] - |
618 | prog_cal[RF1] + prog_tab[RF1]) / | 618 | prog_cal[RF1] + prog_tab[RF1]) / |
619 | ((rf_freq[RF2] - rf_freq[RF1]) / 1000); | 619 | (s32)((rf_freq[RF2] - rf_freq[RF1]) / 1000); |
620 | map[i].rf2 = rf_freq[RF2] / 1000; | 620 | map[i].rf2 = rf_freq[RF2] / 1000; |
621 | break; | 621 | break; |
622 | case RF3: | 622 | case RF3: |
623 | map[i].rf_a2 = (prog_cal[RF3] - prog_tab[RF3] - | 623 | map[i].rf_a2 = (prog_cal[RF3] - prog_tab[RF3] - |
624 | prog_cal[RF2] + prog_tab[RF2]) / | 624 | prog_cal[RF2] + prog_tab[RF2]) / |
625 | ((rf_freq[RF3] - rf_freq[RF2]) / 1000); | 625 | (s32)((rf_freq[RF3] - rf_freq[RF2]) / 1000); |
626 | map[i].rf_b2 = prog_cal[RF2] - prog_tab[RF2]; | 626 | map[i].rf_b2 = prog_cal[RF2] - prog_tab[RF2]; |
627 | map[i].rf3 = rf_freq[RF3] / 1000; | 627 | map[i].rf3 = rf_freq[RF3] / 1000; |
628 | break; | 628 | break; |
@@ -1000,12 +1000,12 @@ static int tda18271_set_analog_params(struct dvb_frontend *fe, | |||
1000 | struct tda18271_std_map_item *map; | 1000 | struct tda18271_std_map_item *map; |
1001 | char *mode; | 1001 | char *mode; |
1002 | int ret; | 1002 | int ret; |
1003 | u32 freq = params->frequency * 62500; | 1003 | u32 freq = params->frequency * 125 * |
1004 | ((params->mode == V4L2_TUNER_RADIO) ? 1 : 1000) / 2; | ||
1004 | 1005 | ||
1005 | priv->mode = TDA18271_ANALOG; | 1006 | priv->mode = TDA18271_ANALOG; |
1006 | 1007 | ||
1007 | if (params->mode == V4L2_TUNER_RADIO) { | 1008 | if (params->mode == V4L2_TUNER_RADIO) { |
1008 | freq = freq / 1000; | ||
1009 | map = &std_map->fm_radio; | 1009 | map = &std_map->fm_radio; |
1010 | mode = "fm"; | 1010 | mode = "fm"; |
1011 | } else if (params->std & V4L2_STD_MN) { | 1011 | } else if (params->std & V4L2_STD_MN) { |
diff --git a/drivers/media/dvb/dvb-usb/Kconfig b/drivers/media/dvb/dvb-usb/Kconfig index 9744b0692417..0e4b97fba384 100644 --- a/drivers/media/dvb/dvb-usb/Kconfig +++ b/drivers/media/dvb/dvb-usb/Kconfig | |||
@@ -75,7 +75,7 @@ config DVB_USB_DIB0700 | |||
75 | select DVB_DIB3000MC if !DVB_FE_CUSTOMISE | 75 | select DVB_DIB3000MC if !DVB_FE_CUSTOMISE |
76 | select DVB_S5H1411 if !DVB_FE_CUSTOMISE | 76 | select DVB_S5H1411 if !DVB_FE_CUSTOMISE |
77 | select DVB_LGDT3305 if !DVB_FE_CUSTOMISE | 77 | select DVB_LGDT3305 if !DVB_FE_CUSTOMISE |
78 | select DVB_TUNER_DIB0070 | 78 | select DVB_TUNER_DIB0070 if !DVB_FE_CUSTOMISE |
79 | select MEDIA_TUNER_MT2060 if !MEDIA_TUNER_CUSTOMISE | 79 | select MEDIA_TUNER_MT2060 if !MEDIA_TUNER_CUSTOMISE |
80 | select MEDIA_TUNER_MT2266 if !MEDIA_TUNER_CUSTOMISE | 80 | select MEDIA_TUNER_MT2266 if !MEDIA_TUNER_CUSTOMISE |
81 | select MEDIA_TUNER_XC2028 if !MEDIA_TUNER_CUSTOMISE | 81 | select MEDIA_TUNER_XC2028 if !MEDIA_TUNER_CUSTOMISE |
diff --git a/drivers/media/dvb/dvb-usb/ce6230.c b/drivers/media/dvb/dvb-usb/ce6230.c index 0737c6377892..3df2045b7d2d 100644 --- a/drivers/media/dvb/dvb-usb/ce6230.c +++ b/drivers/media/dvb/dvb-usb/ce6230.c | |||
@@ -105,7 +105,7 @@ static int ce6230_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msg[], | |||
105 | int i = 0; | 105 | int i = 0; |
106 | struct req_t req; | 106 | struct req_t req; |
107 | int ret = 0; | 107 | int ret = 0; |
108 | memset(&req, 0, sizeof(&req)); | 108 | memset(&req, 0, sizeof(req)); |
109 | 109 | ||
110 | if (num > 2) | 110 | if (num > 2) |
111 | return -EINVAL; | 111 | return -EINVAL; |
diff --git a/drivers/media/dvb/dvb-usb/dib0700_devices.c b/drivers/media/dvb/dvb-usb/dib0700_devices.c index 0b2812aa30a4..6bd8951ea02b 100644 --- a/drivers/media/dvb/dvb-usb/dib0700_devices.c +++ b/drivers/media/dvb/dvb-usb/dib0700_devices.c | |||
@@ -1925,7 +1925,7 @@ struct dvb_usb_device_properties dib0700_devices[] = { | |||
1925 | { NULL }, | 1925 | { NULL }, |
1926 | }, | 1926 | }, |
1927 | { "Leadtek Winfast DTV Dongle (STK7700P based)", | 1927 | { "Leadtek Winfast DTV Dongle (STK7700P based)", |
1928 | { &dib0700_usb_id_table[8] }, | 1928 | { &dib0700_usb_id_table[8], &dib0700_usb_id_table[34] }, |
1929 | { NULL }, | 1929 | { NULL }, |
1930 | }, | 1930 | }, |
1931 | { "AVerMedia AVerTV DVB-T Express", | 1931 | { "AVerMedia AVerTV DVB-T Express", |
@@ -2064,7 +2064,7 @@ struct dvb_usb_device_properties dib0700_devices[] = { | |||
2064 | }, | 2064 | }, |
2065 | }, | 2065 | }, |
2066 | 2066 | ||
2067 | .num_device_descs = 12, | 2067 | .num_device_descs = 11, |
2068 | .devices = { | 2068 | .devices = { |
2069 | { "DiBcom STK7070P reference design", | 2069 | { "DiBcom STK7070P reference design", |
2070 | { &dib0700_usb_id_table[15], NULL }, | 2070 | { &dib0700_usb_id_table[15], NULL }, |
@@ -2098,11 +2098,6 @@ struct dvb_usb_device_properties dib0700_devices[] = { | |||
2098 | { &dib0700_usb_id_table[30], NULL }, | 2098 | { &dib0700_usb_id_table[30], NULL }, |
2099 | { NULL }, | 2099 | { NULL }, |
2100 | }, | 2100 | }, |
2101 | { "Terratec Cinergy T USB XXS/ T3", | ||
2102 | { &dib0700_usb_id_table[33], | ||
2103 | &dib0700_usb_id_table[52], NULL }, | ||
2104 | { NULL }, | ||
2105 | }, | ||
2106 | { "Elgato EyeTV DTT", | 2101 | { "Elgato EyeTV DTT", |
2107 | { &dib0700_usb_id_table[49], NULL }, | 2102 | { &dib0700_usb_id_table[49], NULL }, |
2108 | { NULL }, | 2103 | { NULL }, |
@@ -2343,8 +2338,10 @@ struct dvb_usb_device_properties dib0700_devices[] = { | |||
2343 | { &dib0700_usb_id_table[59], NULL }, | 2338 | { &dib0700_usb_id_table[59], NULL }, |
2344 | { NULL }, | 2339 | { NULL }, |
2345 | }, | 2340 | }, |
2346 | { "Terratec Cinergy T USB XXS (HD)", | 2341 | { "Terratec Cinergy T USB XXS (HD)/ T3", |
2347 | { &dib0700_usb_id_table[34], &dib0700_usb_id_table[60] }, | 2342 | { &dib0700_usb_id_table[33], |
2343 | &dib0700_usb_id_table[52], | ||
2344 | &dib0700_usb_id_table[60], NULL}, | ||
2348 | { NULL }, | 2345 | { NULL }, |
2349 | }, | 2346 | }, |
2350 | }, | 2347 | }, |
diff --git a/drivers/media/dvb/firewire/firedtv-avc.c b/drivers/media/dvb/firewire/firedtv-avc.c index d1b67fe0f011..485d061319ab 100644 --- a/drivers/media/dvb/firewire/firedtv-avc.c +++ b/drivers/media/dvb/firewire/firedtv-avc.c | |||
@@ -1050,28 +1050,28 @@ int avc_ca_pmt(struct firedtv *fdtv, char *msg, int length) | |||
1050 | c->operand[4] = 0; /* slot */ | 1050 | c->operand[4] = 0; /* slot */ |
1051 | c->operand[5] = SFE_VENDOR_TAG_CA_PMT; /* ca tag */ | 1051 | c->operand[5] = SFE_VENDOR_TAG_CA_PMT; /* ca tag */ |
1052 | c->operand[6] = 0; /* more/last */ | 1052 | c->operand[6] = 0; /* more/last */ |
1053 | /* c->operand[7] = XXXprogram_info_length + 17; */ /* length */ | 1053 | /* Use three bytes for length field in case length > 127 */ |
1054 | c->operand[8] = list_management; | 1054 | c->operand[10] = list_management; |
1055 | c->operand[9] = 0x01; /* pmt_cmd=OK_descramble */ | 1055 | c->operand[11] = 0x01; /* pmt_cmd=OK_descramble */ |
1056 | 1056 | ||
1057 | /* TS program map table */ | 1057 | /* TS program map table */ |
1058 | 1058 | ||
1059 | c->operand[10] = 0x02; /* Table id=2 */ | 1059 | c->operand[12] = 0x02; /* Table id=2 */ |
1060 | c->operand[11] = 0x80; /* Section syntax + length */ | 1060 | c->operand[13] = 0x80; /* Section syntax + length */ |
1061 | /* c->operand[12] = XXXprogram_info_length + 12; */ | 1061 | /* c->operand[14] = XXXprogram_info_length + 12; */ |
1062 | c->operand[13] = msg[1]; /* Program number */ | 1062 | c->operand[15] = msg[1]; /* Program number */ |
1063 | c->operand[14] = msg[2]; | 1063 | c->operand[16] = msg[2]; |
1064 | c->operand[15] = 0x01; /* Version number=0 + current/next=1 */ | 1064 | c->operand[17] = 0x01; /* Version number=0 + current/next=1 */ |
1065 | c->operand[16] = 0x00; /* Section number=0 */ | 1065 | c->operand[18] = 0x00; /* Section number=0 */ |
1066 | c->operand[17] = 0x00; /* Last section number=0 */ | 1066 | c->operand[19] = 0x00; /* Last section number=0 */ |
1067 | c->operand[18] = 0x1f; /* PCR_PID=1FFF */ | 1067 | c->operand[20] = 0x1f; /* PCR_PID=1FFF */ |
1068 | c->operand[19] = 0xff; | 1068 | c->operand[21] = 0xff; |
1069 | c->operand[20] = (program_info_length >> 8); /* Program info length */ | 1069 | c->operand[22] = (program_info_length >> 8); /* Program info length */ |
1070 | c->operand[21] = (program_info_length & 0xff); | 1070 | c->operand[23] = (program_info_length & 0xff); |
1071 | 1071 | ||
1072 | /* CA descriptors at programme level */ | 1072 | /* CA descriptors at programme level */ |
1073 | read_pos = 6; | 1073 | read_pos = 6; |
1074 | write_pos = 22; | 1074 | write_pos = 24; |
1075 | if (program_info_length > 0) { | 1075 | if (program_info_length > 0) { |
1076 | pmt_cmd_id = msg[read_pos++]; | 1076 | pmt_cmd_id = msg[read_pos++]; |
1077 | if (pmt_cmd_id != 1 && pmt_cmd_id != 4) | 1077 | if (pmt_cmd_id != 1 && pmt_cmd_id != 4) |
@@ -1113,8 +1113,10 @@ int avc_ca_pmt(struct firedtv *fdtv, char *msg, int length) | |||
1113 | c->operand[write_pos++] = 0x00; | 1113 | c->operand[write_pos++] = 0x00; |
1114 | c->operand[write_pos++] = 0x00; | 1114 | c->operand[write_pos++] = 0x00; |
1115 | 1115 | ||
1116 | c->operand[7] = write_pos - 8; | 1116 | c->operand[7] = 0x82; |
1117 | c->operand[12] = write_pos - 13; | 1117 | c->operand[8] = (write_pos - 10) >> 8; |
1118 | c->operand[9] = (write_pos - 10) & 0xff; | ||
1119 | c->operand[14] = write_pos - 15; | ||
1118 | 1120 | ||
1119 | crc32_csum = crc32_be(0, &c->operand[10], c->operand[12] - 1); | 1121 | crc32_csum = crc32_be(0, &c->operand[10], c->operand[12] - 1); |
1120 | c->operand[write_pos - 4] = (crc32_csum >> 24) & 0xff; | 1122 | c->operand[write_pos - 4] = (crc32_csum >> 24) & 0xff; |
diff --git a/drivers/media/dvb/firewire/firedtv-fe.c b/drivers/media/dvb/firewire/firedtv-fe.c index 7ba43630a25d..e49cdc88b0c7 100644 --- a/drivers/media/dvb/firewire/firedtv-fe.c +++ b/drivers/media/dvb/firewire/firedtv-fe.c | |||
@@ -141,18 +141,12 @@ static int fdtv_read_uncorrected_blocks(struct dvb_frontend *fe, u32 *ucblocks) | |||
141 | return -EOPNOTSUPP; | 141 | return -EOPNOTSUPP; |
142 | } | 142 | } |
143 | 143 | ||
144 | #define ACCEPTED 0x9 | ||
145 | |||
146 | static int fdtv_set_frontend(struct dvb_frontend *fe, | 144 | static int fdtv_set_frontend(struct dvb_frontend *fe, |
147 | struct dvb_frontend_parameters *params) | 145 | struct dvb_frontend_parameters *params) |
148 | { | 146 | { |
149 | struct firedtv *fdtv = fe->sec_priv; | 147 | struct firedtv *fdtv = fe->sec_priv; |
150 | 148 | ||
151 | /* FIXME: avc_tuner_dsd never returns ACCEPTED. Check status? */ | 149 | return avc_tuner_dsd(fdtv, params); |
152 | if (avc_tuner_dsd(fdtv, params) != ACCEPTED) | ||
153 | return -EINVAL; | ||
154 | else | ||
155 | return 0; /* not sure of this... */ | ||
156 | } | 150 | } |
157 | 151 | ||
158 | static int fdtv_get_frontend(struct dvb_frontend *fe, | 152 | static int fdtv_get_frontend(struct dvb_frontend *fe, |
diff --git a/drivers/media/dvb/frontends/dib0070.h b/drivers/media/dvb/frontends/dib0070.h index 8a2e1e710adb..eec9e52ffa75 100644 --- a/drivers/media/dvb/frontends/dib0070.h +++ b/drivers/media/dvb/frontends/dib0070.h | |||
@@ -51,6 +51,7 @@ struct dib0070_config { | |||
51 | #if defined(CONFIG_DVB_TUNER_DIB0070) || (defined(CONFIG_DVB_TUNER_DIB0070_MODULE) && defined(MODULE)) | 51 | #if defined(CONFIG_DVB_TUNER_DIB0070) || (defined(CONFIG_DVB_TUNER_DIB0070_MODULE) && defined(MODULE)) |
52 | extern struct dvb_frontend *dib0070_attach(struct dvb_frontend *fe, struct i2c_adapter *i2c, struct dib0070_config *cfg); | 52 | extern struct dvb_frontend *dib0070_attach(struct dvb_frontend *fe, struct i2c_adapter *i2c, struct dib0070_config *cfg); |
53 | extern u16 dib0070_wbd_offset(struct dvb_frontend *); | 53 | extern u16 dib0070_wbd_offset(struct dvb_frontend *); |
54 | extern void dib0070_ctrl_agc_filter(struct dvb_frontend *, u8 open); | ||
54 | #else | 55 | #else |
55 | static inline struct dvb_frontend *dib0070_attach(struct dvb_frontend *fe, struct i2c_adapter *i2c, struct dib0070_config *cfg) | 56 | static inline struct dvb_frontend *dib0070_attach(struct dvb_frontend *fe, struct i2c_adapter *i2c, struct dib0070_config *cfg) |
56 | { | 57 | { |
@@ -63,7 +64,11 @@ static inline u16 dib0070_wbd_offset(struct dvb_frontend *fe) | |||
63 | printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__); | 64 | printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__); |
64 | return -ENODEV; | 65 | return -ENODEV; |
65 | } | 66 | } |
67 | |||
68 | static inline void dib0070_ctrl_agc_filter(struct dvb_frontend *fe, u8 open) | ||
69 | { | ||
70 | printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__); | ||
71 | } | ||
66 | #endif | 72 | #endif |
67 | extern void dib0070_ctrl_agc_filter(struct dvb_frontend *, u8 open); | ||
68 | 73 | ||
69 | #endif | 74 | #endif |
diff --git a/drivers/media/dvb/frontends/dib7000p.c b/drivers/media/dvb/frontends/dib7000p.c index 55ef6eeb0769..0781f94e05d2 100644 --- a/drivers/media/dvb/frontends/dib7000p.c +++ b/drivers/media/dvb/frontends/dib7000p.c | |||
@@ -1375,6 +1375,11 @@ struct dvb_frontend * dib7000p_attach(struct i2c_adapter *i2c_adap, u8 i2c_addr, | |||
1375 | if (dib7000p_identify(st) != 0) | 1375 | if (dib7000p_identify(st) != 0) |
1376 | goto error; | 1376 | goto error; |
1377 | 1377 | ||
1378 | /* FIXME: make sure the dev.parent field is initialized, or else | ||
1379 | request_firmware() will hit an OOPS (this should be moved somewhere | ||
1380 | more common) */ | ||
1381 | st->i2c_master.gated_tuner_i2c_adap.dev.parent = i2c_adap->dev.parent; | ||
1382 | |||
1378 | dibx000_init_i2c_master(&st->i2c_master, DIB7000P, st->i2c_adap, st->i2c_addr); | 1383 | dibx000_init_i2c_master(&st->i2c_master, DIB7000P, st->i2c_adap, st->i2c_addr); |
1379 | 1384 | ||
1380 | dib7000p_demod_reset(st); | 1385 | dib7000p_demod_reset(st); |
diff --git a/drivers/media/dvb/pt1/pt1.c b/drivers/media/dvb/pt1/pt1.c index 81e623a90f09..1fd8306371e2 100644 --- a/drivers/media/dvb/pt1/pt1.c +++ b/drivers/media/dvb/pt1/pt1.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/pci.h> | 27 | #include <linux/pci.h> |
28 | #include <linux/kthread.h> | 28 | #include <linux/kthread.h> |
29 | #include <linux/freezer.h> | 29 | #include <linux/freezer.h> |
30 | #include <linux/vmalloc.h> | ||
30 | 31 | ||
31 | #include "dvbdev.h" | 32 | #include "dvbdev.h" |
32 | #include "dvb_demux.h" | 33 | #include "dvb_demux.h" |
diff --git a/drivers/media/dvb/siano/smsusb.c b/drivers/media/dvb/siano/smsusb.c index cb8a358b7310..8f88a586b0dd 100644 --- a/drivers/media/dvb/siano/smsusb.c +++ b/drivers/media/dvb/siano/smsusb.c | |||
@@ -529,6 +529,12 @@ struct usb_device_id smsusb_id_table[] = { | |||
529 | .driver_info = SMS1XXX_BOARD_SIANO_NICE }, | 529 | .driver_info = SMS1XXX_BOARD_SIANO_NICE }, |
530 | { USB_DEVICE(0x187f, 0x0301), | 530 | { USB_DEVICE(0x187f, 0x0301), |
531 | .driver_info = SMS1XXX_BOARD_SIANO_VENICE }, | 531 | .driver_info = SMS1XXX_BOARD_SIANO_VENICE }, |
532 | { USB_DEVICE(0x2040, 0xb900), | ||
533 | .driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM }, | ||
534 | { USB_DEVICE(0x2040, 0xb910), | ||
535 | .driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM }, | ||
536 | { USB_DEVICE(0x2040, 0xc000), | ||
537 | .driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM }, | ||
532 | { } /* Terminating entry */ | 538 | { } /* Terminating entry */ |
533 | }; | 539 | }; |
534 | 540 | ||
diff --git a/drivers/media/video/bt8xx/bttv-driver.c b/drivers/media/video/bt8xx/bttv-driver.c index 939d1e512974..a6724019c66f 100644 --- a/drivers/media/video/bt8xx/bttv-driver.c +++ b/drivers/media/video/bt8xx/bttv-driver.c | |||
@@ -1299,7 +1299,7 @@ set_tvnorm(struct bttv *btv, unsigned int norm) | |||
1299 | 1299 | ||
1300 | tvnorm = &bttv_tvnorms[norm]; | 1300 | tvnorm = &bttv_tvnorms[norm]; |
1301 | 1301 | ||
1302 | if (!memcmp(&bttv_tvnorms[btv->tvnorm].cropcap, &tvnorm->cropcap, | 1302 | if (memcmp(&bttv_tvnorms[btv->tvnorm].cropcap, &tvnorm->cropcap, |
1303 | sizeof (tvnorm->cropcap))) { | 1303 | sizeof (tvnorm->cropcap))) { |
1304 | bttv_crop_reset(&btv->crop[0], norm); | 1304 | bttv_crop_reset(&btv->crop[0], norm); |
1305 | btv->crop[1] = btv->crop[0]; /* current = default */ | 1305 | btv->crop[1] = btv->crop[0]; /* current = default */ |
@@ -3800,11 +3800,34 @@ bttv_irq_next_video(struct bttv *btv, struct bttv_buffer_set *set) | |||
3800 | if (!V4L2_FIELD_HAS_BOTH(item->vb.field) && | 3800 | if (!V4L2_FIELD_HAS_BOTH(item->vb.field) && |
3801 | (item->vb.queue.next != &btv->capture)) { | 3801 | (item->vb.queue.next != &btv->capture)) { |
3802 | item = list_entry(item->vb.queue.next, struct bttv_buffer, vb.queue); | 3802 | item = list_entry(item->vb.queue.next, struct bttv_buffer, vb.queue); |
3803 | /* Mike Isely <isely@pobox.com> - Only check | ||
3804 | * and set up the bottom field in the logic | ||
3805 | * below. Don't ever do the top field. This | ||
3806 | * of course means that if we set up the | ||
3807 | * bottom field in the above code that we'll | ||
3808 | * actually skip a field. But that's OK. | ||
3809 | * Having processed only a single buffer this | ||
3810 | * time, then the next time around the first | ||
3811 | * available buffer should be for a top field. | ||
3812 | * That will then cause us here to set up a | ||
3813 | * top then a bottom field in the normal way. | ||
3814 | * The alternative to this understanding is | ||
3815 | * that we set up the second available buffer | ||
3816 | * as a top field, but that's out of order | ||
3817 | * since this driver always processes the top | ||
3818 | * field first - the effect will be the two | ||
3819 | * buffers being returned in the wrong order, | ||
3820 | * with the second buffer also being delayed | ||
3821 | * by one field time (owing to the fifo nature | ||
3822 | * of videobuf). Worse still, we'll be stuck | ||
3823 | * doing fields out of order now every time | ||
3824 | * until something else causes a field to be | ||
3825 | * dropped. By effectively forcing a field to | ||
3826 | * drop this way then we always get back into | ||
3827 | * sync within a single frame time. (Out of | ||
3828 | * order fields can screw up deinterlacing | ||
3829 | * algorithms.) */ | ||
3803 | if (!V4L2_FIELD_HAS_BOTH(item->vb.field)) { | 3830 | if (!V4L2_FIELD_HAS_BOTH(item->vb.field)) { |
3804 | if (NULL == set->top && | ||
3805 | V4L2_FIELD_TOP == item->vb.field) { | ||
3806 | set->top = item; | ||
3807 | } | ||
3808 | if (NULL == set->bottom && | 3831 | if (NULL == set->bottom && |
3809 | V4L2_FIELD_BOTTOM == item->vb.field) { | 3832 | V4L2_FIELD_BOTTOM == item->vb.field) { |
3810 | set->bottom = item; | 3833 | set->bottom = item; |
diff --git a/drivers/media/video/em28xx/em28xx-audio.c b/drivers/media/video/em28xx/em28xx-audio.c index 7bd8a70f0a0b..ac947aecb9c3 100644 --- a/drivers/media/video/em28xx/em28xx-audio.c +++ b/drivers/media/video/em28xx/em28xx-audio.c | |||
@@ -383,6 +383,11 @@ static int snd_em28xx_hw_capture_free(struct snd_pcm_substream *substream) | |||
383 | 383 | ||
384 | static int snd_em28xx_prepare(struct snd_pcm_substream *substream) | 384 | static int snd_em28xx_prepare(struct snd_pcm_substream *substream) |
385 | { | 385 | { |
386 | struct em28xx *dev = snd_pcm_substream_chip(substream); | ||
387 | |||
388 | dev->adev.hwptr_done_capture = 0; | ||
389 | dev->adev.capture_transfer_done = 0; | ||
390 | |||
386 | return 0; | 391 | return 0; |
387 | } | 392 | } |
388 | 393 | ||
diff --git a/drivers/media/video/gspca/m5602/m5602_s5k4aa.c b/drivers/media/video/gspca/m5602/m5602_s5k4aa.c index 59400e858965..a27afeb6f39b 100644 --- a/drivers/media/video/gspca/m5602/m5602_s5k4aa.c +++ b/drivers/media/video/gspca/m5602/m5602_s5k4aa.c | |||
@@ -35,12 +35,25 @@ static | |||
35 | const | 35 | const |
36 | struct dmi_system_id s5k4aa_vflip_dmi_table[] = { | 36 | struct dmi_system_id s5k4aa_vflip_dmi_table[] = { |
37 | { | 37 | { |
38 | .ident = "BRUNEINIT", | ||
39 | .matches = { | ||
40 | DMI_MATCH(DMI_SYS_VENDOR, "BRUNENIT"), | ||
41 | DMI_MATCH(DMI_PRODUCT_NAME, "BRUNENIT"), | ||
42 | DMI_MATCH(DMI_BOARD_VERSION, "00030D0000000001") | ||
43 | } | ||
44 | }, { | ||
38 | .ident = "Fujitsu-Siemens Amilo Xa 2528", | 45 | .ident = "Fujitsu-Siemens Amilo Xa 2528", |
39 | .matches = { | 46 | .matches = { |
40 | DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"), | 47 | DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"), |
41 | DMI_MATCH(DMI_PRODUCT_NAME, "AMILO Xa 2528") | 48 | DMI_MATCH(DMI_PRODUCT_NAME, "AMILO Xa 2528") |
42 | } | 49 | } |
43 | }, { | 50 | }, { |
51 | .ident = "Fujitsu-Siemens Amilo Xi 2528", | ||
52 | .matches = { | ||
53 | DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"), | ||
54 | DMI_MATCH(DMI_PRODUCT_NAME, "AMILO Xi 2528") | ||
55 | } | ||
56 | }, { | ||
44 | .ident = "Fujitsu-Siemens Amilo Xi 2550", | 57 | .ident = "Fujitsu-Siemens Amilo Xi 2550", |
45 | .matches = { | 58 | .matches = { |
46 | DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"), | 59 | DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"), |
@@ -57,6 +70,13 @@ static | |||
57 | .matches = { | 70 | .matches = { |
58 | DMI_MATCH(DMI_SYS_VENDOR, "Micro-Star International"), | 71 | DMI_MATCH(DMI_SYS_VENDOR, "Micro-Star International"), |
59 | DMI_MATCH(DMI_PRODUCT_NAME, "GX700"), | 72 | DMI_MATCH(DMI_PRODUCT_NAME, "GX700"), |
73 | DMI_MATCH(DMI_BIOS_DATE, "12/02/2008") | ||
74 | } | ||
75 | }, { | ||
76 | .ident = "MSI GX700", | ||
77 | .matches = { | ||
78 | DMI_MATCH(DMI_SYS_VENDOR, "Micro-Star International"), | ||
79 | DMI_MATCH(DMI_PRODUCT_NAME, "GX700"), | ||
60 | DMI_MATCH(DMI_BIOS_DATE, "07/26/2007") | 80 | DMI_MATCH(DMI_BIOS_DATE, "07/26/2007") |
61 | } | 81 | } |
62 | }, { | 82 | }, { |
diff --git a/drivers/media/video/gspca/mr97310a.c b/drivers/media/video/gspca/mr97310a.c index 140c8f320e47..f8328b9efae5 100644 --- a/drivers/media/video/gspca/mr97310a.c +++ b/drivers/media/video/gspca/mr97310a.c | |||
@@ -483,7 +483,7 @@ static int start_cif_cam(struct gspca_dev *gspca_dev) | |||
483 | data[3] = 0x2c; /* reg 2, H size/8 */ | 483 | data[3] = 0x2c; /* reg 2, H size/8 */ |
484 | data[4] = 0x48; /* reg 3, V size/4 */ | 484 | data[4] = 0x48; /* reg 3, V size/4 */ |
485 | data[6] = 0x06; /* reg 5, H start */ | 485 | data[6] = 0x06; /* reg 5, H start */ |
486 | data[8] = 0x06 + sd->sensor_type; /* reg 7, V start */ | 486 | data[8] = 0x06 - sd->sensor_type; /* reg 7, V start */ |
487 | break; | 487 | break; |
488 | } | 488 | } |
489 | err_code = mr_write(gspca_dev, 11); | 489 | err_code = mr_write(gspca_dev, 11); |
diff --git a/drivers/media/video/gspca/ov519.c b/drivers/media/video/gspca/ov519.c index 2f6e135d94bc..a5c190e93799 100644 --- a/drivers/media/video/gspca/ov519.c +++ b/drivers/media/video/gspca/ov519.c | |||
@@ -2919,7 +2919,7 @@ static void ov518_pkt_scan(struct gspca_dev *gspca_dev, | |||
2919 | /* A false positive here is likely, until OVT gives me | 2919 | /* A false positive here is likely, until OVT gives me |
2920 | * the definitive SOF/EOF format */ | 2920 | * the definitive SOF/EOF format */ |
2921 | if ((!(data[0] | data[1] | data[2] | data[3] | data[5])) && data[6]) { | 2921 | if ((!(data[0] | data[1] | data[2] | data[3] | data[5])) && data[6]) { |
2922 | gspca_frame_add(gspca_dev, LAST_PACKET, frame, data, 0); | 2922 | frame = gspca_frame_add(gspca_dev, LAST_PACKET, frame, data, 0); |
2923 | gspca_frame_add(gspca_dev, FIRST_PACKET, frame, data, 0); | 2923 | gspca_frame_add(gspca_dev, FIRST_PACKET, frame, data, 0); |
2924 | sd->packet_nr = 0; | 2924 | sd->packet_nr = 0; |
2925 | } | 2925 | } |
diff --git a/drivers/media/video/gspca/stv06xx/stv06xx.c b/drivers/media/video/gspca/stv06xx/stv06xx.c index 65489d6b0d89..bfae63f5584c 100644 --- a/drivers/media/video/gspca/stv06xx/stv06xx.c +++ b/drivers/media/video/gspca/stv06xx/stv06xx.c | |||
@@ -394,7 +394,8 @@ frame_data: | |||
394 | PDEBUG(D_PACK, "End of frame detected"); | 394 | PDEBUG(D_PACK, "End of frame detected"); |
395 | 395 | ||
396 | /* Complete the last frame (if any) */ | 396 | /* Complete the last frame (if any) */ |
397 | gspca_frame_add(gspca_dev, LAST_PACKET, frame, data, 0); | 397 | frame = gspca_frame_add(gspca_dev, LAST_PACKET, |
398 | frame, data, 0); | ||
398 | 399 | ||
399 | if (chunk_len) | 400 | if (chunk_len) |
400 | PDEBUG(D_ERR, "Chunk length is " | 401 | PDEBUG(D_ERR, "Chunk length is " |
diff --git a/drivers/media/video/pxa_camera.c b/drivers/media/video/pxa_camera.c index 6952e9602d5d..51b683c63b70 100644 --- a/drivers/media/video/pxa_camera.c +++ b/drivers/media/video/pxa_camera.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/device.h> | 26 | #include <linux/device.h> |
27 | #include <linux/platform_device.h> | 27 | #include <linux/platform_device.h> |
28 | #include <linux/clk.h> | 28 | #include <linux/clk.h> |
29 | #include <linux/sched.h> | ||
29 | 30 | ||
30 | #include <media/v4l2-common.h> | 31 | #include <media/v4l2-common.h> |
31 | #include <media/v4l2-dev.h> | 32 | #include <media/v4l2-dev.h> |
@@ -1432,7 +1433,9 @@ static int pxa_camera_set_fmt(struct soc_camera_device *icd, | |||
1432 | icd->sense = &sense; | 1433 | icd->sense = &sense; |
1433 | 1434 | ||
1434 | cam_f.fmt.pix.pixelformat = cam_fmt->fourcc; | 1435 | cam_f.fmt.pix.pixelformat = cam_fmt->fourcc; |
1435 | ret = v4l2_subdev_call(sd, video, s_fmt, f); | 1436 | ret = v4l2_subdev_call(sd, video, s_fmt, &cam_f); |
1437 | cam_f.fmt.pix.pixelformat = pix->pixelformat; | ||
1438 | *pix = cam_f.fmt.pix; | ||
1436 | 1439 | ||
1437 | icd->sense = NULL; | 1440 | icd->sense = NULL; |
1438 | 1441 | ||
diff --git a/drivers/media/video/s2255drv.c b/drivers/media/video/s2255drv.c index 9e3262c0ba37..2c0bb06cab3b 100644 --- a/drivers/media/video/s2255drv.c +++ b/drivers/media/video/s2255drv.c | |||
@@ -598,11 +598,6 @@ static int s2255_got_frame(struct s2255_dev *dev, int chn, int jpgsize) | |||
598 | buf = list_entry(dma_q->active.next, | 598 | buf = list_entry(dma_q->active.next, |
599 | struct s2255_buffer, vb.queue); | 599 | struct s2255_buffer, vb.queue); |
600 | 600 | ||
601 | if (!waitqueue_active(&buf->vb.done)) { | ||
602 | /* no one active */ | ||
603 | rc = -1; | ||
604 | goto unlock; | ||
605 | } | ||
606 | list_del(&buf->vb.queue); | 601 | list_del(&buf->vb.queue); |
607 | do_gettimeofday(&buf->vb.ts); | 602 | do_gettimeofday(&buf->vb.ts); |
608 | dprintk(100, "[%p/%d] wakeup\n", buf, buf->vb.i); | 603 | dprintk(100, "[%p/%d] wakeup\n", buf, buf->vb.i); |
diff --git a/drivers/media/video/saa7134/saa7134-cards.c b/drivers/media/video/saa7134/saa7134-cards.c index 71145bff94fa..09013229d4aa 100644 --- a/drivers/media/video/saa7134/saa7134-cards.c +++ b/drivers/media/video/saa7134/saa7134-cards.c | |||
@@ -3428,6 +3428,7 @@ struct saa7134_board saa7134_boards[] = { | |||
3428 | .tuner_config = 3, | 3428 | .tuner_config = 3, |
3429 | .mpeg = SAA7134_MPEG_DVB, | 3429 | .mpeg = SAA7134_MPEG_DVB, |
3430 | .ts_type = SAA7134_MPEG_TS_SERIAL, | 3430 | .ts_type = SAA7134_MPEG_TS_SERIAL, |
3431 | .ts_force_val = 1, | ||
3431 | .gpiomask = 0x0800100, /* GPIO 21 is an INPUT */ | 3432 | .gpiomask = 0x0800100, /* GPIO 21 is an INPUT */ |
3432 | .inputs = {{ | 3433 | .inputs = {{ |
3433 | .name = name_tv, | 3434 | .name = name_tv, |
diff --git a/drivers/media/video/saa7134/saa7134-ts.c b/drivers/media/video/saa7134/saa7134-ts.c index 3fa652279ac0..03488ba4c99c 100644 --- a/drivers/media/video/saa7134/saa7134-ts.c +++ b/drivers/media/video/saa7134/saa7134-ts.c | |||
@@ -262,11 +262,13 @@ int saa7134_ts_start(struct saa7134_dev *dev) | |||
262 | switch (saa7134_boards[dev->board].ts_type) { | 262 | switch (saa7134_boards[dev->board].ts_type) { |
263 | case SAA7134_MPEG_TS_PARALLEL: | 263 | case SAA7134_MPEG_TS_PARALLEL: |
264 | saa_writeb(SAA7134_TS_SERIAL0, 0x40); | 264 | saa_writeb(SAA7134_TS_SERIAL0, 0x40); |
265 | saa_writeb(SAA7134_TS_PARALLEL, 0xec); | 265 | saa_writeb(SAA7134_TS_PARALLEL, 0xec | |
266 | (saa7134_boards[dev->board].ts_force_val << 4)); | ||
266 | break; | 267 | break; |
267 | case SAA7134_MPEG_TS_SERIAL: | 268 | case SAA7134_MPEG_TS_SERIAL: |
268 | saa_writeb(SAA7134_TS_SERIAL0, 0xd8); | 269 | saa_writeb(SAA7134_TS_SERIAL0, 0xd8); |
269 | saa_writeb(SAA7134_TS_PARALLEL, 0x6c); | 270 | saa_writeb(SAA7134_TS_PARALLEL, 0x6c | |
271 | (saa7134_boards[dev->board].ts_force_val << 4)); | ||
270 | saa_writeb(SAA7134_TS_PARALLEL_SERIAL, 0xbc); | 272 | saa_writeb(SAA7134_TS_PARALLEL_SERIAL, 0xbc); |
271 | saa_writeb(SAA7134_TS_SERIAL1, 0x02); | 273 | saa_writeb(SAA7134_TS_SERIAL1, 0x02); |
272 | break; | 274 | break; |
diff --git a/drivers/media/video/saa7134/saa7134.h b/drivers/media/video/saa7134/saa7134.h index 6ee3e9b7769e..f8697d46ff5f 100644 --- a/drivers/media/video/saa7134/saa7134.h +++ b/drivers/media/video/saa7134/saa7134.h | |||
@@ -360,6 +360,7 @@ struct saa7134_board { | |||
360 | enum saa7134_mpeg_type mpeg; | 360 | enum saa7134_mpeg_type mpeg; |
361 | enum saa7134_mpeg_ts_type ts_type; | 361 | enum saa7134_mpeg_ts_type ts_type; |
362 | unsigned int vid_port_opts; | 362 | unsigned int vid_port_opts; |
363 | unsigned int ts_force_val:1; | ||
363 | }; | 364 | }; |
364 | 365 | ||
365 | #define card_has_radio(dev) (NULL != saa7134_boards[dev->board].radio.name) | 366 | #define card_has_radio(dev) (NULL != saa7134_boards[dev->board].radio.name) |
diff --git a/drivers/media/video/saa7164/saa7164-cmd.c b/drivers/media/video/saa7164/saa7164-cmd.c index c45966edc0cf..9c1d3ac43869 100644 --- a/drivers/media/video/saa7164/saa7164-cmd.c +++ b/drivers/media/video/saa7164/saa7164-cmd.c | |||
@@ -347,7 +347,7 @@ int saa7164_cmd_send(struct saa7164_dev *dev, u8 id, tmComResCmd_t command, | |||
347 | 347 | ||
348 | /* Prepare some basic command/response structures */ | 348 | /* Prepare some basic command/response structures */ |
349 | memset(&command_t, 0, sizeof(command_t)); | 349 | memset(&command_t, 0, sizeof(command_t)); |
350 | memset(&response_t, 0, sizeof(&response_t)); | 350 | memset(&response_t, 0, sizeof(response_t)); |
351 | pcommand_t = &command_t; | 351 | pcommand_t = &command_t; |
352 | presponse_t = &response_t; | 352 | presponse_t = &response_t; |
353 | command_t.id = id; | 353 | command_t.id = id; |
diff --git a/drivers/media/video/sh_mobile_ceu_camera.c b/drivers/media/video/sh_mobile_ceu_camera.c index 65ac474c517a..2f78b4f263f5 100644 --- a/drivers/media/video/sh_mobile_ceu_camera.c +++ b/drivers/media/video/sh_mobile_ceu_camera.c | |||
@@ -1173,8 +1173,8 @@ static int get_scales(struct soc_camera_device *icd, | |||
1173 | width_in = scale_up(cam->ceu_rect.width, *scale_h); | 1173 | width_in = scale_up(cam->ceu_rect.width, *scale_h); |
1174 | height_in = scale_up(cam->ceu_rect.height, *scale_v); | 1174 | height_in = scale_up(cam->ceu_rect.height, *scale_v); |
1175 | 1175 | ||
1176 | *scale_h = calc_generic_scale(cam->ceu_rect.width, icd->user_width); | 1176 | *scale_h = calc_generic_scale(width_in, icd->user_width); |
1177 | *scale_v = calc_generic_scale(cam->ceu_rect.height, icd->user_height); | 1177 | *scale_v = calc_generic_scale(height_in, icd->user_height); |
1178 | 1178 | ||
1179 | return 0; | 1179 | return 0; |
1180 | } | 1180 | } |
diff --git a/drivers/media/video/soc_camera.c b/drivers/media/video/soc_camera.c index 59aa7a3694c2..36e617bd13c7 100644 --- a/drivers/media/video/soc_camera.c +++ b/drivers/media/video/soc_camera.c | |||
@@ -1160,13 +1160,15 @@ void soc_camera_host_unregister(struct soc_camera_host *ici) | |||
1160 | if (icd->iface == ici->nr) { | 1160 | if (icd->iface == ici->nr) { |
1161 | /* The bus->remove will be called */ | 1161 | /* The bus->remove will be called */ |
1162 | device_unregister(&icd->dev); | 1162 | device_unregister(&icd->dev); |
1163 | /* Not before device_unregister(), .remove | 1163 | /* |
1164 | * needs parent to call ici->ops->remove() */ | 1164 | * Not before device_unregister(), .remove |
1165 | icd->dev.parent = NULL; | 1165 | * needs parent to call ici->ops->remove(). |
1166 | 1166 | * If the host module is loaded again, device_register() | |
1167 | /* If the host module is loaded again, device_register() | 1167 | * would complain "already initialised," since 2.6.32 |
1168 | * would complain "already initialised" */ | 1168 | * this is also needed to prevent use-after-free of the |
1169 | memset(&icd->dev.kobj, 0, sizeof(icd->dev.kobj)); | 1169 | * device private data. |
1170 | */ | ||
1171 | memset(&icd->dev, 0, sizeof(icd->dev)); | ||
1170 | } | 1172 | } |
1171 | } | 1173 | } |
1172 | 1174 | ||
diff --git a/drivers/media/video/uvc/uvc_ctrl.c b/drivers/media/video/uvc/uvc_ctrl.c index c3225a561748..1b89735e62fd 100644 --- a/drivers/media/video/uvc/uvc_ctrl.c +++ b/drivers/media/video/uvc/uvc_ctrl.c | |||
@@ -348,7 +348,7 @@ static void uvc_ctrl_set_zoom(struct uvc_control_mapping *mapping, | |||
348 | __s32 value, __u8 *data) | 348 | __s32 value, __u8 *data) |
349 | { | 349 | { |
350 | data[0] = value == 0 ? 0 : (value > 0) ? 1 : 0xff; | 350 | data[0] = value == 0 ? 0 : (value > 0) ? 1 : 0xff; |
351 | data[2] = min(abs(value), 0xff); | 351 | data[2] = min((int)abs(value), 0xff); |
352 | } | 352 | } |
353 | 353 | ||
354 | static struct uvc_control_mapping uvc_ctrl_mappings[] = { | 354 | static struct uvc_control_mapping uvc_ctrl_mappings[] = { |
diff --git a/drivers/media/video/uvc/uvc_video.c b/drivers/media/video/uvc/uvc_video.c index f960e8ea4f17..a6e41d12b221 100644 --- a/drivers/media/video/uvc/uvc_video.c +++ b/drivers/media/video/uvc/uvc_video.c | |||
@@ -90,7 +90,8 @@ static void uvc_fixup_video_ctrl(struct uvc_streaming *stream, | |||
90 | ctrl->dwMaxVideoFrameSize = | 90 | ctrl->dwMaxVideoFrameSize = |
91 | frame->dwMaxVideoFrameBufferSize; | 91 | frame->dwMaxVideoFrameBufferSize; |
92 | 92 | ||
93 | if (stream->dev->quirks & UVC_QUIRK_FIX_BANDWIDTH && | 93 | if (!(format->flags & UVC_FMT_FLAG_COMPRESSED) && |
94 | stream->dev->quirks & UVC_QUIRK_FIX_BANDWIDTH && | ||
94 | stream->intf->num_altsetting > 1) { | 95 | stream->intf->num_altsetting > 1) { |
95 | u32 interval; | 96 | u32 interval; |
96 | u32 bandwidth; | 97 | u32 bandwidth; |
diff --git a/drivers/mtd/maps/Makefile b/drivers/mtd/maps/Makefile index 1d5cf8636723..ae2f6dbe43c3 100644 --- a/drivers/mtd/maps/Makefile +++ b/drivers/mtd/maps/Makefile | |||
@@ -58,4 +58,6 @@ obj-$(CONFIG_MTD_PLATRAM) += plat-ram.o | |||
58 | obj-$(CONFIG_MTD_OMAP_NOR) += omap_nor.o | 58 | obj-$(CONFIG_MTD_OMAP_NOR) += omap_nor.o |
59 | obj-$(CONFIG_MTD_INTEL_VR_NOR) += intel_vr_nor.o | 59 | obj-$(CONFIG_MTD_INTEL_VR_NOR) += intel_vr_nor.o |
60 | obj-$(CONFIG_MTD_BFIN_ASYNC) += bfin-async-flash.o | 60 | obj-$(CONFIG_MTD_BFIN_ASYNC) += bfin-async-flash.o |
61 | obj-$(CONFIG_MTD_RBTX4939) += rbtx4939-flash.o | ||
62 | obj-$(CONFIG_MTD_VMU) += vmu-flash.o | ||
61 | obj-$(CONFIG_MTD_GPIO_ADDR) += gpio-addr-flash.o | 63 | obj-$(CONFIG_MTD_GPIO_ADDR) += gpio-addr-flash.o |