Lines Matching refs:qcam
713 struct qcam_device *qcam=(struct qcam_device *)dev; in qcam_ioctl() local
789 p.brightness=qcam->brightness<<8; in qcam_ioctl()
790 p.contrast=qcam->contrast<<8; in qcam_ioctl()
791 p.whiteness=qcam->whitebal<<8; in qcam_ioctl()
792 p.depth=qcam->bpp; in qcam_ioctl()
812 qcam->brightness = p.brightness>>8; in qcam_ioctl()
813 qcam->contrast = p.contrast>>8; in qcam_ioctl()
814 qcam->whitebal = p.whiteness>>8; in qcam_ioctl()
815 qcam->bpp = p.depth; in qcam_ioctl()
817 down(&qcam->lock); in qcam_ioctl()
818 qc_setscanmode(qcam); in qcam_ioctl()
819 up(&qcam->lock); in qcam_ioctl()
820 qcam->status |= QC_PARAM_CHANGE; in qcam_ioctl()
838 qcam->width = 320; in qcam_ioctl()
839 qcam->height = 240; in qcam_ioctl()
840 qcam->transfer_scale = 4; in qcam_ioctl()
844 qcam->transfer_scale = 2; in qcam_ioctl()
848 qcam->width = 320; in qcam_ioctl()
849 qcam->height = 240; in qcam_ioctl()
850 qcam->transfer_scale = 1; in qcam_ioctl()
852 down(&qcam->lock); in qcam_ioctl()
853 qc_setscanmode(qcam); in qcam_ioctl()
854 up(&qcam->lock); in qcam_ioctl()
858 qcam->status |= QC_PARAM_CHANGE; in qcam_ioctl()
867 vw.width=qcam->width/qcam->transfer_scale; in qcam_ioctl()
868 vw.height=qcam->height/qcam->transfer_scale; in qcam_ioctl()
897 struct qcam_device *qcam=(struct qcam_device *)v; in qcam_read() local
899 parport_claim_or_block(qcam->pdev); in qcam_read()
901 down(&qcam->lock); in qcam_read()
903 qc_reset(qcam); in qcam_read()
906 if (qcam->status & QC_PARAM_CHANGE) in qcam_read()
907 qc_set(qcam); in qcam_read()
909 len=qc_capture(qcam, buf,count); in qcam_read()
911 up(&qcam->lock); in qcam_read()
913 parport_release(qcam->pdev); in qcam_read()
936 struct qcam_device *qcam; in init_bwqcam() local
944 qcam=qcam_init(port); in init_bwqcam()
945 if(qcam==NULL) in init_bwqcam()
948 parport_claim_or_block(qcam->pdev); in init_bwqcam()
950 qc_reset(qcam); in init_bwqcam()
952 if(qc_detect(qcam)==0) in init_bwqcam()
954 parport_release(qcam->pdev); in init_bwqcam()
955 parport_unregister_device(qcam->pdev); in init_bwqcam()
956 kfree(qcam); in init_bwqcam()
959 qc_calibrate(qcam); in init_bwqcam()
961 parport_release(qcam->pdev); in init_bwqcam()
963 printk(KERN_INFO "Connectix Quickcam on %s\n", qcam->pport->name); in init_bwqcam()
965 if(video_register_device(&qcam->vdev, VFL_TYPE_GRABBER, video_nr)==-1) in init_bwqcam()
967 parport_unregister_device(qcam->pdev); in init_bwqcam()
968 kfree(qcam); in init_bwqcam()
972 qcams[num_cams++] = qcam; in init_bwqcam()
977 void close_bwqcam(struct qcam_device *qcam) in close_bwqcam() argument
979 video_unregister_device(&qcam->vdev); in close_bwqcam()
980 parport_unregister_device(qcam->pdev); in close_bwqcam()
981 kfree(qcam); in close_bwqcam()