Merge git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvb

* git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvb: (48 commits)
V4L/DVB (8001): dib0070: fix dib0070_attach when !CONFIG_DVB_TUNER_DIB0070
V4L/DVB (8000): tda827x: fix NULL pointer in tda827xa_lna_gain
V4L/DVB (7990): Fix entry for PowerColor RA 330 and make it run with firmware version 2.7
V4L/DVB (7983): tda18271_calc_rf_cal must return the return value of tda18271_lookup_map
V4L/DVB (7978): cx18: explicitly test for XC2028 tuner
V4L/DVB (7977): cx18: fix init order and remove duplicate open_on_first_use.
V4L/DVB (7975): saa7134_empress
V4L/DVB (7974): fix MEDIA_TUNER && FW_LOADER build error
V4L/DVB (7972): or51132.c: unaligned
V4L/DVB (7971): usb: unaligned
V4L/DVB (7970): mix trivial endianness annotations
V4L/DVB (7969): m920x: unaligned access
V4L/DVB (7968): zoran: endianness annotations
V4L/DVB (7967): bt8xx: unaligned access
V4L/DVB (7966): cx18: direct dereferencing of iomem
V4L/DVB (7965): annotate bcx_riscmem
V4L/DVB (7964): cx18 iomem annotations
V4L/DVB (7963): ivtv: trivial annotations
V4L/DVB (7962): ttusb endianness annotations and fixes
V4L/DVB (7961): fix endianness bug in dib0700_devices.c
...

+434 -348
+1 -1
Documentation/video4linux/CARDLIST.cx88
··· 60 60 59 -> DViCO FusionHDTV 5 PCI nano [18ac:d530] 61 61 60 -> Pinnacle Hybrid PCTV [12ab:1788] 62 62 61 -> Winfast TV2000 XP Global [107d:6f18] 63 - 62 -> PowerColor Real Angel 330 [14f1:ea3d] 63 + 62 -> PowerColor RA330 [14f1:ea3d] 64 64 63 -> Geniatech X8000-MT DVBT [14f1:8852] 65 65 64 -> DViCO FusionHDTV DVB-T PRO [18ac:db30] 66 66 65 -> DViCO FusionHDTV 7 Gold [18ac:d610]
+3 -1
Documentation/video4linux/cx18.txt
··· 1 1 Some notes regarding the cx18 driver for the Conexant CX23418 MPEG 2 2 encoder chip: 3 3 4 - 1) The only hardware currently supported is the Hauppauge HVR-1600. 4 + 1) The only hardware currently supported is the Hauppauge HVR-1600 5 + card and the Compro VideoMate H900 (note that this card only 6 + supports analog input, it has no digital tuner!). 5 7 6 8 2) Some people have problems getting the i2c bus to work. Cause unknown. 7 9 The symptom is that the eeprom cannot be read and the card is
+1 -6
drivers/media/Makefile
··· 2 2 # Makefile for the kernel multimedia device drivers. 3 3 # 4 4 5 - obj-y := common/ 6 - 7 - obj-$(CONFIG_VIDEO_MEDIA) += common/ 8 - 9 - # Since hybrid devices are here, should be compiled if DVB and/or V4L 10 - obj-$(CONFIG_VIDEO_MEDIA) += video/ 5 + obj-y += common/ video/ 11 6 12 7 obj-$(CONFIG_VIDEO_DEV) += radio/ 13 8 obj-$(CONFIG_DVB_CORE) += dvb/
+1
drivers/media/common/tuners/Kconfig
··· 21 21 tristate 22 22 default VIDEO_MEDIA && I2C 23 23 depends on VIDEO_MEDIA && I2C 24 + select FW_LOADER if !MEDIA_TUNER_CUSTOMIZE && HOTPLUG 24 25 select MEDIA_TUNER_XC2028 if !MEDIA_TUNER_CUSTOMIZE && HOTPLUG 25 26 select MEDIA_TUNER_XC5000 if !MEDIA_TUNER_CUSTOMIZE && HOTPLUG 26 27 select MEDIA_TUNER_MT20XX if !MEDIA_TUNER_CUSTOMIZE
+2 -2
drivers/media/common/tuners/mxl5005s.c
··· 101 101 MXL_QAM, 102 102 MXL_ANALOG_CABLE, 103 103 MXL_ANALOG_OTA 104 - } tuner_modu_type; 104 + }; 105 105 106 106 /* MXL5005 Tuner Register Struct */ 107 107 struct TunerReg { ··· 194 194 RFSYN_DIVM, /* 88 */ 195 195 DN_BYPASS_AGC_I2C /* 89 */ 196 196 #endif 197 - } MXL5005_ControlName; 197 + }; 198 198 199 199 /* 200 200 * The following context is source code provided by MaxLinear.
+2 -2
drivers/media/common/tuners/tda18271-common.c
··· 648 648 unsigned char *regs = priv->tda18271_regs; 649 649 u8 val; 650 650 651 - tda18271_lookup_map(fe, RF_CAL, freq, &val); 651 + int ret = tda18271_lookup_map(fe, RF_CAL, freq, &val); 652 652 653 653 regs[R_EB14] = val; 654 654 655 - return 0; 655 + return ret; 656 656 } 657 657 658 658 /*
+2 -2
drivers/media/common/tuners/tda827x.c
··· 418 418 unsigned char buf[] = {0x22, 0x01}; 419 419 int arg; 420 420 int gp_func; 421 - struct i2c_msg msg = { .addr = priv->cfg->switch_addr, .flags = 0, 422 - .buf = buf, .len = sizeof(buf) }; 421 + struct i2c_msg msg = { .flags = 0, .buf = buf, .len = sizeof(buf) }; 423 422 424 423 if (NULL == priv->cfg) { 425 424 dprintk("tda827x_config not defined, cannot set LNA gain!\n"); 426 425 return; 427 426 } 427 + msg.addr = priv->cfg->switch_addr; 428 428 if (priv->cfg->config) { 429 429 if (high) 430 430 dprintk("setting LNA to high gain\n");
+1 -1
drivers/media/common/tuners/tea5761.c
··· 295 295 { 296 296 struct tea5761_priv *priv = NULL; 297 297 298 - if (tea5761_autodetection(i2c_adap, i2c_addr) == EINVAL) 298 + if (tea5761_autodetection(i2c_adap, i2c_addr) != 0) 299 299 return NULL; 300 300 301 301 priv = kzalloc(sizeof(struct tea5761_priv), GFP_KERNEL);
+8
drivers/media/common/tuners/tuner-i2c.h
··· 170 170 __ret; \ 171 171 }) 172 172 173 + #define hybrid_tuner_report_instance_count(state) \ 174 + ({ \ 175 + int __ret = 0; \ 176 + if (state) \ 177 + __ret = state->i2c_props.count; \ 178 + __ret; \ 179 + }) 180 + 173 181 #endif /* __TUNER_I2C_H__ */
+4 -2
drivers/media/common/tuners/tuner-simple.c
··· 1018 1018 fe->ops.i2c_gate_ctrl(fe, 1); 1019 1019 1020 1020 if (1 != i2c_transfer(i2c_adap, &msg, 1)) 1021 - tuner_warn("unable to probe %s, proceeding anyway.", 1022 - tuners[type].name); 1021 + printk(KERN_WARNING "tuner-simple %d-%04x: " 1022 + "unable to probe %s, proceeding anyway.", 1023 + i2c_adapter_id(i2c_adap), i2c_addr, 1024 + tuners[type].name); 1023 1025 1024 1026 if (fe->ops.i2c_gate_ctrl) 1025 1027 fe->ops.i2c_gate_ctrl(fe, 0);
+41 -46
drivers/media/common/tuners/tuner-xc2028.c
··· 46 46 MODULE_PARM_DESC(firmware_name, "Firmware file name. Allows overriding the " 47 47 "default firmware name\n"); 48 48 49 - static LIST_HEAD(xc2028_list); 49 + static LIST_HEAD(hybrid_tuner_instance_list); 50 50 static DEFINE_MUTEX(xc2028_list_mutex); 51 51 52 52 /* struct for storing firmware table */ ··· 68 68 }; 69 69 70 70 struct xc2028_data { 71 - struct list_head xc2028_list; 71 + struct list_head hybrid_tuner_instance_list; 72 72 struct tuner_i2c_props i2c_props; 73 73 int (*tuner_callback) (void *dev, 74 74 int command, int arg); 75 75 void *video_dev; 76 - int count; 77 76 __u32 frequency; 78 77 79 78 struct firmware_description *firm; ··· 1071 1072 1072 1073 mutex_lock(&xc2028_list_mutex); 1073 1074 1074 - priv->count--; 1075 - 1076 - if (!priv->count) { 1077 - list_del(&priv->xc2028_list); 1078 - 1075 + /* only perform final cleanup if this is the last instance */ 1076 + if (hybrid_tuner_report_instance_count(priv) == 1) { 1079 1077 kfree(priv->ctrl.fname); 1080 - 1081 1078 free_firmware(priv); 1082 - kfree(priv); 1083 - fe->tuner_priv = NULL; 1084 1079 } 1085 1080 1081 + if (priv) 1082 + hybrid_tuner_release_state(priv); 1083 + 1086 1084 mutex_unlock(&xc2028_list_mutex); 1085 + 1086 + fe->tuner_priv = NULL; 1087 1087 1088 1088 return 0; 1089 1089 } ··· 1148 1150 struct xc2028_config *cfg) 1149 1151 { 1150 1152 struct xc2028_data *priv; 1151 - void *video_dev; 1153 + int instance; 1152 1154 1153 1155 if (debug) 1154 1156 printk(KERN_DEBUG "xc2028: Xcv2028/3028 init called!\n"); ··· 1161 1163 return NULL; 1162 1164 } 1163 1165 1164 - video_dev = cfg->i2c_adap->algo_data; 1165 - 1166 - if (debug) 1167 - printk(KERN_DEBUG "xc2028: video_dev =%p\n", video_dev); 1168 - 1169 1166 mutex_lock(&xc2028_list_mutex); 1170 1167 1171 - list_for_each_entry(priv, &xc2028_list, xc2028_list) { 1172 - if (&priv->i2c_props.adap->dev == &cfg->i2c_adap->dev) { 1173 - video_dev = NULL; 1174 - if (debug) 1175 - printk(KERN_DEBUG "xc2028: reusing device\n"); 1176 - 1177 - break; 1178 - } 1179 - } 1180 - 1181 - if (video_dev) { 1182 - priv = kzalloc(sizeof(*priv), GFP_KERNEL); 1183 - if (priv == NULL) { 1184 - mutex_unlock(&xc2028_list_mutex); 1185 - return NULL; 1186 - } 1187 - 1188 - priv->i2c_props.addr = cfg->i2c_addr; 1189 - priv->i2c_props.adap = cfg->i2c_adap; 1190 - priv->i2c_props.name = "xc2028"; 1191 - 1192 - priv->video_dev = video_dev; 1168 + instance = hybrid_tuner_request_state(struct xc2028_data, priv, 1169 + hybrid_tuner_instance_list, 1170 + cfg->i2c_adap, cfg->i2c_addr, 1171 + "xc2028"); 1172 + switch (instance) { 1173 + case 0: 1174 + /* memory allocation failure */ 1175 + goto fail; 1176 + break; 1177 + case 1: 1178 + /* new tuner instance */ 1193 1179 priv->tuner_callback = cfg->callback; 1194 1180 priv->ctrl.max_len = 13; 1195 1181 1196 1182 mutex_init(&priv->lock); 1197 1183 1198 - list_add_tail(&priv->xc2028_list, &xc2028_list); 1184 + /* analog side (tuner-core) uses i2c_adap->algo_data. 1185 + * digital side is not guaranteed to have algo_data defined. 1186 + * 1187 + * digital side will always have fe->dvb defined. 1188 + * analog side (tuner-core) doesn't (yet) define fe->dvb. 1189 + */ 1190 + priv->video_dev = ((fe->dvb) && (fe->dvb->priv)) ? 1191 + fe->dvb->priv : cfg->i2c_adap->algo_data; 1192 + 1193 + fe->tuner_priv = priv; 1194 + break; 1195 + case 2: 1196 + /* existing tuner instance */ 1197 + fe->tuner_priv = priv; 1198 + break; 1199 1199 } 1200 - 1201 - fe->tuner_priv = priv; 1202 - priv->count++; 1203 - 1204 - if (debug) 1205 - printk(KERN_DEBUG "xc2028: usage count is %i\n", priv->count); 1206 1200 1207 1201 memcpy(&fe->ops.tuner_ops, &xc2028_dvb_tuner_ops, 1208 1202 sizeof(xc2028_dvb_tuner_ops)); ··· 1207 1217 mutex_unlock(&xc2028_list_mutex); 1208 1218 1209 1219 return fe; 1220 + fail: 1221 + mutex_unlock(&xc2028_list_mutex); 1222 + 1223 + xc2028_dvb_release(fe); 1224 + return NULL; 1210 1225 } 1211 1226 1212 1227 EXPORT_SYMBOL(xc2028_attach);
+1 -1
drivers/media/dvb/b2c2/flexcop-usb.c
··· 379 379 380 380 static int flexcop_usb_transfer_init(struct flexcop_usb *fc_usb) 381 381 { 382 - u16 frame_size = fc_usb->uintf->cur_altsetting->endpoint[0].desc.wMaxPacketSize; 382 + u16 frame_size = le16_to_cpu(fc_usb->uintf->cur_altsetting->endpoint[0].desc.wMaxPacketSize); 383 383 int bufsize = B2C2_USB_NUM_ISO_URB * B2C2_USB_FRAMES_PER_ISO * frame_size,i,j,ret; 384 384 int buffer_offset = 0; 385 385
+24 -22
drivers/media/dvb/cinergyT2/cinergyT2.c
··· 82 82 83 83 struct dvbt_set_parameters_msg { 84 84 uint8_t cmd; 85 - uint32_t freq; 85 + __le32 freq; 86 86 uint8_t bandwidth; 87 - uint16_t tps; 87 + __le16 tps; 88 88 uint8_t flags; 89 89 } __attribute__((packed)); 90 90 91 91 struct dvbt_get_status_msg { 92 - uint32_t freq; 92 + __le32 freq; 93 93 uint8_t bandwidth; 94 - uint16_t tps; 94 + __le16 tps; 95 95 uint8_t flags; 96 - uint16_t gain; 96 + __le16 gain; 97 97 uint8_t snr; 98 - uint32_t viterbi_error_rate; 99 - uint32_t rs_error_rate; 100 - uint32_t uncorrected_block_count; 98 + __le32 viterbi_error_rate; 99 + __le32 rs_error_rate; 100 + __le32 uncorrected_block_count; 101 101 uint8_t lock_bits; 102 102 uint8_t prev_lock_bits; 103 103 } __attribute__((packed)); ··· 136 136 wait_queue_head_t poll_wq; 137 137 int pending_fe_events; 138 138 int disconnect_pending; 139 + unsigned int uncorrected_block_count; 139 140 atomic_t inuse; 140 141 141 142 void *streambuf; ··· 148 147 char phys[64]; 149 148 struct delayed_work rc_query_work; 150 149 int rc_input_event; 151 - u32 rc_last_code; 150 + __le32 rc_last_code; 152 151 unsigned long last_event_jiffies; 153 152 #endif 154 153 }; ··· 161 160 162 161 struct cinergyt2_rc_event { 163 162 char type; 164 - uint32_t value; 163 + __le32 value; 165 164 } __attribute__((packed)); 166 165 167 166 static const uint32_t rc_keys[] = { ··· 620 619 { 621 620 uint32_t unc_count; 622 621 623 - unc_count = stat->uncorrected_block_count; 624 - stat->uncorrected_block_count = 0; 622 + if (mutex_lock_interruptible(&cinergyt2->sem)) 623 + return -ERESTARTSYS; 624 + unc_count = cinergyt2->uncorrected_block_count; 625 + cinergyt2->uncorrected_block_count = 0; 626 + mutex_unlock(&cinergyt2->sem); 625 627 626 628 /* UNC are already converted to host byte order... */ 627 629 return put_user(unc_count,(__u32 __user *) arg); ··· 773 769 input_sync(cinergyt2->rc_input_dev); 774 770 cinergyt2->rc_input_event = KEY_MAX; 775 771 } 776 - cinergyt2->rc_last_code = ~0; 772 + cinergyt2->rc_last_code = cpu_to_le32(~0); 777 773 } 778 774 goto out; 779 775 } ··· 784 780 n, le32_to_cpu(rc_events[n].value), rc_events[n].type); 785 781 786 782 if (rc_events[n].type == CINERGYT2_RC_EVENT_TYPE_NEC && 787 - rc_events[n].value == ~0) { 783 + rc_events[n].value == cpu_to_le32(~0)) { 788 784 /* keyrepeat bit -> just repeat last rc_input_event */ 789 785 } else { 790 786 cinergyt2->rc_input_event = KEY_MAX; ··· 799 795 800 796 if (cinergyt2->rc_input_event != KEY_MAX) { 801 797 if (rc_events[n].value == cinergyt2->rc_last_code && 802 - cinergyt2->rc_last_code != ~0) { 798 + cinergyt2->rc_last_code != cpu_to_le32(~0)) { 803 799 /* emit a key-up so the double event is recognized */ 804 800 dprintk(1, "rc_input_event=%d UP\n", cinergyt2->rc_input_event); 805 801 input_report_key(cinergyt2->rc_input_dev, ··· 833 829 usb_make_path(cinergyt2->udev, cinergyt2->phys, sizeof(cinergyt2->phys)); 834 830 strlcat(cinergyt2->phys, "/input0", sizeof(cinergyt2->phys)); 835 831 cinergyt2->rc_input_event = KEY_MAX; 836 - cinergyt2->rc_last_code = ~0; 832 + cinergyt2->rc_last_code = cpu_to_le32(~0); 837 833 INIT_DELAYED_WORK(&cinergyt2->rc_query_work, cinergyt2_query_rc); 838 834 839 835 input_dev->name = DRIVER_NAME " remote control"; ··· 844 840 input_dev->keycodesize = 0; 845 841 input_dev->keycodemax = 0; 846 842 input_dev->id.bustype = BUS_USB; 847 - input_dev->id.vendor = cinergyt2->udev->descriptor.idVendor; 848 - input_dev->id.product = cinergyt2->udev->descriptor.idProduct; 843 + input_dev->id.vendor = le16_to_cpu(cinergyt2->udev->descriptor.idVendor); 844 + input_dev->id.product = le16_to_cpu(cinergyt2->udev->descriptor.idProduct); 849 845 input_dev->id.version = 1; 850 846 input_dev->dev.parent = &cinergyt2->udev->dev; 851 847 ··· 893 889 char cmd [] = { CINERGYT2_EP1_GET_TUNER_STATUS }; 894 890 struct dvbt_get_status_msg *s = &cinergyt2->status; 895 891 uint8_t lock_bits; 896 - uint32_t unc; 897 892 898 893 if (cinergyt2->disconnect_pending || mutex_lock_interruptible(&cinergyt2->sem)) 899 894 return; 900 895 901 - unc = s->uncorrected_block_count; 902 896 lock_bits = s->lock_bits; 903 897 904 898 cinergyt2_command(cinergyt2, cmd, sizeof(cmd), (char *) s, sizeof(*s)); 905 899 906 - unc += le32_to_cpu(s->uncorrected_block_count); 907 - s->uncorrected_block_count = unc; 900 + cinergyt2->uncorrected_block_count += 901 + le32_to_cpu(s->uncorrected_block_count); 908 902 909 903 if (lock_bits != s->lock_bits) { 910 904 wake_up_interruptible(&cinergyt2->poll_wq);
+6 -6
drivers/media/dvb/dvb-core/dvb_net.c
··· 168 168 * stolen from eth.c out of the linux kernel, hacked for dvb-device 169 169 * by Michael Holzt <kju@debian.org> 170 170 */ 171 - static unsigned short dvb_net_eth_type_trans(struct sk_buff *skb, 171 + static __be16 dvb_net_eth_type_trans(struct sk_buff *skb, 172 172 struct net_device *dev) 173 173 { 174 174 struct ethhdr *eth; ··· 277 277 if(ext_len >= 0) { 278 278 p->ule_next_hdr += ext_len; 279 279 if (!p->ule_bridged) { 280 - p->ule_sndu_type = ntohs(*(unsigned short *)p->ule_next_hdr); 280 + p->ule_sndu_type = ntohs(*(__be16 *)p->ule_next_hdr); 281 281 p->ule_next_hdr += 2; 282 282 } else { 283 - p->ule_sndu_type = ntohs(*(unsigned short *)(p->ule_next_hdr + ((p->ule_dbit ? 2 : 3) * ETH_ALEN))); 283 + p->ule_sndu_type = ntohs(*(__be16 *)(p->ule_next_hdr + ((p->ule_dbit ? 2 : 3) * ETH_ALEN))); 284 284 /* This assures the extension handling loop will terminate. */ 285 285 } 286 286 } ··· 294 294 if (ule_optional_ext_handlers[htype]) 295 295 (void)ule_optional_ext_handlers[htype]( p ); 296 296 p->ule_next_hdr += ext_len; 297 - p->ule_sndu_type = ntohs( *(unsigned short *)(p->ule_next_hdr-2) ); 297 + p->ule_sndu_type = ntohs( *(__be16 *)(p->ule_next_hdr-2) ); 298 298 /* 299 299 * note: the length of the next header type is included in the 300 300 * length of THIS optional extension header ··· 594 594 /* Check for complete payload. */ 595 595 if (priv->ule_sndu_remain <= 0) { 596 596 /* Check CRC32, we've got it in our skb already. */ 597 - unsigned short ulen = htons(priv->ule_sndu_len); 598 - unsigned short utype = htons(priv->ule_sndu_type); 597 + __be16 ulen = htons(priv->ule_sndu_len); 598 + __be16 utype = htons(priv->ule_sndu_type); 599 599 const u8 *tail; 600 600 struct kvec iov[3] = { 601 601 { &ulen, sizeof ulen },
+1 -1
drivers/media/dvb/dvb-usb/Kconfig
··· 1 1 config DVB_USB 2 2 tristate "Support for various USB DVB devices" 3 - depends on DVB_CORE && USB && I2C 3 + depends on DVB_CORE && USB && I2C && INPUT 4 4 depends on HOTPLUG # due to FW_LOADER 5 5 select FW_LOADER 6 6 help
+11 -10
drivers/media/dvb/dvb-usb/dib0700_devices.c
··· 111 111 struct i2c_adapter *tun_i2c = dib3000mc_get_tuner_i2c_master(adap->fe, 1); 112 112 s8 a; 113 113 int if1=1220; 114 - if (adap->dev->udev->descriptor.idVendor == USB_VID_HAUPPAUGE && 115 - adap->dev->udev->descriptor.idProduct == USB_PID_HAUPPAUGE_NOVA_T_500_2) { 114 + if (adap->dev->udev->descriptor.idVendor == cpu_to_le16(USB_VID_HAUPPAUGE) && 115 + adap->dev->udev->descriptor.idProduct == cpu_to_le16(USB_PID_HAUPPAUGE_NOVA_T_500_2)) { 116 116 if (!eeprom_read(prim_i2c,0x59 + adap->id,&a)) if1=1220+a; 117 117 } 118 118 return dvb_attach(mt2060_attach,adap->fe, tun_i2c,&bristol_mt2060_config[adap->id], ··· 402 402 { 403 403 struct usb_device_descriptor *desc = &adap->dev->udev->descriptor; 404 404 405 - if (desc->idVendor == USB_VID_PINNACLE && 406 - desc->idProduct == USB_PID_PINNACLE_EXPRESSCARD_320CX) 405 + if (desc->idVendor == cpu_to_le16(USB_VID_PINNACLE) && 406 + desc->idProduct == cpu_to_le16(USB_PID_PINNACLE_EXPRESSCARD_320CX)) 407 407 dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 0); 408 408 else 409 409 dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 1); ··· 845 845 struct i2c_adapter *tun_i2c; 846 846 s8 a; 847 847 int if1=1220; 848 - if (adap->dev->udev->descriptor.idVendor == USB_VID_HAUPPAUGE && 849 - adap->dev->udev->descriptor.idProduct == USB_PID_HAUPPAUGE_NOVA_T_STICK) { 848 + if (adap->dev->udev->descriptor.idVendor == cpu_to_le16(USB_VID_HAUPPAUGE) && 849 + adap->dev->udev->descriptor.idProduct == cpu_to_le16(USB_PID_HAUPPAUGE_NOVA_T_STICK)) { 850 850 if (!eeprom_read(prim_i2c,0x58,&a)) if1=1220+a; 851 851 } 852 852 if (st->is_dib7000pc) ··· 990 990 /* STK7070P */ 991 991 static int stk7070p_frontend_attach(struct dvb_usb_adapter *adap) 992 992 { 993 - if (adap->dev->udev->descriptor.idVendor == USB_VID_PINNACLE && 994 - adap->dev->udev->descriptor.idProduct == USB_PID_PINNACLE_PCTV72E) 995 - dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 0); 993 + struct usb_device_descriptor *p = &adap->dev->udev->descriptor; 994 + if (p->idVendor == cpu_to_le16(USB_VID_PINNACLE) && 995 + p->idProduct == cpu_to_le16(USB_PID_PINNACLE_PCTV72E)) 996 + dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 0); 996 997 else 997 - dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 1); 998 + dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 1); 998 999 msleep(10); 999 1000 dib0700_set_gpio(adap->dev, GPIO9, GPIO_OUT, 1); 1000 1001 dib0700_set_gpio(adap->dev, GPIO4, GPIO_OUT, 1);
+1 -1
drivers/media/dvb/dvb-usb/dvb-usb-firmware.c
··· 127 127 if ((*pos + hx->len + 4) >= fw->size) 128 128 return -EINVAL; 129 129 130 - hx->addr = le16_to_cpu( *((u16 *) &b[1]) ); 130 + hx->addr = b[1] | (b[2] << 8); 131 131 hx->type = b[3]; 132 132 133 133 if (hx->type == 0x04) {
+5 -5
drivers/media/dvb/dvb-usb/gp8psk.c
··· 146 146 if (gp_product_id == USB_PID_GENPIX_8PSK_REV_1_WARM) 147 147 if (! (status & bm8pskFW_Loaded)) /* BCM4500 firmware loaded */ 148 148 if(gp8psk_load_bcm4500fw(d)) 149 - return EINVAL; 149 + return -EINVAL; 150 150 151 151 if (! (status & bmIntersilOn)) /* LNB Power */ 152 152 if (gp8psk_usb_in_op(d, START_INTERSIL, 1, 0, 153 153 &buf, 1)) 154 - return EINVAL; 154 + return -EINVAL; 155 155 156 156 /* Set DVB mode to 1 */ 157 157 if (gp_product_id == USB_PID_GENPIX_8PSK_REV_1_WARM) 158 158 if (gp8psk_usb_out_op(d, SET_DVB_MODE, 1, 0, NULL, 0)) 159 - return EINVAL; 159 + return -EINVAL; 160 160 /* Abort possible TS (if previous tune crashed) */ 161 161 if (gp8psk_usb_out_op(d, ARM_TRANSFER, 0, 0, NULL, 0)) 162 - return EINVAL; 162 + return -EINVAL; 163 163 } else { 164 164 /* Turn off LNB power */ 165 165 if (gp8psk_usb_in_op(d, START_INTERSIL, 0, 0, &buf, 1)) 166 - return EINVAL; 166 + return -EINVAL; 167 167 /* Turn off 8psk power */ 168 168 if (gp8psk_usb_in_op(d, BOOT_8PSK, 0, 0, &buf, 1)) 169 169 return -EINVAL;
+4 -3
drivers/media/dvb/dvb-usb/m920x.c
··· 16 16 #include "qt1010.h" 17 17 #include "tda1004x.h" 18 18 #include "tda827x.h" 19 + #include <asm/unaligned.h> 19 20 20 21 /* debug */ 21 22 static int dvb_usb_m920x_debug; ··· 348 347 349 348 for (pass = 0; pass < 2; pass++) { 350 349 for (i = 0; i + (sizeof(u16) * 3) < fw->size;) { 351 - value = le16_to_cpu(*(u16 *)(fw->data + i)); 350 + value = get_unaligned_le16(fw->data + i); 352 351 i += sizeof(u16); 353 352 354 - index = le16_to_cpu(*(u16 *)(fw->data + i)); 353 + index = get_unaligned_le16(fw->data + i); 355 354 i += sizeof(u16); 356 355 357 - size = le16_to_cpu(*(u16 *)(fw->data + i)); 356 + size = get_unaligned_le16(fw->data + i); 358 357 i += sizeof(u16); 359 358 360 359 if (pass == 1) {
+14 -1
drivers/media/dvb/frontends/dib0070.h
··· 37 37 u8 flip_chip; 38 38 }; 39 39 40 - extern struct dvb_frontend * dib0070_attach(struct dvb_frontend *fe, struct i2c_adapter *i2c, struct dib0070_config *cfg); 40 + #if defined(CONFIG_DVB_TUNER_DIB0070) || (defined(CONFIG_DVB_TUNER_DIB0070_MODULE) && defined(MODULE)) 41 + extern struct dvb_frontend *dib0070_attach(struct dvb_frontend *fe, 42 + struct i2c_adapter *i2c, 43 + struct dib0070_config *cfg); 44 + #else 45 + static inline struct dvb_frontend *dib0070_attach(struct dvb_frontend *fe, 46 + struct i2c_adapter *i2c, 47 + struct dib0070_config *cfg) 48 + { 49 + printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__); 50 + return NULL; 51 + } 52 + #endif 53 + 41 54 extern void dib0070_ctrl_agc_filter(struct dvb_frontend *, uint8_t open); 42 55 extern u16 dib0070_wbd_offset(struct dvb_frontend *); 43 56
+14 -1
drivers/media/dvb/frontends/dib7000p.h
··· 37 37 38 38 #define DEFAULT_DIB7000P_I2C_ADDRESS 18 39 39 40 - extern struct dvb_frontend * dib7000p_attach(struct i2c_adapter *i2c_adap, u8 i2c_addr, struct dib7000p_config *cfg); 40 + #if defined(CONFIG_DVB_DIB7000P) || (defined(CONFIG_DVB_DIB7000P_MODULE) && defined(MODULE)) 41 + extern struct dvb_frontend *dib7000p_attach(struct i2c_adapter *i2c_adap, 42 + u8 i2c_addr, 43 + struct dib7000p_config *cfg); 44 + #else 45 + static inline struct dvb_frontend *dib7000p_attach(struct i2c_adapter *i2c_adap, 46 + u8 i2c_addr, 47 + struct dib7000p_config *cfg) 48 + { 49 + printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__); 50 + return NULL; 51 + } 52 + #endif 53 + 41 54 extern int dib7000p_i2c_enumeration(struct i2c_adapter *i2c, int no_of_demods, u8 default_addr, struct dib7000p_config cfg[]); 42 55 43 56 extern struct i2c_adapter * dib7000p_get_i2c_master(struct dvb_frontend *, enum dibx000_i2c_interface, int);
+3 -3
drivers/media/dvb/frontends/or51132.c
··· 126 126 reg, err); 127 127 return -EREMOTEIO; 128 128 } 129 - return le16_to_cpup((u16*)buf); 129 + return buf[0] | (buf[1] << 8); 130 130 } 131 131 132 132 static int or51132_load_firmware (struct dvb_frontend* fe, const struct firmware *fw) ··· 140 140 dprintk("Firmware is %Zd bytes\n",fw->size); 141 141 142 142 /* Get size of firmware A and B */ 143 - firmwareAsize = le32_to_cpu(*((u32*)fw->data)); 143 + firmwareAsize = le32_to_cpu(*((__le32*)fw->data)); 144 144 dprintk("FirmwareA is %i bytes\n",firmwareAsize); 145 - firmwareBsize = le32_to_cpu(*((u32*)(fw->data+4))); 145 + firmwareBsize = le32_to_cpu(*((__le32*)(fw->data+4))); 146 146 dprintk("FirmwareB is %i bytes\n",firmwareBsize); 147 147 148 148 /* Upload firmware */
+5 -4
drivers/media/dvb/ttpci/av7110.c
··· 51 51 #include <linux/crc32.h> 52 52 #include <linux/i2c.h> 53 53 #include <linux/kthread.h> 54 + #include <asm/unaligned.h> 54 55 55 56 #include <asm/system.h> 56 57 ··· 1462 1461 ptr += 4; 1463 1462 1464 1463 /* check dpram file */ 1465 - crc = ntohl(*(u32*) ptr); 1464 + crc = get_unaligned_be32(ptr); 1466 1465 ptr += 4; 1467 - len = ntohl(*(u32*) ptr); 1466 + len = get_unaligned_be32(ptr); 1468 1467 ptr += 4; 1469 1468 if (len >= 512) { 1470 1469 printk("dvb-ttpci: dpram file is way too big.\n"); ··· 1479 1478 ptr += len; 1480 1479 1481 1480 /* check root file */ 1482 - crc = ntohl(*(u32*) ptr); 1481 + crc = get_unaligned_be32(ptr); 1483 1482 ptr += 4; 1484 - len = ntohl(*(u32*) ptr); 1483 + len = get_unaligned_be32(ptr); 1485 1484 ptr += 4; 1486 1485 1487 1486 if (len <= 200000 || len >= 300000 ||
+27 -7
drivers/media/dvb/ttpci/av7110_av.c
··· 965 965 966 966 static int play_iframe(struct av7110 *av7110, char __user *buf, unsigned int len, int nonblock) 967 967 { 968 - int i, n; 968 + unsigned i, n; 969 969 int progressive = 0; 970 + int match = 0; 970 971 971 972 dprintk(2, "av7110:%p, \n", av7110); 972 973 ··· 976 975 return -EBUSY; 977 976 } 978 977 979 - for (i = 0; i < len - 5; i++) { 980 - /* get progressive flag from picture extension */ 981 - if (buf[i] == 0x00 && buf[i+1] == 0x00 && 982 - buf[i+2] == 0x01 && (unsigned char)buf[i+3] == 0xb5 && 983 - (buf[i+4] & 0xf0) == 0x10) 984 - progressive = buf[i+5] & 0x08; 978 + /* search in buf for instances of 00 00 01 b5 1? */ 979 + for (i = 0; i < len; i++) { 980 + unsigned char c; 981 + if (get_user(c, buf + i)) 982 + return -EFAULT; 983 + if (match == 5) { 984 + progressive = c & 0x08; 985 + match = 0; 986 + } 987 + if (c == 0x00) { 988 + match = (match == 1 || match == 2) ? 2 : 1; 989 + continue; 990 + } 991 + switch (match++) { 992 + case 2: if (c == 0x01) 993 + continue; 994 + break; 995 + case 3: if (c == 0xb5) 996 + continue; 997 + break; 998 + case 4: if ((c & 0xf0) == 0x10) 999 + continue; 1000 + break; 1001 + } 1002 + match = 0; 985 1003 } 986 1004 987 1005 /* setting n always > 1, fixes problems when playing stillframes
+1 -1
drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c
··· 552 552 u16 csum = 0, cc; 553 553 int i; 554 554 for (i = 0; i < len; i += 2) 555 - csum ^= le16_to_cpup((u16 *) (muxpack + i)); 555 + csum ^= le16_to_cpup((__le16 *) (muxpack + i)); 556 556 if (csum) { 557 557 printk("%s: muxpack with incorrect checksum, ignoring\n", 558 558 __func__);
+1 -1
drivers/media/dvb/ttusb-dec/Kconfig
··· 1 1 config DVB_TTUSB_DEC 2 2 tristate "Technotrend/Hauppauge USB DEC devices" 3 - depends on DVB_CORE && USB 3 + depends on DVB_CORE && USB && INPUT 4 4 depends on HOTPLUG # due to FW_LOADER 5 5 select FW_LOADER 6 6 select CRC32
+13 -12
drivers/media/dvb/ttusb-dec/ttusb_dec.c
··· 343 343 u8 c[COMMAND_PACKET_SIZE]; 344 344 int c_length; 345 345 int result; 346 - unsigned int tmp; 346 + __be32 tmp; 347 347 348 348 dprintk("%s\n", __func__); 349 349 ··· 398 398 0x00, 0x00, 0xff, 0xff, 399 399 0xff, 0xff, 0xff, 0xff }; 400 400 401 - u16 pcr = htons(dec->pid[DMX_PES_PCR]); 402 - u16 audio = htons(dec->pid[DMX_PES_AUDIO]); 403 - u16 video = htons(dec->pid[DMX_PES_VIDEO]); 401 + __be16 pcr = htons(dec->pid[DMX_PES_PCR]); 402 + __be16 audio = htons(dec->pid[DMX_PES_AUDIO]); 403 + __be16 video = htons(dec->pid[DMX_PES_VIDEO]); 404 404 405 405 dprintk("%s\n", __func__); 406 406 ··· 435 435 case 0x01: { /* VideoStream */ 436 436 int prebytes = pva[5] & 0x03; 437 437 int postbytes = (pva[5] & 0x0c) >> 2; 438 - u16 v_pes_payload_length; 438 + __be16 v_pes_payload_length; 439 439 440 440 if (output_pva) { 441 441 dec->video_filter->feed->cb.ts(pva, length, NULL, 0, ··· 1006 1006 0x00, 0x00, 0x00, 0x00, 1007 1007 0x00, 0x00, 0x00, 0x00, 1008 1008 0x00 }; 1009 - u16 pid; 1009 + __be16 pid; 1010 1010 u8 c[COMMAND_PACKET_SIZE]; 1011 1011 int c_length; 1012 1012 int result; ··· 1278 1278 u8 *firmware = NULL; 1279 1279 size_t firmware_size = 0; 1280 1280 u16 firmware_csum = 0; 1281 - u16 firmware_csum_ns; 1282 - u32 firmware_size_nl; 1283 - u32 crc32_csum, crc32_check, tmp; 1281 + __be16 firmware_csum_ns; 1282 + __be32 firmware_size_nl; 1283 + u32 crc32_csum, crc32_check; 1284 + __be32 tmp; 1284 1285 const struct firmware *fw_entry = NULL; 1285 1286 1286 1287 dprintk("%s\n", __func__); ··· 1307 1306 valid. */ 1308 1307 crc32_csum = crc32(~0L, firmware, 56) ^ ~0L; 1309 1308 memcpy(&tmp, &firmware[56], 4); 1310 - crc32_check = htonl(tmp); 1309 + crc32_check = ntohl(tmp); 1311 1310 if (crc32_csum != crc32_check) { 1312 1311 printk("%s: crc32 check of DSP code failed (calculated " 1313 1312 "0x%08x != 0x%08x in file), file invalid.\n", ··· 1628 1627 1629 1628 usb_set_intfdata(intf, (void *)dec); 1630 1629 1631 - switch (le16_to_cpu(id->idProduct)) { 1630 + switch (id->idProduct) { 1632 1631 case 0x1006: 1633 1632 ttusb_dec_set_model(dec, TTUSB_DEC3000S); 1634 1633 break; ··· 1653 1652 ttusb_dec_init_dvb(dec); 1654 1653 1655 1654 dec->adapter.priv = dec; 1656 - switch (le16_to_cpu(id->idProduct)) { 1655 + switch (id->idProduct) { 1657 1656 case 0x1006: 1658 1657 dec->fe = ttusbdecfe_dvbs_attach(&fe_config); 1659 1658 break;
+5 -5
drivers/media/dvb/ttusb-dec/ttusbdecfe.c
··· 86 86 0x00, 0x00, 0x00, 0xff, 87 87 0x00, 0x00, 0x00, 0xff }; 88 88 89 - u32 freq = htonl(p->frequency / 1000); 89 + __be32 freq = htonl(p->frequency / 1000); 90 90 memcpy(&b[4], &freq, sizeof (u32)); 91 91 state->config->send_command(fe, 0x71, sizeof(b), b, NULL, NULL); 92 92 ··· 117 117 0x00, 0x00, 0x00, 0x00, 118 118 0x00, 0x00, 0x00, 0x00, 119 119 0x00, 0x00, 0x00, 0x00 }; 120 - u32 freq; 121 - u32 sym_rate; 122 - u32 band; 123 - u32 lnb_voltage; 120 + __be32 freq; 121 + __be32 sym_rate; 122 + __be32 band; 123 + __be32 lnb_voltage; 124 124 125 125 freq = htonl(p->frequency + 126 126 (state->hi_band ? LOF_HI : LOF_LO));
+1 -1
drivers/media/video/au0828/Kconfig
··· 1 1 2 2 config VIDEO_AU0828 3 3 tristate "Auvitek AU0828 support" 4 - depends on VIDEO_DEV && I2C && INPUT && DVB_CORE && USB 4 + depends on I2C && INPUT && DVB_CORE && USB 5 5 select I2C_ALGOBIT 6 6 select VIDEO_TVEEPROM 7 7 select DVB_AU8522 if !DVB_FE_CUSTOMIZE
-6
drivers/media/video/au0828/au0828-dvb.c
··· 353 353 return -1; 354 354 } 355 355 356 - /* Put the analog decoder in standby to keep it quiet */ 357 - au0828_call_i2c_clients(dev, TUNER_SET_STANDBY, NULL); 358 - 359 - if (dvb->frontend->ops.analog_ops.standby) 360 - dvb->frontend->ops.analog_ops.standby(dvb->frontend); 361 - 362 356 /* register everything */ 363 357 ret = dvb_register(dev); 364 358 if (ret < 0) {
+3 -2
drivers/media/video/bt8xx/bttv-cards.c
··· 34 34 #include <linux/firmware.h> 35 35 #include <net/checksum.h> 36 36 37 + #include <asm/unaligned.h> 37 38 #include <asm/io.h> 38 39 39 40 #include "bttvp.h" ··· 3859 3858 ee += i; 3860 3859 3861 3860 /* found a valid descriptor */ 3862 - type = be16_to_cpup((u16*)(ee+4)); 3861 + type = get_unaligned_be16((__be16 *)(ee+4)); 3863 3862 3864 3863 switch(type) { 3865 3864 /* 848 based */ ··· 3919 3918 btv->c.nr, type); 3920 3919 break; 3921 3920 } 3922 - serial = be32_to_cpup((u32*)(ee+6)); 3921 + serial = get_unaligned_be32((__be32 *)(ee+6)); 3923 3922 } 3924 3923 3925 3924 printk(KERN_INFO "bttv%d: osprey eeprom: card=%d '%s' serial=%u\n",
+5 -3
drivers/media/video/bt8xx/bttv-risc.c
··· 48 48 { 49 49 u32 instructions,line,todo; 50 50 struct scatterlist *sg; 51 - u32 *rp; 51 + __le32 *rp; 52 52 int rc; 53 53 54 54 /* estimate risc mem: worst case is one write per page border + ··· 128 128 unsigned int cpadding) 129 129 { 130 130 unsigned int instructions,line,todo,ylen,chroma; 131 - u32 *rp,ri; 131 + __le32 *rp; 132 + u32 ri; 132 133 struct scatterlist *ysg; 133 134 struct scatterlist *usg; 134 135 struct scatterlist *vsg; ··· 245 244 { 246 245 int dwords,rc,line,maxy,start,end,skip,nskips; 247 246 struct btcx_skiplist *skips; 248 - u32 *rp,ri,ra; 247 + __le32 *rp; 248 + u32 ri,ra; 249 249 u32 addr; 250 250 251 251 /* skip list for window clipping */
+1 -1
drivers/media/video/btcx-risc.c
··· 63 63 struct btcx_riscmem *risc, 64 64 unsigned int size) 65 65 { 66 - u32 *cpu; 66 + __le32 *cpu; 67 67 dma_addr_t dma; 68 68 69 69 if (NULL != risc->cpu && risc->size < size)
+2 -2
drivers/media/video/btcx-risc.h
··· 2 2 */ 3 3 struct btcx_riscmem { 4 4 unsigned int size; 5 - u32 *cpu; 6 - u32 *jmp; 5 + __le32 *cpu; 6 + __le32 *jmp; 7 7 dma_addr_t dma; 8 8 }; 9 9
+45 -36
drivers/media/video/cx18/cx18-av-core.c
··· 182 182 if (std == V4L2_STD_NTSC_M_JP) { 183 183 /* Japan uses EIAJ audio standard */ 184 184 cx18_av_write(cx, 0x808, 0xf7); 185 + cx18_av_write(cx, 0x80b, 0x02); 185 186 } else if (std == V4L2_STD_NTSC_M_KR) { 186 187 /* South Korea uses A2 audio standard */ 187 188 cx18_av_write(cx, 0x808, 0xf8); 189 + cx18_av_write(cx, 0x80b, 0x03); 188 190 } else { 189 191 /* Others use the BTSC audio standard */ 190 192 cx18_av_write(cx, 0x808, 0xf6); 193 + cx18_av_write(cx, 0x80b, 0x01); 191 194 } 192 - cx18_av_write(cx, 0x80b, 0x00); 193 195 } else if (std & V4L2_STD_PAL) { 194 196 /* Follow tuner change procedure for PAL */ 195 197 cx18_av_write(cx, 0x808, 0xff); ··· 743 741 { 744 742 struct cx18_av_state *state = &cx->av_state; 745 743 u8 download_ctl = cx18_av_read(cx, 0x803); 746 - u8 mod_det_stat0 = cx18_av_read(cx, 0x805); 747 - u8 mod_det_stat1 = cx18_av_read(cx, 0x804); 744 + u8 mod_det_stat0 = cx18_av_read(cx, 0x804); 745 + u8 mod_det_stat1 = cx18_av_read(cx, 0x805); 748 746 u8 audio_config = cx18_av_read(cx, 0x808); 749 747 u8 pref_mode = cx18_av_read(cx, 0x809); 750 748 u8 afc0 = cx18_av_read(cx, 0x80b); ··· 762 760 case 0x12: p = "dual with SAP"; break; 763 761 case 0x14: p = "tri with SAP"; break; 764 762 case 0xfe: p = "forced mode"; break; 765 - default: p = "not defined"; 763 + default: p = "not defined"; break; 766 764 } 767 765 CX18_INFO("Detected audio mode: %s\n", p); 768 766 769 767 switch (mod_det_stat1) { 770 - case 0x00: p = "BTSC"; break; 768 + case 0x00: p = "not defined"; break; 771 769 case 0x01: p = "EIAJ"; break; 772 770 case 0x02: p = "A2-M"; break; 773 771 case 0x03: p = "A2-BG"; break; ··· 781 779 case 0x0b: p = "NICAM-I"; break; 782 780 case 0x0c: p = "NICAM-L"; break; 783 781 case 0x0d: p = "BTSC/EIAJ/A2-M Mono (4.5 MHz FMMono)"; break; 782 + case 0x0e: p = "IF FM Radio"; break; 783 + case 0x0f: p = "BTSC"; break; 784 + case 0x10: p = "detected chrominance"; break; 785 + case 0xfd: p = "unknown audio standard"; break; 786 + case 0xfe: p = "forced audio standard"; break; 784 787 case 0xff: p = "no detected audio standard"; break; 785 - default: p = "not defined"; 788 + default: p = "not defined"; break; 786 789 } 787 790 CX18_INFO("Detected audio standard: %s\n", p); 788 791 CX18_INFO("Audio muted: %s\n", ··· 796 789 (download_ctl & 0x10) ? "running" : "stopped"); 797 790 798 791 switch (audio_config >> 4) { 799 - case 0x00: p = "BTSC"; break; 800 - case 0x01: p = "EIAJ"; break; 801 - case 0x02: p = "A2-M"; break; 802 - case 0x03: p = "A2-BG"; break; 803 - case 0x04: p = "A2-DK1"; break; 804 - case 0x05: p = "A2-DK2"; break; 805 - case 0x06: p = "A2-DK3"; break; 806 - case 0x07: p = "A1 (6.0 MHz FM Mono)"; break; 807 - case 0x08: p = "AM-L"; break; 808 - case 0x09: p = "NICAM-BG"; break; 809 - case 0x0a: p = "NICAM-DK"; break; 810 - case 0x0b: p = "NICAM-I"; break; 811 - case 0x0c: p = "NICAM-L"; break; 812 - case 0x0d: p = "FM radio"; break; 792 + case 0x00: p = "undefined"; break; 793 + case 0x01: p = "BTSC"; break; 794 + case 0x02: p = "EIAJ"; break; 795 + case 0x03: p = "A2-M"; break; 796 + case 0x04: p = "A2-BG"; break; 797 + case 0x05: p = "A2-DK1"; break; 798 + case 0x06: p = "A2-DK2"; break; 799 + case 0x07: p = "A2-DK3"; break; 800 + case 0x08: p = "A1 (6.0 MHz FM Mono)"; break; 801 + case 0x09: p = "AM-L"; break; 802 + case 0x0a: p = "NICAM-BG"; break; 803 + case 0x0b: p = "NICAM-DK"; break; 804 + case 0x0c: p = "NICAM-I"; break; 805 + case 0x0d: p = "NICAM-L"; break; 806 + case 0x0e: p = "FM radio"; break; 813 807 case 0x0f: p = "automatic detection"; break; 814 - default: p = "undefined"; 808 + default: p = "undefined"; break; 815 809 } 816 810 CX18_INFO("Configured audio standard: %s\n", p); 817 811 ··· 823 815 case 0x02: p = "MONO3 (STEREO forced MONO)"; break; 824 816 case 0x03: p = "MONO4 (NICAM ANALOG-Language C/Analog Fallback)"; break; 825 817 case 0x04: p = "STEREO"; break; 826 - case 0x05: p = "DUAL1 (AB)"; break; 827 - case 0x06: p = "DUAL2 (AC) (FM)"; break; 828 - case 0x07: p = "DUAL3 (BC) (FM)"; break; 829 - case 0x08: p = "DUAL4 (AC) (AM)"; break; 830 - case 0x09: p = "DUAL5 (BC) (AM)"; break; 831 - case 0x0a: p = "SAP"; break; 818 + case 0x05: p = "DUAL1 (AC)"; break; 819 + case 0x06: p = "DUAL2 (BC)"; break; 820 + case 0x07: p = "DUAL3 (AB)"; break; 832 821 default: p = "undefined"; 833 822 } 834 823 CX18_INFO("Configured audio mode: %s\n", p); ··· 840 835 case 0x06: p = "BTSC"; break; 841 836 case 0x07: p = "EIAJ"; break; 842 837 case 0x08: p = "A2-M"; break; 843 - case 0x09: p = "FM Radio"; break; 838 + case 0x09: p = "FM Radio (4.5 MHz)"; break; 839 + case 0x0a: p = "FM Radio (5.5 MHz)"; break; 840 + case 0x0b: p = "S-Video"; break; 844 841 case 0x0f: p = "automatic standard and mode detection"; break; 845 - default: p = "undefined"; 842 + default: p = "undefined"; break; 846 843 } 847 844 CX18_INFO("Configured audio system: %s\n", p); 848 845 } ··· 864 857 case 5: p = "language AC"; break; 865 858 case 6: p = "language BC"; break; 866 859 case 7: p = "language AB"; break; 867 - default: p = "undefined"; 860 + default: p = "undefined"; break; 868 861 } 869 862 CX18_INFO("Preferred audio mode: %s\n", p); 870 863 871 864 if ((audio_config & 0xf) == 0xf) { 872 - switch ((afc0 >> 2) & 0x1) { 865 + switch ((afc0 >> 3) & 0x1) { 873 866 case 0: p = "system DK"; break; 874 867 case 1: p = "system L"; break; 875 868 } 876 869 CX18_INFO("Selected 65 MHz format: %s\n", p); 877 870 878 - switch (afc0 & 0x3) { 879 - case 0: p = "BTSC"; break; 880 - case 1: p = "EIAJ"; break; 881 - case 2: p = "A2-M"; break; 882 - default: p = "undefined"; 871 + switch (afc0 & 0x7) { 872 + case 0: p = "Chroma"; break; 873 + case 1: p = "BTSC"; break; 874 + case 2: p = "EIAJ"; break; 875 + case 3: p = "A2-M"; break; 876 + case 4: p = "autodetect"; break; 877 + default: p = "undefined"; break; 883 878 } 884 879 CX18_INFO("Selected 45 MHz format: %s\n", p); 885 880 }
+2 -2
drivers/media/video/cx18/cx18-cards.c
··· 126 126 127 127 /* ------------------------------------------------------------------------- */ 128 128 129 - /* Compro VideoMate H900: not working at the moment! */ 129 + /* Compro VideoMate H900: note that this card is analog only! */ 130 130 131 131 static const struct cx18_card_pci_info cx18_pci_h900[] = { 132 132 { PCI_DEVICE_ID_CX23418, CX18_PCI_ID_COMPRO, 0xe100 }, ··· 136 136 static const struct cx18_card cx18_card_h900 = { 137 137 .type = CX18_CARD_COMPRO_H900, 138 138 .name = "Compro VideoMate H900", 139 - .comment = "DVB & VBI are not yet supported\n", 139 + .comment = "VBI is not yet supported\n", 140 140 .v4l2_capabilities = CX18_CAP_ENCODER, 141 141 .hw_audio_ctrl = CX18_HW_CX23418, 142 142 .hw_all = CX18_HW_TUNER,
+3 -3
drivers/media/video/cx18/cx18-controls.c
··· 159 159 { 160 160 if (!(cx->v4l2_cap & V4L2_CAP_SLICED_VBI_CAPTURE)) 161 161 return -EINVAL; 162 - if (atomic_read(&cx->capturing) > 0) 162 + if (atomic_read(&cx->ana_capturing) > 0) 163 163 return -EBUSY; 164 164 165 165 /* First try to allocate sliced VBI buffers if needed. */ ··· 235 235 CX18_DEBUG_IOCTL("VIDIOC_S_EXT_CTRLS\n"); 236 236 if (c->ctrl_class == V4L2_CTRL_CLASS_MPEG) { 237 237 struct cx2341x_mpeg_params p = cx->params; 238 - int err = cx2341x_ext_ctrls(&p, atomic_read(&cx->capturing), arg, cmd); 238 + int err = cx2341x_ext_ctrls(&p, atomic_read(&cx->ana_capturing), arg, cmd); 239 239 240 240 if (err) 241 241 return err; ··· 295 295 CX18_DEBUG_IOCTL("VIDIOC_TRY_EXT_CTRLS\n"); 296 296 if (c->ctrl_class == V4L2_CTRL_CLASS_MPEG) 297 297 return cx2341x_ext_ctrls(&cx->params, 298 - atomic_read(&cx->capturing), arg, cmd); 298 + atomic_read(&cx->ana_capturing), arg, cmd); 299 299 return -EINVAL; 300 300 } 301 301
+12 -14
drivers/media/video/cx18/cx18-driver.c
··· 670 670 cx18_init_power(cx, 1); 671 671 cx18_init_memory(cx); 672 672 673 - cx->scb = (struct cx18_scb *)(cx->enc_mem + SCB_OFFSET); 673 + cx->scb = (struct cx18_scb __iomem *)(cx->enc_mem + SCB_OFFSET); 674 674 cx18_init_scb(cx); 675 675 676 676 cx18_gpio_init(cx); ··· 751 751 if (cx->options.radio > 0) 752 752 cx->v4l2_cap |= V4L2_CAP_RADIO; 753 753 754 - retval = cx18_streams_setup(cx); 755 - if (retval) { 756 - CX18_ERR("Error %d setting up streams\n", retval); 757 - goto free_irq; 758 - } 759 - retval = cx18_streams_register(cx); 760 - if (retval) { 761 - CX18_ERR("Error %d registering devices\n", retval); 762 - goto free_streams; 763 - } 764 - 765 754 if (cx->options.tuner > -1) { 766 755 struct tuner_setup setup; 767 756 ··· 777 788 are not. */ 778 789 cx->tuner_std = cx->std; 779 790 780 - cx18_init_on_first_open(cx); 791 + retval = cx18_streams_setup(cx); 792 + if (retval) { 793 + CX18_ERR("Error %d setting up streams\n", retval); 794 + goto free_irq; 795 + } 796 + retval = cx18_streams_register(cx); 797 + if (retval) { 798 + CX18_ERR("Error %d registering devices\n", retval); 799 + goto free_streams; 800 + } 781 801 782 802 CX18_INFO("Initialized card #%d: %s\n", cx->num, cx->card_name); 783 803 ··· 887 889 888 890 /* Stop all captures */ 889 891 CX18_DEBUG_INFO("Stopping all streams\n"); 890 - if (atomic_read(&cx->capturing) > 0) 892 + if (atomic_read(&cx->tot_capturing) > 0) 891 893 cx18_stop_all_captures(cx); 892 894 893 895 /* Interrupts */
+7 -2
drivers/media/video/cx18/cx18-driver.h
··· 358 358 u32 v4l2_cap; /* V4L2 capabilities of card */ 359 359 u32 hw_flags; /* Hardware description of the board */ 360 360 unsigned mdl_offset; 361 - struct cx18_scb *scb; /* pointer to SCB */ 361 + struct cx18_scb __iomem *scb; /* pointer to SCB */ 362 362 363 363 struct cx18_av_state av_state; 364 364 ··· 380 380 int stream_buf_size[CX18_MAX_STREAMS]; /* Stream buffer size */ 381 381 struct cx18_stream streams[CX18_MAX_STREAMS]; /* Stream data */ 382 382 unsigned long i_flags; /* global cx18 flags */ 383 - atomic_t capturing; /* count number of active capture streams */ 383 + atomic_t ana_capturing; /* count number of active analog capture streams */ 384 + atomic_t tot_capturing; /* total count number of active capture streams */ 384 385 spinlock_t lock; /* lock access to this struct */ 385 386 int search_pack_header; 386 387 ··· 423 422 struct i2c_client i2c_client[2]; 424 423 struct mutex i2c_bus_lock[2]; 425 424 struct i2c_client *i2c_clients[I2C_CLIENTS_MAX]; 425 + 426 + /* gpio */ 427 + u32 gpio_dir; 428 + u32 gpio_val; 426 429 427 430 /* v4l2 and User settings */ 428 431
+7 -6
drivers/media/video/cx18/cx18-fileops.c
··· 318 318 size_t tot_written = 0; 319 319 int single_frame = 0; 320 320 321 - if (atomic_read(&cx->capturing) == 0 && s->id == -1) { 321 + if (atomic_read(&cx->ana_capturing) == 0 && s->id == -1) { 322 322 /* shouldn't happen */ 323 323 CX18_DEBUG_WARN("Stream %s not initialized before read\n", 324 324 s->name); ··· 361 361 cx18_enqueue(s, buf, &s->q_free); 362 362 cx18_vapi(cx, CX18_CPU_DE_SET_MDL, 5, 363 363 s->handle, 364 - (void *)&cx->scb->cpu_mdl[buf->id] - cx->enc_mem, 364 + (void __iomem *)&cx->scb->cpu_mdl[buf->id] - 365 + cx->enc_mem, 365 366 1, buf->id, s->buf_size); 366 367 } else 367 368 cx18_enqueue(s, buf, &s->q_io); ··· 582 581 cx18_call_i2c_clients(cx, VIDIOC_S_STD, &cx->std); 583 582 /* Select correct audio input (i.e. TV tuner or Line in) */ 584 583 cx18_audio_set_io(cx); 585 - if (atomic_read(&cx->capturing) > 0) { 584 + if (atomic_read(&cx->ana_capturing) > 0) { 586 585 /* Undo video mute */ 587 586 cx18_vapi(cx, CX18_CPU_SET_VIDEO_MUTE, 2, s->handle, 588 587 cx->params.video_mute | ··· 628 627 } 629 628 630 629 if (!test_bit(CX18_F_I_RADIO_USER, &cx->i_flags)) { 631 - if (atomic_read(&cx->capturing) > 0) { 630 + if (atomic_read(&cx->ana_capturing) > 0) { 632 631 /* switching to radio while capture is 633 632 in progress is not polite */ 634 633 cx18_release_stream(s); ··· 695 694 696 695 void cx18_mute(struct cx18 *cx) 697 696 { 698 - if (atomic_read(&cx->capturing)) 697 + if (atomic_read(&cx->ana_capturing)) 699 698 cx18_vapi(cx, CX18_CPU_SET_AUDIO_MUTE, 2, 700 699 cx18_find_handle(cx), 1); 701 700 CX18_DEBUG_INFO("Mute\n"); ··· 703 702 704 703 void cx18_unmute(struct cx18 *cx) 705 704 { 706 - if (atomic_read(&cx->capturing)) { 705 + if (atomic_read(&cx->ana_capturing)) { 707 706 cx18_msleep_timeout(100, 0); 708 707 cx18_vapi(cx, CX18_CPU_SET_MISC_PARAMETERS, 2, 709 708 cx18_find_handle(cx), 12);
+17 -16
drivers/media/video/cx18/cx18-gpio.c
··· 35 35 #define CX18_REG_GPIO_OUT2 0xc78104 36 36 #define CX18_REG_GPIO_DIR2 0xc7810c 37 37 38 - static u32 gpio_dir; 39 - static u32 gpio_val; 40 - 41 38 /* 42 39 * HVR-1600 GPIO pins, courtesy of Hauppauge: 43 40 * ··· 46 49 47 50 static void gpio_write(struct cx18 *cx) 48 51 { 49 - write_reg((gpio_dir & 0xffff) << 16, CX18_REG_GPIO_DIR1); 50 - write_reg(((gpio_dir & 0xffff) << 16) | (gpio_val & 0xffff), 52 + u32 dir = cx->gpio_dir; 53 + u32 val = cx->gpio_val; 54 + 55 + write_reg((dir & 0xffff) << 16, CX18_REG_GPIO_DIR1); 56 + write_reg(((dir & 0xffff) << 16) | (val & 0xffff), 51 57 CX18_REG_GPIO_OUT1); 52 - write_reg(gpio_dir & 0xffff0000, CX18_REG_GPIO_DIR2); 53 - write_reg((gpio_dir & 0xffff0000) | ((gpio_val & 0xffff0000) >> 16), 58 + write_reg(dir & 0xffff0000, CX18_REG_GPIO_DIR2); 59 + write_reg((dir & 0xffff0000) | ((val & 0xffff0000) >> 16), 54 60 CX18_REG_GPIO_OUT2); 55 61 } 56 62 57 63 void cx18_gpio_init(struct cx18 *cx) 58 64 { 59 - gpio_dir = cx->card->gpio_init.direction; 60 - gpio_val = cx->card->gpio_init.initial_value; 65 + cx->gpio_dir = cx->card->gpio_init.direction; 66 + cx->gpio_val = cx->card->gpio_init.initial_value; 61 67 62 - if (gpio_dir == 0) 68 + if (cx->card->tuners[0].tuner == TUNER_XC2028) { 69 + cx->gpio_dir |= 1 << cx->card->xceive_pin; 70 + cx->gpio_val |= 1 << cx->card->xceive_pin; 71 + } 72 + 73 + if (cx->gpio_dir == 0) 63 74 return; 64 - 65 - gpio_dir |= 1 << cx->card->xceive_pin; 66 - gpio_val |= 1 << cx->card->xceive_pin; 67 75 68 76 CX18_DEBUG_INFO("GPIO initial dir: %08x/%08x out: %08x/%08x\n", 69 77 read_reg(CX18_REG_GPIO_DIR1), read_reg(CX18_REG_GPIO_DIR2), ··· 88 86 return 0; 89 87 CX18_DEBUG_INFO("Resetting tuner\n"); 90 88 91 - gpio_dir |= 1 << cx->card->xceive_pin; 92 - gpio_val &= ~(1 << cx->card->xceive_pin); 89 + cx->gpio_val &= ~(1 << cx->card->xceive_pin); 93 90 94 91 gpio_write(cx); 95 92 schedule_timeout_interruptible(msecs_to_jiffies(1)); 96 93 97 - gpio_val |= 1 << cx->card->xceive_pin; 94 + cx->gpio_val |= 1 << cx->card->xceive_pin; 98 95 gpio_write(cx); 99 96 schedule_timeout_interruptible(msecs_to_jiffies(1)); 100 97 return 0;
+6 -6
drivers/media/video/cx18/cx18-ioctl.c
··· 247 247 248 248 if (!set_fmt || (cx->params.width == w && cx->params.height == h)) 249 249 return 0; 250 - if (atomic_read(&cx->capturing) > 0) 250 + if (atomic_read(&cx->ana_capturing) > 0) 251 251 return -EBUSY; 252 252 253 253 cx->params.width = w; ··· 264 264 if (fmt->type == V4L2_BUF_TYPE_VBI_CAPTURE) { 265 265 if (set_fmt && streamtype == CX18_ENC_STREAM_TYPE_VBI && 266 266 cx->vbi.sliced_in->service_set && 267 - atomic_read(&cx->capturing) > 0) 267 + atomic_read(&cx->ana_capturing) > 0) 268 268 return -EBUSY; 269 269 if (set_fmt) { 270 270 cx->vbi.sliced_in->service_set = 0; ··· 293 293 return 0; 294 294 if (set == 0) 295 295 return -EINVAL; 296 - if (atomic_read(&cx->capturing) > 0 && cx->vbi.sliced_in->service_set == 0) 296 + if (atomic_read(&cx->ana_capturing) > 0 && cx->vbi.sliced_in->service_set == 0) 297 297 return -EBUSY; 298 298 cx18_av_cmd(cx, VIDIOC_S_FMT, fmt); 299 299 memcpy(cx->vbi.sliced_in, vbifmt, sizeof(*cx->vbi.sliced_in)); ··· 581 581 break; 582 582 583 583 if (test_bit(CX18_F_I_RADIO_USER, &cx->i_flags) || 584 - atomic_read(&cx->capturing) > 0) { 584 + atomic_read(&cx->ana_capturing) > 0) { 585 585 /* Switching standard would turn off the radio or mess 586 586 with already running streams, prevent that by 587 587 returning EBUSY. */ ··· 677 677 enc->flags = 0; 678 678 if (try) 679 679 return 0; 680 - if (!atomic_read(&cx->capturing)) 680 + if (!atomic_read(&cx->ana_capturing)) 681 681 return -EPERM; 682 682 if (test_and_set_bit(CX18_F_I_ENC_PAUSED, &cx->i_flags)) 683 683 return 0; ··· 689 689 enc->flags = 0; 690 690 if (try) 691 691 return 0; 692 - if (!atomic_read(&cx->capturing)) 692 + if (!atomic_read(&cx->ana_capturing)) 693 693 return -EPERM; 694 694 if (!test_and_clear_bit(CX18_F_I_ENC_PAUSED, &cx->i_flags)) 695 695 return 0;
+7 -5
drivers/media/video/cx18/cx18-irq.c
··· 75 75 76 76 cx18_buf_sync_for_device(s, buf); 77 77 cx18_vapi(cx, CX18_CPU_DE_SET_MDL, 5, s->handle, 78 - (void *)&cx->scb->cpu_mdl[buf->id] - cx->enc_mem, 78 + (void __iomem *)&cx->scb->cpu_mdl[buf->id] - cx->enc_mem, 79 79 1, buf->id, s->buf_size); 80 80 } else 81 81 set_bit(CX18_F_B_NEED_BUF_SWAP, &buf->b_flags); ··· 161 161 */ 162 162 163 163 if (sw2) { 164 - if (sw2 & (cx->scb->cpu2hpu_irq_ack | cx->scb->cpu2epu_irq_ack)) 164 + if (sw2 & (readl(&cx->scb->cpu2hpu_irq_ack) | 165 + readl(&cx->scb->cpu2epu_irq_ack))) 165 166 wake_up(&cx->mb_cpu_waitq); 166 - if (sw2 & (cx->scb->apu2hpu_irq_ack | cx->scb->apu2epu_irq_ack)) 167 + if (sw2 & (readl(&cx->scb->apu2hpu_irq_ack) | 168 + readl(&cx->scb->apu2epu_irq_ack))) 167 169 wake_up(&cx->mb_apu_waitq); 168 - if (sw2 & cx->scb->epu2hpu_irq_ack) 170 + if (sw2 & readl(&cx->scb->epu2hpu_irq_ack)) 169 171 wake_up(&cx->mb_epu_waitq); 170 - if (sw2 & cx->scb->hpu2epu_irq_ack) 172 + if (sw2 & readl(&cx->scb->hpu2epu_irq_ack)) 171 173 wake_up(&cx->mb_hpu_waitq); 172 174 } 173 175
+4 -4
drivers/media/video/cx18/cx18-mailbox.c
··· 94 94 return NULL; 95 95 } 96 96 97 - static struct cx18_mailbox *cx18_mb_is_complete(struct cx18 *cx, int rpu, 97 + static struct cx18_mailbox __iomem *cx18_mb_is_complete(struct cx18 *cx, int rpu, 98 98 u32 *state, u32 *irq, u32 *req) 99 99 { 100 - struct cx18_mailbox *mb = NULL; 100 + struct cx18_mailbox __iomem *mb = NULL; 101 101 int wait_count = 0; 102 102 u32 ack; 103 103 ··· 142 142 long cx18_mb_ack(struct cx18 *cx, const struct cx18_mailbox *mb) 143 143 { 144 144 const struct cx18_api_info *info = find_api_info(mb->cmd); 145 - struct cx18_mailbox *ack_mb; 145 + struct cx18_mailbox __iomem *ack_mb; 146 146 u32 ack_irq; 147 147 u8 rpu = CPU; 148 148 ··· 182 182 { 183 183 const struct cx18_api_info *info = find_api_info(cmd); 184 184 u32 state = 0, irq = 0, req, oldreq, err; 185 - struct cx18_mailbox *mb; 185 + struct cx18_mailbox __iomem *mb; 186 186 wait_queue_head_t *waitq; 187 187 int timeout = 100; 188 188 int cnt = 0;
+21 -16
drivers/media/video/cx18/cx18-streams.c
··· 36 36 #define CX18_DSP0_INTERRUPT_MASK 0xd0004C 37 37 38 38 static struct file_operations cx18_v4l2_enc_fops = { 39 - .owner = THIS_MODULE, 40 - .read = cx18_v4l2_read, 41 - .open = cx18_v4l2_open, 42 - .ioctl = cx18_v4l2_ioctl, 43 - .release = cx18_v4l2_close, 44 - .poll = cx18_v4l2_enc_poll, 39 + .owner = THIS_MODULE, 40 + .read = cx18_v4l2_read, 41 + .open = cx18_v4l2_open, 42 + .ioctl = cx18_v4l2_ioctl, 43 + .compat_ioctl = v4l_compat_ioctl32, 44 + .release = cx18_v4l2_close, 45 + .poll = cx18_v4l2_enc_poll, 45 46 }; 46 47 47 48 /* offset from 0 to register ts v4l2 minors on */ ··· 444 443 s->handle = data[0]; 445 444 cx18_vapi(cx, CX18_CPU_SET_CHANNEL_TYPE, 2, s->handle, captype); 446 445 447 - if (atomic_read(&cx->capturing) == 0 && !ts) { 446 + if (atomic_read(&cx->ana_capturing) == 0 && !ts) { 448 447 /* Stuff from Windows, we don't know what it is */ 449 448 cx18_vapi(cx, CX18_CPU_SET_VER_CROP_LINE, 2, s->handle, 0); 450 449 cx18_vapi(cx, CX18_CPU_SET_MISC_PARAMETERS, 3, s->handle, 3, 1); ··· 467 466 cx2341x_update(cx, cx18_api_func, NULL, &cx->params); 468 467 } 469 468 470 - if (atomic_read(&cx->capturing) == 0) { 469 + if (atomic_read(&cx->tot_capturing) == 0) { 471 470 clear_bit(CX18_F_I_EOS, &cx->i_flags); 472 471 write_reg(7, CX18_DSP0_INTERRUPT_MASK); 473 472 } 474 473 475 474 cx18_vapi(cx, CX18_CPU_DE_SET_MDL_ACK, 3, s->handle, 476 - (void *)&cx->scb->cpu_mdl_ack[s->type][0] - cx->enc_mem, 477 - (void *)&cx->scb->cpu_mdl_ack[s->type][1] - cx->enc_mem); 475 + (void __iomem *)&cx->scb->cpu_mdl_ack[s->type][0] - cx->enc_mem, 476 + (void __iomem *)&cx->scb->cpu_mdl_ack[s->type][1] - cx->enc_mem); 478 477 479 478 list_for_each(p, &s->q_free.list) { 480 479 struct cx18_buffer *buf = list_entry(p, struct cx18_buffer, list); ··· 482 481 writel(buf->dma_handle, &cx->scb->cpu_mdl[buf->id].paddr); 483 482 writel(s->buf_size, &cx->scb->cpu_mdl[buf->id].length); 484 483 cx18_vapi(cx, CX18_CPU_DE_SET_MDL, 5, s->handle, 485 - (void *)&cx->scb->cpu_mdl[buf->id] - cx->enc_mem, 1, 486 - buf->id, s->buf_size); 484 + (void __iomem *)&cx->scb->cpu_mdl[buf->id] - cx->enc_mem, 485 + 1, buf->id, s->buf_size); 487 486 } 488 487 /* begin_capture */ 489 488 if (cx18_vapi(cx, CX18_CPU_CAPTURE_START, 1, s->handle)) { ··· 493 492 } 494 493 495 494 /* you're live! sit back and await interrupts :) */ 496 - atomic_inc(&cx->capturing); 495 + if (!ts) 496 + atomic_inc(&cx->ana_capturing); 497 + atomic_inc(&cx->tot_capturing); 497 498 return 0; 498 499 } 499 500 ··· 526 523 527 524 CX18_DEBUG_INFO("Stop Capture\n"); 528 525 529 - if (atomic_read(&cx->capturing) == 0) 526 + if (atomic_read(&cx->tot_capturing) == 0) 530 527 return 0; 531 528 532 529 if (s->type == CX18_ENC_STREAM_TYPE_MPG) ··· 540 537 CX18_INFO("ignoring gop_end: not (yet?) supported by the firmware\n"); 541 538 } 542 539 543 - atomic_dec(&cx->capturing); 540 + if (s->type != CX18_ENC_STREAM_TYPE_TS) 541 + atomic_dec(&cx->ana_capturing); 542 + atomic_dec(&cx->tot_capturing); 544 543 545 544 /* Clear capture and no-read bits */ 546 545 clear_bit(CX18_F_S_STREAMING, &s->s_flags); ··· 550 545 cx18_vapi(cx, CX18_DESTROY_TASK, 1, s->handle); 551 546 s->handle = 0xffffffff; 552 547 553 - if (atomic_read(&cx->capturing) > 0) 548 + if (atomic_read(&cx->tot_capturing) > 0) 554 549 return 0; 555 550 556 551 write_reg(5, CX18_DSP0_INTERRUPT_MASK);
+4 -4
drivers/media/video/cx23885/cx23885-core.c
··· 823 823 iounmap(dev->lmmio); 824 824 } 825 825 826 - static u32* cx23885_risc_field(u32 *rp, struct scatterlist *sglist, 826 + static __le32* cx23885_risc_field(__le32 *rp, struct scatterlist *sglist, 827 827 unsigned int offset, u32 sync_line, 828 828 unsigned int bpl, unsigned int padding, 829 829 unsigned int lines) ··· 883 883 unsigned int padding, unsigned int lines) 884 884 { 885 885 u32 instructions, fields; 886 - u32 *rp; 886 + __le32 *rp; 887 887 int rc; 888 888 889 889 fields = 0; ··· 924 924 unsigned int lines) 925 925 { 926 926 u32 instructions; 927 - u32 *rp; 927 + __le32 *rp; 928 928 int rc; 929 929 930 930 /* estimate risc mem: worst case is one write per page border + ··· 951 951 int cx23885_risc_stopper(struct pci_dev *pci, struct btcx_riscmem *risc, 952 952 u32 reg, u32 mask, u32 value) 953 953 { 954 - u32 *rp; 954 + __le32 *rp; 955 955 int rc; 956 956 957 957 if ((rc = btcx_riscmem_alloc(pci, risc, 4*16)) < 0)
+10 -3
drivers/media/video/cx88/cx88-cards.c
··· 1493 1493 }, 1494 1494 }, 1495 1495 [CX88_BOARD_POWERCOLOR_REAL_ANGEL] = { 1496 - .name = "PowerColor Real Angel 330", 1496 + .name = "PowerColor RA330", /* Long names may confuse LIRC. */ 1497 1497 .tuner_type = TUNER_XC2028, 1498 1498 .tuner_addr = 0x61, 1499 1499 .input = { { 1500 + .type = CX88_VMUX_DEBUG, 1501 + .vmux = 3, /* Due to the way the cx88 driver is written, */ 1502 + .gpio0 = 0x00ff, /* there is no way to deactivate audio pass- */ 1503 + .gpio1 = 0xf39d, /* through without this entry. Furthermore, if */ 1504 + .gpio3 = 0x0000, /* the TV mux entry is first, you get audio */ 1505 + }, { /* from the tuner on boot for a little while. */ 1500 1506 .type = CX88_VMUX_TELEVISION, 1501 1507 .vmux = 0, 1502 1508 .gpio0 = 0x00ff, ··· 2430 2424 2431 2425 switch (core->boardnr) { 2432 2426 case CX88_BOARD_POWERCOLOR_REAL_ANGEL: 2433 - /* Doesn't work with firmware version 2.7 */ 2434 - ctl->fname = "xc3028-v25.fw"; 2427 + /* Now works with firmware version 2.7 */ 2428 + if (core->i2c_algo.udelay < 16) 2429 + core->i2c_algo.udelay = 16; 2435 2430 break; 2436 2431 case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PRO: 2437 2432 ctl->scode_table = XC3028_FE_ZARLINK456;
+4 -4
drivers/media/video/cx88/cx88-core.c
··· 70 70 71 71 /* @lpi: lines per IRQ, or 0 to not generate irqs. Note: IRQ to be 72 72 generated _after_ lpi lines are transferred. */ 73 - static u32* cx88_risc_field(u32 *rp, struct scatterlist *sglist, 73 + static __le32* cx88_risc_field(__le32 *rp, struct scatterlist *sglist, 74 74 unsigned int offset, u32 sync_line, 75 75 unsigned int bpl, unsigned int padding, 76 76 unsigned int lines, unsigned int lpi) ··· 130 130 unsigned int bpl, unsigned int padding, unsigned int lines) 131 131 { 132 132 u32 instructions,fields; 133 - u32 *rp; 133 + __le32 *rp; 134 134 int rc; 135 135 136 136 fields = 0; ··· 168 168 unsigned int lines, unsigned int lpi) 169 169 { 170 170 u32 instructions; 171 - u32 *rp; 171 + __le32 *rp; 172 172 int rc; 173 173 174 174 /* estimate risc mem: worst case is one write per page border + ··· 193 193 int cx88_risc_stopper(struct pci_dev *pci, struct btcx_riscmem *risc, 194 194 u32 reg, u32 mask, u32 value) 195 195 { 196 - u32 *rp; 196 + __le32 *rp; 197 197 int rc; 198 198 199 199 if ((rc = btcx_riscmem_alloc(pci, risc, 4*16)) < 0)
+4 -4
drivers/media/video/em28xx/em28xx-video.c
··· 1166 1166 1167 1167 reg->val = ret; 1168 1168 } else { 1169 - u64 val = 0; 1169 + __le64 val = 0; 1170 1170 ret = em28xx_read_reg_req_len(dev, USB_REQ_GET_STATUS, 1171 1171 reg->reg, (char *)&val, 2); 1172 1172 if (ret < 0) 1173 1173 return ret; 1174 1174 1175 - reg->val = cpu_to_le64((__u64)val); 1175 + reg->val = le64_to_cpu(val); 1176 1176 } 1177 1177 1178 1178 return 0; ··· 1183 1183 { 1184 1184 struct em28xx_fh *fh = priv; 1185 1185 struct em28xx *dev = fh->dev; 1186 - u64 buf; 1186 + __le64 buf; 1187 1187 1188 - buf = le64_to_cpu((__u64)reg->val); 1188 + buf = cpu_to_le64(reg->val); 1189 1189 1190 1190 return em28xx_write_regs(dev, reg->reg, (char *)&buf, 1191 1191 em28xx_reg_len(reg->reg));
+8 -2
drivers/media/video/ivtv/ivtv-driver.h
··· 259 259 260 260 /* Scatter-Gather array element, used in DMA transfers */ 261 261 struct ivtv_sg_element { 262 + __le32 src; 263 + __le32 dst; 264 + __le32 size; 265 + }; 266 + 267 + struct ivtv_sg_host_element { 262 268 u32 src; 263 269 u32 dst; 264 270 u32 size; ··· 355 349 u16 dma_xfer_cnt; 356 350 357 351 /* Base Dev SG Array for cx23415/6 */ 358 - struct ivtv_sg_element *sg_pending; 359 - struct ivtv_sg_element *sg_processing; 352 + struct ivtv_sg_host_element *sg_pending; 353 + struct ivtv_sg_host_element *sg_processing; 360 354 struct ivtv_sg_element *sg_dma; 361 355 dma_addr_t sg_handle; 362 356 int sg_pending_size;
+1 -1
drivers/media/video/ivtv/ivtv-fileops.c
··· 587 587 since we may get here before the stream has been fully set-up */ 588 588 if (mode == OUT_YUV && s->q_full.length == 0 && itv->dma_data_req_size) { 589 589 while (count >= itv->dma_data_req_size) { 590 - if (!ivtv_yuv_udma_stream_frame (itv, (void *)user_buf)) { 590 + if (!ivtv_yuv_udma_stream_frame (itv, (void __user *)user_buf)) { 591 591 bytes_written += itv->dma_data_req_size; 592 592 user_buf += itv->dma_data_req_size; 593 593 count -= itv->dma_data_req_size;
+4 -4
drivers/media/video/ivtv/ivtv-irq.c
··· 231 231 struct ivtv_buffer *buf = NULL; 232 232 struct list_head *p; 233 233 u32 offset; 234 - u32 *u32buf; 234 + __le32 *u32buf; 235 235 int x = 0; 236 236 237 237 IVTV_DEBUG_HI_DMA("%s %s completed (%x)\n", ivtv_use_pio(s) ? "PIO" : "DMA", 238 238 s->name, s->dma_offset); 239 239 list_for_each(p, &s->q_dma.list) { 240 240 buf = list_entry(p, struct ivtv_buffer, list); 241 - u32buf = (u32 *)buf->buf; 241 + u32buf = (__le32 *)buf->buf; 242 242 243 243 /* Sync Buffer */ 244 244 ivtv_buf_sync_for_cpu(s, buf); ··· 444 444 } 445 445 446 446 s->dma_xfer_cnt++; 447 - memcpy(s->sg_processing, s->sg_pending, sizeof(struct ivtv_sg_element) * s->sg_pending_size); 447 + memcpy(s->sg_processing, s->sg_pending, sizeof(struct ivtv_sg_host_element) * s->sg_pending_size); 448 448 s->sg_processing_size = s->sg_pending_size; 449 449 s->sg_pending_size = 0; 450 450 s->sg_processed = 0; ··· 473 473 if (s->q_predma.bytesused) 474 474 ivtv_queue_move(s, &s->q_predma, NULL, &s->q_dma, s->q_predma.bytesused); 475 475 s->dma_xfer_cnt++; 476 - memcpy(s->sg_processing, s->sg_pending, sizeof(struct ivtv_sg_element) * s->sg_pending_size); 476 + memcpy(s->sg_processing, s->sg_pending, sizeof(struct ivtv_sg_host_element) * s->sg_pending_size); 477 477 s->sg_processing_size = s->sg_pending_size; 478 478 s->sg_pending_size = 0; 479 479 s->sg_processed = 0;
+1 -1
drivers/media/video/ivtv/ivtv-queue.c
··· 193 193 int ivtv_stream_alloc(struct ivtv_stream *s) 194 194 { 195 195 struct ivtv *itv = s->itv; 196 - int SGsize = sizeof(struct ivtv_sg_element) * s->buffers; 196 + int SGsize = sizeof(struct ivtv_sg_host_element) * s->buffers; 197 197 int i; 198 198 199 199 if (s->buffers == 0)
+16 -14
drivers/media/video/ivtv/ivtv-streams.c
··· 44 44 #include "ivtv-streams.h" 45 45 46 46 static const struct file_operations ivtv_v4l2_enc_fops = { 47 - .owner = THIS_MODULE, 48 - .read = ivtv_v4l2_read, 49 - .write = ivtv_v4l2_write, 50 - .open = ivtv_v4l2_open, 51 - .ioctl = ivtv_v4l2_ioctl, 52 - .release = ivtv_v4l2_close, 53 - .poll = ivtv_v4l2_enc_poll, 47 + .owner = THIS_MODULE, 48 + .read = ivtv_v4l2_read, 49 + .write = ivtv_v4l2_write, 50 + .open = ivtv_v4l2_open, 51 + .ioctl = ivtv_v4l2_ioctl, 52 + .compat_ioctl = v4l_compat_ioctl32, 53 + .release = ivtv_v4l2_close, 54 + .poll = ivtv_v4l2_enc_poll, 54 55 }; 55 56 56 57 static const struct file_operations ivtv_v4l2_dec_fops = { 57 - .owner = THIS_MODULE, 58 - .read = ivtv_v4l2_read, 59 - .write = ivtv_v4l2_write, 60 - .open = ivtv_v4l2_open, 61 - .ioctl = ivtv_v4l2_ioctl, 62 - .release = ivtv_v4l2_close, 63 - .poll = ivtv_v4l2_dec_poll, 58 + .owner = THIS_MODULE, 59 + .read = ivtv_v4l2_read, 60 + .write = ivtv_v4l2_write, 61 + .open = ivtv_v4l2_open, 62 + .ioctl = ivtv_v4l2_ioctl, 63 + .compat_ioctl = v4l_compat_ioctl32, 64 + .release = ivtv_v4l2_close, 65 + .poll = ivtv_v4l2_dec_poll, 64 66 }; 65 67 66 68 #define IVTV_V4L2_DEC_MPG_OFFSET 16 /* offset from 0 to register decoder mpg v4l2 minors on */
+2 -2
drivers/media/video/ivtv/ivtv-version.h
··· 22 22 23 23 #define IVTV_DRIVER_NAME "ivtv" 24 24 #define IVTV_DRIVER_VERSION_MAJOR 1 25 - #define IVTV_DRIVER_VERSION_MINOR 2 26 - #define IVTV_DRIVER_VERSION_PATCHLEVEL 1 25 + #define IVTV_DRIVER_VERSION_MINOR 3 26 + #define IVTV_DRIVER_VERSION_PATCHLEVEL 0 27 27 28 28 #define IVTV_VERSION __stringify(IVTV_DRIVER_VERSION_MAJOR) "." __stringify(IVTV_DRIVER_VERSION_MINOR) "." __stringify(IVTV_DRIVER_VERSION_PATCHLEVEL) 29 29 #define IVTV_DRIVER_VERSION KERNEL_VERSION(IVTV_DRIVER_VERSION_MAJOR,IVTV_DRIVER_VERSION_MINOR,IVTV_DRIVER_VERSION_PATCHLEVEL)
+1 -1
drivers/media/video/ivtv/ivtv-yuv.c
··· 1116 1116 } 1117 1117 1118 1118 /* Attempt to dma a frame from a user buffer */ 1119 - int ivtv_yuv_udma_stream_frame(struct ivtv *itv, void *src) 1119 + int ivtv_yuv_udma_stream_frame(struct ivtv *itv, void __user *src) 1120 1120 { 1121 1121 struct yuv_playback_info *yi = &itv->yuv_info; 1122 1122 struct ivtv_dma_frame dma_args;
+1 -1
drivers/media/video/ivtv/ivtv-yuv.h
··· 35 35 36 36 int ivtv_yuv_filter_check(struct ivtv *itv); 37 37 void ivtv_yuv_setup_stream_frame(struct ivtv *itv); 38 - int ivtv_yuv_udma_stream_frame(struct ivtv *itv, void *src); 38 + int ivtv_yuv_udma_stream_frame(struct ivtv *itv, void __user *src); 39 39 void ivtv_yuv_frame_complete(struct ivtv *itv); 40 40 int ivtv_yuv_prep_frame(struct ivtv *itv, struct ivtv_dma_frame *args); 41 41 void ivtv_yuv_close(struct ivtv *itv);
+1 -2
drivers/media/video/saa7134/saa7134-empress.c
··· 163 163 static int empress_querycap(struct file *file, void *priv, 164 164 struct v4l2_capability *cap) 165 165 { 166 - struct saa7134_fh *fh = priv; 167 - struct saa7134_dev *dev = fh->dev; 166 + struct saa7134_dev *dev = file->private_data; 168 167 169 168 strcpy(cap->driver, "saa7134"); 170 169 strlcpy(cap->card, saa7134_boards[dev->board].name,
+20 -20
drivers/media/video/tuner-core.c
··· 536 536 static inline int check_mode(struct tuner *t, char *cmd) 537 537 { 538 538 if ((1 << t->mode & t->mode_mask) == 0) { 539 - return EINVAL; 539 + return -EINVAL; 540 540 } 541 541 542 542 switch (t->mode) { ··· 730 730 731 731 t->mode = mode; 732 732 733 - if (check_mode(t, cmd) == EINVAL) { 733 + if (check_mode(t, cmd) == -EINVAL) { 734 734 t->mode = T_STANDBY; 735 735 if (analog_ops->standby) 736 736 analog_ops->standby(&t->fe); 737 - return EINVAL; 737 + return -EINVAL; 738 738 } 739 739 return 0; 740 740 } ··· 776 776 break; 777 777 case AUDC_SET_RADIO: 778 778 if (set_mode(client, t, V4L2_TUNER_RADIO, "AUDC_SET_RADIO") 779 - == EINVAL) 779 + == -EINVAL) 780 780 return 0; 781 781 if (t->radio_freq) 782 782 set_freq(client, t->radio_freq); 783 783 break; 784 784 case TUNER_SET_STANDBY: 785 - if (check_mode(t, "TUNER_SET_STANDBY") == EINVAL) 785 + if (check_mode(t, "TUNER_SET_STANDBY") == -EINVAL) 786 786 return 0; 787 787 t->mode = T_STANDBY; 788 788 if (analog_ops->standby) ··· 790 790 break; 791 791 #ifdef CONFIG_VIDEO_ALLOW_V4L1 792 792 case VIDIOCSAUDIO: 793 - if (check_mode(t, "VIDIOCSAUDIO") == EINVAL) 793 + if (check_mode(t, "VIDIOCSAUDIO") == -EINVAL) 794 794 return 0; 795 - if (check_v4l2(t) == EINVAL) 795 + if (check_v4l2(t) == -EINVAL) 796 796 return 0; 797 797 798 798 /* Should be implemented, since bttv calls it */ ··· 810 810 }; 811 811 struct video_channel *vc = arg; 812 812 813 - if (check_v4l2(t) == EINVAL) 813 + if (check_v4l2(t) == -EINVAL) 814 814 return 0; 815 815 816 - if (set_mode(client,t,V4L2_TUNER_ANALOG_TV, "VIDIOCSCHAN")==EINVAL) 816 + if (set_mode(client,t,V4L2_TUNER_ANALOG_TV, "VIDIOCSCHAN")==-EINVAL) 817 817 return 0; 818 818 819 819 if (vc->norm < ARRAY_SIZE(map)) ··· 827 827 { 828 828 unsigned long *v = arg; 829 829 830 - if (check_mode(t, "VIDIOCSFREQ") == EINVAL) 830 + if (check_mode(t, "VIDIOCSFREQ") == -EINVAL) 831 831 return 0; 832 - if (check_v4l2(t) == EINVAL) 832 + if (check_v4l2(t) == -EINVAL) 833 833 return 0; 834 834 835 835 set_freq(client, *v); ··· 839 839 { 840 840 struct video_tuner *vt = arg; 841 841 842 - if (check_mode(t, "VIDIOCGTUNER") == EINVAL) 842 + if (check_mode(t, "VIDIOCGTUNER") == -EINVAL) 843 843 return 0; 844 - if (check_v4l2(t) == EINVAL) 844 + if (check_v4l2(t) == -EINVAL) 845 845 return 0; 846 846 847 847 if (V4L2_TUNER_RADIO == t->mode) { ··· 883 883 { 884 884 struct video_audio *va = arg; 885 885 886 - if (check_mode(t, "VIDIOCGAUDIO") == EINVAL) 886 + if (check_mode(t, "VIDIOCGAUDIO") == -EINVAL) 887 887 return 0; 888 - if (check_v4l2(t) == EINVAL) 888 + if (check_v4l2(t) == -EINVAL) 889 889 return 0; 890 890 891 891 if (V4L2_TUNER_RADIO == t->mode) { ··· 925 925 v4l2_std_id *id = arg; 926 926 927 927 if (set_mode (client, t, V4L2_TUNER_ANALOG_TV, "VIDIOC_S_STD") 928 - == EINVAL) 928 + == -EINVAL) 929 929 return 0; 930 930 931 931 switch_v4l2(); ··· 941 941 struct v4l2_frequency *f = arg; 942 942 943 943 if (set_mode (client, t, f->type, "VIDIOC_S_FREQUENCY") 944 - == EINVAL) 944 + == -EINVAL) 945 945 return 0; 946 946 switch_v4l2(); 947 947 set_freq(client,f->frequency); ··· 952 952 { 953 953 struct v4l2_frequency *f = arg; 954 954 955 - if (check_mode(t, "VIDIOC_G_FREQUENCY") == EINVAL) 955 + if (check_mode(t, "VIDIOC_G_FREQUENCY") == -EINVAL) 956 956 return 0; 957 957 switch_v4l2(); 958 958 f->type = t->mode; ··· 973 973 { 974 974 struct v4l2_tuner *tuner = arg; 975 975 976 - if (check_mode(t, "VIDIOC_G_TUNER") == EINVAL) 976 + if (check_mode(t, "VIDIOC_G_TUNER") == -EINVAL) 977 977 return 0; 978 978 switch_v4l2(); 979 979 ··· 1020 1020 { 1021 1021 struct v4l2_tuner *tuner = arg; 1022 1022 1023 - if (check_mode(t, "VIDIOC_S_TUNER") == EINVAL) 1023 + if (check_mode(t, "VIDIOC_S_TUNER") == -EINVAL) 1024 1024 return 0; 1025 1025 1026 1026 switch_v4l2();
+1 -1
drivers/media/video/usbvideo/quickcam_messenger.c
··· 210 210 return ret; 211 211 } 212 212 213 - static int qcm_stv_setw(struct usb_device *dev, u16 reg, u16 val) 213 + static int qcm_stv_setw(struct usb_device *dev, u16 reg, __le16 val) 214 214 { 215 215 int ret; 216 216
+2 -2
drivers/media/video/zoran.h
··· 285 285 286 286 struct zoran_jpg_buffer { 287 287 struct zoran_mapping *map; 288 - u32 *frag_tab; /* addresses of frag table */ 288 + __le32 *frag_tab; /* addresses of frag table */ 289 289 u32 frag_tab_bus; /* same value cached to save time in ISR */ 290 290 enum zoran_buffer_state state; /* non-zero if corresponding buffer is in use in grab queue */ 291 291 struct zoran_sync bs; /* DONE: info to return to application */ ··· 450 450 unsigned long jpg_queued_num; /* count of frames queued since grab/play started */ 451 451 452 452 /* zr36057's code buffer table */ 453 - u32 *stat_com; /* stat_com[i] is indexed by dma_head/tail & BUZ_MASK_STAT_COM */ 453 + __le32 *stat_com; /* stat_com[i] is indexed by dma_head/tail & BUZ_MASK_STAT_COM */ 454 454 455 455 /* (value & BUZ_MASK_FRAME) corresponds to index in pend[] queue */ 456 456 int jpg_pend[BUZ_MAX_FRAME];
+1 -1
drivers/media/video/zoran_device.c
··· 1320 1320 if (i) { 1321 1321 /* Rotate stat_comm entries to make current entry first */ 1322 1322 int j; 1323 - u32 bus_addr[BUZ_NUM_STAT_COM]; 1323 + __le32 bus_addr[BUZ_NUM_STAT_COM]; 1324 1324 1325 1325 /* Here we are copying the stat_com array, which 1326 1326 * is already in little endian format, so
+5 -5
drivers/media/video/zoran_driver.c
··· 495 495 jpg_fbuffer_free(file); 496 496 return -ENOBUFS; 497 497 } 498 - fh->jpg_buffers.buffer[i].frag_tab = (u32 *) mem; 498 + fh->jpg_buffers.buffer[i].frag_tab = (__le32 *) mem; 499 499 fh->jpg_buffers.buffer[i].frag_tab_bus = 500 500 virt_to_bus((void *) mem); 501 501 ··· 1167 1167 1168 1168 /* v4l capture */ 1169 1169 if (fh->v4l_buffers.active != ZORAN_FREE) { 1170 - long flags; 1170 + unsigned long flags; 1171 1171 1172 1172 spin_lock_irqsave(&zr->spinlock, flags); 1173 1173 zr36057_set_memgrab(zr, 0); ··· 3436 3436 3437 3437 /* unload capture */ 3438 3438 if (zr->v4l_memgrab_active) { 3439 - long flags; 3439 + unsigned long flags; 3440 3440 3441 3441 spin_lock_irqsave(&zr->spinlock, flags); 3442 3442 zr36057_set_memgrab(zr, 0); ··· 4375 4375 mutex_lock(&zr->resource_lock); 4376 4376 4377 4377 if (fh->v4l_buffers.active != ZORAN_FREE) { 4378 - long flags; 4378 + unsigned long flags; 4379 4379 4380 4380 spin_lock_irqsave(&zr->spinlock, flags); 4381 4381 zr36057_set_memgrab(zr, 0); ··· 4506 4506 if (todo > fraglen) 4507 4507 todo = fraglen; 4508 4508 pos = 4509 - le32_to_cpu((unsigned long) fh->jpg_buffers. 4509 + le32_to_cpu(fh->jpg_buffers. 4510 4510 buffer[i].frag_tab[2 * j]); 4511 4511 /* should just be pos on i386 */ 4512 4512 page = virt_to_phys(bus_to_virt(pos))
+3 -3
include/linux/videodev2.h
··· 865 865 #define V4L2_CID_HFLIP (V4L2_CID_BASE+20) 866 866 #define V4L2_CID_VFLIP (V4L2_CID_BASE+21) 867 867 868 - /* Deprecated, use V4L2_CID_PAN_RESET and V4L2_CID_TILT_RESET */ 869 - #define V4L2_CID_HCENTER_DEPRECATED (V4L2_CID_BASE+22) 870 - #define V4L2_CID_VCENTER_DEPRECATED (V4L2_CID_BASE+23) 868 + /* Deprecated; use V4L2_CID_PAN_RESET and V4L2_CID_TILT_RESET */ 869 + #define V4L2_CID_HCENTER (V4L2_CID_BASE+22) 870 + #define V4L2_CID_VCENTER (V4L2_CID_BASE+23) 871 871 872 872 #define V4L2_CID_POWER_LINE_FREQUENCY (V4L2_CID_BASE+24) 873 873 enum v4l2_power_line_frequency {
-1
include/media/v4l2-dev.h
··· 40 40 #define VFL_TYPE_VTX 3 41 41 42 42 /* Video standard functions */ 43 - extern unsigned int v4l2_video_std_fps(struct v4l2_standard *vs); 44 43 extern char *v4l2_norm_to_name(v4l2_std_id id); 45 44 extern int v4l2_video_std_construct(struct v4l2_standard *vs, 46 45 int id, char *name);