1 /* GSPCA subdrivers for Genesys Logic webcams with the GL860 chip
4 * 2009/09/24 Olivier Lorin <o.lorin@laposte.net>
5 * GSPCA by Jean-Francois Moine <http://moinejf.free.fr>
6 * Thanks BUGabundo and Malmostoso for your amazing help!
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program. If not, see <http://www.gnu.org/licenses/>.
24 MODULE_AUTHOR("Olivier Lorin <o.lorin@laposte.net>");
25 MODULE_DESCRIPTION("Genesys Logic USB PC Camera Driver");
26 MODULE_LICENSE("GPL");
28 /*======================== static function declarations ====================*/
30 static void (*dev_init_settings
)(struct gspca_dev
*gspca_dev
);
32 static int sd_config(struct gspca_dev
*gspca_dev
,
33 const struct usb_device_id
*id
);
34 static int sd_init(struct gspca_dev
*gspca_dev
);
35 static int sd_isoc_init(struct gspca_dev
*gspca_dev
);
36 static int sd_start(struct gspca_dev
*gspca_dev
);
37 static void sd_stop0(struct gspca_dev
*gspca_dev
);
38 static void sd_pkt_scan(struct gspca_dev
*gspca_dev
,
40 static void sd_callback(struct gspca_dev
*gspca_dev
);
42 static int gl860_guess_sensor(struct gspca_dev
*gspca_dev
,
43 u16 vendor_id
, u16 product_id
);
45 /*============================ driver options ==============================*/
47 static s32 AC50Hz
= 0xff;
48 module_param(AC50Hz
, int, 0644);
49 MODULE_PARM_DESC(AC50Hz
, " Does AC power frequency is 50Hz? (0/1)");
51 static char sensor
[7];
52 module_param_string(sensor
, sensor
, sizeof(sensor
), 0644);
53 MODULE_PARM_DESC(sensor
,
54 " Driver sensor ('MI1320'/'MI2020'/'OV9655'/'OV2640')");
56 /*============================ webcam controls =============================*/
58 /* Functions to get and set a control value */
59 #define SD_SETGET(thename) \
60 static int sd_set_##thename(struct gspca_dev *gspca_dev, s32 val)\
62 struct sd *sd = (struct sd *) gspca_dev;\
64 sd->vcur.thename = val;\
65 if (gspca_dev->streaming)\
69 static int sd_get_##thename(struct gspca_dev *gspca_dev, s32 *val)\
71 struct sd *sd = (struct sd *) gspca_dev;\
73 *val = sd->vcur.thename;\
89 #define GL860_NCTRLS 11
92 static struct ctrl sd_ctrls_mi1320
[GL860_NCTRLS
];
93 static struct ctrl sd_ctrls_mi2020
[GL860_NCTRLS
];
94 static struct ctrl sd_ctrls_ov2640
[GL860_NCTRLS
];
95 static struct ctrl sd_ctrls_ov9655
[GL860_NCTRLS
];
97 #define SET_MY_CTRL(theid, \
98 thetype, thelabel, thename) \
99 if (sd->vmax.thename != 0) {\
100 sd_ctrls[nCtrls].qctrl.id = theid;\
101 sd_ctrls[nCtrls].qctrl.type = thetype;\
102 strcpy(sd_ctrls[nCtrls].qctrl.name, thelabel);\
103 sd_ctrls[nCtrls].qctrl.minimum = 0;\
104 sd_ctrls[nCtrls].qctrl.maximum = sd->vmax.thename;\
105 sd_ctrls[nCtrls].qctrl.default_value = sd->vcur.thename;\
106 sd_ctrls[nCtrls].qctrl.step = \
107 (sd->vmax.thename < 16) ? 1 : sd->vmax.thename/16;\
108 sd_ctrls[nCtrls].set = sd_set_##thename;\
109 sd_ctrls[nCtrls].get = sd_get_##thename;\
113 static int gl860_build_control_table(struct gspca_dev
*gspca_dev
)
115 struct sd
*sd
= (struct sd
*) gspca_dev
;
116 struct ctrl
*sd_ctrls
;
120 sd_ctrls
= sd_ctrls_mi1320
;
122 sd_ctrls
= sd_ctrls_mi2020
;
124 sd_ctrls
= sd_ctrls_ov2640
;
126 sd_ctrls
= sd_ctrls_ov9655
;
130 memset(sd_ctrls
, 0, GL860_NCTRLS
* sizeof(struct ctrl
));
132 SET_MY_CTRL(V4L2_CID_BRIGHTNESS
,
133 V4L2_CTRL_TYPE_INTEGER
, "Brightness", brightness
)
134 SET_MY_CTRL(V4L2_CID_SHARPNESS
,
135 V4L2_CTRL_TYPE_INTEGER
, "Sharpness", sharpness
)
136 SET_MY_CTRL(V4L2_CID_CONTRAST
,
137 V4L2_CTRL_TYPE_INTEGER
, "Contrast", contrast
)
138 SET_MY_CTRL(V4L2_CID_GAMMA
,
139 V4L2_CTRL_TYPE_INTEGER
, "Gamma", gamma
)
140 SET_MY_CTRL(V4L2_CID_HUE
,
141 V4L2_CTRL_TYPE_INTEGER
, "Palette", hue
)
142 SET_MY_CTRL(V4L2_CID_SATURATION
,
143 V4L2_CTRL_TYPE_INTEGER
, "Saturation", saturation
)
144 SET_MY_CTRL(V4L2_CID_WHITE_BALANCE_TEMPERATURE
,
145 V4L2_CTRL_TYPE_INTEGER
, "White Bal.", whitebal
)
146 SET_MY_CTRL(V4L2_CID_BACKLIGHT_COMPENSATION
,
147 V4L2_CTRL_TYPE_INTEGER
, "Backlight" , backlight
)
149 SET_MY_CTRL(V4L2_CID_HFLIP
,
150 V4L2_CTRL_TYPE_BOOLEAN
, "Mirror", mirror
)
151 SET_MY_CTRL(V4L2_CID_VFLIP
,
152 V4L2_CTRL_TYPE_BOOLEAN
, "Flip", flip
)
153 SET_MY_CTRL(V4L2_CID_POWER_LINE_FREQUENCY
,
154 V4L2_CTRL_TYPE_BOOLEAN
, "AC power 50Hz", AC50Hz
)
159 /*==================== sud-driver structure initialisation =================*/
161 static const struct sd_desc sd_desc_mi1320
= {
163 .ctrls
= sd_ctrls_mi1320
,
164 .nctrls
= GL860_NCTRLS
,
167 .isoc_init
= sd_isoc_init
,
170 .pkt_scan
= sd_pkt_scan
,
171 .dq_callback
= sd_callback
,
174 static const struct sd_desc sd_desc_mi2020
= {
176 .ctrls
= sd_ctrls_mi2020
,
177 .nctrls
= GL860_NCTRLS
,
180 .isoc_init
= sd_isoc_init
,
183 .pkt_scan
= sd_pkt_scan
,
184 .dq_callback
= sd_callback
,
187 static const struct sd_desc sd_desc_ov2640
= {
189 .ctrls
= sd_ctrls_ov2640
,
190 .nctrls
= GL860_NCTRLS
,
193 .isoc_init
= sd_isoc_init
,
196 .pkt_scan
= sd_pkt_scan
,
197 .dq_callback
= sd_callback
,
200 static const struct sd_desc sd_desc_ov9655
= {
202 .ctrls
= sd_ctrls_ov9655
,
203 .nctrls
= GL860_NCTRLS
,
206 .isoc_init
= sd_isoc_init
,
209 .pkt_scan
= sd_pkt_scan
,
210 .dq_callback
= sd_callback
,
213 /*=========================== sub-driver image sizes =======================*/
215 static struct v4l2_pix_format mi2020_mode
[] = {
216 { 640, 480, V4L2_PIX_FMT_SGBRG8
, V4L2_FIELD_NONE
,
218 .sizeimage
= 640 * 480,
219 .colorspace
= V4L2_COLORSPACE_SRGB
,
222 { 800, 598, V4L2_PIX_FMT_SGBRG8
, V4L2_FIELD_NONE
,
224 .sizeimage
= 800 * 598,
225 .colorspace
= V4L2_COLORSPACE_SRGB
,
228 {1280, 1024, V4L2_PIX_FMT_SGBRG8
, V4L2_FIELD_NONE
,
229 .bytesperline
= 1280,
230 .sizeimage
= 1280 * 1024,
231 .colorspace
= V4L2_COLORSPACE_SRGB
,
234 {1600, 1198, V4L2_PIX_FMT_SGBRG8
, V4L2_FIELD_NONE
,
235 .bytesperline
= 1600,
236 .sizeimage
= 1600 * 1198,
237 .colorspace
= V4L2_COLORSPACE_SRGB
,
242 static struct v4l2_pix_format ov2640_mode
[] = {
243 { 640, 480, V4L2_PIX_FMT_SGBRG8
, V4L2_FIELD_NONE
,
245 .sizeimage
= 640 * 480,
246 .colorspace
= V4L2_COLORSPACE_SRGB
,
249 { 800, 600, V4L2_PIX_FMT_SGBRG8
, V4L2_FIELD_NONE
,
251 .sizeimage
= 800 * 600,
252 .colorspace
= V4L2_COLORSPACE_SRGB
,
255 {1280, 960, V4L2_PIX_FMT_SGBRG8
, V4L2_FIELD_NONE
,
256 .bytesperline
= 1280,
257 .sizeimage
= 1280 * 960,
258 .colorspace
= V4L2_COLORSPACE_SRGB
,
261 {1600, 1200, V4L2_PIX_FMT_SGBRG8
, V4L2_FIELD_NONE
,
262 .bytesperline
= 1600,
263 .sizeimage
= 1600 * 1200,
264 .colorspace
= V4L2_COLORSPACE_SRGB
,
269 static struct v4l2_pix_format mi1320_mode
[] = {
270 { 640, 480, V4L2_PIX_FMT_SGBRG8
, V4L2_FIELD_NONE
,
272 .sizeimage
= 640 * 480,
273 .colorspace
= V4L2_COLORSPACE_SRGB
,
276 { 800, 600, V4L2_PIX_FMT_SGBRG8
, V4L2_FIELD_NONE
,
278 .sizeimage
= 800 * 600,
279 .colorspace
= V4L2_COLORSPACE_SRGB
,
282 {1280, 960, V4L2_PIX_FMT_SGBRG8
, V4L2_FIELD_NONE
,
283 .bytesperline
= 1280,
284 .sizeimage
= 1280 * 960,
285 .colorspace
= V4L2_COLORSPACE_SRGB
,
290 static struct v4l2_pix_format ov9655_mode
[] = {
291 { 640, 480, V4L2_PIX_FMT_SGBRG8
, V4L2_FIELD_NONE
,
293 .sizeimage
= 640 * 480,
294 .colorspace
= V4L2_COLORSPACE_SRGB
,
297 {1280, 960, V4L2_PIX_FMT_SGBRG8
, V4L2_FIELD_NONE
,
298 .bytesperline
= 1280,
299 .sizeimage
= 1280 * 960,
300 .colorspace
= V4L2_COLORSPACE_SRGB
,
305 /*========================= sud-driver functions ===========================*/
307 /* This function is called at probe time */
308 static int sd_config(struct gspca_dev
*gspca_dev
,
309 const struct usb_device_id
*id
)
311 struct sd
*sd
= (struct sd
*) gspca_dev
;
313 u16 vendor_id
, product_id
;
315 /* Get USB VendorID and ProductID */
316 vendor_id
= id
->idVendor
;
317 product_id
= id
->idProduct
;
323 if (strcmp(sensor
, "MI1320") == 0)
324 sd
->sensor
= ID_MI1320
;
325 else if (strcmp(sensor
, "OV2640") == 0)
326 sd
->sensor
= ID_OV2640
;
327 else if (strcmp(sensor
, "OV9655") == 0)
328 sd
->sensor
= ID_OV9655
;
329 else if (strcmp(sensor
, "MI2020") == 0)
330 sd
->sensor
= ID_MI2020
;
332 /* Get sensor and set the suitable init/start/../stop functions */
333 if (gl860_guess_sensor(gspca_dev
, vendor_id
, product_id
) == -1)
336 cam
= &gspca_dev
->cam
;
337 gspca_dev
->nbalt
= 4;
339 switch (sd
->sensor
) {
341 gspca_dev
->sd_desc
= &sd_desc_mi1320
;
342 cam
->cam_mode
= mi1320_mode
;
343 cam
->nmodes
= ARRAY_SIZE(mi1320_mode
);
344 dev_init_settings
= mi1320_init_settings
;
348 gspca_dev
->sd_desc
= &sd_desc_mi2020
;
349 cam
->cam_mode
= mi2020_mode
;
350 cam
->nmodes
= ARRAY_SIZE(mi2020_mode
);
351 dev_init_settings
= mi2020_init_settings
;
355 gspca_dev
->sd_desc
= &sd_desc_ov2640
;
356 cam
->cam_mode
= ov2640_mode
;
357 cam
->nmodes
= ARRAY_SIZE(ov2640_mode
);
358 dev_init_settings
= ov2640_init_settings
;
362 gspca_dev
->sd_desc
= &sd_desc_ov9655
;
363 cam
->cam_mode
= ov9655_mode
;
364 cam
->nmodes
= ARRAY_SIZE(ov9655_mode
);
365 dev_init_settings
= ov9655_init_settings
;
369 dev_init_settings(gspca_dev
);
371 ((struct sd
*) gspca_dev
)->vcur
.AC50Hz
= AC50Hz
;
372 gl860_build_control_table(gspca_dev
);
377 /* This function is called at probe time after sd_config */
378 static int sd_init(struct gspca_dev
*gspca_dev
)
380 struct sd
*sd
= (struct sd
*) gspca_dev
;
382 return sd
->dev_init_at_startup(gspca_dev
);
385 /* This function is called before to choose the alt setting */
386 static int sd_isoc_init(struct gspca_dev
*gspca_dev
)
388 struct sd
*sd
= (struct sd
*) gspca_dev
;
390 return sd
->dev_configure_alt(gspca_dev
);
393 /* This function is called to start the webcam */
394 static int sd_start(struct gspca_dev
*gspca_dev
)
396 struct sd
*sd
= (struct sd
*) gspca_dev
;
398 return sd
->dev_init_pre_alt(gspca_dev
);
401 /* This function is called to stop the webcam */
402 static void sd_stop0(struct gspca_dev
*gspca_dev
)
404 struct sd
*sd
= (struct sd
*) gspca_dev
;
406 return sd
->dev_post_unset_alt(gspca_dev
);
409 /* This function is called when an image is being received */
410 static void sd_pkt_scan(struct gspca_dev
*gspca_dev
,
413 struct sd
*sd
= (struct sd
*) gspca_dev
;
416 s32 mode
= (s32
) gspca_dev
->curr_mode
;
418 sd
->swapRB
* (gspca_dev
->cam
.cam_mode
[mode
].bytesperline
+ 1);
420 /* Test only against 0202h, so endianess does not matter */
421 switch (*(s16
*) data
) {
422 case 0x0202: /* End of frame, start a new one */
423 gspca_frame_add(gspca_dev
, LAST_PACKET
, NULL
, 0);
425 if (sd
->nbIm
>= 0 && sd
->nbIm
< 10)
427 gspca_frame_add(gspca_dev
, FIRST_PACKET
, NULL
, 0);
433 if (nSkipped
+ len
<= nToSkip
)
436 if (nSkipped
< nToSkip
&& nSkipped
+ len
> nToSkip
) {
437 data
+= nToSkip
- nSkipped
;
438 len
-= nToSkip
- nSkipped
;
439 nSkipped
= nToSkip
+ 1;
441 gspca_frame_add(gspca_dev
,
442 INTER_PACKET
, data
, len
);
448 /* This function is called when an image has been read */
449 /* This function is used to monitor webcam orientation */
450 static void sd_callback(struct gspca_dev
*gspca_dev
)
452 struct sd
*sd
= (struct sd
*) gspca_dev
;
458 /* Probe sensor orientation */
459 ctrl_in(gspca_dev
, 0xc0, 2, 0x0000, 0x0000, 1, (void *)&state
);
461 /* C8/40 means upside-down (looking backwards) */
462 /* D8/50 means right-up (looking onwards) */
463 upsideDown
= (state
== 0xc8 || state
== 0x40);
465 if (upsideDown
&& sd
->nbRightUp
> -4) {
466 if (sd
->nbRightUp
> 0)
468 if (sd
->nbRightUp
== -3) {
474 if (!upsideDown
&& sd
->nbRightUp
< 4) {
475 if (sd
->nbRightUp
< 0)
477 if (sd
->nbRightUp
== 3) {
486 sd
->dev_camera_settings(gspca_dev
);
489 /*=================== USB driver structure initialisation ==================*/
491 static const struct usb_device_id device_table
[] = {
492 {USB_DEVICE(0x05e3, 0x0503)},
493 {USB_DEVICE(0x05e3, 0xf191)},
497 MODULE_DEVICE_TABLE(usb
, device_table
);
499 static int sd_probe(struct usb_interface
*intf
,
500 const struct usb_device_id
*id
)
502 return gspca_dev_probe(intf
, id
,
503 &sd_desc_mi1320
, sizeof(struct sd
), THIS_MODULE
);
506 static void sd_disconnect(struct usb_interface
*intf
)
508 gspca_disconnect(intf
);
511 static struct usb_driver sd_driver
= {
513 .id_table
= device_table
,
515 .disconnect
= sd_disconnect
,
517 .suspend
= gspca_suspend
,
518 .resume
= gspca_resume
,
522 /*====================== Init and Exit module functions ====================*/
524 static int __init
sd_mod_init(void)
526 PDEBUG(D_PROBE
, "driver startup - version %s", DRIVER_VERSION
);
528 if (usb_register(&sd_driver
) < 0)
533 static void __exit
sd_mod_exit(void)
535 usb_deregister(&sd_driver
);
538 module_init(sd_mod_init
);
539 module_exit(sd_mod_exit
);
541 /*==========================================================================*/
543 int gl860_RTx(struct gspca_dev
*gspca_dev
,
544 unsigned char pref
, u32 req
, u16 val
, u16 index
,
545 s32 len
, void *pdata
)
547 struct usb_device
*udev
= gspca_dev
->dev
;
550 if (pref
== 0x40) { /* Send */
552 memcpy(gspca_dev
->usb_buf
, pdata
, len
);
553 r
= usb_control_msg(udev
, usb_sndctrlpipe(udev
, 0),
554 req
, pref
, val
, index
,
556 len
, 400 + 200 * (len
> 1));
558 r
= usb_control_msg(udev
, usb_sndctrlpipe(udev
, 0),
559 req
, pref
, val
, index
, NULL
, len
, 400);
561 } else { /* Receive */
563 r
= usb_control_msg(udev
, usb_rcvctrlpipe(udev
, 0),
564 req
, pref
, val
, index
,
566 len
, 400 + 200 * (len
> 1));
567 memcpy(pdata
, gspca_dev
->usb_buf
, len
);
569 r
= usb_control_msg(udev
, usb_rcvctrlpipe(udev
, 0),
570 req
, pref
, val
, index
, NULL
, len
, 400);
575 err("ctrl transfer failed %4d "
576 "[p%02x r%d v%04x i%04x len%d]",
577 r
, pref
, req
, val
, index
, len
);
578 else if (len
> 1 && r
< len
)
579 PDEBUG(D_ERR
, "short ctrl transfer %d/%d", r
, len
);
586 int fetch_validx(struct gspca_dev
*gspca_dev
, struct validx
*tbl
, int len
)
590 for (n
= 0; n
< len
; n
++) {
591 if (tbl
[n
].idx
!= 0xffff)
592 ctrl_out(gspca_dev
, 0x40, 1, tbl
[n
].val
,
593 tbl
[n
].idx
, 0, NULL
);
594 else if (tbl
[n
].val
== 0xffff)
602 int keep_on_fetching_validx(struct gspca_dev
*gspca_dev
, struct validx
*tbl
,
606 if (tbl
[n
].idx
!= 0xffff)
607 ctrl_out(gspca_dev
, 0x40, 1, tbl
[n
].val
, tbl
[n
].idx
,
609 else if (tbl
[n
].val
== 0xffff)
617 void fetch_idxdata(struct gspca_dev
*gspca_dev
, struct idxdata
*tbl
, int len
)
621 for (n
= 0; n
< len
; n
++) {
622 if (memcmp(tbl
[n
].data
, "\xff\xff\xff", 3) != 0)
623 ctrl_out(gspca_dev
, 0x40, 3, 0x7a00, tbl
[n
].idx
,
630 static int gl860_guess_sensor(struct gspca_dev
*gspca_dev
,
631 u16 vendor_id
, u16 product_id
)
633 struct sd
*sd
= (struct sd
*) gspca_dev
;
634 u8 probe
, nb26
, nb96
, nOV
, ntry
;
636 if (product_id
== 0xf191)
637 sd
->sensor
= ID_MI1320
;
639 if (sd
->sensor
== 0xff) {
640 ctrl_in(gspca_dev
, 0xc0, 2, 0x0000, 0x0004, 1, &probe
);
641 ctrl_in(gspca_dev
, 0xc0, 2, 0x0000, 0x0004, 1, &probe
);
643 ctrl_out(gspca_dev
, 0x40, 1, 0x0000, 0x0000, 0, NULL
);
645 ctrl_out(gspca_dev
, 0x40, 1, 0x0010, 0x0010, 0, NULL
);
647 ctrl_out(gspca_dev
, 0x40, 1, 0x0008, 0x00c0, 0, NULL
);
649 ctrl_out(gspca_dev
, 0x40, 1, 0x0001, 0x00c1, 0, NULL
);
651 ctrl_out(gspca_dev
, 0x40, 1, 0x0001, 0x00c2, 0, NULL
);
653 ctrl_out(gspca_dev
, 0x40, 1, 0x0020, 0x0006, 0, NULL
);
655 ctrl_out(gspca_dev
, 0x40, 1, 0x006a, 0x000d, 0, NULL
);
658 PDEBUG(D_PROBE
, "probing for sensor MI2020 or OVXXXX");
660 for (ntry
= 0; ntry
< 4; ntry
++) {
661 ctrl_out(gspca_dev
, 0x40, 1, 0x0040, 0x0000, 0, NULL
);
663 ctrl_out(gspca_dev
, 0x40, 1, 0x0063, 0x0006, 0, NULL
);
665 ctrl_out(gspca_dev
, 0x40, 1, 0x7a00, 0x8030, 0, NULL
);
667 ctrl_in(gspca_dev
, 0xc0, 2, 0x7a00, 0x8030, 1, &probe
);
668 PDEBUG(D_PROBE
, "probe=0x%02x", probe
);
674 PDEBUG(D_PROBE
, "0xff -> OVXXXX");
675 PDEBUG(D_PROBE
, "probing for sensor OV2640 or OV9655");
678 for (ntry
= 0; ntry
< 4; ntry
++) {
679 ctrl_out(gspca_dev
, 0x40, 1, 0x0040, 0x0000,
682 ctrl_out(gspca_dev
, 0x40, 1, 0x6000, 0x800a,
686 /* Wait for 26(OV2640) or 96(OV9655) */
687 ctrl_in(gspca_dev
, 0xc0, 2, 0x6000, 0x800a,
690 if (probe
== 0x26 || probe
== 0x40) {
692 "probe=0x%02x -> OV2640",
694 sd
->sensor
= ID_OV2640
;
698 if (probe
== 0x96 || probe
== 0x55) {
700 "probe=0x%02x -> OV9655",
702 sd
->sensor
= ID_OV9655
;
706 PDEBUG(D_PROBE
, "probe=0x%02x", probe
);
713 if (nb26
< 4 && nb96
< 4)
716 PDEBUG(D_PROBE
, "Not any 0xff -> MI2020");
717 sd
->sensor
= ID_MI2020
;
722 PDEBUG(D_PROBE
, "05e3:f191 sensor MI1320 (1.3M)");
723 } else if (_MI2020_
) {
724 PDEBUG(D_PROBE
, "05e3:0503 sensor MI2020 (2.0M)");
725 } else if (_OV9655_
) {
726 PDEBUG(D_PROBE
, "05e3:0503 sensor OV9655 (1.3M)");
727 } else if (_OV2640_
) {
728 PDEBUG(D_PROBE
, "05e3:0503 sensor OV2640 (2.0M)");
730 PDEBUG(D_PROBE
, "***** Unknown sensor *****");