• Home
  • Raw
  • Download

Lines Matching refs:zr

100 	struct zoran *zr = (struct zoran *)codec->master_data->data;  in zr36060_read()  local
103 if (post_office_wait(zr) || post_office_write(zr, 0, 1, reg >> 8) || in zr36060_read()
104 post_office_write(zr, 0, 2, reg & 0xff)) in zr36060_read()
107 data = post_office_read(zr, 0, 3) & 0xff; in zr36060_read()
113 struct zoran *zr = (struct zoran *)codec->master_data->data; in zr36060_write() local
115 if (post_office_wait(zr) || post_office_write(zr, 0, 1, reg >> 8) || in zr36060_write()
116 post_office_write(zr, 0, 2, reg & 0xff)) in zr36060_write()
119 post_office_write(zr, 0, 3, val & 0xff); in zr36060_write()
125 struct zoran *zr = (struct zoran *)codec->master_data->data; in zr36050_read() local
128 if (post_office_wait(zr) || post_office_write(zr, 1, 0, reg >> 2)) // reg. HIGHBYTES in zr36050_read()
131 data = post_office_read(zr, 0, reg & 0x03) & 0xff; // reg. LOWBYTES + read in zr36050_read()
137 struct zoran *zr = (struct zoran *)codec->master_data->data; in zr36050_write() local
139 if (post_office_wait(zr) || post_office_write(zr, 1, 0, reg >> 2)) // reg. HIGHBYTES in zr36050_write()
142 post_office_write(zr, 0, reg & 0x03, val & 0xff); // reg. LOWBYTES + wr. data in zr36050_write()
148 struct zoran *zr = (struct zoran *)codec->master_data->data; in zr36016_read() local
151 if (post_office_wait(zr)) in zr36016_read()
154 data = post_office_read(zr, 2, reg & 0x03) & 0xff; // read in zr36016_read()
161 struct zoran *zr = (struct zoran *)codec->master_data->data; in zr36016_write() local
163 if (post_office_wait(zr)) in zr36016_write()
166 post_office_write(zr, 2, reg & 0x03, val & 0x0ff); // wr. data in zr36016_write()
173 static void dc10_init(struct zoran *zr) in dc10_init() argument
176 GPIO(zr, 4, 0); in dc10_init()
177 GPIO(zr, 5, 1); in dc10_init()
179 GPIO(zr, 7, 0); in dc10_init()
182 static void dc10plus_init(struct zoran *zr) in dc10plus_init() argument
186 static void buz_init(struct zoran *zr) in buz_init() argument
189 pci_write_config_dword(zr->pci_dev, 0xfc, 0x90680f15); in buz_init()
190 pci_write_config_dword(zr->pci_dev, 0x0c, 0x00012020); in buz_init()
191 pci_write_config_dword(zr->pci_dev, 0xe8, 0xc0200000); in buz_init()
194 static void lml33_init(struct zoran *zr) in lml33_init() argument
196 GPIO(zr, 2, 1); // Set Composite input/output in lml33_init()
199 static void avs6eyes_init(struct zoran *zr) in avs6eyes_init() argument
208 GPIO(zr, 4, 1); /* Bt866 SLEEP on */ in avs6eyes_init()
211 GPIO(zr, 0, 1); /* ZR36060 /RESET on */ in avs6eyes_init()
212 GPIO(zr, 1, 0); /* ZR36060 /SLEEP on */ in avs6eyes_init()
213 GPIO(zr, 2, mux & 1); /* MUX S0 */ in avs6eyes_init()
214 GPIO(zr, 3, 0); /* /FRAME on */ in avs6eyes_init()
215 GPIO(zr, 4, 0); /* Bt866 SLEEP off */ in avs6eyes_init()
216 GPIO(zr, 5, mux & 2); /* MUX S1 */ in avs6eyes_init()
217 GPIO(zr, 6, 0); /* ? */ in avs6eyes_init()
218 GPIO(zr, 7, mux & 4); /* MUX S2 */ in avs6eyes_init()
240 static int codec_init(struct zoran *zr, u16 codecid) in codec_init() argument
247 pci_err(zr->pci_dev, "ZR36060 support is not enabled\n"); in codec_init()
255 pci_err(zr->pci_dev, "ZR36050 support is not enabled\n"); in codec_init()
263 pci_err(zr->pci_dev, "ZR36016 support is not enabled\n"); in codec_init()
269 pci_err(zr->pci_dev, "unknown codec id %x\n", codecid); in codec_init()
273 static void codec_exit(struct zoran *zr, u16 codecid) in codec_exit() argument
294 static int videocodec_init(struct zoran *zr) in videocodec_init() argument
299 codec_name = codecid_to_modulename(zr->card.video_codec); in videocodec_init()
301 result = codec_init(zr, zr->card.video_codec); in videocodec_init()
303 pci_err(zr->pci_dev, "failed to load video codec %s: %d\n", in videocodec_init()
308 vfe_name = codecid_to_modulename(zr->card.video_vfe); in videocodec_init()
310 result = codec_init(zr, zr->card.video_vfe); in videocodec_init()
312 pci_err(zr->pci_dev, "failed to load video vfe %s: %d\n", in videocodec_init()
315 codec_exit(zr, zr->card.video_codec); in videocodec_init()
322 static void videocodec_exit(struct zoran *zr) in videocodec_exit() argument
324 if (zr->card.video_codec != CODEC_TYPE_NONE) in videocodec_exit()
325 codec_exit(zr, zr->card.video_codec); in videocodec_exit()
326 if (zr->card.video_vfe != CODEC_TYPE_NONE) in videocodec_exit()
327 codec_exit(zr, zr->card.video_vfe); in videocodec_exit()
659 struct zoran *zr = (struct zoran *)data; in zoran_i2c_getsda() local
666 struct zoran *zr = (struct zoran *)data; in zoran_i2c_getscl() local
673 struct zoran *zr = (struct zoran *)data; in zoran_i2c_setsda() local
676 zr->i2cbr |= 2; in zoran_i2c_setsda()
678 zr->i2cbr &= ~2; in zoran_i2c_setsda()
679 btwrite(zr->i2cbr, ZR36057_I2CBR); in zoran_i2c_setsda()
684 struct zoran *zr = (struct zoran *)data; in zoran_i2c_setscl() local
687 zr->i2cbr |= 1; in zoran_i2c_setscl()
689 zr->i2cbr &= ~1; in zoran_i2c_setscl()
690 btwrite(zr->i2cbr, ZR36057_I2CBR); in zoran_i2c_setscl()
702 static int zoran_register_i2c(struct zoran *zr) in zoran_register_i2c() argument
704 zr->i2c_algo = zoran_i2c_bit_data_template; in zoran_register_i2c()
705 zr->i2c_algo.data = zr; in zoran_register_i2c()
706 strscpy(zr->i2c_adapter.name, ZR_DEVNAME(zr), in zoran_register_i2c()
707 sizeof(zr->i2c_adapter.name)); in zoran_register_i2c()
708 i2c_set_adapdata(&zr->i2c_adapter, &zr->v4l2_dev); in zoran_register_i2c()
709 zr->i2c_adapter.algo_data = &zr->i2c_algo; in zoran_register_i2c()
710 zr->i2c_adapter.dev.parent = &zr->pci_dev->dev; in zoran_register_i2c()
711 return i2c_bit_add_bus(&zr->i2c_adapter); in zoran_register_i2c()
714 static void zoran_unregister_i2c(struct zoran *zr) in zoran_unregister_i2c() argument
716 i2c_del_adapter(&zr->i2c_adapter); in zoran_unregister_i2c()
720 int zoran_check_jpg_settings(struct zoran *zr, in zoran_check_jpg_settings() argument
725 pci_dbg(zr->pci_dev, "%s - dec: %d, Hdcm: %d, Vdcm: %d, Tdcm: %d\n", in zoran_check_jpg_settings()
728 pci_dbg(zr->pci_dev, "%s - x: %d, y: %d, w: %d, y: %d\n", __func__, in zoran_check_jpg_settings()
758 if (zr->card.type == DC10_NEW) { in zoran_check_jpg_settings()
759 pci_dbg(zr->pci_dev, in zoran_check_jpg_settings()
781 (zr->card.type == DC10_NEW || settings->hor_dcm != 4)) { in zoran_check_jpg_settings()
836 pci_err(zr->pci_dev, "%s - error in params for decimation = 0\n", __func__); in zoran_check_jpg_settings()
841 pci_err(zr->pci_dev, "%s - decimation = %d, must be 0, 1, 2 or 4\n", in zoran_check_jpg_settings()
868 static int zoran_init_video_device(struct zoran *zr, struct video_device *video_dev, int dir) in zoran_init_video_device() argument
874 video_dev->v4l2_dev = &zr->v4l2_dev; in zoran_init_video_device()
875 video_dev->lock = &zr->lock; in zoran_init_video_device()
878 strscpy(video_dev->name, ZR_DEVNAME(zr), sizeof(video_dev->name)); in zoran_init_video_device()
880 zoran_queue_init(zr, &zr->vq, V4L2_BUF_TYPE_VIDEO_CAPTURE); in zoran_init_video_device()
882 err = video_register_device(video_dev, VFL_TYPE_VIDEO, video_nr[zr->id]); in zoran_init_video_device()
885 video_set_drvdata(video_dev, zr); in zoran_init_video_device()
889 static void zoran_exit_video_devices(struct zoran *zr) in zoran_exit_video_devices() argument
891 video_unregister_device(zr->video_dev); in zoran_exit_video_devices()
892 kfree(zr->video_dev); in zoran_exit_video_devices()
895 static int zoran_init_video_devices(struct zoran *zr) in zoran_init_video_devices() argument
899 zr->video_dev = video_device_alloc(); in zoran_init_video_devices()
900 if (!zr->video_dev) in zoran_init_video_devices()
903 err = zoran_init_video_device(zr, zr->video_dev, V4L2_CAP_VIDEO_CAPTURE); in zoran_init_video_devices()
905 kfree(zr->video_dev); in zoran_init_video_devices()
913 static int zoran_i2c_init(struct zoran *zr) in zoran_i2c_init() argument
917 pci_info(zr->pci_dev, "Initializing i2c bus...\n"); in zoran_i2c_init()
919 err = zoran_register_i2c(zr); in zoran_i2c_init()
921 pci_err(zr->pci_dev, "%s - cannot initialize i2c bus\n", __func__); in zoran_i2c_init()
925 zr->decoder = v4l2_i2c_new_subdev(&zr->v4l2_dev, &zr->i2c_adapter, in zoran_i2c_init()
926 zr->card.i2c_decoder, 0, in zoran_i2c_init()
927 zr->card.addrs_decoder); in zoran_i2c_init()
928 if (!zr->decoder) { in zoran_i2c_init()
929 pci_err(zr->pci_dev, "Fail to get decoder %s\n", zr->card.i2c_decoder); in zoran_i2c_init()
934 if (zr->card.i2c_encoder) { in zoran_i2c_init()
935 zr->encoder = v4l2_i2c_new_subdev(&zr->v4l2_dev, &zr->i2c_adapter, in zoran_i2c_init()
936 zr->card.i2c_encoder, 0, in zoran_i2c_init()
937 zr->card.addrs_encoder); in zoran_i2c_init()
938 if (!zr->encoder) { in zoran_i2c_init()
939 pci_err(zr->pci_dev, "Fail to get encoder %s\n", zr->card.i2c_encoder); in zoran_i2c_init()
947 zoran_unregister_i2c(zr); in zoran_i2c_init()
951 static void zoran_i2c_exit(struct zoran *zr) in zoran_i2c_exit() argument
953 zoran_unregister_i2c(zr); in zoran_i2c_exit()
956 void zoran_open_init_params(struct zoran *zr) in zoran_open_init_params() argument
960 zr->v4l_settings.width = 192; in zoran_open_init_params()
961 zr->v4l_settings.height = 144; in zoran_open_init_params()
962 zr->v4l_settings.format = &zoran_formats[7]; /* YUY2 - YUV-4:2:2 packed */ in zoran_open_init_params()
963 zr->v4l_settings.bytesperline = zr->v4l_settings.width * in zoran_open_init_params()
964 ((zr->v4l_settings.format->depth + 7) / 8); in zoran_open_init_params()
967 zr->jpg_settings.decimation = 1; in zoran_open_init_params()
968 zr->jpg_settings.jpg_comp.quality = 50; /* default compression factor 8 */ in zoran_open_init_params()
969 if (zr->card.type != BUZ) in zoran_open_init_params()
970 zr->jpg_settings.odd_even = 1; in zoran_open_init_params()
972 zr->jpg_settings.odd_even = 0; in zoran_open_init_params()
973 zr->jpg_settings.jpg_comp.APPn = 0; in zoran_open_init_params()
974 zr->jpg_settings.jpg_comp.APP_len = 0; /* No APPn marker */ in zoran_open_init_params()
975 memset(zr->jpg_settings.jpg_comp.APP_data, 0, in zoran_open_init_params()
976 sizeof(zr->jpg_settings.jpg_comp.APP_data)); in zoran_open_init_params()
977 zr->jpg_settings.jpg_comp.COM_len = 0; /* No COM marker */ in zoran_open_init_params()
978 memset(zr->jpg_settings.jpg_comp.COM_data, 0, in zoran_open_init_params()
979 sizeof(zr->jpg_settings.jpg_comp.COM_data)); in zoran_open_init_params()
980 zr->jpg_settings.jpg_comp.jpeg_markers = in zoran_open_init_params()
982 i = zoran_check_jpg_settings(zr, &zr->jpg_settings, 0); in zoran_open_init_params()
984 pci_err(zr->pci_dev, "%s internal error\n", __func__); in zoran_open_init_params()
986 zr->buffer_size = zr->v4l_settings.bytesperline * zr->v4l_settings.height; in zoran_open_init_params()
988 clear_interrupt_counters(zr); in zoran_open_init_params()
991 static int zr36057_init(struct zoran *zr) in zr36057_init() argument
995 pci_info(zr->pci_dev, "initializing card[%d]\n", zr->id); in zr36057_init()
1001 zr->norm = V4L2_STD_PAL; in zr36057_init()
1002 zr->timing = zr->card.tvn[ZR_NORM_PAL]; in zr36057_init()
1004 zr->norm = V4L2_STD_NTSC; in zr36057_init()
1005 zr->timing = zr->card.tvn[ZR_NORM_NTSC]; in zr36057_init()
1007 zr->norm = V4L2_STD_SECAM; in zr36057_init()
1008 zr->timing = zr->card.tvn[ZR_NORM_SECAM]; in zr36057_init()
1010 if (!zr->timing) { in zr36057_init()
1011 pci_warn(zr->pci_dev, in zr36057_init()
1014 zr->norm = V4L2_STD_PAL; in zr36057_init()
1015 zr->timing = zr->card.tvn[ZR_NORM_PAL]; in zr36057_init()
1018 if (default_input > zr->card.inputs - 1) { in zr36057_init()
1019 pci_warn(zr->pci_dev, "default_input value %d out of range (0-%d)\n", in zr36057_init()
1020 default_input, zr->card.inputs - 1); in zr36057_init()
1023 zr->input = default_input; in zr36057_init()
1026 zoran_open_init_params(zr); in zr36057_init()
1029 zr->stat_com = dma_alloc_coherent(&zr->pci_dev->dev, in zr36057_init()
1031 &zr->p_sc, GFP_KERNEL); in zr36057_init()
1032 if (!zr->stat_com) in zr36057_init()
1036 zr->stat_com[j] = cpu_to_le32(1); /* mark as unavailable to zr36057 */ in zr36057_init()
1038 zr->stat_comb = dma_alloc_coherent(&zr->pci_dev->dev, in zr36057_init()
1040 &zr->p_scb, GFP_KERNEL); in zr36057_init()
1041 if (!zr->stat_comb) { in zr36057_init()
1046 err = zoran_init_video_devices(zr); in zr36057_init()
1050 zoran_init_hardware(zr); in zr36057_init()
1052 decoder_call(zr, video, s_stream, 0); in zr36057_init()
1053 encoder_call(zr, video, s_routing, 2, 0, 0); in zr36057_init()
1056 zr->initialized = 1; in zr36057_init()
1060 dma_free_coherent(&zr->pci_dev->dev, BUZ_NUM_STAT_COM * sizeof(u32) * 2, in zr36057_init()
1061 zr->stat_comb, zr->p_scb); in zr36057_init()
1063 dma_free_coherent(&zr->pci_dev->dev, BUZ_NUM_STAT_COM * sizeof(u32), in zr36057_init()
1064 zr->stat_com, zr->p_sc); in zr36057_init()
1071 struct zoran *zr = to_zoran(v4l2_dev); in zoran_remove() local
1073 if (!zr->initialized) in zoran_remove()
1076 debugfs_remove_recursive(zr->dbgfs_dir); in zoran_remove()
1078 zoran_queue_exit(zr); in zoran_remove()
1081 if (zr->codec) in zoran_remove()
1082 videocodec_detach(zr->codec); in zoran_remove()
1083 if (zr->vfe) in zoran_remove()
1084 videocodec_detach(zr->vfe); in zoran_remove()
1085 videocodec_exit(zr); in zoran_remove()
1088 zoran_i2c_exit(zr); in zoran_remove()
1090 zoran_set_pci_master(zr, 0); in zoran_remove()
1093 pci_free_irq(zr->pci_dev, 0, zr); in zoran_remove()
1095 dma_free_coherent(&zr->pci_dev->dev, BUZ_NUM_STAT_COM * sizeof(u32), in zoran_remove()
1096 zr->stat_com, zr->p_sc); in zoran_remove()
1097 dma_free_coherent(&zr->pci_dev->dev, BUZ_NUM_STAT_COM * sizeof(u32) * 2, in zoran_remove()
1098 zr->stat_comb, zr->p_scb); in zoran_remove()
1100 pci_disable_device(zr->pci_dev); in zoran_remove()
1101 zoran_exit_video_devices(zr); in zoran_remove()
1103 v4l2_ctrl_handler_free(&zr->hdl); in zoran_remove()
1104 v4l2_device_unregister(&zr->v4l2_dev); in zoran_remove()
1112 static struct videocodec_master *zoran_setup_videocodec(struct zoran *zr, in zoran_setup_videocodec() argument
1117 m = devm_kmalloc(&zr->pci_dev->dev, sizeof(*m), GFP_KERNEL); in zoran_setup_videocodec()
1130 strscpy(m->name, ZR_DEVNAME(zr), sizeof(m->name)); in zoran_setup_videocodec()
1131 m->data = zr; in zoran_setup_videocodec()
1156 struct zoran *zr = to_zoran(sd->v4l2_dev); in zoran_subdev_notify() local
1163 GPIO(zr, 7, 0); in zoran_subdev_notify()
1165 GPIO(zr, 7, 1); in zoran_subdev_notify()
1170 struct zoran *zr = container_of(ctrl->handler, struct zoran, hdl); in zoran_video_set_ctrl() local
1174 zr->jpg_settings.jpg_comp.quality = ctrl->val; in zoran_video_set_ctrl()
1175 return zoran_check_jpg_settings(zr, &zr->jpg_settings, 0); in zoran_video_set_ctrl()
1189 struct zoran *zr = seq->private; in zoran_debugfs_show() local
1191 seq_printf(seq, "Running mode %x\n", zr->running); in zoran_debugfs_show()
1192 seq_printf(seq, "Codec mode %x\n", zr->codec_mode); in zoran_debugfs_show()
1193 seq_printf(seq, "Norm %llx\n", zr->norm); in zoran_debugfs_show()
1194 seq_printf(seq, "Input %d\n", zr->input); in zoran_debugfs_show()
1195 seq_printf(seq, "Buffersize %d\n", zr->buffer_size); in zoran_debugfs_show()
1197 seq_printf(seq, "V4L width %dx%d\n", zr->v4l_settings.width, zr->v4l_settings.height); in zoran_debugfs_show()
1198 seq_printf(seq, "V4L bytesperline %d\n", zr->v4l_settings.bytesperline); in zoran_debugfs_show()
1200 seq_printf(seq, "JPG decimation %u\n", zr->jpg_settings.decimation); in zoran_debugfs_show()
1201 seq_printf(seq, "JPG hor_dcm %u\n", zr->jpg_settings.hor_dcm); in zoran_debugfs_show()
1202 seq_printf(seq, "JPG ver_dcm %u\n", zr->jpg_settings.ver_dcm); in zoran_debugfs_show()
1203 seq_printf(seq, "JPG tmp_dcm %u\n", zr->jpg_settings.tmp_dcm); in zoran_debugfs_show()
1204 seq_printf(seq, "JPG odd_even %u\n", zr->jpg_settings.odd_even); in zoran_debugfs_show()
1206 zr->jpg_settings.img_x, in zoran_debugfs_show()
1207 zr->jpg_settings.img_y, in zoran_debugfs_show()
1208 zr->jpg_settings.img_width, in zoran_debugfs_show()
1209 zr->jpg_settings.img_height); in zoran_debugfs_show()
1211 seq_printf(seq, "Prepared %u\n", zr->prepared); in zoran_debugfs_show()
1212 seq_printf(seq, "Queued %u\n", zr->queued); in zoran_debugfs_show()
1227 struct zoran *zr; in zoran_probe() local
1255 zr = devm_kzalloc(&pdev->dev, sizeof(*zr), GFP_KERNEL); in zoran_probe()
1256 if (!zr) in zoran_probe()
1259 zr->v4l2_dev.notify = zoran_subdev_notify; in zoran_probe()
1260 if (v4l2_device_register(&pdev->dev, &zr->v4l2_dev)) in zoran_probe()
1262 zr->pci_dev = pdev; in zoran_probe()
1263 zr->id = nr; in zoran_probe()
1264 snprintf(ZR_DEVNAME(zr), sizeof(ZR_DEVNAME(zr)), "MJPEG[%u]", zr->id); in zoran_probe()
1265 if (v4l2_ctrl_handler_init(&zr->hdl, 10)) in zoran_probe()
1267 zr->v4l2_dev.ctrl_handler = &zr->hdl; in zoran_probe()
1268 v4l2_ctrl_new_std(&zr->hdl, &zoran_video_ctrl_ops, in zoran_probe()
1271 spin_lock_init(&zr->spinlock); in zoran_probe()
1272 mutex_init(&zr->lock); in zoran_probe()
1275 zr->revision = zr->pci_dev->revision; in zoran_probe()
1277 pci_info(zr->pci_dev, "Zoran ZR360%c7 (rev %d), irq: %d, memory: 0x%08llx\n", in zoran_probe()
1278 zr->revision < 2 ? '5' : '6', zr->revision, in zoran_probe()
1279 zr->pci_dev->irq, (uint64_t)pci_resource_start(zr->pci_dev, 0)); in zoran_probe()
1280 if (zr->revision >= 2) in zoran_probe()
1281 pci_info(zr->pci_dev, "Subsystem vendor=0x%04x id=0x%04x\n", in zoran_probe()
1282 zr->pci_dev->subsystem_vendor, zr->pci_dev->subsystem_device); in zoran_probe()
1286 if (zr->revision < 2) { in zoran_probe()
1297 pci_info(zr->pci_dev, "%s() - card %s detected\n", __func__, in zoran_probe()
1315 zr->card = zoran_cards[card_num]; in zoran_probe()
1316 snprintf(ZR_DEVNAME(zr), sizeof(ZR_DEVNAME(zr)), "%s[%u]", in zoran_probe()
1317 zr->card.name, zr->id); in zoran_probe()
1319 err = pci_request_regions(pdev, ZR_DEVNAME(zr)); in zoran_probe()
1323 zr->zr36057_mem = devm_ioremap(&pdev->dev, pci_resource_start(pdev, 0), in zoran_probe()
1325 if (!zr->zr36057_mem) { in zoran_probe()
1330 result = pci_request_irq(pdev, 0, zoran_irq, NULL, zr, ZR_DEVNAME(zr)); in zoran_probe()
1336 __func__, zr->pci_dev->irq); in zoran_probe()
1344 pci_read_config_byte(zr->pci_dev, PCI_LATENCY_TIMER, in zoran_probe()
1346 need_latency = zr->revision > 1 ? 32 : 48; in zoran_probe()
1348 pci_info(zr->pci_dev, "Changing PCI latency from %d to %d\n", in zoran_probe()
1350 pci_write_config_byte(zr->pci_dev, PCI_LATENCY_TIMER, need_latency); in zoran_probe()
1353 zr36057_restart(zr); in zoran_probe()
1355 err = zoran_i2c_init(zr); in zoran_probe()
1359 pci_info(zr->pci_dev, "Initializing videocodec bus...\n"); in zoran_probe()
1360 err = videocodec_init(zr); in zoran_probe()
1365 jpeg_codec_sleep(zr, 1); in zoran_probe()
1366 jpeg_codec_reset(zr); in zoran_probe()
1369 if (zr->card.video_codec != 0) { in zoran_probe()
1370 master_codec = zoran_setup_videocodec(zr, zr->card.video_codec); in zoran_probe()
1373 zr->codec = videocodec_attach(master_codec); in zoran_probe()
1374 if (!zr->codec) { in zoran_probe()
1378 if (zr->codec->type != zr->card.video_codec) { in zoran_probe()
1383 if (zr->card.video_vfe != 0) { in zoran_probe()
1384 master_vfe = zoran_setup_videocodec(zr, zr->card.video_vfe); in zoran_probe()
1387 zr->vfe = videocodec_attach(master_vfe); in zoran_probe()
1388 if (!zr->vfe) { in zoran_probe()
1392 if (zr->vfe->type != zr->card.video_vfe) { in zoran_probe()
1399 if ((pci_pci_problems & PCIPCI_NATOMA) && zr->revision <= 1) in zoran_probe()
1400 pci_info(zr->pci_dev, "ZR36057/Natoma bug, max. buffer size is 128K\n"); in zoran_probe()
1402 if (zr36057_init(zr) < 0) in zoran_probe()
1405 zr->map_mode = ZORAN_MAP_MODE_RAW; in zoran_probe()
1407 zr->dbgfs_dir = debugfs_create_dir(ZR_DEVNAME(zr), NULL); in zoran_probe()
1408 debugfs_create_file("debug", 0444, zr->dbgfs_dir, zr, in zoran_probe()
1413 videocodec_detach(zr->vfe); in zoran_probe()
1415 videocodec_detach(zr->codec); in zoran_probe()
1417 videocodec_exit(zr); in zoran_probe()
1419 zoran_i2c_exit(zr); in zoran_probe()
1422 pci_free_irq(zr->pci_dev, 0, zr); in zoran_probe()
1426 v4l2_ctrl_handler_free(&zr->hdl); in zoran_probe()
1427 v4l2_device_unregister(&zr->v4l2_dev); in zoran_probe()