cx                111 arch/arm/mach-omap2/cpuidle34xx.c 	struct omap3_idle_statedata *cx = &omap3_idle_data[index];
cx                117 arch/arm/mach-omap2/cpuidle34xx.c 	if (cx->flags & OMAP_CPUIDLE_CX_NO_CLKDM_IDLE) {
cx                120 arch/arm/mach-omap2/cpuidle34xx.c 		pwrdm_set_next_pwrst(mpu_pd, cx->mpu_state);
cx                121 arch/arm/mach-omap2/cpuidle34xx.c 		pwrdm_set_next_pwrst(core_pd, cx->core_state);
cx                128 arch/arm/mach-omap2/cpuidle34xx.c 	if (cx->mpu_state == PWRDM_POWER_OFF)
cx                138 arch/arm/mach-omap2/cpuidle34xx.c 	if (cx->mpu_state == PWRDM_POWER_OFF &&
cx                143 arch/arm/mach-omap2/cpuidle34xx.c 	if (cx->flags & OMAP_CPUIDLE_CX_NO_CLKDM_IDLE)
cx                167 arch/arm/mach-omap2/cpuidle34xx.c 	struct omap3_idle_statedata *cx = &omap3_idle_data[index];
cx                185 arch/arm/mach-omap2/cpuidle34xx.c 	if ((cx->mpu_state >= mpu_deepest_state) &&
cx                186 arch/arm/mach-omap2/cpuidle34xx.c 	    (cx->core_state >= core_deepest_state))
cx                194 arch/arm/mach-omap2/cpuidle34xx.c 		cx = &omap3_idle_data[idx];
cx                195 arch/arm/mach-omap2/cpuidle34xx.c 		if ((cx->mpu_state >= mpu_deepest_state) &&
cx                196 arch/arm/mach-omap2/cpuidle34xx.c 		    (cx->core_state >= core_deepest_state)) {
cx                220 arch/arm/mach-omap2/cpuidle34xx.c 	struct omap3_idle_statedata *cx;
cx                240 arch/arm/mach-omap2/cpuidle34xx.c 	cx = &omap3_idle_data[new_state_idx];
cx                244 arch/arm/mach-omap2/cpuidle34xx.c 	if (per_next_state < cx->per_min_state) {
cx                245 arch/arm/mach-omap2/cpuidle34xx.c 		per_next_state = cx->per_min_state;
cx                 97 arch/arm/mach-omap2/cpuidle44xx.c 	struct idle_statedata *cx = state_ptr + index;
cx                101 arch/arm/mach-omap2/cpuidle44xx.c 	cx->mpu_state_vote++;
cx                102 arch/arm/mach-omap2/cpuidle44xx.c 	if (cx->mpu_state_vote == num_online_cpus()) {
cx                103 arch/arm/mach-omap2/cpuidle44xx.c 		pwrdm_set_logic_retst(mpu_pd, cx->mpu_logic_state);
cx                104 arch/arm/mach-omap2/cpuidle44xx.c 		omap_set_pwrdm_state(mpu_pd, cx->mpu_state);
cx                108 arch/arm/mach-omap2/cpuidle44xx.c 	omap4_enter_lowpower(dev->cpu, cx->cpu_state);
cx                111 arch/arm/mach-omap2/cpuidle44xx.c 	if (cx->mpu_state_vote == num_online_cpus())
cx                113 arch/arm/mach-omap2/cpuidle44xx.c 	cx->mpu_state_vote--;
cx                123 arch/arm/mach-omap2/cpuidle44xx.c 	struct idle_statedata *cx = state_ptr + index;
cx                149 arch/arm/mach-omap2/cpuidle44xx.c 	mpuss_can_lose_context = (cx->mpu_state == PWRDM_POWER_RET) &&
cx                150 arch/arm/mach-omap2/cpuidle44xx.c 				 (cx->mpu_logic_state == PWRDM_POWER_OFF);
cx                165 arch/arm/mach-omap2/cpuidle44xx.c 		pwrdm_set_logic_retst(mpu_pd, cx->mpu_logic_state);
cx                166 arch/arm/mach-omap2/cpuidle44xx.c 		omap_set_pwrdm_state(mpu_pd, cx->mpu_state);
cx                176 arch/arm/mach-omap2/cpuidle44xx.c 	omap4_enter_lowpower(dev->cpu, cx->cpu_state);
cx               1426 arch/mips/math-emu/cp1emu.c 	ieee754_csr_save.cx |= ieee754_csr.cx;				\
cx               1429 arch/mips/math-emu/cp1emu.c 	ieee754_csr.cx |= ieee754_csr_save.cx;				\
cx                127 arch/mips/math-emu/dp_sqrt.c 		oldcsr.cx |= IEEE754_INEXACT;
cx                148 arch/mips/math-emu/ieee754.h 	__BITFIELD_FIELD(unsigned cx:6,		/* exceptions this operation */
cx                171 arch/mips/math-emu/ieee754.h 	return (ieee754_csr.cx);
cx                178 arch/mips/math-emu/ieee754.h 	return (ieee754_csr.cx & n);
cx                 23 arch/mips/math-emu/ieee754int.h 	ieee754_csr.cx = 0;
cx                 28 arch/mips/math-emu/ieee754int.h 	ieee754_csr.cx |= flags;
cx                 28 arch/s390/include/uapi/asm/guarded_storage.h 			__u8 cx	: 1;
cx                989 arch/s390/kvm/kvm-s390.c 	int cx;
cx                992 arch/s390/kvm/kvm-s390.c 	kvm_for_each_vcpu(cx, vcpu, kvm)
cx                 34 arch/x86/boot/apm.c 	if (!(oreg.cx & 0x02))		/* 32 bits supported? */
cx                 47 arch/x86/boot/apm.c 	boot_params.apm_bios_info.cseg_16     = oreg.cx;
cx                 70 arch/x86/boot/apm.c 	boot_params.apm_bios_info.flags   = oreg.cx;
cx                249 arch/x86/boot/boot.h 			u16 cx, hcx;
cx                 29 arch/x86/boot/edd.c 	ireg.cx = 0x0001;		/* Sector 0-0-1 */
cx                 95 arch/x86/boot/edd.c 	ei->interface_support = oreg.cx; /* EDD functionality subsets */
cx                 27 arch/x86/boot/memory.c 	ireg.cx  = sizeof(buf);
cx                 84 arch/x86/boot/memory.c 	if (oreg.cx || oreg.dx) {
cx                 85 arch/x86/boot/memory.c 		oreg.ax = oreg.cx;
cx                 44 arch/x86/boot/tty.c 	ireg.cx = 0x0001;
cx                 66 arch/x86/boot/video-vesa.c 		ireg.cx = mode;
cx                114 arch/x86/boot/video-vesa.c 	ireg.cx = vesa_mode;
cx                 85 arch/x86/boot/video-vga.c 	ireg.cx = 0x0607;
cx                108 arch/x86/boot/video-vga.c 	ireg.cx = 0x0b0c;
cx                 61 arch/x86/entry/common.c 				    regs->cx, regs->dx, regs->si);
cx                110 arch/x86/entry/common.c 			sd.args[1] = regs->cx;
cx                342 arch/x86/entry/common.c 			(unsigned int)regs->bx, (unsigned int)regs->cx,
cx               2892 arch/x86/events/intel/core.c 		struct event_constraint *cx;
cx               2897 arch/x86/events/intel/core.c 		cx = &cpuc->constraint_list[idx];
cx               2903 arch/x86/events/intel/core.c 		*cx = *c;
cx               2908 arch/x86/events/intel/core.c 		cx->flags |= PERF_X86_EVENT_DYNAMIC;
cx               2909 arch/x86/events/intel/core.c 		c = cx;
cx                205 arch/x86/events/intel/ds.c 	u64 ax, bx, cx, dx;
cx                213 arch/x86/events/intel/ds.c 	u64 ax, bx, cx, dx;
cx                225 arch/x86/events/intel/ds.c 	u64 ax, bx, cx, dx;
cx                254 arch/x86/events/intel/ds.c 	u64 ax, bx, cx, dx;
cx               1403 arch/x86/events/intel/ds.c 		regs->cx = pebs->cx;
cx               1486 arch/x86/events/intel/ds.c 	regs->cx = gprs->cx;
cx                 89 arch/x86/ia32/ia32_signal.c 		COPY(dx); COPY(cx); COPY(ip); COPY(ax);
cx                198 arch/x86/ia32/ia32_signal.c 		put_user_ex(regs->cx, &sc->cx);
cx                319 arch/x86/ia32/ia32_signal.c 	regs->cx = 0;
cx                398 arch/x86/ia32/ia32_signal.c 	regs->cx = (unsigned long) &frame->uc;
cx                 52 arch/x86/include/asm/apm.h 	int	cx, dx, si;
cx                 67 arch/x86/include/asm/apm.h 		: "=a" (*eax), "=b" (error), "=c" (cx), "=d" (dx),
cx                 35 arch/x86/include/asm/asm-prototypes.h INDIRECT_THUNK(cx)
cx                 42 arch/x86/include/asm/asm.h #define _ASM_CX		__ASM_REG(cx)
cx                 62 arch/x86/include/asm/asm.h #define _ASM_ARG3W	cx
cx                 95 arch/x86/include/asm/asm.h #define _ASM_ARG4W	cx
cx                111 arch/x86/include/asm/elf.h 	_r->bx = 0; _r->cx = 0; _r->dx = 0;	\
cx                124 arch/x86/include/asm/elf.h 	pr_reg[1] = regs->cx;			\
cx                176 arch/x86/include/asm/elf.h 	/*regs->ax = */ regs->bx = regs->cx = regs->dx = 0;
cx                220 arch/x86/include/asm/elf.h 	(pr_reg)[11] = (regs)->cx;				\
cx                 86 arch/x86/include/asm/kexec.h 		asm volatile("movl %%ecx,%0" : "=m"(newregs->cx));
cx                100 arch/x86/include/asm/kexec.h 		asm volatile("movq %%rcx,%0" : "=m"(newregs->cx));
cx                206 arch/x86/include/asm/perf_event.h 	u64 flags, ip, ax, cx, dx, bx, sp, bp, si, di;
cx                281 arch/x86/include/asm/processor.h 	unsigned long		cx;
cx                 28 arch/x86/include/asm/ptrace.h 	unsigned long cx;
cx                 73 arch/x86/include/asm/ptrace.h 	unsigned long cx;
cx                312 arch/x86/include/asm/ptrace.h 		offsetof(struct pt_regs, cx),
cx                319 arch/x86/include/asm/ptrace.h 		offsetof(struct pt_regs, cx),
cx                123 arch/x86/include/asm/syscall.h 		*args++ = regs->cx;
cx                147 arch/x86/include/asm/syscall.h 		regs->cx = *args++;
cx                 20 arch/x86/include/asm/syscall_wrapper.h 	      ,,(unsigned int)regs->bx,,(unsigned int)regs->cx		\
cx                 80 arch/x86/include/asm/user_32.h 	unsigned long	cx;
cx                 81 arch/x86/include/asm/user_64.h 	unsigned long	cx;
cx                111 arch/x86/include/asm/xen/interface_64.h     __DECL_REG(cx);
cx                213 arch/x86/include/uapi/asm/sigcontext.h 	__u32				cx;
cx                253 arch/x86/include/uapi/asm/sigcontext.h 	__u64				cx;
cx                101 arch/x86/kernel/acpi/cstate.c 	struct acpi_processor_cx *cx = _cx;
cx                111 arch/x86/kernel/acpi/cstate.c 	cstate_type = ((cx->address >> MWAIT_SUBSTATE_SIZE) &
cx                120 arch/x86/kernel/acpi/cstate.c 				cx->address, edx_part);
cx                136 arch/x86/kernel/acpi/cstate.c 			cx->type);
cx                138 arch/x86/kernel/acpi/cstate.c 	snprintf(cx->desc,
cx                140 arch/x86/kernel/acpi/cstate.c 			cx->address);
cx                146 arch/x86/kernel/acpi/cstate.c 		struct acpi_processor_cx *cx, struct acpi_power_register *reg)
cx                159 arch/x86/kernel/acpi/cstate.c 	percpu_entry->states[cx->index].eax = 0;
cx                160 arch/x86/kernel/acpi/cstate.c 	percpu_entry->states[cx->index].ecx = 0;
cx                164 arch/x86/kernel/acpi/cstate.c 	retval = call_on_cpu(cpu, acpi_processor_ffh_cstate_probe_cpu, cx,
cx                168 arch/x86/kernel/acpi/cstate.c 		percpu_entry->states[cx->index].eax = cx->address;
cx                169 arch/x86/kernel/acpi/cstate.c 		percpu_entry->states[cx->index].ecx = MWAIT_ECX_INTERRUPT_BREAK;
cx                178 arch/x86/kernel/acpi/cstate.c 		cx->bm_sts_skip = 1;
cx                184 arch/x86/kernel/acpi/cstate.c void __cpuidle acpi_processor_ffh_cstate_enter(struct acpi_processor_cx *cx)
cx                190 arch/x86/kernel/acpi/cstate.c 	mwait_idle_with_hints(percpu_entry->states[cx->index].eax,
cx                191 arch/x86/kernel/acpi/cstate.c 	                      percpu_entry->states[cx->index].ecx);
cx               1638 arch/x86/kernel/apm_32.c 	unsigned short	cx;
cx               1649 arch/x86/kernel/apm_32.c 	    !(error = apm_get_power_status(&bx, &cx, &dx))) {
cx               1652 arch/x86/kernel/apm_32.c 		if ((cx & 0xff) != 0xff)
cx               1653 arch/x86/kernel/apm_32.c 			percentage = cx & 0xff;
cx               1656 arch/x86/kernel/apm_32.c 			battery_flag = (cx >> 8) & 0xff;
cx               1719 arch/x86/kernel/apm_32.c 	unsigned short	cx;
cx               1781 arch/x86/kernel/apm_32.c 		error = apm_get_power_status(&bx, &cx, &dx);
cx               1819 arch/x86/kernel/apm_32.c 			if ((cx & 0xff) == 0xff)
cx               1822 arch/x86/kernel/apm_32.c 				printk("%d%%\n", cx & 0xff);
cx               1826 arch/x86/kernel/apm_32.c 				       (cx >> 8) & 0xff);
cx                 55 arch/x86/kernel/asm-offsets.c 	OFFSET(IA32_SIGCONTEXT_cx, sigcontext_32, cx);
cx                 28 arch/x86/kernel/asm-offsets_32.c 	OFFSET(PT_ECX, pt_regs, cx);
cx                 57 arch/x86/kernel/asm-offsets_64.c 	ENTRY(cx);
cx                 43 arch/x86/kernel/doublefault.c 				t->ax, t->bx, t->cx, t->dx);
cx                 50 arch/x86/kernel/kgdb.c 	{ "cx", 4, offsetof(struct pt_regs, cx) },
cx                 66 arch/x86/kernel/kgdb.c 	{ "cx", 8, offsetof(struct pt_regs, cx) },
cx                 23 arch/x86/kernel/perf_regs.c 	PT_REGS_OFFSET(PERF_REG_X86_CX, cx),
cx                157 arch/x86/kernel/perf_regs.c 	regs_user_copy->cx = user_regs->cx;
cx                 75 arch/x86/kernel/process_32.c 		regs->ax, regs->bx, regs->cx, regs->dx);
cx                 82 arch/x86/kernel/process_64.c 	       regs->ax, regs->bx, regs->cx);
cx                 78 arch/x86/kernel/ptrace.c 	REG_OFFSET_NAME(cx),
cx                879 arch/x86/kernel/ptrace.c 	R32(ecx, cx);
cx                952 arch/x86/kernel/ptrace.c 	R32(ecx, cx);
cx                119 arch/x86/kernel/signal.c 		COPY(dx); COPY(cx); COPY(ip); COPY(ax);
cx                179 arch/x86/kernel/signal.c 		put_user_ex(regs->cx, &sc->cx);
cx                365 arch/x86/kernel/signal.c 	regs->cx = 0;
cx                431 arch/x86/kernel/signal.c 	regs->cx = (unsigned long)&frame->uc;
cx                814 arch/x86/kernel/uprobes.c 			reg_offset = offsetof(struct pt_regs, cx);
cx                126 arch/x86/kernel/vm86_32.c 		put_user_ex(regs->pt.cx, &user->regs.ecx);
cx                290 arch/x86/kernel/vm86_32.c 		get_user_ex(vm86regs.pt.cx, &user_vm86->regs.ecx);
cx                368 arch/x86/kvm/emulate.c 	FOP1E(op, cx) \
cx                377 arch/x86/kvm/emulate.c 	FOP1EEX(op, cx) \
cx               3056 arch/x86/kvm/emulate.c 	tss->cx = reg_read(ctxt, VCPU_REGS_RCX);
cx               3080 arch/x86/kvm/emulate.c 	*reg_write(ctxt, VCPU_REGS_RCX) = tss->cx;
cx                 46 arch/x86/kvm/tss.h 	u16 cx;
cx                176 arch/x86/lib/insn-eval.c 	case offsetof(struct pt_regs, cx):
cx                403 arch/x86/lib/insn-eval.c 		offsetof(struct pt_regs, cx),
cx                 34 arch/x86/math-emu/get_address.c 	offsetof(struct pt_regs, cx),
cx                 57 arch/x86/mm/extable.c 	*(int *)regs->cx = INT_MIN / 2;
cx                150 arch/x86/mm/extable.c 			 (unsigned int)regs->cx, regs->ip, (void *)regs->ip))
cx                167 arch/x86/mm/extable.c 			 (unsigned int)regs->cx, (unsigned int)regs->dx,
cx                117 arch/x86/mm/mmio-mod.c 		 regs->ax, regs->bx, regs->cx, regs->dx);
cx                122 arch/x86/mm/mmio-mod.c 		 regs->ax, regs->cx, regs->dx);
cx                248 arch/x86/mm/pf_in.c 		rv = (unsigned char *)&regs->cx;
cx                316 arch/x86/mm/pf_in.c 			rv = 1 + (unsigned char *)&regs->cx;
cx                344 arch/x86/mm/pf_in.c 		rv = &regs->cx;
cx                180 arch/x86/um/signal.c 	GETREG(CX, cx);
cx                259 arch/x86/um/signal.c 	PUTREG(CX, cx);
cx                172 arch/x86/xen/enlighten_pv.c 		      unsigned int *cx, unsigned int *dx)
cx                185 arch/x86/xen/enlighten_pv.c 		*cx = cpuid_leaf5_ecx_val;
cx                198 arch/x86/xen/enlighten_pv.c 		  "=c" (*cx),
cx                200 arch/x86/xen/enlighten_pv.c 		: "0" (*ax), "2" (*cx));
cx                215 arch/x86/xen/enlighten_pv.c 	unsigned int ax, bx, cx, dx;
cx                237 arch/x86/xen/enlighten_pv.c 	cx = 0;
cx                239 arch/x86/xen/enlighten_pv.c 	native_cpuid(&ax, &bx, &cx, &dx);
cx                244 arch/x86/xen/enlighten_pv.c 	if ((cx & mwait_mask) != mwait_mask)
cx                253 arch/x86/xen/enlighten_pv.c 	cx = 0;
cx                256 arch/x86/xen/enlighten_pv.c 	native_cpuid(&ax, &bx, &cx, &dx);
cx                269 arch/x86/xen/enlighten_pv.c 		cpuid_leaf5_ecx_val = cx;
cx                280 arch/x86/xen/enlighten_pv.c 	unsigned int cx, xsave_mask;
cx                282 arch/x86/xen/enlighten_pv.c 	cx = cpuid_ecx(1);
cx                288 arch/x86/xen/enlighten_pv.c 	return (cx & xsave_mask) == xsave_mask;
cx                125 drivers/acpi/processor_idle.c 				   struct acpi_processor_cx *cx)
cx                143 drivers/acpi/processor_idle.c 	if (cx->type >= type)
cx                165 drivers/acpi/processor_idle.c 				       struct acpi_processor_cx *cx,
cx                168 drivers/acpi/processor_idle.c 	int state = cx - pr->power.states;
cx                184 drivers/acpi/processor_idle.c 				       struct acpi_processor_cx *cx,
cx                345 drivers/acpi/processor_idle.c 		struct acpi_processor_cx cx;
cx                347 drivers/acpi/processor_idle.c 		memset(&cx, 0, sizeof(cx));
cx                372 drivers/acpi/processor_idle.c 		cx.type = obj->integer.value;
cx                377 drivers/acpi/processor_idle.c 		if (i == 1 && cx.type != ACPI_STATE_C1)
cx                380 drivers/acpi/processor_idle.c 		cx.address = reg->address;
cx                381 drivers/acpi/processor_idle.c 		cx.index = current_count + 1;
cx                383 drivers/acpi/processor_idle.c 		cx.entry_method = ACPI_CSTATE_SYSTEMIO;
cx                386 drivers/acpi/processor_idle.c 					(pr->id, &cx, reg) == 0) {
cx                387 drivers/acpi/processor_idle.c 				cx.entry_method = ACPI_CSTATE_FFH;
cx                388 drivers/acpi/processor_idle.c 			} else if (cx.type == ACPI_STATE_C1) {
cx                395 drivers/acpi/processor_idle.c 				cx.entry_method = ACPI_CSTATE_HALT;
cx                396 drivers/acpi/processor_idle.c 				snprintf(cx.desc, ACPI_CX_DESC_LEN, "ACPI HLT");
cx                400 drivers/acpi/processor_idle.c 			if (cx.type == ACPI_STATE_C1 &&
cx                412 drivers/acpi/processor_idle.c 				cx.entry_method = ACPI_CSTATE_HALT;
cx                413 drivers/acpi/processor_idle.c 				snprintf(cx.desc, ACPI_CX_DESC_LEN, "ACPI HLT");
cx                416 drivers/acpi/processor_idle.c 			snprintf(cx.desc, ACPI_CX_DESC_LEN, "ACPI IOPORT 0x%x",
cx                417 drivers/acpi/processor_idle.c 				 cx.address);
cx                420 drivers/acpi/processor_idle.c 		if (cx.type == ACPI_STATE_C1) {
cx                421 drivers/acpi/processor_idle.c 			cx.valid = 1;
cx                428 drivers/acpi/processor_idle.c 		cx.latency = obj->integer.value;
cx                435 drivers/acpi/processor_idle.c 		memcpy(&(pr->power.states[current_count]), &cx, sizeof(cx));
cx                463 drivers/acpi/processor_idle.c 					   struct acpi_processor_cx *cx)
cx                469 drivers/acpi/processor_idle.c 	if (!cx->address)
cx                528 drivers/acpi/processor_idle.c 	cx->valid = 1;
cx                551 drivers/acpi/processor_idle.c 		struct acpi_processor_cx *cx = &pr->power.states[i];
cx                553 drivers/acpi/processor_idle.c 		switch (cx->type) {
cx                555 drivers/acpi/processor_idle.c 			cx->valid = 1;
cx                559 drivers/acpi/processor_idle.c 			if (!cx->address)
cx                561 drivers/acpi/processor_idle.c 			cx->valid = 1;
cx                565 drivers/acpi/processor_idle.c 			acpi_processor_power_verify_c3(pr, cx);
cx                568 drivers/acpi/processor_idle.c 		if (!cx->valid)
cx                571 drivers/acpi/processor_idle.c 		lapic_timer_check_state(i, pr, cx);
cx                572 drivers/acpi/processor_idle.c 		tsc_check_state(cx->type);
cx                651 drivers/acpi/processor_idle.c static void __cpuidle acpi_idle_do_entry(struct acpi_processor_cx *cx)
cx                653 drivers/acpi/processor_idle.c 	if (cx->entry_method == ACPI_CSTATE_FFH) {
cx                655 drivers/acpi/processor_idle.c 		acpi_processor_ffh_cstate_enter(cx);
cx                656 drivers/acpi/processor_idle.c 	} else if (cx->entry_method == ACPI_CSTATE_HALT) {
cx                660 drivers/acpi/processor_idle.c 		inb(cx->address);
cx                675 drivers/acpi/processor_idle.c 	struct acpi_processor_cx *cx = per_cpu(acpi_cstate[index], dev->cpu);
cx                681 drivers/acpi/processor_idle.c 		if (cx->entry_method == ACPI_CSTATE_HALT)
cx                683 drivers/acpi/processor_idle.c 		else if (cx->entry_method == ACPI_CSTATE_SYSTEMIO) {
cx                684 drivers/acpi/processor_idle.c 			inb(cx->address);
cx                711 drivers/acpi/processor_idle.c 			       struct acpi_processor_cx *cx, bool timer_bc)
cx                720 drivers/acpi/processor_idle.c 		lapic_timer_state_broadcast(pr, cx, 1);
cx                740 drivers/acpi/processor_idle.c 	acpi_idle_do_entry(cx);
cx                751 drivers/acpi/processor_idle.c 		lapic_timer_state_broadcast(pr, cx, 0);
cx                757 drivers/acpi/processor_idle.c 	struct acpi_processor_cx *cx = per_cpu(acpi_cstate[index], dev->cpu);
cx                764 drivers/acpi/processor_idle.c 	if (cx->type != ACPI_STATE_C1) {
cx                767 drivers/acpi/processor_idle.c 			cx = per_cpu(acpi_cstate[index], dev->cpu);
cx                768 drivers/acpi/processor_idle.c 		} else if (cx->type == ACPI_STATE_C3 && pr->flags.bm_check) {
cx                769 drivers/acpi/processor_idle.c 			if (cx->bm_sts_skip || !acpi_idle_bm_check()) {
cx                770 drivers/acpi/processor_idle.c 				acpi_idle_enter_bm(pr, cx, true);
cx                774 drivers/acpi/processor_idle.c 				cx = per_cpu(acpi_cstate[index], dev->cpu);
cx                782 drivers/acpi/processor_idle.c 	lapic_timer_state_broadcast(pr, cx, 1);
cx                784 drivers/acpi/processor_idle.c 	if (cx->type == ACPI_STATE_C3)
cx                787 drivers/acpi/processor_idle.c 	acpi_idle_do_entry(cx);
cx                789 drivers/acpi/processor_idle.c 	lapic_timer_state_broadcast(pr, cx, 0);
cx                797 drivers/acpi/processor_idle.c 	struct acpi_processor_cx *cx = per_cpu(acpi_cstate[index], dev->cpu);
cx                799 drivers/acpi/processor_idle.c 	if (cx->type == ACPI_STATE_C3) {
cx                806 drivers/acpi/processor_idle.c 			acpi_idle_enter_bm(pr, cx, false);
cx                812 drivers/acpi/processor_idle.c 	acpi_idle_do_entry(cx);
cx                819 drivers/acpi/processor_idle.c 	struct acpi_processor_cx *cx;
cx                825 drivers/acpi/processor_idle.c 		cx = &pr->power.states[i];
cx                827 drivers/acpi/processor_idle.c 		if (!cx->valid)
cx                830 drivers/acpi/processor_idle.c 		per_cpu(acpi_cstate[count], dev->cpu) = cx;
cx                846 drivers/acpi/processor_idle.c 	struct acpi_processor_cx *cx;
cx                861 drivers/acpi/processor_idle.c 		cx = &pr->power.states[i];
cx                863 drivers/acpi/processor_idle.c 		if (!cx->valid)
cx                868 drivers/acpi/processor_idle.c 		strlcpy(state->desc, cx->desc, CPUIDLE_DESC_LEN);
cx                869 drivers/acpi/processor_idle.c 		state->exit_latency = cx->latency;
cx                870 drivers/acpi/processor_idle.c 		state->target_residency = cx->latency * latency_factor;
cx                874 drivers/acpi/processor_idle.c 		if (cx->type == ACPI_STATE_C1 || cx->type == ACPI_STATE_C2) {
cx                885 drivers/acpi/processor_idle.c 		if (cx->type != ACPI_STATE_C1 && !acpi_idle_fallback_to_c1(pr))
cx                353 drivers/char/toshiba.c 	unsigned short bx,cx;
cx                383 drivers/char/toshiba.c 		cx = readw(bios + address);
cx                384 drivers/char/toshiba.c 		address = 9+bx+cx;
cx                385 drivers/char/toshiba.c 		cx = readw(bios + address);
cx                386 drivers/char/toshiba.c 		address = 0xa+cx;
cx                387 drivers/char/toshiba.c 		cx = readw(bios + address);
cx                391 drivers/char/toshiba.c 		id = ((cx & 0xff)<<8)+((cx & 0xff00)>>8);
cx                 71 drivers/cpufreq/longhaul.c static struct acpi_processor_cx *cx;
cx                327 drivers/cpufreq/longhaul.c 			do_powersaver(cx->address, mults_index, dir);
cx                866 drivers/cpufreq/longhaul.c 		cx = &pr->power.states[ACPI_STATE_C3];
cx                867 drivers/cpufreq/longhaul.c 		if (cx->address > 0 && cx->latency <= 1000)
cx                 77 drivers/gpu/drm/vboxvideo/modesetting.c 	p->cx = width;
cx                 83 drivers/gpu/drm/vboxvideo/vbox_irq.c 					hintsj->dx + (hintsj->cx & 0x8fff) &&
cx                 84 drivers/gpu/drm/vboxvideo/vbox_irq.c 				     hintsi->dx + (hintsi->cx & 0x8fff) >
cx                100 drivers/gpu/drm/vboxvideo/vbox_irq.c 				    vbox->last_mode_hints[i].cx & 0x8fff;
cx                138 drivers/gpu/drm/vboxvideo/vbox_irq.c 		vbox_conn->mode_hint.width = hints->cx;
cx                153 drivers/gpu/drm/vboxvideo/vbox_irq.c 					   hints->cx * 4, hints->cx,
cx                407 drivers/gpu/drm/vboxvideo/vboxvideo.h 	u32 cx;
cx                427 drivers/gpu/drm/vboxvideo/vboxvideo.h 	u32 cx;	/* Rectangle width. */
cx                 98 drivers/hid/hid-multitouch.c 	__s32 *x, *y, *cx, *cy, *p, *w, *h, *a;
cx                516 drivers/hid/hid-multitouch.c 	usage->cx = DEFAULT_ZERO;
cx                721 drivers/hid/hid-multitouch.c 				MT_STORE_FIELD(cx);
cx               1090 drivers/hid/hid-multitouch.c 		input_event(input, EV_ABS, ABS_MT_TOOL_X, *slot->cx);
cx                 42 drivers/input/touchscreen/surface3_spi.c 	__le16 cx;
cx                102 drivers/media/pci/cx18/cx18-alsa-main.c 	struct cx18 *cx = to_cx18(cxsc->v4l2_dev);
cx                110 drivers/media/pci/cx18/cx18-alsa-main.c 		 cx->instance);
cx                115 drivers/media/pci/cx18/cx18-alsa-main.c 		 cx->instance, cx->card_name);
cx                122 drivers/media/pci/cx18/cx18-alsa-main.c 	struct cx18 *cx = to_cx18(v4l2_dev);
cx                133 drivers/media/pci/cx18/cx18-alsa-main.c 	ret = snd_card_new(&cx->pci_dev->dev,
cx                165 drivers/media/pci/cx18/cx18-alsa-main.c 	cx->alsa = cxsc;
cx                170 drivers/media/pci/cx18/cx18-alsa-main.c 		cx->alsa = NULL;
cx                186 drivers/media/pci/cx18/cx18-alsa-main.c static int cx18_alsa_load(struct cx18 *cx)
cx                188 drivers/media/pci/cx18/cx18-alsa-main.c 	struct v4l2_device *v4l2_dev = &cx->v4l2_dev;
cx                197 drivers/media/pci/cx18/cx18-alsa-main.c 	cx = to_cx18(v4l2_dev);
cx                198 drivers/media/pci/cx18/cx18-alsa-main.c 	if (cx == NULL) {
cx                203 drivers/media/pci/cx18/cx18-alsa-main.c 	s = &cx->streams[CX18_ENC_STREAM_TYPE_PCM];
cx                210 drivers/media/pci/cx18/cx18-alsa-main.c 	if (cx->alsa != NULL) {
cx                235 drivers/media/pci/cx18/cx18-alsa-main.c 	struct cx18 *cx = to_cx18(cxsc->v4l2_dev);
cx                240 drivers/media/pci/cx18/cx18-alsa-main.c 	cx->alsa = NULL;
cx                140 drivers/media/pci/cx18/cx18-alsa-pcm.c 	struct cx18 *cx = to_cx18(v4l2_dev);
cx                147 drivers/media/pci/cx18/cx18-alsa-pcm.c 	s = &cx->streams[CX18_ENC_STREAM_TYPE_PCM];
cx                149 drivers/media/pci/cx18/cx18-alsa-pcm.c 	item.cx = cx;
cx                151 drivers/media/pci/cx18/cx18-alsa-pcm.c 	item.open_id = cx->open_id++;
cx                171 drivers/media/pci/cx18/cx18-alsa-pcm.c 	runtime->private_data = cx;
cx                173 drivers/media/pci/cx18/cx18-alsa-pcm.c 	cx->pcm_announce_callback = cx18_alsa_announce_pcm_data;
cx                187 drivers/media/pci/cx18/cx18-alsa-pcm.c 	struct cx18 *cx = to_cx18(v4l2_dev);
cx                192 drivers/media/pci/cx18/cx18-alsa-pcm.c 	s = &cx->streams[CX18_ENC_STREAM_TYPE_PCM];
cx                198 drivers/media/pci/cx18/cx18-alsa-pcm.c 	cx->pcm_announce_callback = NULL;
cx                319 drivers/media/pci/cx18/cx18-alsa-pcm.c 	struct cx18 *cx = to_cx18(v4l2_dev);
cx                339 drivers/media/pci/cx18/cx18-alsa-pcm.c 	strscpy(sp->name, cx->card_name, sizeof(sp->name));
cx                 27 drivers/media/pci/cx18/cx18-alsa.h 	struct cx18 *cx = to_cx18(cxsc->v4l2_dev);
cx                 28 drivers/media/pci/cx18/cx18-alsa.h 	mutex_lock(&cx->serialize_lock);
cx                 33 drivers/media/pci/cx18/cx18-alsa.h 	struct cx18 *cx = to_cx18(cxsc->v4l2_dev);
cx                 34 drivers/media/pci/cx18/cx18-alsa.h 	mutex_unlock(&cx->serialize_lock);
cx                 23 drivers/media/pci/cx18/cx18-audio.c int cx18_audio_set_io(struct cx18 *cx)
cx                 30 drivers/media/pci/cx18/cx18-audio.c 	if (test_bit(CX18_F_I_RADIO_USER, &cx->i_flags))
cx                 31 drivers/media/pci/cx18/cx18-audio.c 		in = &cx->card->radio_input;
cx                 33 drivers/media/pci/cx18/cx18-audio.c 		in = &cx->card->audio_inputs[cx->audio_input];
cx                 36 drivers/media/pci/cx18/cx18-audio.c 	v4l2_subdev_call(cx->sd_extmux, audio, s_routing,
cx                 39 drivers/media/pci/cx18/cx18-audio.c 	err = cx18_call_hw_err(cx, cx->card->hw_audio_ctrl,
cx                 45 drivers/media/pci/cx18/cx18-audio.c 	u = cx18_read_reg(cx, CX18_AUDIO_ENABLE);
cx                 72 drivers/media/pci/cx18/cx18-audio.c 		cx18_write_reg_expect(cx, u | 0xb00, CX18_AUDIO_ENABLE,
cx                 75 drivers/media/pci/cx18/cx18-audio.c 	cx18_write_reg_expect(cx, v | 0xb00, CX18_AUDIO_ENABLE,
cx                 10 drivers/media/pci/cx18/cx18-audio.h int cx18_audio_set_io(struct cx18 *cx);
cx                 13 drivers/media/pci/cx18/cx18-av-audio.c static int set_audclk_freq(struct cx18 *cx, u32 freq)
cx                 15 drivers/media/pci/cx18/cx18-av-audio.c 	struct cx18_av_state *state = &cx->av_state;
cx                 63 drivers/media/pci/cx18/cx18-av-audio.c 			cx18_av_write4(cx, 0x108, 0x200d040f);
cx                 67 drivers/media/pci/cx18/cx18-av-audio.c 			cx18_av_write4(cx, 0x10c, 0x002be2fe);
cx                 71 drivers/media/pci/cx18/cx18-av-audio.c 			cx18_av_write4(cx, 0x110, 0x0176740c);
cx                 75 drivers/media/pci/cx18/cx18-av-audio.c 			cx18_av_write4(cx, 0x900, 0x0801f77f);
cx                 76 drivers/media/pci/cx18/cx18-av-audio.c 			cx18_av_write4(cx, 0x904, 0x0801f77f);
cx                 77 drivers/media/pci/cx18/cx18-av-audio.c 			cx18_av_write4(cx, 0x90c, 0x0801f77f);
cx                 80 drivers/media/pci/cx18/cx18-av-audio.c 			cx18_av_write(cx, 0x127, 0x60);
cx                 83 drivers/media/pci/cx18/cx18-av-audio.c 			cx18_av_write4(cx, 0x12c, 0x11202fff);
cx                 90 drivers/media/pci/cx18/cx18-av-audio.c 			cx18_av_write4(cx, 0x128, 0xa00d2ef8);
cx                 98 drivers/media/pci/cx18/cx18-av-audio.c 			cx18_av_write4(cx, 0x108, 0x180e040f);
cx                102 drivers/media/pci/cx18/cx18-av-audio.c 			cx18_av_write4(cx, 0x10c, 0x002be2fe);
cx                106 drivers/media/pci/cx18/cx18-av-audio.c 			cx18_av_write4(cx, 0x110, 0x0062a1f2);
cx                110 drivers/media/pci/cx18/cx18-av-audio.c 			cx18_av_write4(cx, 0x900, 0x08016d59);
cx                111 drivers/media/pci/cx18/cx18-av-audio.c 			cx18_av_write4(cx, 0x904, 0x08016d59);
cx                112 drivers/media/pci/cx18/cx18-av-audio.c 			cx18_av_write4(cx, 0x90c, 0x08016d59);
cx                115 drivers/media/pci/cx18/cx18-av-audio.c 			cx18_av_write(cx, 0x127, 0x58);
cx                118 drivers/media/pci/cx18/cx18-av-audio.c 			cx18_av_write4(cx, 0x12c, 0x112092ff);
cx                125 drivers/media/pci/cx18/cx18-av-audio.c 			cx18_av_write4(cx, 0x128, 0xa01d4bf8);
cx                133 drivers/media/pci/cx18/cx18-av-audio.c 			cx18_av_write4(cx, 0x108, 0x160e040f);
cx                137 drivers/media/pci/cx18/cx18-av-audio.c 			cx18_av_write4(cx, 0x10c, 0x002be2fe);
cx                141 drivers/media/pci/cx18/cx18-av-audio.c 			cx18_av_write4(cx, 0x110, 0x005227ad);
cx                145 drivers/media/pci/cx18/cx18-av-audio.c 			cx18_av_write4(cx, 0x900, 0x08014faa);
cx                146 drivers/media/pci/cx18/cx18-av-audio.c 			cx18_av_write4(cx, 0x904, 0x08014faa);
cx                147 drivers/media/pci/cx18/cx18-av-audio.c 			cx18_av_write4(cx, 0x90c, 0x08014faa);
cx                150 drivers/media/pci/cx18/cx18-av-audio.c 			cx18_av_write(cx, 0x127, 0x56);
cx                153 drivers/media/pci/cx18/cx18-av-audio.c 			cx18_av_write4(cx, 0x12c, 0x11205fff);
cx                160 drivers/media/pci/cx18/cx18-av-audio.c 			cx18_av_write4(cx, 0x128, 0xa01193f8);
cx                170 drivers/media/pci/cx18/cx18-av-audio.c 			cx18_av_write4(cx, 0x108, 0x300d040f);
cx                174 drivers/media/pci/cx18/cx18-av-audio.c 			cx18_av_write4(cx, 0x10c, 0x002be2fe);
cx                178 drivers/media/pci/cx18/cx18-av-audio.c 			cx18_av_write4(cx, 0x110, 0x0176740c);
cx                182 drivers/media/pci/cx18/cx18-av-audio.c 			cx18_av_write4(cx, 0x8f8, 0x08010000);
cx                186 drivers/media/pci/cx18/cx18-av-audio.c 			cx18_av_write4(cx, 0x900, 0x08020000);
cx                187 drivers/media/pci/cx18/cx18-av-audio.c 			cx18_av_write4(cx, 0x904, 0x08020000);
cx                188 drivers/media/pci/cx18/cx18-av-audio.c 			cx18_av_write4(cx, 0x90c, 0x08020000);
cx                191 drivers/media/pci/cx18/cx18-av-audio.c 			cx18_av_write(cx, 0x127, 0x70);
cx                194 drivers/media/pci/cx18/cx18-av-audio.c 			cx18_av_write4(cx, 0x12c, 0x11201fff);
cx                201 drivers/media/pci/cx18/cx18-av-audio.c 			cx18_av_write4(cx, 0x128, 0xa00d2ef8);
cx                209 drivers/media/pci/cx18/cx18-av-audio.c 			cx18_av_write4(cx, 0x108, 0x240e040f);
cx                213 drivers/media/pci/cx18/cx18-av-audio.c 			cx18_av_write4(cx, 0x10c, 0x002be2fe);
cx                217 drivers/media/pci/cx18/cx18-av-audio.c 			cx18_av_write4(cx, 0x110, 0x0062a1f2);
cx                221 drivers/media/pci/cx18/cx18-av-audio.c 			cx18_av_write4(cx, 0x8f8, 0x080160cd);
cx                225 drivers/media/pci/cx18/cx18-av-audio.c 			cx18_av_write4(cx, 0x900, 0x08017385);
cx                226 drivers/media/pci/cx18/cx18-av-audio.c 			cx18_av_write4(cx, 0x904, 0x08017385);
cx                227 drivers/media/pci/cx18/cx18-av-audio.c 			cx18_av_write4(cx, 0x90c, 0x08017385);
cx                230 drivers/media/pci/cx18/cx18-av-audio.c 			cx18_av_write(cx, 0x127, 0x64);
cx                233 drivers/media/pci/cx18/cx18-av-audio.c 			cx18_av_write4(cx, 0x12c, 0x112061ff);
cx                240 drivers/media/pci/cx18/cx18-av-audio.c 			cx18_av_write4(cx, 0x128, 0xa01d4bf8);
cx                248 drivers/media/pci/cx18/cx18-av-audio.c 			cx18_av_write4(cx, 0x108, 0x200d040f);
cx                252 drivers/media/pci/cx18/cx18-av-audio.c 			cx18_av_write4(cx, 0x10c, 0x002be2fe);
cx                256 drivers/media/pci/cx18/cx18-av-audio.c 			cx18_av_write4(cx, 0x110, 0x0176740c);
cx                260 drivers/media/pci/cx18/cx18-av-audio.c 			cx18_av_write4(cx, 0x8f8, 0x08018000);
cx                264 drivers/media/pci/cx18/cx18-av-audio.c 			cx18_av_write4(cx, 0x900, 0x08015555);
cx                265 drivers/media/pci/cx18/cx18-av-audio.c 			cx18_av_write4(cx, 0x904, 0x08015555);
cx                266 drivers/media/pci/cx18/cx18-av-audio.c 			cx18_av_write4(cx, 0x90c, 0x08015555);
cx                269 drivers/media/pci/cx18/cx18-av-audio.c 			cx18_av_write(cx, 0x127, 0x60);
cx                272 drivers/media/pci/cx18/cx18-av-audio.c 			cx18_av_write4(cx, 0x12c, 0x11203fff);
cx                279 drivers/media/pci/cx18/cx18-av-audio.c 			cx18_av_write4(cx, 0x128, 0xa01193f8);
cx                289 drivers/media/pci/cx18/cx18-av-audio.c void cx18_av_audio_set_path(struct cx18 *cx)
cx                291 drivers/media/pci/cx18/cx18-av-audio.c 	struct cx18_av_state *state = &cx->av_state;
cx                295 drivers/media/pci/cx18/cx18-av-audio.c 	v = cx18_av_read(cx, 0x803) & ~0x10;
cx                296 drivers/media/pci/cx18/cx18-av-audio.c 	cx18_av_write_expect(cx, 0x803, v, v, 0x1f);
cx                299 drivers/media/pci/cx18/cx18-av-audio.c 	v = cx18_av_read(cx, 0x810) | 0x01;
cx                300 drivers/media/pci/cx18/cx18-av-audio.c 	cx18_av_write_expect(cx, 0x810, v, v, 0x0f);
cx                303 drivers/media/pci/cx18/cx18-av-audio.c 	cx18_av_write(cx, 0x8d3, 0x1f);
cx                307 drivers/media/pci/cx18/cx18-av-audio.c 		cx18_av_write4(cx, 0x8d0, 0x01011012);
cx                314 drivers/media/pci/cx18/cx18-av-audio.c 		cx18_av_write4(cx, 0x8d0, 0x1f063870);
cx                317 drivers/media/pci/cx18/cx18-av-audio.c 	set_audclk_freq(cx, state->audclk_freq);
cx                320 drivers/media/pci/cx18/cx18-av-audio.c 	v = cx18_av_read(cx, 0x810) & ~0x01;
cx                321 drivers/media/pci/cx18/cx18-av-audio.c 	cx18_av_write_expect(cx, 0x810, v, v, 0x0f);
cx                326 drivers/media/pci/cx18/cx18-av-audio.c 		v = cx18_av_read(cx, 0x803) | 0x10;
cx                327 drivers/media/pci/cx18/cx18-av-audio.c 		cx18_av_write_expect(cx, 0x803, v, v, 0x1f);
cx                331 drivers/media/pci/cx18/cx18-av-audio.c static void set_volume(struct cx18 *cx, int volume)
cx                344 drivers/media/pci/cx18/cx18-av-audio.c 	cx18_av_write(cx, 0x8d4, 228 - (vol * 2));
cx                347 drivers/media/pci/cx18/cx18-av-audio.c static void set_bass(struct cx18 *cx, int bass)
cx                350 drivers/media/pci/cx18/cx18-av-audio.c 	cx18_av_and_or(cx, 0x8d9, ~0x3f, 48 - (bass * 48 / 0xffff));
cx                353 drivers/media/pci/cx18/cx18-av-audio.c static void set_treble(struct cx18 *cx, int treble)
cx                356 drivers/media/pci/cx18/cx18-av-audio.c 	cx18_av_and_or(cx, 0x8db, ~0x3f, 48 - (treble * 48 / 0xffff));
cx                359 drivers/media/pci/cx18/cx18-av-audio.c static void set_balance(struct cx18 *cx, int balance)
cx                364 drivers/media/pci/cx18/cx18-av-audio.c 		cx18_av_and_or(cx, 0x8d5, 0x7f, 0x80);
cx                366 drivers/media/pci/cx18/cx18-av-audio.c 		cx18_av_and_or(cx, 0x8d5, ~0x7f, bal & 0x7f);
cx                369 drivers/media/pci/cx18/cx18-av-audio.c 		cx18_av_and_or(cx, 0x8d5, 0x7f, 0x00);
cx                371 drivers/media/pci/cx18/cx18-av-audio.c 		cx18_av_and_or(cx, 0x8d5, ~0x7f, 0x80 - bal);
cx                375 drivers/media/pci/cx18/cx18-av-audio.c static void set_mute(struct cx18 *cx, int mute)
cx                377 drivers/media/pci/cx18/cx18-av-audio.c 	struct cx18_av_state *state = &cx->av_state;
cx                385 drivers/media/pci/cx18/cx18-av-audio.c 		v = cx18_av_read(cx, 0x803);
cx                389 drivers/media/pci/cx18/cx18-av-audio.c 			cx18_av_write_expect(cx, 0x803, v, v, 0x1f);
cx                390 drivers/media/pci/cx18/cx18-av-audio.c 			cx18_av_write(cx, 0x8d3, 0x1f);
cx                394 drivers/media/pci/cx18/cx18-av-audio.c 			cx18_av_write_expect(cx, 0x803, v, v, 0x1f);
cx                398 drivers/media/pci/cx18/cx18-av-audio.c 		cx18_av_and_or(cx, 0x8d3, ~0x2, mute ? 0x02 : 0x00);
cx                404 drivers/media/pci/cx18/cx18-av-audio.c 	struct cx18 *cx = v4l2_get_subdevdata(sd);
cx                405 drivers/media/pci/cx18/cx18-av-audio.c 	struct cx18_av_state *state = &cx->av_state;
cx                410 drivers/media/pci/cx18/cx18-av-audio.c 		v = cx18_av_read(cx, 0x803) & ~0x10;
cx                411 drivers/media/pci/cx18/cx18-av-audio.c 		cx18_av_write_expect(cx, 0x803, v, v, 0x1f);
cx                412 drivers/media/pci/cx18/cx18-av-audio.c 		cx18_av_write(cx, 0x8d3, 0x1f);
cx                414 drivers/media/pci/cx18/cx18-av-audio.c 	v = cx18_av_read(cx, 0x810) | 0x1;
cx                415 drivers/media/pci/cx18/cx18-av-audio.c 	cx18_av_write_expect(cx, 0x810, v, v, 0x0f);
cx                417 drivers/media/pci/cx18/cx18-av-audio.c 	retval = set_audclk_freq(cx, freq);
cx                419 drivers/media/pci/cx18/cx18-av-audio.c 	v = cx18_av_read(cx, 0x810) & ~0x1;
cx                420 drivers/media/pci/cx18/cx18-av-audio.c 	cx18_av_write_expect(cx, 0x810, v, v, 0x0f);
cx                422 drivers/media/pci/cx18/cx18-av-audio.c 		v = cx18_av_read(cx, 0x803) | 0x10;
cx                423 drivers/media/pci/cx18/cx18-av-audio.c 		cx18_av_write_expect(cx, 0x803, v, v, 0x1f);
cx                431 drivers/media/pci/cx18/cx18-av-audio.c 	struct cx18 *cx = v4l2_get_subdevdata(sd);
cx                435 drivers/media/pci/cx18/cx18-av-audio.c 		set_volume(cx, ctrl->val);
cx                438 drivers/media/pci/cx18/cx18-av-audio.c 		set_bass(cx, ctrl->val);
cx                441 drivers/media/pci/cx18/cx18-av-audio.c 		set_treble(cx, ctrl->val);
cx                444 drivers/media/pci/cx18/cx18-av-audio.c 		set_balance(cx, ctrl->val);
cx                447 drivers/media/pci/cx18/cx18-av-audio.c 		set_mute(cx, ctrl->val);
cx                 15 drivers/media/pci/cx18/cx18-av-core.c int cx18_av_write(struct cx18 *cx, u16 addr, u8 value)
cx                 20 drivers/media/pci/cx18/cx18-av-core.c 	u32 x = cx18_read_reg(cx, reg);
cx                 23 drivers/media/pci/cx18/cx18-av-core.c 	cx18_write_reg(cx, x, reg);
cx                 27 drivers/media/pci/cx18/cx18-av-core.c int cx18_av_write_expect(struct cx18 *cx, u16 addr, u8 value, u8 eval, u8 mask)
cx                 31 drivers/media/pci/cx18/cx18-av-core.c 	u32 x = cx18_read_reg(cx, reg);
cx                 34 drivers/media/pci/cx18/cx18-av-core.c 	cx18_write_reg_expect(cx, x, reg,
cx                 39 drivers/media/pci/cx18/cx18-av-core.c int cx18_av_write4(struct cx18 *cx, u16 addr, u32 value)
cx                 41 drivers/media/pci/cx18/cx18-av-core.c 	cx18_write_reg(cx, value, 0xc40000 + addr);
cx                 46 drivers/media/pci/cx18/cx18-av-core.c cx18_av_write4_expect(struct cx18 *cx, u16 addr, u32 value, u32 eval, u32 mask)
cx                 48 drivers/media/pci/cx18/cx18-av-core.c 	cx18_write_reg_expect(cx, value, 0xc40000 + addr, eval, mask);
cx                 52 drivers/media/pci/cx18/cx18-av-core.c int cx18_av_write4_noretry(struct cx18 *cx, u16 addr, u32 value)
cx                 54 drivers/media/pci/cx18/cx18-av-core.c 	cx18_write_reg_noretry(cx, value, 0xc40000 + addr);
cx                 58 drivers/media/pci/cx18/cx18-av-core.c u8 cx18_av_read(struct cx18 *cx, u16 addr)
cx                 60 drivers/media/pci/cx18/cx18-av-core.c 	u32 x = cx18_read_reg(cx, 0xc40000 + (addr & ~3));
cx                 66 drivers/media/pci/cx18/cx18-av-core.c u32 cx18_av_read4(struct cx18 *cx, u16 addr)
cx                 68 drivers/media/pci/cx18/cx18-av-core.c 	return cx18_read_reg(cx, 0xc40000 + addr);
cx                 71 drivers/media/pci/cx18/cx18-av-core.c int cx18_av_and_or(struct cx18 *cx, u16 addr, unsigned and_mask,
cx                 74 drivers/media/pci/cx18/cx18-av-core.c 	return cx18_av_write(cx, addr,
cx                 75 drivers/media/pci/cx18/cx18-av-core.c 			     (cx18_av_read(cx, addr) & and_mask) |
cx                 79 drivers/media/pci/cx18/cx18-av-core.c int cx18_av_and_or4(struct cx18 *cx, u16 addr, u32 and_mask,
cx                 82 drivers/media/pci/cx18/cx18-av-core.c 	return cx18_av_write4(cx, addr,
cx                 83 drivers/media/pci/cx18/cx18-av-core.c 			     (cx18_av_read4(cx, addr) & and_mask) |
cx                 87 drivers/media/pci/cx18/cx18-av-core.c static void cx18_av_init(struct cx18 *cx)
cx                 99 drivers/media/pci/cx18/cx18-av-core.c 	cx18_av_write4(cx, CXADEC_PLL_CTRL1, 0x160e040f);
cx                103 drivers/media/pci/cx18/cx18-av-core.c 	cx18_av_write4(cx, CXADEC_VID_PLL_FRAC, 0x002be2fe);
cx                107 drivers/media/pci/cx18/cx18-av-core.c 	cx18_av_write4(cx, CXADEC_AUX_PLL_FRAC, 0x005227ad);
cx                110 drivers/media/pci/cx18/cx18-av-core.c 	cx18_av_write(cx, CXADEC_I2S_MCLK, 0x56);
cx                116 drivers/media/pci/cx18/cx18-av-core.c 	struct cx18 *cx = v4l2_get_subdevdata(sd);
cx                120 drivers/media/pci/cx18/cx18-av-core.c 	cx18_av_loadfw(cx);
cx                122 drivers/media/pci/cx18/cx18-av-core.c 	cx18_av_write4_expect(cx, CXADEC_DL_CTL, 0x03000000,
cx                126 drivers/media/pci/cx18/cx18-av-core.c 	v = cx18_av_read4(cx, CXADEC_HOST_REG1);
cx                128 drivers/media/pci/cx18/cx18-av-core.c 	cx18_av_write4_expect(cx, CXADEC_HOST_REG1, v | 1, v, 0xfffe);
cx                130 drivers/media/pci/cx18/cx18-av-core.c 	cx18_av_write4_expect(cx, CXADEC_HOST_REG1, v & 0xfffe,
cx                134 drivers/media/pci/cx18/cx18-av-core.c 	v = cx18_av_read4(cx, CXADEC_DLL1_DIAG_CTRL) & 0xE1FFFEFF;
cx                136 drivers/media/pci/cx18/cx18-av-core.c 	cx18_av_write4(cx, CXADEC_DLL1_DIAG_CTRL, v);
cx                138 drivers/media/pci/cx18/cx18-av-core.c 	cx18_av_write4(cx, CXADEC_DLL1_DIAG_CTRL, v | 0x10000100);
cx                140 drivers/media/pci/cx18/cx18-av-core.c 	v = cx18_av_read4(cx, CXADEC_DLL2_DIAG_CTRL) & 0xE1FFFEFF;
cx                142 drivers/media/pci/cx18/cx18-av-core.c 	cx18_av_write4(cx, CXADEC_DLL2_DIAG_CTRL, v);
cx                144 drivers/media/pci/cx18/cx18-av-core.c 	cx18_av_write4(cx, CXADEC_DLL2_DIAG_CTRL, v | 0x06000100);
cx                147 drivers/media/pci/cx18/cx18-av-core.c 	cx18_av_write4(cx, CXADEC_AFE_DIAG_CTRL1, 0x000A1802);
cx                149 drivers/media/pci/cx18/cx18-av-core.c 	v = cx18_av_read4(cx, CXADEC_AFE_DIAG_CTRL3) | 1;
cx                151 drivers/media/pci/cx18/cx18-av-core.c 	cx18_av_write4_expect(cx, CXADEC_AFE_DIAG_CTRL3, v, v, 0x03009F0F);
cx                153 drivers/media/pci/cx18/cx18-av-core.c 	cx18_av_write4_expect(cx, CXADEC_AFE_DIAG_CTRL3,
cx                157 drivers/media/pci/cx18/cx18-av-core.c 	cx18_av_and_or4(cx, CXADEC_PIN_CTRL1, ~0, 0x040C00);
cx                160 drivers/media/pci/cx18/cx18-av-core.c 	cx18_av_and_or4(cx, CXADEC_PIN_CTRL2, ~0, 0x2);
cx                163 drivers/media/pci/cx18/cx18-av-core.c 	cx18_av_write4(cx, CXADEC_SOFT_RST_CTRL, 0x8000);
cx                164 drivers/media/pci/cx18/cx18-av-core.c 	cx18_av_write4(cx, CXADEC_SOFT_RST_CTRL, 0);
cx                181 drivers/media/pci/cx18/cx18-av-core.c 	cx18_av_and_or4(cx, CXADEC_CHIP_CTRL, 0xFFFBFFFF, 0x00120000);
cx                184 drivers/media/pci/cx18/cx18-av-core.c 	cx18_av_init(cx);
cx                189 drivers/media/pci/cx18/cx18-av-core.c 	cx18_av_and_or4(cx, CXADEC_MODE_CTRL, 0xFFF7E7F0, 0x02040800);
cx                193 drivers/media/pci/cx18/cx18-av-core.c 	cx18_av_and_or4(cx, CXADEC_CRUSH_CTRL, ~0, 0x00500000);
cx                196 drivers/media/pci/cx18/cx18-av-core.c 	cx18_av_and_or4(cx, CXADEC_DFE_CTRL2, 0xFFFF00FF, 0x00002000);
cx                205 drivers/media/pci/cx18/cx18-av-core.c 	cx18_av_write4(cx, CXADEC_OUT_CTRL1, 0x4013252e);
cx                228 drivers/media/pci/cx18/cx18-av-core.c 	cx18_av_and_or4(cx, CXADEC_AFE_CTRL, 0xFF000000, 0x00005D00);
cx                235 drivers/media/pci/cx18/cx18-av-core.c 	cx18_av_write4(cx, CXADEC_SRC_COMB_CFG, 0x6628021F);
cx                236 drivers/media/pci/cx18/cx18-av-core.c 	default_volume = cx18_av_read(cx, 0x8d4);
cx                244 drivers/media/pci/cx18/cx18-av-core.c 		cx18_av_write(cx, 0x8d4, 228);
cx                248 drivers/media/pci/cx18/cx18-av-core.c 		cx18_av_write(cx, 0x8d4, 20);
cx                273 drivers/media/pci/cx18/cx18-av-core.c void cx18_av_std_setup(struct cx18 *cx)
cx                275 drivers/media/pci/cx18/cx18-av-core.c 	struct cx18_av_state *state = &cx->av_state;
cx                292 drivers/media/pci/cx18/cx18-av-core.c 		cx18_av_write(cx, 0x49f, 0x11);
cx                294 drivers/media/pci/cx18/cx18-av-core.c 		cx18_av_write(cx, 0x49f, 0x14);
cx                440 drivers/media/pci/cx18/cx18-av-core.c 	pll_int = cx18_av_read(cx, 0x108);
cx                441 drivers/media/pci/cx18/cx18-av-core.c 	pll_frac = cx18_av_read4(cx, 0x10c) & 0x1ffffff;
cx                442 drivers/media/pci/cx18/cx18-av-core.c 	pll_post = cx18_av_read(cx, 0x109);
cx                476 drivers/media/pci/cx18/cx18-av-core.c 	cx18_av_write(cx, 0x470, hblank);
cx                477 drivers/media/pci/cx18/cx18-av-core.c 	cx18_av_write(cx, 0x471,
cx                479 drivers/media/pci/cx18/cx18-av-core.c 	cx18_av_write(cx, 0x472, hactive >> 4);
cx                482 drivers/media/pci/cx18/cx18-av-core.c 	cx18_av_write(cx, 0x473, burst);
cx                485 drivers/media/pci/cx18/cx18-av-core.c 	cx18_av_write(cx, 0x474, vblank);
cx                486 drivers/media/pci/cx18/cx18-av-core.c 	cx18_av_write(cx, 0x475,
cx                488 drivers/media/pci/cx18/cx18-av-core.c 	cx18_av_write(cx, 0x476, vactive >> 4);
cx                489 drivers/media/pci/cx18/cx18-av-core.c 	cx18_av_write(cx, 0x477, vblank656);
cx                492 drivers/media/pci/cx18/cx18-av-core.c 	cx18_av_write(cx, 0x478, src_decimation & 0xff);
cx                493 drivers/media/pci/cx18/cx18-av-core.c 	cx18_av_write(cx, 0x479, (src_decimation >> 8) & 0xff);
cx                496 drivers/media/pci/cx18/cx18-av-core.c 	cx18_av_write(cx, 0x47a, luma_lpf << 6 | ((uv_lpf << 4) & 0x30));
cx                499 drivers/media/pci/cx18/cx18-av-core.c 	cx18_av_write(cx, 0x47b, comb);
cx                502 drivers/media/pci/cx18/cx18-av-core.c 	cx18_av_write(cx, 0x47c, sc);
cx                503 drivers/media/pci/cx18/cx18-av-core.c 	cx18_av_write(cx, 0x47d, (sc >> 8) & 0xff);
cx                504 drivers/media/pci/cx18/cx18-av-core.c 	cx18_av_write(cx, 0x47e, (sc >> 16) & 0xff);
cx                513 drivers/media/pci/cx18/cx18-av-core.c 	cx18_av_write(cx, 0x47f, state->slicer_line_delay);
cx                516 drivers/media/pci/cx18/cx18-av-core.c static void input_change(struct cx18 *cx)
cx                518 drivers/media/pci/cx18/cx18-av-core.c 	struct cx18_av_state *state = &cx->av_state;
cx                523 drivers/media/pci/cx18/cx18-av-core.c 	cx18_av_write(cx, 0x49f, (std & V4L2_STD_NTSC) ? 0x14 : 0x11);
cx                524 drivers/media/pci/cx18/cx18-av-core.c 	cx18_av_and_or(cx, 0x401, ~0x60, 0);
cx                525 drivers/media/pci/cx18/cx18-av-core.c 	cx18_av_and_or(cx, 0x401, ~0x60, 0x60);
cx                530 drivers/media/pci/cx18/cx18-av-core.c 			cx18_av_write_expect(cx, 0x808, 0xf7, 0xf7, 0xff);
cx                531 drivers/media/pci/cx18/cx18-av-core.c 			cx18_av_write_expect(cx, 0x80b, 0x02, 0x02, 0x3f);
cx                534 drivers/media/pci/cx18/cx18-av-core.c 			cx18_av_write_expect(cx, 0x808, 0xf8, 0xf8, 0xff);
cx                535 drivers/media/pci/cx18/cx18-av-core.c 			cx18_av_write_expect(cx, 0x80b, 0x03, 0x03, 0x3f);
cx                538 drivers/media/pci/cx18/cx18-av-core.c 			cx18_av_write_expect(cx, 0x808, 0xf6, 0xf6, 0xff);
cx                539 drivers/media/pci/cx18/cx18-av-core.c 			cx18_av_write_expect(cx, 0x80b, 0x01, 0x01, 0x3f);
cx                543 drivers/media/pci/cx18/cx18-av-core.c 		cx18_av_write_expect(cx, 0x808, 0xff, 0xff, 0xff);
cx                544 drivers/media/pci/cx18/cx18-av-core.c 		cx18_av_write_expect(cx, 0x80b, 0x03, 0x03, 0x3f);
cx                547 drivers/media/pci/cx18/cx18-av-core.c 		cx18_av_write_expect(cx, 0x808, 0xff, 0xff, 0xff);
cx                548 drivers/media/pci/cx18/cx18-av-core.c 		cx18_av_write_expect(cx, 0x80b, 0x03, 0x03, 0x3f);
cx                551 drivers/media/pci/cx18/cx18-av-core.c 	v = cx18_av_read(cx, 0x803);
cx                555 drivers/media/pci/cx18/cx18-av-core.c 		cx18_av_write_expect(cx, 0x803, v, v, 0x1f);
cx                557 drivers/media/pci/cx18/cx18-av-core.c 		cx18_av_write_expect(cx, 0x803, v, v, 0x1f);
cx                564 drivers/media/pci/cx18/cx18-av-core.c 	struct cx18 *cx = v4l2_get_subdevdata(sd);
cx                565 drivers/media/pci/cx18/cx18-av-core.c 	input_change(cx);
cx                569 drivers/media/pci/cx18/cx18-av-core.c static int set_input(struct cx18 *cx, enum cx18_av_video_input vid_input,
cx                572 drivers/media/pci/cx18/cx18-av-core.c 	struct cx18_av_state *state = &cx->av_state;
cx                676 drivers/media/pci/cx18/cx18-av-core.c 	cx18_av_write_expect(cx, 0x103, afe_mux_cfg, afe_mux_cfg, 0xf7);
cx                678 drivers/media/pci/cx18/cx18-av-core.c 	cx18_av_and_or(cx, 0x401, ~0x6, input_mode);
cx                681 drivers/media/pci/cx18/cx18-av-core.c 	adc2_cfg = cx18_av_read(cx, 0x102);
cx                692 drivers/media/pci/cx18/cx18-av-core.c 	cx18_av_write_expect(cx, 0x102, adc2_cfg, adc2_cfg, 0x17);
cx                695 drivers/media/pci/cx18/cx18-av-core.c 	afe_cfg = cx18_av_read4(cx, CXADEC_AFE_CTRL);
cx                733 drivers/media/pci/cx18/cx18-av-core.c 	cx18_av_write4(cx, CXADEC_AFE_CTRL, afe_cfg);
cx                737 drivers/media/pci/cx18/cx18-av-core.c 	cx18_av_audio_set_path(cx);
cx                738 drivers/media/pci/cx18/cx18-av-core.c 	input_change(cx);
cx                746 drivers/media/pci/cx18/cx18-av-core.c 	struct cx18 *cx = v4l2_get_subdevdata(sd);
cx                747 drivers/media/pci/cx18/cx18-av-core.c 	return set_input(cx, input, state->aud_input);
cx                754 drivers/media/pci/cx18/cx18-av-core.c 	struct cx18 *cx = v4l2_get_subdevdata(sd);
cx                755 drivers/media/pci/cx18/cx18-av-core.c 	return set_input(cx, state->vid_input, input);
cx                761 drivers/media/pci/cx18/cx18-av-core.c 	struct cx18 *cx = v4l2_get_subdevdata(sd);
cx                769 drivers/media/pci/cx18/cx18-av-core.c 	vpres = cx18_av_read(cx, 0x40e) & 0x20;
cx                776 drivers/media/pci/cx18/cx18-av-core.c 	mode = cx18_av_read(cx, 0x804);
cx                798 drivers/media/pci/cx18/cx18-av-core.c 	struct cx18 *cx = v4l2_get_subdevdata(sd);
cx                804 drivers/media/pci/cx18/cx18-av-core.c 	v = cx18_av_read(cx, 0x809);
cx                835 drivers/media/pci/cx18/cx18-av-core.c 	cx18_av_write_expect(cx, 0x809, v, v, 0xff);
cx                843 drivers/media/pci/cx18/cx18-av-core.c 	struct cx18 *cx = v4l2_get_subdevdata(sd);
cx                885 drivers/media/pci/cx18/cx18-av-core.c 		cx18_av_and_or(cx, 0x400, ~0xf, 1);
cx                887 drivers/media/pci/cx18/cx18-av-core.c 		cx18_av_and_or(cx, 0x47b, ~6, 0);
cx                889 drivers/media/pci/cx18/cx18-av-core.c 	cx18_av_and_or(cx, 0x400, ~0x2f, fmt | 0x20);
cx                890 drivers/media/pci/cx18/cx18-av-core.c 	cx18_av_and_or(cx, 0x403, ~0x3, pal_m);
cx                891 drivers/media/pci/cx18/cx18-av-core.c 	cx18_av_std_setup(cx);
cx                892 drivers/media/pci/cx18/cx18-av-core.c 	input_change(cx);
cx                906 drivers/media/pci/cx18/cx18-av-core.c 	struct cx18 *cx = v4l2_get_subdevdata(sd);
cx                910 drivers/media/pci/cx18/cx18-av-core.c 		cx18_av_write(cx, 0x414, ctrl->val - 128);
cx                914 drivers/media/pci/cx18/cx18-av-core.c 		cx18_av_write(cx, 0x415, ctrl->val << 1);
cx                918 drivers/media/pci/cx18/cx18-av-core.c 		cx18_av_write(cx, 0x420, ctrl->val << 1);
cx                919 drivers/media/pci/cx18/cx18-av-core.c 		cx18_av_write(cx, 0x421, ctrl->val << 1);
cx                923 drivers/media/pci/cx18/cx18-av-core.c 		cx18_av_write(cx, 0x422, ctrl->val);
cx                938 drivers/media/pci/cx18/cx18-av-core.c 	struct cx18 *cx = v4l2_get_subdevdata(sd);
cx                948 drivers/media/pci/cx18/cx18-av-core.c 	Vsrc = (cx18_av_read(cx, 0x476) & 0x3f) << 4;
cx                949 drivers/media/pci/cx18/cx18-av-core.c 	Vsrc |= (cx18_av_read(cx, 0x475) & 0xf0) >> 4;
cx                951 drivers/media/pci/cx18/cx18-av-core.c 	Hsrc = (cx18_av_read(cx, 0x472) & 0x3f) << 4;
cx                952 drivers/media/pci/cx18/cx18-av-core.c 	Hsrc |= (cx18_av_read(cx, 0x471) & 0xf0) >> 4;
cx                998 drivers/media/pci/cx18/cx18-av-core.c 	cx18_av_write(cx, 0x418, HSC & 0xff);
cx                999 drivers/media/pci/cx18/cx18-av-core.c 	cx18_av_write(cx, 0x419, (HSC >> 8) & 0xff);
cx               1000 drivers/media/pci/cx18/cx18-av-core.c 	cx18_av_write(cx, 0x41a, HSC >> 16);
cx               1002 drivers/media/pci/cx18/cx18-av-core.c 	cx18_av_write(cx, 0x41c, VSC & 0xff);
cx               1003 drivers/media/pci/cx18/cx18-av-core.c 	cx18_av_write(cx, 0x41d, VSC >> 8);
cx               1005 drivers/media/pci/cx18/cx18-av-core.c 	cx18_av_write(cx, 0x41e, 0x8 | filter);
cx               1011 drivers/media/pci/cx18/cx18-av-core.c 	struct cx18 *cx = v4l2_get_subdevdata(sd);
cx               1015 drivers/media/pci/cx18/cx18-av-core.c 		cx18_av_write(cx, 0x115, 0x8c);
cx               1016 drivers/media/pci/cx18/cx18-av-core.c 		cx18_av_write(cx, 0x116, 0x07);
cx               1018 drivers/media/pci/cx18/cx18-av-core.c 		cx18_av_write(cx, 0x115, 0x00);
cx               1019 drivers/media/pci/cx18/cx18-av-core.c 		cx18_av_write(cx, 0x116, 0x00);
cx               1024 drivers/media/pci/cx18/cx18-av-core.c static void log_video_status(struct cx18 *cx)
cx               1035 drivers/media/pci/cx18/cx18-av-core.c 	struct cx18_av_state *state = &cx->av_state;
cx               1037 drivers/media/pci/cx18/cx18-av-core.c 	u8 vidfmt_sel = cx18_av_read(cx, 0x400) & 0xf;
cx               1038 drivers/media/pci/cx18/cx18-av-core.c 	u8 gen_stat1 = cx18_av_read(cx, 0x40d);
cx               1039 drivers/media/pci/cx18/cx18-av-core.c 	u8 gen_stat2 = cx18_av_read(cx, 0x40e);
cx               1065 drivers/media/pci/cx18/cx18-av-core.c static void log_audio_status(struct cx18 *cx)
cx               1067 drivers/media/pci/cx18/cx18-av-core.c 	struct cx18_av_state *state = &cx->av_state;
cx               1069 drivers/media/pci/cx18/cx18-av-core.c 	u8 download_ctl = cx18_av_read(cx, 0x803);
cx               1070 drivers/media/pci/cx18/cx18-av-core.c 	u8 mod_det_stat0 = cx18_av_read(cx, 0x804);
cx               1071 drivers/media/pci/cx18/cx18-av-core.c 	u8 mod_det_stat1 = cx18_av_read(cx, 0x805);
cx               1072 drivers/media/pci/cx18/cx18-av-core.c 	u8 audio_config = cx18_av_read(cx, 0x808);
cx               1073 drivers/media/pci/cx18/cx18-av-core.c 	u8 pref_mode = cx18_av_read(cx, 0x809);
cx               1074 drivers/media/pci/cx18/cx18-av-core.c 	u8 afc0 = cx18_av_read(cx, 0x80b);
cx               1075 drivers/media/pci/cx18/cx18-av-core.c 	u8 mute_ctl = cx18_av_read(cx, 0x8d3);
cx               1216 drivers/media/pci/cx18/cx18-av-core.c 	struct cx18 *cx = v4l2_get_subdevdata(sd);
cx               1217 drivers/media/pci/cx18/cx18-av-core.c 	log_video_status(cx);
cx               1218 drivers/media/pci/cx18/cx18-av-core.c 	log_audio_status(cx);
cx               1226 drivers/media/pci/cx18/cx18-av-core.c 	struct cx18 *cx = v4l2_get_subdevdata(sd);
cx               1231 drivers/media/pci/cx18/cx18-av-core.c 	reg->val = cx18_av_read4(cx, reg->reg & 0x00000ffc);
cx               1238 drivers/media/pci/cx18/cx18-av-core.c 	struct cx18 *cx = v4l2_get_subdevdata(sd);
cx               1242 drivers/media/pci/cx18/cx18-av-core.c 	cx18_av_write4(cx, reg->reg & 0x00000ffc, reg->val);
cx               1299 drivers/media/pci/cx18/cx18-av-core.c int cx18_av_probe(struct cx18 *cx)
cx               1301 drivers/media/pci/cx18/cx18-av-core.c 	struct cx18_av_state *state = &cx->av_state;
cx               1305 drivers/media/pci/cx18/cx18-av-core.c 	state->rev = cx18_av_read4(cx, CXADEC_CHIP_CTRL) & 0xffff;
cx               1316 drivers/media/pci/cx18/cx18-av-core.c 	v4l2_set_subdevdata(sd, cx);
cx               1318 drivers/media/pci/cx18/cx18-av-core.c 		 "%s %03x", cx->v4l2_dev.name, (state->rev >> 4));
cx               1352 drivers/media/pci/cx18/cx18-av-core.c 	err = v4l2_device_register_subdev(&cx->v4l2_dev, sd);
cx               1356 drivers/media/pci/cx18/cx18-av-core.c 		cx18_av_init(cx);
cx                344 drivers/media/pci/cx18/cx18-av-core.h int cx18_av_write(struct cx18 *cx, u16 addr, u8 value);
cx                345 drivers/media/pci/cx18/cx18-av-core.h int cx18_av_write4(struct cx18 *cx, u16 addr, u32 value);
cx                346 drivers/media/pci/cx18/cx18-av-core.h int cx18_av_write4_noretry(struct cx18 *cx, u16 addr, u32 value);
cx                347 drivers/media/pci/cx18/cx18-av-core.h int cx18_av_write_expect(struct cx18 *cx, u16 addr, u8 value, u8 eval, u8 mask);
cx                348 drivers/media/pci/cx18/cx18-av-core.h int cx18_av_write4_expect(struct cx18 *cx, u16 addr, u32 value, u32 eval,
cx                350 drivers/media/pci/cx18/cx18-av-core.h u8 cx18_av_read(struct cx18 *cx, u16 addr);
cx                351 drivers/media/pci/cx18/cx18-av-core.h u32 cx18_av_read4(struct cx18 *cx, u16 addr);
cx                352 drivers/media/pci/cx18/cx18-av-core.h int cx18_av_and_or(struct cx18 *cx, u16 addr, unsigned mask, u8 value);
cx                353 drivers/media/pci/cx18/cx18-av-core.h int cx18_av_and_or4(struct cx18 *cx, u16 addr, u32 mask, u32 value);
cx                354 drivers/media/pci/cx18/cx18-av-core.h void cx18_av_std_setup(struct cx18 *cx);
cx                356 drivers/media/pci/cx18/cx18-av-core.h int cx18_av_probe(struct cx18 *cx);
cx                360 drivers/media/pci/cx18/cx18-av-core.h int cx18_av_loadfw(struct cx18 *cx);
cx                365 drivers/media/pci/cx18/cx18-av-core.h void cx18_av_audio_set_path(struct cx18 *cx);
cx                 22 drivers/media/pci/cx18/cx18-av-firmware.c static int cx18_av_verifyfw(struct cx18 *cx, const struct firmware *fw)
cx                 24 drivers/media/pci/cx18/cx18-av-firmware.c 	struct v4l2_subdev *sd = &cx->av_state.sd;
cx                 32 drivers/media/pci/cx18/cx18-av-firmware.c 	dl_control = cx18_av_read4(cx, CXADEC_DL_CTL);
cx                 36 drivers/media/pci/cx18/cx18-av-firmware.c 		cx18_av_write4_noretry(cx, CXADEC_DL_CTL, dl_control);
cx                 37 drivers/media/pci/cx18/cx18-av-firmware.c 		dl_control = cx18_av_read4(cx, CXADEC_DL_CTL);
cx                 42 drivers/media/pci/cx18/cx18-av-firmware.c 		dl_control = cx18_av_read4(cx, CXADEC_DL_CTL);
cx                 55 drivers/media/pci/cx18/cx18-av-firmware.c 		dl_control = cx18_av_read4(cx, CXADEC_DL_CTL);
cx                 63 drivers/media/pci/cx18/cx18-av-firmware.c int cx18_av_loadfw(struct cx18 *cx)
cx                 65 drivers/media/pci/cx18/cx18-av-firmware.c 	struct v4l2_subdev *sd = &cx->av_state.sd;
cx                 73 drivers/media/pci/cx18/cx18-av-firmware.c 	if (request_firmware(&fw, FWFILE, &cx->pci_dev->dev) != 0) {
cx                 81 drivers/media/pci/cx18/cx18-av-firmware.c 		cx18_av_write4_expect(cx, CXADEC_CHIP_CTRL, 0x00010000,
cx                 83 drivers/media/pci/cx18/cx18-av-firmware.c 		cx18_av_write_expect(cx, CXADEC_STD_DET_CTL, 0xf6, 0xf6, 0xff);
cx                 86 drivers/media/pci/cx18/cx18-av-firmware.c 		cx18_av_write4_expect(cx, 0x8100, 0x00010000,
cx                 90 drivers/media/pci/cx18/cx18-av-firmware.c 		cx18_av_write4_noretry(cx, CXADEC_DL_CTL, 0x0F000000);
cx                103 drivers/media/pci/cx18/cx18-av-firmware.c 				cx18_av_write4_noretry(cx, CXADEC_DL_CTL,
cx                106 drivers/media/pci/cx18/cx18-av-firmware.c 				value = cx18_av_read4(cx, CXADEC_DL_CTL);
cx                130 drivers/media/pci/cx18/cx18-av-firmware.c 	cx18_av_write4_expect(cx, CXADEC_DL_CTL,
cx                135 drivers/media/pci/cx18/cx18-av-firmware.c 	if (cx18_av_verifyfw(cx, fw) == 0)
cx                136 drivers/media/pci/cx18/cx18-av-firmware.c 		cx18_av_write4_expect(cx, CXADEC_DL_CTL,
cx                140 drivers/media/pci/cx18/cx18-av-firmware.c 	cx18_av_and_or4(cx, CXADEC_PIN_CTRL1, ~0, 0x78000);
cx                147 drivers/media/pci/cx18/cx18-av-firmware.c 	cx18_av_write4(cx, CXADEC_I2S_IN_CTL, 0x000000A0);
cx                156 drivers/media/pci/cx18/cx18-av-firmware.c 	cx18_av_write4(cx, CXADEC_I2S_OUT_CTL, 0x000001A0);
cx                160 drivers/media/pci/cx18/cx18-av-firmware.c 	cx18_av_write4(cx, CXADEC_PIN_CFG3, 0x5600B687);
cx                162 drivers/media/pci/cx18/cx18-av-firmware.c 	cx18_av_write4_expect(cx, CXADEC_STD_DET_CTL, 0x000000F6, 0x000000F6,
cx                169 drivers/media/pci/cx18/cx18-av-firmware.c 	cx18_av_write4(cx, 0x09CC, 1);
cx                171 drivers/media/pci/cx18/cx18-av-firmware.c 	v = cx18_read_reg(cx, CX18_AUDIO_ENABLE);
cx                174 drivers/media/pci/cx18/cx18-av-firmware.c 		cx18_write_reg_expect(cx, v & 0xFFFFFBFF, CX18_AUDIO_ENABLE,
cx                178 drivers/media/pci/cx18/cx18-av-firmware.c 	v = cx18_read_reg(cx, CX18_AUDIO_ENABLE);
cx                184 drivers/media/pci/cx18/cx18-av-firmware.c 		cx18_write_reg_expect(cx, v | 0xb00, CX18_AUDIO_ENABLE,
cx                191 drivers/media/pci/cx18/cx18-av-firmware.c 		cx18_write_reg_expect(cx, v | 0xb00, CX18_AUDIO_ENABLE,
cx                196 drivers/media/pci/cx18/cx18-av-firmware.c 	cx18_write_reg_expect(cx, v | 0xb00, CX18_AUDIO_ENABLE,
cx                200 drivers/media/pci/cx18/cx18-av-firmware.c 	v = cx18_av_read4(cx, CXADEC_STD_DET_CTL);
cx                204 drivers/media/pci/cx18/cx18-av-firmware.c 	cx18_av_write4_expect(cx, CXADEC_STD_DET_CTL, v, v, 0x3F00FFFF);
cx                120 drivers/media/pci/cx18/cx18-av-vbi.c 	struct cx18 *cx = v4l2_get_subdevdata(sd);
cx                121 drivers/media/pci/cx18/cx18-av-vbi.c 	struct cx18_av_state *state = &cx->av_state;
cx                136 drivers/media/pci/cx18/cx18-av-vbi.c 	if ((cx18_av_read(cx, 0x404) & 0x10) == 0)
cx                141 drivers/media/pci/cx18/cx18-av-vbi.c 			u8 v = cx18_av_read(cx, 0x424 + i - 7);
cx                150 drivers/media/pci/cx18/cx18-av-vbi.c 			u8 v = cx18_av_read(cx, 0x424 + i - 10);
cx                163 drivers/media/pci/cx18/cx18-av-vbi.c 	struct cx18 *cx = v4l2_get_subdevdata(sd);
cx                164 drivers/media/pci/cx18/cx18-av-vbi.c 	struct cx18_av_state *state = &cx->av_state;
cx                167 drivers/media/pci/cx18/cx18-av-vbi.c 	cx18_av_std_setup(cx);
cx                170 drivers/media/pci/cx18/cx18-av-vbi.c 	cx18_av_write(cx, 0x47f, state->slicer_line_delay);
cx                171 drivers/media/pci/cx18/cx18-av-vbi.c 	cx18_av_write(cx, 0x404, 0x2e);
cx                177 drivers/media/pci/cx18/cx18-av-vbi.c 	struct cx18 *cx = v4l2_get_subdevdata(sd);
cx                178 drivers/media/pci/cx18/cx18-av-vbi.c 	struct cx18_av_state *state = &cx->av_state;
cx                187 drivers/media/pci/cx18/cx18-av-vbi.c 	cx18_av_std_setup(cx);
cx                190 drivers/media/pci/cx18/cx18-av-vbi.c 	cx18_av_write(cx, 0x404, 0x32);	/* Ancillary data */
cx                191 drivers/media/pci/cx18/cx18-av-vbi.c 	cx18_av_write(cx, 0x406, 0x13);
cx                192 drivers/media/pci/cx18/cx18-av-vbi.c 	cx18_av_write(cx, 0x47f, state->slicer_line_delay);
cx                231 drivers/media/pci/cx18/cx18-av-vbi.c 			cx18_av_write(cx, i, lcr[6 + x]);
cx                234 drivers/media/pci/cx18/cx18-av-vbi.c 			cx18_av_write(cx, i, lcr[9 + x]);
cx                236 drivers/media/pci/cx18/cx18-av-vbi.c 			cx18_av_write(cx, i, 0);
cx                239 drivers/media/pci/cx18/cx18-av-vbi.c 	cx18_av_write(cx, 0x43c, 0x16);
cx                241 drivers/media/pci/cx18/cx18-av-vbi.c 	cx18_av_write(cx, 0x474, is_pal ? 38 : 26);
cx                248 drivers/media/pci/cx18/cx18-av-vbi.c 	struct cx18 *cx = v4l2_get_subdevdata(sd);
cx                249 drivers/media/pci/cx18/cx18-av-vbi.c 	struct cx18_av_state *state = &cx->av_state;
cx                580 drivers/media/pci/cx18/cx18-cards.c int cx18_get_input(struct cx18 *cx, u16 index, struct v4l2_input *input)
cx                583 drivers/media/pci/cx18/cx18-cards.c 		cx->card->video_inputs + index;
cx                593 drivers/media/pci/cx18/cx18-cards.c 	if (index >= cx->nof_inputs)
cx                600 drivers/media/pci/cx18/cx18-cards.c 	input->audioset = (1 << cx->nof_audio_inputs) - 1;
cx                602 drivers/media/pci/cx18/cx18-cards.c 				cx->tuner_std : V4L2_STD_ALL;
cx                606 drivers/media/pci/cx18/cx18-cards.c int cx18_get_audio_input(struct cx18 *cx, u16 index, struct v4l2_audio *audio)
cx                609 drivers/media/pci/cx18/cx18-cards.c 		cx->card->audio_inputs + index;
cx                617 drivers/media/pci/cx18/cx18-cards.c 	if (index >= cx->nof_audio_inputs)
cx                137 drivers/media/pci/cx18/cx18-cards.h int cx18_get_input(struct cx18 *cx, u16 index, struct v4l2_input *input);
cx                138 drivers/media/pci/cx18/cx18-cards.h int cx18_get_audio_input(struct cx18 *cx, u16 index, struct v4l2_audio *input);
cx                 21 drivers/media/pci/cx18/cx18-controls.c 	struct cx18 *cx = container_of(cxhdl, struct cx18, cxhdl);
cx                 24 drivers/media/pci/cx18/cx18-controls.c 	if (atomic_read(&cx->ana_capturing) > 0)
cx                 32 drivers/media/pci/cx18/cx18-controls.c 		cx->vbi.insert_mpeg = V4L2_MPEG_STREAM_VBI_FMT_NONE;
cx                 38 drivers/media/pci/cx18/cx18-controls.c 	if (cx->vbi.sliced_mpeg_data[0] == NULL) {
cx                 42 drivers/media/pci/cx18/cx18-controls.c 			cx->vbi.sliced_mpeg_data[i] =
cx                 44 drivers/media/pci/cx18/cx18-controls.c 			if (cx->vbi.sliced_mpeg_data[i] == NULL) {
cx                 46 drivers/media/pci/cx18/cx18-controls.c 					kfree(cx->vbi.sliced_mpeg_data[i]);
cx                 47 drivers/media/pci/cx18/cx18-controls.c 					cx->vbi.sliced_mpeg_data[i] = NULL;
cx                 49 drivers/media/pci/cx18/cx18-controls.c 				cx->vbi.insert_mpeg =
cx                 57 drivers/media/pci/cx18/cx18-controls.c 	cx->vbi.insert_mpeg = fmt;
cx                 64 drivers/media/pci/cx18/cx18-controls.c 	if (cx18_get_service_set(cx->vbi.sliced_in) == 0) {
cx                 65 drivers/media/pci/cx18/cx18-controls.c 		if (cx->is_60hz)
cx                 66 drivers/media/pci/cx18/cx18-controls.c 			cx->vbi.sliced_in->service_set =
cx                 69 drivers/media/pci/cx18/cx18-controls.c 			cx->vbi.sliced_in->service_set = V4L2_SLICED_WSS_625;
cx                 70 drivers/media/pci/cx18/cx18-controls.c 		cx18_expand_service_set(cx->vbi.sliced_in, cx->is_50hz);
cx                 77 drivers/media/pci/cx18/cx18-controls.c 	struct cx18 *cx = container_of(cxhdl, struct cx18, cxhdl);
cx                 88 drivers/media/pci/cx18/cx18-controls.c 	v4l2_subdev_call(cx->sd_av, pad, set_fmt, NULL, &format);
cx                 95 drivers/media/pci/cx18/cx18-controls.c 	struct cx18 *cx = container_of(cxhdl, struct cx18, cxhdl);
cx                100 drivers/media/pci/cx18/cx18-controls.c 		cx18_call_all(cx, audio, s_clock_freq, freqs[idx]);
cx                106 drivers/media/pci/cx18/cx18-controls.c 	struct cx18 *cx = container_of(cxhdl, struct cx18, cxhdl);
cx                108 drivers/media/pci/cx18/cx18-controls.c 	cx->dualwatch_stereo_mode = val;
cx                283 drivers/media/pci/cx18/cx18-driver.c static void cx18_iounmap(struct cx18 *cx)
cx                285 drivers/media/pci/cx18/cx18-driver.c 	if (!cx)
cx                289 drivers/media/pci/cx18/cx18-driver.c 	if (cx->enc_mem) {
cx                291 drivers/media/pci/cx18/cx18-driver.c 		iounmap(cx->enc_mem);
cx                292 drivers/media/pci/cx18/cx18-driver.c 		cx->enc_mem = NULL;
cx                296 drivers/media/pci/cx18/cx18-driver.c static void cx18_eeprom_dump(struct cx18 *cx, unsigned char *eedata, int len)
cx                311 drivers/media/pci/cx18/cx18-driver.c void cx18_read_eeprom(struct cx18 *cx, struct tveeprom *tv)
cx                323 drivers/media/pci/cx18/cx18-driver.c 	c->adapter = &cx->i2c_adap[0];
cx                329 drivers/media/pci/cx18/cx18-driver.c 	switch (cx->card->type) {
cx                338 drivers/media/pci/cx18/cx18-driver.c 		cx18_eeprom_dump(cx, eedata, sizeof(eedata));
cx                344 drivers/media/pci/cx18/cx18-driver.c 		cx18_eeprom_dump(cx, eedata, sizeof(eedata));
cx                352 drivers/media/pci/cx18/cx18-driver.c static void cx18_process_eeprom(struct cx18 *cx)
cx                356 drivers/media/pci/cx18/cx18-driver.c 	cx18_read_eeprom(cx, &tv);
cx                369 drivers/media/pci/cx18/cx18-driver.c 		cx->card = cx18_get_card(CX18_CARD_HVR_1600_S5H1411);
cx                383 drivers/media/pci/cx18/cx18-driver.c 		cx->card = cx18_get_card(CX18_CARD_HVR_1600_ESMT);
cx                396 drivers/media/pci/cx18/cx18-driver.c 		cx->card = cx18_get_card(CX18_CARD_HVR_1600_ESMT);
cx                400 drivers/media/pci/cx18/cx18-driver.c 	cx->v4l2_cap = cx->card->v4l2_capabilities;
cx                401 drivers/media/pci/cx18/cx18-driver.c 	cx->card_name = cx->card->name;
cx                402 drivers/media/pci/cx18/cx18-driver.c 	cx->card_i2c = cx->card->i2c;
cx                404 drivers/media/pci/cx18/cx18-driver.c 	CX18_INFO("Autodetected %s\n", cx->card_name);
cx                409 drivers/media/pci/cx18/cx18-driver.c 	if (cx->options.tuner == -1)
cx                410 drivers/media/pci/cx18/cx18-driver.c 		cx->options.tuner = tv.tuner_type;
cx                411 drivers/media/pci/cx18/cx18-driver.c 	if (cx->options.radio == -1)
cx                412 drivers/media/pci/cx18/cx18-driver.c 		cx->options.radio = (tv.has_radio != 0);
cx                414 drivers/media/pci/cx18/cx18-driver.c 	if (cx->std != 0)
cx                427 drivers/media/pci/cx18/cx18-driver.c 		cx->std = V4L2_STD_ALL;
cx                430 drivers/media/pci/cx18/cx18-driver.c 		cx->std |= V4L2_STD_PAL_BG | V4L2_STD_PAL_H;
cx                433 drivers/media/pci/cx18/cx18-driver.c 		cx->std |= V4L2_STD_NTSC_M;
cx                436 drivers/media/pci/cx18/cx18-driver.c 		cx->std |= V4L2_STD_SECAM_L;
cx                439 drivers/media/pci/cx18/cx18-driver.c 		cx->std |= V4L2_STD_NTSC_M;
cx                443 drivers/media/pci/cx18/cx18-driver.c static v4l2_std_id cx18_parse_std(struct cx18 *cx)
cx                525 drivers/media/pci/cx18/cx18-driver.c static void cx18_process_options(struct cx18 *cx)
cx                529 drivers/media/pci/cx18/cx18-driver.c 	cx->options.megabytes[CX18_ENC_STREAM_TYPE_TS] = enc_ts_buffers;
cx                530 drivers/media/pci/cx18/cx18-driver.c 	cx->options.megabytes[CX18_ENC_STREAM_TYPE_MPG] = enc_mpg_buffers;
cx                531 drivers/media/pci/cx18/cx18-driver.c 	cx->options.megabytes[CX18_ENC_STREAM_TYPE_IDX] = enc_idx_buffers;
cx                532 drivers/media/pci/cx18/cx18-driver.c 	cx->options.megabytes[CX18_ENC_STREAM_TYPE_YUV] = enc_yuv_buffers;
cx                533 drivers/media/pci/cx18/cx18-driver.c 	cx->options.megabytes[CX18_ENC_STREAM_TYPE_VBI] = enc_vbi_buffers;
cx                534 drivers/media/pci/cx18/cx18-driver.c 	cx->options.megabytes[CX18_ENC_STREAM_TYPE_PCM] = enc_pcm_buffers;
cx                535 drivers/media/pci/cx18/cx18-driver.c 	cx->options.megabytes[CX18_ENC_STREAM_TYPE_RAD] = 0; /* control only */
cx                537 drivers/media/pci/cx18/cx18-driver.c 	cx->stream_buffers[CX18_ENC_STREAM_TYPE_TS] = enc_ts_bufs;
cx                538 drivers/media/pci/cx18/cx18-driver.c 	cx->stream_buffers[CX18_ENC_STREAM_TYPE_MPG] = enc_mpg_bufs;
cx                539 drivers/media/pci/cx18/cx18-driver.c 	cx->stream_buffers[CX18_ENC_STREAM_TYPE_IDX] = enc_idx_bufs;
cx                540 drivers/media/pci/cx18/cx18-driver.c 	cx->stream_buffers[CX18_ENC_STREAM_TYPE_YUV] = enc_yuv_bufs;
cx                541 drivers/media/pci/cx18/cx18-driver.c 	cx->stream_buffers[CX18_ENC_STREAM_TYPE_VBI] = enc_vbi_bufs;
cx                542 drivers/media/pci/cx18/cx18-driver.c 	cx->stream_buffers[CX18_ENC_STREAM_TYPE_PCM] = enc_pcm_bufs;
cx                543 drivers/media/pci/cx18/cx18-driver.c 	cx->stream_buffers[CX18_ENC_STREAM_TYPE_RAD] = 0; /* control, no data */
cx                545 drivers/media/pci/cx18/cx18-driver.c 	cx->stream_buf_size[CX18_ENC_STREAM_TYPE_TS] = enc_ts_bufsize;
cx                546 drivers/media/pci/cx18/cx18-driver.c 	cx->stream_buf_size[CX18_ENC_STREAM_TYPE_MPG] = enc_mpg_bufsize;
cx                547 drivers/media/pci/cx18/cx18-driver.c 	cx->stream_buf_size[CX18_ENC_STREAM_TYPE_IDX] = enc_idx_bufsize;
cx                548 drivers/media/pci/cx18/cx18-driver.c 	cx->stream_buf_size[CX18_ENC_STREAM_TYPE_YUV] = enc_yuv_bufsize;
cx                549 drivers/media/pci/cx18/cx18-driver.c 	cx->stream_buf_size[CX18_ENC_STREAM_TYPE_VBI] = VBI_ACTIVE_SAMPLES * 36;
cx                550 drivers/media/pci/cx18/cx18-driver.c 	cx->stream_buf_size[CX18_ENC_STREAM_TYPE_PCM] = enc_pcm_bufsize;
cx                551 drivers/media/pci/cx18/cx18-driver.c 	cx->stream_buf_size[CX18_ENC_STREAM_TYPE_RAD] = 0; /* control no data */
cx                555 drivers/media/pci/cx18/cx18-driver.c 		if (cx->stream_buffers[i] == 0 ||     /* User said 0 buffers */
cx                556 drivers/media/pci/cx18/cx18-driver.c 		    cx->options.megabytes[i] <= 0 ||  /* User said 0 MB total */
cx                557 drivers/media/pci/cx18/cx18-driver.c 		    cx->stream_buf_size[i] <= 0) {    /* User said buf size 0 */
cx                558 drivers/media/pci/cx18/cx18-driver.c 			cx->options.megabytes[i] = 0;
cx                559 drivers/media/pci/cx18/cx18-driver.c 			cx->stream_buffers[i] = 0;
cx                560 drivers/media/pci/cx18/cx18-driver.c 			cx->stream_buf_size[i] = 0;
cx                574 drivers/media/pci/cx18/cx18-driver.c 			cx->stream_buf_size[i] *= 1024;
cx                575 drivers/media/pci/cx18/cx18-driver.c 			cx->stream_buf_size[i] -=
cx                576 drivers/media/pci/cx18/cx18-driver.c 			   (cx->stream_buf_size[i] % CX18_UNIT_ENC_YUV_BUFSIZE);
cx                578 drivers/media/pci/cx18/cx18-driver.c 			if (cx->stream_buf_size[i] < CX18_UNIT_ENC_YUV_BUFSIZE)
cx                579 drivers/media/pci/cx18/cx18-driver.c 				cx->stream_buf_size[i] =
cx                582 drivers/media/pci/cx18/cx18-driver.c 			cx->stream_buf_size[i] *= 1024;
cx                583 drivers/media/pci/cx18/cx18-driver.c 			cx->stream_buf_size[i] -=
cx                584 drivers/media/pci/cx18/cx18-driver.c 			   (cx->stream_buf_size[i] % CX18_UNIT_ENC_IDX_BUFSIZE);
cx                586 drivers/media/pci/cx18/cx18-driver.c 			if (cx->stream_buf_size[i] < CX18_UNIT_ENC_IDX_BUFSIZE)
cx                587 drivers/media/pci/cx18/cx18-driver.c 				cx->stream_buf_size[i] =
cx                599 drivers/media/pci/cx18/cx18-driver.c 			if (cx->stream_buffers[i] < 0) {
cx                600 drivers/media/pci/cx18/cx18-driver.c 				cx->stream_buffers[i] =
cx                601 drivers/media/pci/cx18/cx18-driver.c 					cx->options.megabytes[i] * 1024 * 1024
cx                602 drivers/media/pci/cx18/cx18-driver.c 					/ cx->stream_buf_size[i];
cx                605 drivers/media/pci/cx18/cx18-driver.c 				cx->options.megabytes[i] =
cx                606 drivers/media/pci/cx18/cx18-driver.c 					cx->stream_buffers[i]
cx                607 drivers/media/pci/cx18/cx18-driver.c 					* cx->stream_buf_size[i]/(1024 * 1024);
cx                611 drivers/media/pci/cx18/cx18-driver.c 			if (cx->stream_buffers[i] < 0) {
cx                612 drivers/media/pci/cx18/cx18-driver.c 				cx->stream_buffers[i] =
cx                613 drivers/media/pci/cx18/cx18-driver.c 						cx->options.megabytes[i] * 1024
cx                614 drivers/media/pci/cx18/cx18-driver.c 						/ cx->stream_buf_size[i];
cx                617 drivers/media/pci/cx18/cx18-driver.c 				cx->options.megabytes[i] =
cx                618 drivers/media/pci/cx18/cx18-driver.c 						cx->stream_buffers[i]
cx                619 drivers/media/pci/cx18/cx18-driver.c 						* cx->stream_buf_size[i] / 1024;
cx                622 drivers/media/pci/cx18/cx18-driver.c 			cx->stream_buf_size[i] *= 1024;
cx                625 drivers/media/pci/cx18/cx18-driver.c 				i, cx->options.megabytes[i],
cx                626 drivers/media/pci/cx18/cx18-driver.c 				cx->stream_buffers[i], cx->stream_buf_size[i]);
cx                629 drivers/media/pci/cx18/cx18-driver.c 	cx->options.cardtype = cardtype[cx->instance];
cx                630 drivers/media/pci/cx18/cx18-driver.c 	cx->options.tuner = tuner[cx->instance];
cx                631 drivers/media/pci/cx18/cx18-driver.c 	cx->options.radio = radio[cx->instance];
cx                633 drivers/media/pci/cx18/cx18-driver.c 	cx->std = cx18_parse_std(cx);
cx                634 drivers/media/pci/cx18/cx18-driver.c 	if (cx->options.cardtype == -1) {
cx                638 drivers/media/pci/cx18/cx18-driver.c 	cx->card = cx18_get_card(cx->options.cardtype - 1);
cx                639 drivers/media/pci/cx18/cx18-driver.c 	if (cx->card)
cx                640 drivers/media/pci/cx18/cx18-driver.c 		CX18_INFO("User specified %s card\n", cx->card->name);
cx                641 drivers/media/pci/cx18/cx18-driver.c 	else if (cx->options.cardtype != 0)
cx                643 drivers/media/pci/cx18/cx18-driver.c 	if (!cx->card) {
cx                644 drivers/media/pci/cx18/cx18-driver.c 		if (cx->pci_dev->subsystem_vendor == CX18_PCI_ID_HAUPPAUGE) {
cx                645 drivers/media/pci/cx18/cx18-driver.c 			cx->card = cx18_get_card(CX18_CARD_HVR_1600_ESMT);
cx                649 drivers/media/pci/cx18/cx18-driver.c 	if (!cx->card) {
cx                650 drivers/media/pci/cx18/cx18-driver.c 		for (i = 0; (cx->card = cx18_get_card(i)); i++) {
cx                651 drivers/media/pci/cx18/cx18-driver.c 			if (!cx->card->pci_list)
cx                653 drivers/media/pci/cx18/cx18-driver.c 			for (j = 0; cx->card->pci_list[j].device; j++) {
cx                654 drivers/media/pci/cx18/cx18-driver.c 				if (cx->pci_dev->device !=
cx                655 drivers/media/pci/cx18/cx18-driver.c 				    cx->card->pci_list[j].device)
cx                657 drivers/media/pci/cx18/cx18-driver.c 				if (cx->pci_dev->subsystem_vendor !=
cx                658 drivers/media/pci/cx18/cx18-driver.c 				    cx->card->pci_list[j].subsystem_vendor)
cx                660 drivers/media/pci/cx18/cx18-driver.c 				if (cx->pci_dev->subsystem_device !=
cx                661 drivers/media/pci/cx18/cx18-driver.c 				    cx->card->pci_list[j].subsystem_device)
cx                663 drivers/media/pci/cx18/cx18-driver.c 				CX18_INFO("Autodetected %s card\n", cx->card->name);
cx                670 drivers/media/pci/cx18/cx18-driver.c 	if (!cx->card) {
cx                671 drivers/media/pci/cx18/cx18-driver.c 		cx->card = cx18_get_card(CX18_CARD_HVR_1600_ESMT);
cx                673 drivers/media/pci/cx18/cx18-driver.c 			 cx->pci_dev->vendor, cx->pci_dev->device);
cx                675 drivers/media/pci/cx18/cx18-driver.c 			 cx->pci_dev->subsystem_vendor,
cx                676 drivers/media/pci/cx18/cx18-driver.c 			 cx->pci_dev->subsystem_device);
cx                677 drivers/media/pci/cx18/cx18-driver.c 		CX18_ERR("Defaulting to %s card\n", cx->card->name);
cx                682 drivers/media/pci/cx18/cx18-driver.c 	cx->v4l2_cap = cx->card->v4l2_capabilities;
cx                683 drivers/media/pci/cx18/cx18-driver.c 	cx->card_name = cx->card->name;
cx                684 drivers/media/pci/cx18/cx18-driver.c 	cx->card_i2c = cx->card->i2c;
cx                687 drivers/media/pci/cx18/cx18-driver.c static int cx18_create_in_workq(struct cx18 *cx)
cx                689 drivers/media/pci/cx18/cx18-driver.c 	snprintf(cx->in_workq_name, sizeof(cx->in_workq_name), "%s-in",
cx                690 drivers/media/pci/cx18/cx18-driver.c 		 cx->v4l2_dev.name);
cx                691 drivers/media/pci/cx18/cx18-driver.c 	cx->in_work_queue = alloc_ordered_workqueue("%s", 0, cx->in_workq_name);
cx                692 drivers/media/pci/cx18/cx18-driver.c 	if (!cx->in_work_queue) {
cx                699 drivers/media/pci/cx18/cx18-driver.c static void cx18_init_in_work_orders(struct cx18 *cx)
cx                703 drivers/media/pci/cx18/cx18-driver.c 		cx->in_work_order[i].cx = cx;
cx                704 drivers/media/pci/cx18/cx18-driver.c 		cx->in_work_order[i].str = cx->epu_debug_str;
cx                705 drivers/media/pci/cx18/cx18-driver.c 		INIT_WORK(&cx->in_work_order[i].work, cx18_in_work_handler);
cx                714 drivers/media/pci/cx18/cx18-driver.c static int cx18_init_struct1(struct cx18 *cx)
cx                718 drivers/media/pci/cx18/cx18-driver.c 	cx->base_addr = pci_resource_start(cx->pci_dev, 0);
cx                720 drivers/media/pci/cx18/cx18-driver.c 	mutex_init(&cx->serialize_lock);
cx                721 drivers/media/pci/cx18/cx18-driver.c 	mutex_init(&cx->gpio_lock);
cx                722 drivers/media/pci/cx18/cx18-driver.c 	mutex_init(&cx->epu2apu_mb_lock);
cx                723 drivers/media/pci/cx18/cx18-driver.c 	mutex_init(&cx->epu2cpu_mb_lock);
cx                725 drivers/media/pci/cx18/cx18-driver.c 	ret = cx18_create_in_workq(cx);
cx                729 drivers/media/pci/cx18/cx18-driver.c 	cx18_init_in_work_orders(cx);
cx                732 drivers/media/pci/cx18/cx18-driver.c 	cx->open_id = 1;
cx                735 drivers/media/pci/cx18/cx18-driver.c 	cx->cxhdl.port = CX2341X_PORT_MEMORY;
cx                736 drivers/media/pci/cx18/cx18-driver.c 	cx->cxhdl.capabilities = CX2341X_CAP_HAS_TS | CX2341X_CAP_HAS_SLICED_VBI;
cx                737 drivers/media/pci/cx18/cx18-driver.c 	cx->cxhdl.ops = &cx18_cxhdl_ops;
cx                738 drivers/media/pci/cx18/cx18-driver.c 	cx->cxhdl.func = cx18_api_func;
cx                739 drivers/media/pci/cx18/cx18-driver.c 	cx->cxhdl.priv = &cx->streams[CX18_ENC_STREAM_TYPE_MPG];
cx                740 drivers/media/pci/cx18/cx18-driver.c 	ret = cx2341x_handler_init(&cx->cxhdl, 50);
cx                743 drivers/media/pci/cx18/cx18-driver.c 	cx->v4l2_dev.ctrl_handler = &cx->cxhdl.hdl;
cx                745 drivers/media/pci/cx18/cx18-driver.c 	cx->temporal_strength = cx->cxhdl.video_temporal_filter->cur.val;
cx                746 drivers/media/pci/cx18/cx18-driver.c 	cx->spatial_strength = cx->cxhdl.video_spatial_filter->cur.val;
cx                747 drivers/media/pci/cx18/cx18-driver.c 	cx->filter_mode = cx->cxhdl.video_spatial_filter_mode->cur.val |
cx                748 drivers/media/pci/cx18/cx18-driver.c 		(cx->cxhdl.video_temporal_filter_mode->cur.val << 1) |
cx                749 drivers/media/pci/cx18/cx18-driver.c 		(cx->cxhdl.video_median_filter_type->cur.val << 2);
cx                751 drivers/media/pci/cx18/cx18-driver.c 	init_waitqueue_head(&cx->cap_w);
cx                752 drivers/media/pci/cx18/cx18-driver.c 	init_waitqueue_head(&cx->mb_apu_waitq);
cx                753 drivers/media/pci/cx18/cx18-driver.c 	init_waitqueue_head(&cx->mb_cpu_waitq);
cx                754 drivers/media/pci/cx18/cx18-driver.c 	init_waitqueue_head(&cx->dma_waitq);
cx                757 drivers/media/pci/cx18/cx18-driver.c 	cx->vbi.in.type = V4L2_BUF_TYPE_VBI_CAPTURE;
cx                758 drivers/media/pci/cx18/cx18-driver.c 	cx->vbi.sliced_in = &cx->vbi.in.fmt.sliced;
cx                761 drivers/media/pci/cx18/cx18-driver.c 	INIT_LIST_HEAD(&cx->vbi.sliced_mpeg_buf.list);
cx                762 drivers/media/pci/cx18/cx18-driver.c 	INIT_LIST_HEAD(&cx->vbi.sliced_mpeg_mdl.list);
cx                763 drivers/media/pci/cx18/cx18-driver.c 	INIT_LIST_HEAD(&cx->vbi.sliced_mpeg_mdl.buf_list);
cx                764 drivers/media/pci/cx18/cx18-driver.c 	list_add(&cx->vbi.sliced_mpeg_buf.list,
cx                765 drivers/media/pci/cx18/cx18-driver.c 		 &cx->vbi.sliced_mpeg_mdl.buf_list);
cx                771 drivers/media/pci/cx18/cx18-driver.c static void cx18_init_struct2(struct cx18 *cx)
cx                776 drivers/media/pci/cx18/cx18-driver.c 		if (cx->card->video_inputs[i].video_type == 0)
cx                778 drivers/media/pci/cx18/cx18-driver.c 	cx->nof_inputs = i;
cx                780 drivers/media/pci/cx18/cx18-driver.c 		if (cx->card->audio_inputs[i].audio_type == 0)
cx                782 drivers/media/pci/cx18/cx18-driver.c 	cx->nof_audio_inputs = i;
cx                785 drivers/media/pci/cx18/cx18-driver.c 	for (i = 0; i < cx->nof_inputs; i++) {
cx                786 drivers/media/pci/cx18/cx18-driver.c 		if (cx->card->video_inputs[i].video_type ==
cx                790 drivers/media/pci/cx18/cx18-driver.c 	if (i == cx->nof_inputs)
cx                792 drivers/media/pci/cx18/cx18-driver.c 	cx->active_input = i;
cx                793 drivers/media/pci/cx18/cx18-driver.c 	cx->audio_input = cx->card->video_inputs[i].audio_index;
cx                796 drivers/media/pci/cx18/cx18-driver.c static int cx18_setup_pci(struct cx18 *cx, struct pci_dev *pci_dev,
cx                805 drivers/media/pci/cx18/cx18-driver.c 		CX18_ERR("Can't enable device %d!\n", cx->instance);
cx                809 drivers/media/pci/cx18/cx18-driver.c 		CX18_ERR("No suitable DMA available, card %d\n", cx->instance);
cx                812 drivers/media/pci/cx18/cx18-driver.c 	if (!request_mem_region(cx->base_addr, CX18_MEM_SIZE, "cx18 encoder")) {
cx                814 drivers/media/pci/cx18/cx18-driver.c 			 cx->instance);
cx                823 drivers/media/pci/cx18/cx18-driver.c 	cx->card_rev = pci_dev->revision;
cx                834 drivers/media/pci/cx18/cx18-driver.c 		   cx->pci_dev->device, cx->card_rev, pci_dev->bus->number,
cx                836 drivers/media/pci/cx18/cx18-driver.c 		   cx->pci_dev->irq, pci_latency, (u64)cx->base_addr);
cx                841 drivers/media/pci/cx18/cx18-driver.c static void cx18_init_subdevs(struct cx18 *cx)
cx                843 drivers/media/pci/cx18/cx18-driver.c 	u32 hw = cx->card->hw_all;
cx                856 drivers/media/pci/cx18/cx18-driver.c 			cx->hw_flags |= device;
cx                861 drivers/media/pci/cx18/cx18-driver.c 			cx->hw_flags |= device;
cx                870 drivers/media/pci/cx18/cx18-driver.c 			if (cx18_gpio_register(cx, device) == 0)
cx                871 drivers/media/pci/cx18/cx18-driver.c 				cx->hw_flags |= device;
cx                874 drivers/media/pci/cx18/cx18-driver.c 			if (cx18_i2c_register(cx, i) == 0)
cx                875 drivers/media/pci/cx18/cx18-driver.c 				cx->hw_flags |= device;
cx                880 drivers/media/pci/cx18/cx18-driver.c 	if (cx->hw_flags & CX18_HW_418_AV)
cx                881 drivers/media/pci/cx18/cx18-driver.c 		cx->sd_av = cx18_find_hw(cx, CX18_HW_418_AV);
cx                883 drivers/media/pci/cx18/cx18-driver.c 	if (cx->card->hw_muxer != 0)
cx                884 drivers/media/pci/cx18/cx18-driver.c 		cx->sd_extmux = cx18_find_hw(cx, cx->card->hw_muxer);
cx                893 drivers/media/pci/cx18/cx18-driver.c 	struct cx18 *cx;
cx                903 drivers/media/pci/cx18/cx18-driver.c 	cx = kzalloc(sizeof(*cx), GFP_ATOMIC);
cx                904 drivers/media/pci/cx18/cx18-driver.c 	if (!cx)
cx                907 drivers/media/pci/cx18/cx18-driver.c 	cx->pci_dev = pci_dev;
cx                908 drivers/media/pci/cx18/cx18-driver.c 	cx->instance = i;
cx                910 drivers/media/pci/cx18/cx18-driver.c 	retval = v4l2_device_register(&pci_dev->dev, &cx->v4l2_dev);
cx                913 drivers/media/pci/cx18/cx18-driver.c 		       cx->instance);
cx                914 drivers/media/pci/cx18/cx18-driver.c 		kfree(cx);
cx                917 drivers/media/pci/cx18/cx18-driver.c 	snprintf(cx->v4l2_dev.name, sizeof(cx->v4l2_dev.name), "cx18-%d",
cx                918 drivers/media/pci/cx18/cx18-driver.c 		 cx->instance);
cx                919 drivers/media/pci/cx18/cx18-driver.c 	CX18_INFO("Initializing card %d\n", cx->instance);
cx                921 drivers/media/pci/cx18/cx18-driver.c 	cx18_process_options(cx);
cx                922 drivers/media/pci/cx18/cx18-driver.c 	if (cx->options.cardtype == -1) {
cx                927 drivers/media/pci/cx18/cx18-driver.c 	retval = cx18_init_struct1(cx);
cx                931 drivers/media/pci/cx18/cx18-driver.c 	CX18_DEBUG_INFO("base addr: 0x%llx\n", (u64)cx->base_addr);
cx                934 drivers/media/pci/cx18/cx18-driver.c 	retval = cx18_setup_pci(cx, pci_dev, pci_id);
cx                940 drivers/media/pci/cx18/cx18-driver.c 		   (u64)cx->base_addr + CX18_MEM_OFFSET, CX18_MEM_SIZE);
cx                941 drivers/media/pci/cx18/cx18-driver.c 	cx->enc_mem = ioremap_nocache(cx->base_addr + CX18_MEM_OFFSET,
cx                943 drivers/media/pci/cx18/cx18-driver.c 	if (!cx->enc_mem) {
cx                951 drivers/media/pci/cx18/cx18-driver.c 	cx->reg_mem = cx->enc_mem + CX18_REG_OFFSET;
cx                952 drivers/media/pci/cx18/cx18-driver.c 	devtype = cx18_read_reg(cx, 0xC72028);
cx                965 drivers/media/pci/cx18/cx18-driver.c 	cx18_init_power(cx, 1);
cx                966 drivers/media/pci/cx18/cx18-driver.c 	cx18_init_memory(cx);
cx                968 drivers/media/pci/cx18/cx18-driver.c 	cx->scb = (struct cx18_scb __iomem *)(cx->enc_mem + SCB_OFFSET);
cx                969 drivers/media/pci/cx18/cx18-driver.c 	cx18_init_scb(cx);
cx                971 drivers/media/pci/cx18/cx18-driver.c 	cx18_gpio_init(cx);
cx                974 drivers/media/pci/cx18/cx18-driver.c 	retval = cx18_av_probe(cx);
cx                981 drivers/media/pci/cx18/cx18-driver.c 	if (cx->card->hw_all & CX18_HW_GPIO_RESET_CTRL) {
cx                982 drivers/media/pci/cx18/cx18-driver.c 		if (cx18_gpio_register(cx, CX18_HW_GPIO_RESET_CTRL) != 0)
cx                985 drivers/media/pci/cx18/cx18-driver.c 			cx->hw_flags |= CX18_HW_GPIO_RESET_CTRL;
cx                990 drivers/media/pci/cx18/cx18-driver.c 	retval = init_cx18_i2c(cx);
cx                996 drivers/media/pci/cx18/cx18-driver.c 	if (cx->card->hw_all & CX18_HW_TVEEPROM) {
cx                999 drivers/media/pci/cx18/cx18-driver.c 		const struct cx18_card *orig_card = cx->card;
cx               1000 drivers/media/pci/cx18/cx18-driver.c 		cx18_process_eeprom(cx);
cx               1002 drivers/media/pci/cx18/cx18-driver.c 		if (cx->card != orig_card) {
cx               1004 drivers/media/pci/cx18/cx18-driver.c 			cx18_gpio_init(cx);
cx               1005 drivers/media/pci/cx18/cx18-driver.c 			cx18_call_hw(cx, CX18_HW_GPIO_RESET_CTRL,
cx               1009 drivers/media/pci/cx18/cx18-driver.c 	if (cx->card->comment)
cx               1010 drivers/media/pci/cx18/cx18-driver.c 		CX18_INFO("%s", cx->card->comment);
cx               1011 drivers/media/pci/cx18/cx18-driver.c 	if (cx->card->v4l2_capabilities == 0) {
cx               1015 drivers/media/pci/cx18/cx18-driver.c 	cx18_init_memory(cx);
cx               1016 drivers/media/pci/cx18/cx18-driver.c 	cx18_init_scb(cx);
cx               1019 drivers/media/pci/cx18/cx18-driver.c 	retval = request_irq(cx->pci_dev->irq, cx18_irq_handler,
cx               1020 drivers/media/pci/cx18/cx18-driver.c 			     IRQF_SHARED, cx->v4l2_dev.name, (void *)cx);
cx               1026 drivers/media/pci/cx18/cx18-driver.c 	if (cx->std == 0)
cx               1027 drivers/media/pci/cx18/cx18-driver.c 		cx->std = V4L2_STD_NTSC_M;
cx               1029 drivers/media/pci/cx18/cx18-driver.c 	if (cx->options.tuner == -1) {
cx               1031 drivers/media/pci/cx18/cx18-driver.c 			if ((cx->std & cx->card->tuners[i].std) == 0)
cx               1033 drivers/media/pci/cx18/cx18-driver.c 			cx->options.tuner = cx->card->tuners[i].tuner;
cx               1038 drivers/media/pci/cx18/cx18-driver.c 	if (cx->options.tuner == -1 && cx->card->tuners[0].std) {
cx               1039 drivers/media/pci/cx18/cx18-driver.c 		cx->std = cx->card->tuners[0].std;
cx               1040 drivers/media/pci/cx18/cx18-driver.c 		if (cx->std & V4L2_STD_PAL)
cx               1041 drivers/media/pci/cx18/cx18-driver.c 			cx->std = V4L2_STD_PAL_BG | V4L2_STD_PAL_H;
cx               1042 drivers/media/pci/cx18/cx18-driver.c 		else if (cx->std & V4L2_STD_NTSC)
cx               1043 drivers/media/pci/cx18/cx18-driver.c 			cx->std = V4L2_STD_NTSC_M;
cx               1044 drivers/media/pci/cx18/cx18-driver.c 		else if (cx->std & V4L2_STD_SECAM)
cx               1045 drivers/media/pci/cx18/cx18-driver.c 			cx->std = V4L2_STD_SECAM_L;
cx               1046 drivers/media/pci/cx18/cx18-driver.c 		cx->options.tuner = cx->card->tuners[0].tuner;
cx               1048 drivers/media/pci/cx18/cx18-driver.c 	if (cx->options.radio == -1)
cx               1049 drivers/media/pci/cx18/cx18-driver.c 		cx->options.radio = (cx->card->radio_input.audio_type != 0);
cx               1053 drivers/media/pci/cx18/cx18-driver.c 	cx18_init_struct2(cx);
cx               1055 drivers/media/pci/cx18/cx18-driver.c 	cx18_init_subdevs(cx);
cx               1057 drivers/media/pci/cx18/cx18-driver.c 	if (cx->std & V4L2_STD_525_60)
cx               1058 drivers/media/pci/cx18/cx18-driver.c 		cx->is_60hz = 1;
cx               1060 drivers/media/pci/cx18/cx18-driver.c 		cx->is_50hz = 1;
cx               1062 drivers/media/pci/cx18/cx18-driver.c 	cx2341x_handler_set_50hz(&cx->cxhdl, !cx->is_60hz);
cx               1064 drivers/media/pci/cx18/cx18-driver.c 	if (cx->options.radio > 0)
cx               1065 drivers/media/pci/cx18/cx18-driver.c 		cx->v4l2_cap |= V4L2_CAP_RADIO;
cx               1067 drivers/media/pci/cx18/cx18-driver.c 	if (cx->options.tuner > -1) {
cx               1071 drivers/media/pci/cx18/cx18-driver.c 		setup.type = cx->options.tuner;
cx               1074 drivers/media/pci/cx18/cx18-driver.c 		if (cx->options.radio > 0)
cx               1078 drivers/media/pci/cx18/cx18-driver.c 		cx18_call_all(cx, tuner, s_type_addr, &setup);
cx               1085 drivers/media/pci/cx18/cx18-driver.c 				.tuner = cx->options.tuner,
cx               1088 drivers/media/pci/cx18/cx18-driver.c 			cx18_call_all(cx, tuner, s_config, &cfg);
cx               1094 drivers/media/pci/cx18/cx18-driver.c 	cx->tuner_std = cx->std;
cx               1095 drivers/media/pci/cx18/cx18-driver.c 	if (cx->std == V4L2_STD_ALL)
cx               1096 drivers/media/pci/cx18/cx18-driver.c 		cx->std = V4L2_STD_NTSC_M;
cx               1098 drivers/media/pci/cx18/cx18-driver.c 	retval = cx18_streams_setup(cx);
cx               1103 drivers/media/pci/cx18/cx18-driver.c 	retval = cx18_streams_register(cx);
cx               1109 drivers/media/pci/cx18/cx18-driver.c 	CX18_INFO("Initialized card: %s\n", cx->card_name);
cx               1112 drivers/media/pci/cx18/cx18-driver.c 	request_modules(cx);
cx               1116 drivers/media/pci/cx18/cx18-driver.c 	cx18_streams_cleanup(cx, 1);
cx               1118 drivers/media/pci/cx18/cx18-driver.c 	free_irq(cx->pci_dev->irq, (void *)cx);
cx               1120 drivers/media/pci/cx18/cx18-driver.c 	exit_cx18_i2c(cx);
cx               1122 drivers/media/pci/cx18/cx18-driver.c 	cx18_iounmap(cx);
cx               1124 drivers/media/pci/cx18/cx18-driver.c 	release_mem_region(cx->base_addr, CX18_MEM_SIZE);
cx               1126 drivers/media/pci/cx18/cx18-driver.c 	destroy_workqueue(cx->in_work_queue);
cx               1130 drivers/media/pci/cx18/cx18-driver.c 	v4l2_device_unregister(&cx->v4l2_dev);
cx               1131 drivers/media/pci/cx18/cx18-driver.c 	kfree(cx);
cx               1135 drivers/media/pci/cx18/cx18-driver.c int cx18_init_on_first_open(struct cx18 *cx)
cx               1143 drivers/media/pci/cx18/cx18-driver.c 	fh.cx = cx;
cx               1145 drivers/media/pci/cx18/cx18-driver.c 	if (test_bit(CX18_F_I_FAILED, &cx->i_flags))
cx               1148 drivers/media/pci/cx18/cx18-driver.c 	if (test_and_set_bit(CX18_F_I_INITED, &cx->i_flags))
cx               1153 drivers/media/pci/cx18/cx18-driver.c 		if (cx18_firmware_init(cx) == 0)
cx               1160 drivers/media/pci/cx18/cx18-driver.c 		set_bit(CX18_F_I_FAILED, &cx->i_flags);
cx               1163 drivers/media/pci/cx18/cx18-driver.c 	set_bit(CX18_F_I_LOADED_FW, &cx->i_flags);
cx               1177 drivers/media/pci/cx18/cx18-driver.c 	cx18_vapi(cx, CX18_APU_START, 2, CX18_APU_ENCODING_METHOD_MPEG|0xb9, 0);
cx               1178 drivers/media/pci/cx18/cx18-driver.c 	cx18_vapi(cx, CX18_APU_RESETAI, 0);
cx               1179 drivers/media/pci/cx18/cx18-driver.c 	cx18_vapi(cx, CX18_APU_STOP, 1, CX18_APU_ENCODING_METHOD_MPEG);
cx               1184 drivers/media/pci/cx18/cx18-driver.c 		if (cx18_firmware_init(cx) == 0)
cx               1191 drivers/media/pci/cx18/cx18-driver.c 		set_bit(CX18_F_I_FAILED, &cx->i_flags);
cx               1204 drivers/media/pci/cx18/cx18-driver.c 	cx18_vapi(cx, CX18_APU_START, 2, CX18_APU_ENCODING_METHOD_MPEG|0xb9, 0);
cx               1205 drivers/media/pci/cx18/cx18-driver.c 	cx18_vapi(cx, CX18_APU_RESETAI, 0);
cx               1206 drivers/media/pci/cx18/cx18-driver.c 	cx18_vapi(cx, CX18_APU_STOP, 1, CX18_APU_ENCODING_METHOD_MPEG);
cx               1209 drivers/media/pci/cx18/cx18-driver.c 	v4l2_subdev_call(cx->sd_av, core, load_fw);
cx               1217 drivers/media/pci/cx18/cx18-driver.c 	if (cx->std == V4L2_STD_NTSC_M_JP)
cx               1219 drivers/media/pci/cx18/cx18-driver.c 	else if (cx->std & V4L2_STD_NTSC_M)
cx               1222 drivers/media/pci/cx18/cx18-driver.c 	video_input = cx->active_input;
cx               1223 drivers/media/pci/cx18/cx18-driver.c 	cx->active_input++;	/* Force update of input */
cx               1228 drivers/media/pci/cx18/cx18-driver.c 	cx->std++;		/* Force full standard initialization */
cx               1229 drivers/media/pci/cx18/cx18-driver.c 	std = (cx->tuner_std == V4L2_STD_ALL) ? V4L2_STD_NTSC_M : cx->tuner_std;
cx               1235 drivers/media/pci/cx18/cx18-driver.c static void cx18_cancel_in_work_orders(struct cx18 *cx)
cx               1239 drivers/media/pci/cx18/cx18-driver.c 		cancel_work_sync(&cx->in_work_order[i].work);
cx               1242 drivers/media/pci/cx18/cx18-driver.c static void cx18_cancel_out_work_orders(struct cx18 *cx)
cx               1246 drivers/media/pci/cx18/cx18-driver.c 		if (cx->streams[i].video_dev.v4l2_dev)
cx               1247 drivers/media/pci/cx18/cx18-driver.c 			cancel_work_sync(&cx->streams[i].out_work_order);
cx               1253 drivers/media/pci/cx18/cx18-driver.c 	struct cx18 *cx = to_cx18(v4l2_dev);
cx               1258 drivers/media/pci/cx18/cx18-driver.c 	flush_request_modules(cx);
cx               1262 drivers/media/pci/cx18/cx18-driver.c 	if (atomic_read(&cx->tot_capturing) > 0)
cx               1263 drivers/media/pci/cx18/cx18-driver.c 		cx18_stop_all_captures(cx);
cx               1266 drivers/media/pci/cx18/cx18-driver.c 	cx18_sw1_irq_disable(cx, IRQ_CPU_TO_EPU | IRQ_APU_TO_EPU);
cx               1269 drivers/media/pci/cx18/cx18-driver.c 	cx18_cancel_in_work_orders(cx);
cx               1270 drivers/media/pci/cx18/cx18-driver.c 	cx18_cancel_out_work_orders(cx);
cx               1273 drivers/media/pci/cx18/cx18-driver.c 	cx18_sw2_irq_disable(cx, IRQ_CPU_TO_EPU_ACK | IRQ_APU_TO_EPU_ACK);
cx               1275 drivers/media/pci/cx18/cx18-driver.c 	cx18_halt_firmware(cx);
cx               1277 drivers/media/pci/cx18/cx18-driver.c 	destroy_workqueue(cx->in_work_queue);
cx               1279 drivers/media/pci/cx18/cx18-driver.c 	cx18_streams_cleanup(cx, 1);
cx               1281 drivers/media/pci/cx18/cx18-driver.c 	exit_cx18_i2c(cx);
cx               1283 drivers/media/pci/cx18/cx18-driver.c 	free_irq(cx->pci_dev->irq, (void *)cx);
cx               1285 drivers/media/pci/cx18/cx18-driver.c 	cx18_iounmap(cx);
cx               1287 drivers/media/pci/cx18/cx18-driver.c 	release_mem_region(cx->base_addr, CX18_MEM_SIZE);
cx               1289 drivers/media/pci/cx18/cx18-driver.c 	pci_disable_device(cx->pci_dev);
cx               1291 drivers/media/pci/cx18/cx18-driver.c 	if (cx->vbi.sliced_mpeg_data[0])
cx               1293 drivers/media/pci/cx18/cx18-driver.c 			kfree(cx->vbi.sliced_mpeg_data[i]);
cx               1295 drivers/media/pci/cx18/cx18-driver.c 	v4l2_ctrl_handler_free(&cx->av_state.hdl);
cx               1297 drivers/media/pci/cx18/cx18-driver.c 	CX18_INFO("Removed %s\n", cx->card_name);
cx               1300 drivers/media/pci/cx18/cx18-driver.c 	kfree(cx);
cx                162 drivers/media/pci/cx18/cx18-driver.h 			v4l2_info(&cx->v4l2_dev, " " type ": " fmt , ## args); \
cx                176 drivers/media/pci/cx18/cx18-driver.h 			v4l2_info(&cx->v4l2_dev, " " type ": " fmt , ## args); \
cx                188 drivers/media/pci/cx18/cx18-driver.h #define CX18_ERR(fmt, args...)      v4l2_err(&cx->v4l2_dev, fmt , ## args)
cx                189 drivers/media/pci/cx18/cx18-driver.h #define CX18_WARN(fmt, args...)     v4l2_warn(&cx->v4l2_dev, fmt , ## args)
cx                190 drivers/media/pci/cx18/cx18-driver.h #define CX18_INFO(fmt, args...)     v4l2_info(&cx->v4l2_dev, fmt , ## args)
cx                349 drivers/media/pci/cx18/cx18-driver.h 	struct cx18 *cx;
cx                364 drivers/media/pci/cx18/cx18-driver.h 	struct cx18 *cx;		/* for ease of use */
cx                419 drivers/media/pci/cx18/cx18-driver.h 	struct cx18 *cx;
cx                555 drivers/media/pci/cx18/cx18-driver.h 	struct cx18 *cx;
cx                682 drivers/media/pci/cx18/cx18-driver.h void cx18_read_eeprom(struct cx18 *cx, struct tveeprom *tv);
cx                685 drivers/media/pci/cx18/cx18-driver.h int cx18_init_on_first_open(struct cx18 *cx);
cx                688 drivers/media/pci/cx18/cx18-driver.h static inline int cx18_raw_vbi(const struct cx18 *cx)
cx                690 drivers/media/pci/cx18/cx18-driver.h 	return cx->vbi.in.type == V4L2_BUF_TYPE_VBI_CAPTURE;
cx                695 drivers/media/pci/cx18/cx18-driver.h #define cx18_call_hw(cx, hw, o, f, args...)				\
cx                696 drivers/media/pci/cx18/cx18-driver.h 	v4l2_device_mask_call_all(&(cx)->v4l2_dev, hw, o, f, ##args)
cx                698 drivers/media/pci/cx18/cx18-driver.h #define cx18_call_all(cx, o, f, args...) cx18_call_hw(cx, 0, o, f , ##args)
cx                703 drivers/media/pci/cx18/cx18-driver.h #define cx18_call_hw_err(cx, hw, o, f, args...)				\
cx                704 drivers/media/pci/cx18/cx18-driver.h 	v4l2_device_mask_call_until_err(&(cx)->v4l2_dev, hw, o, f, ##args)
cx                706 drivers/media/pci/cx18/cx18-driver.h #define cx18_call_all_err(cx, o, f, args...) \
cx                707 drivers/media/pci/cx18/cx18-driver.h 	cx18_call_hw_err(cx, 0, o, f , ##args)
cx                125 drivers/media/pci/cx18/cx18-dvb.c 	struct cx18 *cx = stream->cx;
cx                129 drivers/media/pci/cx18/cx18-dvb.c 	ret = request_firmware(fw, fn, &cx->pci_dev->dev);
cx                238 drivers/media/pci/cx18/cx18-dvb.c 	struct cx18 *cx;
cx                245 drivers/media/pci/cx18/cx18-dvb.c 	cx = stream->cx;
cx                249 drivers/media/pci/cx18/cx18-dvb.c 	mutex_lock(&cx->serialize_lock);
cx                250 drivers/media/pci/cx18/cx18-dvb.c 	ret = cx18_init_on_first_open(cx);
cx                251 drivers/media/pci/cx18/cx18-dvb.c 	mutex_unlock(&cx->serialize_lock);
cx                258 drivers/media/pci/cx18/cx18-dvb.c 	switch (cx->card->type) {
cx                262 drivers/media/pci/cx18/cx18-dvb.c 		v = cx18_read_reg(cx, CX18_REG_DMUX_NUM_PORT_0_CONTROL);
cx                268 drivers/media/pci/cx18/cx18-dvb.c 		cx18_write_reg(cx, v, CX18_REG_DMUX_NUM_PORT_0_CONTROL);
cx                287 drivers/media/pci/cx18/cx18-dvb.c 		mutex_lock(&cx->serialize_lock);
cx                296 drivers/media/pci/cx18/cx18-dvb.c 		mutex_unlock(&cx->serialize_lock);
cx                309 drivers/media/pci/cx18/cx18-dvb.c 	struct cx18 *cx;
cx                313 drivers/media/pci/cx18/cx18-dvb.c 		cx = stream->cx;
cx                320 drivers/media/pci/cx18/cx18-dvb.c 			mutex_lock(&cx->serialize_lock);
cx                322 drivers/media/pci/cx18/cx18-dvb.c 			mutex_unlock(&cx->serialize_lock);
cx                333 drivers/media/pci/cx18/cx18-dvb.c 	struct cx18 *cx = stream->cx;
cx                348 drivers/media/pci/cx18/cx18-dvb.c 			THIS_MODULE, &cx->pci_dev->dev, adapter_nr);
cx                425 drivers/media/pci/cx18/cx18-dvb.c 	struct cx18 *cx = stream->cx;
cx                457 drivers/media/pci/cx18/cx18-dvb.c 	struct cx18 *cx = stream->cx;
cx                460 drivers/media/pci/cx18/cx18-dvb.c 	switch (cx->card->type) {
cx                465 drivers/media/pci/cx18/cx18-dvb.c 			&cx->i2c_adap[0]);
cx                468 drivers/media/pci/cx18/cx18-dvb.c 				&cx->i2c_adap[0],
cx                476 drivers/media/pci/cx18/cx18-dvb.c 				     &cx->i2c_adap[0]);
cx                479 drivers/media/pci/cx18/cx18-dvb.c 				   0x60, &cx->i2c_adap[0],
cx                485 drivers/media/pci/cx18/cx18-dvb.c 				     &cx->i2c_adap[1]);
cx                489 drivers/media/pci/cx18/cx18-dvb.c 				.i2c_adap = &cx->i2c_adap[1],
cx                513 drivers/media/pci/cx18/cx18-dvb.c 				     &cx->i2c_adap[1]);
cx                517 drivers/media/pci/cx18/cx18-dvb.c 					     &cx->i2c_adap[1]);
cx                521 drivers/media/pci/cx18/cx18-dvb.c 				.i2c_adap = &cx->i2c_adap[1],
cx                540 drivers/media/pci/cx18/cx18-dvb.c 					     &cx->i2c_adap[1]);
cx                544 drivers/media/pci/cx18/cx18-dvb.c 				.i2c_adap = &cx->i2c_adap[1],
cx                584 drivers/media/pci/cx18/cx18-dvb.c 	cx18_write_reg_expect(cx,
cx                 32 drivers/media/pci/cx18/cx18-fileops.c 	struct cx18 *cx = id->cx;
cx                 33 drivers/media/pci/cx18/cx18-fileops.c 	struct cx18_stream *s = &cx->streams[type];
cx                 73 drivers/media/pci/cx18/cx18-fileops.c 	s_assoc = &cx->streams[CX18_ENC_STREAM_TYPE_IDX];
cx                 74 drivers/media/pci/cx18/cx18-fileops.c 	if (cx->vbi.insert_mpeg && !cx18_raw_vbi(cx))
cx                 75 drivers/media/pci/cx18/cx18-fileops.c 		s_assoc = &cx->streams[CX18_ENC_STREAM_TYPE_VBI];
cx                 91 drivers/media/pci/cx18/cx18-fileops.c 	struct cx18 *cx = s->cx;
cx                125 drivers/media/pci/cx18/cx18-fileops.c 	s_assoc = &cx->streams[CX18_ENC_STREAM_TYPE_IDX];
cx                132 drivers/media/pci/cx18/cx18-fileops.c 	s_assoc = &cx->streams[CX18_ENC_STREAM_TYPE_VBI];
cx                146 drivers/media/pci/cx18/cx18-fileops.c static void cx18_dualwatch(struct cx18 *cx)
cx                152 drivers/media/pci/cx18/cx18-fileops.c 	new_stereo_mode = v4l2_ctrl_g_ctrl(cx->cxhdl.audio_mode);
cx                154 drivers/media/pci/cx18/cx18-fileops.c 	cx18_call_all(cx, tuner, g_tuner, &vt);
cx                159 drivers/media/pci/cx18/cx18-fileops.c 	if (new_stereo_mode == cx->dualwatch_stereo_mode)
cx                163 drivers/media/pci/cx18/cx18-fileops.c 			   cx->dualwatch_stereo_mode, new_stereo_mode);
cx                164 drivers/media/pci/cx18/cx18-fileops.c 	if (v4l2_ctrl_s_ctrl(cx->cxhdl.audio_mode, new_stereo_mode))
cx                172 drivers/media/pci/cx18/cx18-fileops.c 	struct cx18 *cx = s->cx;
cx                173 drivers/media/pci/cx18/cx18-fileops.c 	struct cx18_stream *s_vbi = &cx->streams[CX18_ENC_STREAM_TYPE_VBI];
cx                181 drivers/media/pci/cx18/cx18-fileops.c 			if (time_after(jiffies, cx->dualwatch_jiffies + msecs_to_jiffies(1000))) {
cx                182 drivers/media/pci/cx18/cx18-fileops.c 				cx->dualwatch_jiffies = jiffies;
cx                183 drivers/media/pci/cx18/cx18-fileops.c 				cx18_dualwatch(cx);
cx                190 drivers/media/pci/cx18/cx18-fileops.c 					cx18_process_vbi_data(cx, mdl,
cx                195 drivers/media/pci/cx18/cx18-fileops.c 			mdl = &cx->vbi.sliced_mpeg_mdl;
cx                211 drivers/media/pci/cx18/cx18-fileops.c 				cx18_process_vbi_data(cx, mdl, s->type);
cx                244 drivers/media/pci/cx18/cx18-fileops.c static void cx18_setup_sliced_vbi_mdl(struct cx18 *cx)
cx                246 drivers/media/pci/cx18/cx18-fileops.c 	struct cx18_mdl *mdl = &cx->vbi.sliced_mpeg_mdl;
cx                247 drivers/media/pci/cx18/cx18-fileops.c 	struct cx18_buffer *buf = &cx->vbi.sliced_mpeg_buf;
cx                248 drivers/media/pci/cx18/cx18-fileops.c 	int idx = cx->vbi.inserted_frame % CX18_VBI_FRAMES;
cx                250 drivers/media/pci/cx18/cx18-fileops.c 	buf->buf = cx->vbi.sliced_mpeg_data[idx];
cx                251 drivers/media/pci/cx18/cx18-fileops.c 	buf->bytesused = cx->vbi.sliced_mpeg_size[idx];
cx                255 drivers/media/pci/cx18/cx18-fileops.c 	mdl->bytesused = cx->vbi.sliced_mpeg_size[idx];
cx                262 drivers/media/pci/cx18/cx18-fileops.c 	struct cx18 *cx = s->cx;
cx                268 drivers/media/pci/cx18/cx18-fileops.c 	if (cx->vbi.insert_mpeg && s->type == CX18_ENC_STREAM_TYPE_MPG &&
cx                269 drivers/media/pci/cx18/cx18-fileops.c 	    !cx18_raw_vbi(cx) && buf != &cx->vbi.sliced_mpeg_buf) {
cx                292 drivers/media/pci/cx18/cx18-fileops.c 		u8 ch = cx->search_pack_header ? 0xba : 0xe0;
cx                311 drivers/media/pci/cx18/cx18-fileops.c 			if (!cx->search_pack_header) {
cx                322 drivers/media/pci/cx18/cx18-fileops.c 					cx->search_pack_header = 1;
cx                343 drivers/media/pci/cx18/cx18-fileops.c 				cx->search_pack_header = 0; /* expect vid PES */
cx                345 drivers/media/pci/cx18/cx18-fileops.c 				cx18_setup_sliced_vbi_mdl(cx);
cx                358 drivers/media/pci/cx18/cx18-fileops.c 	    buf != &cx->vbi.sliced_mpeg_buf)
cx                359 drivers/media/pci/cx18/cx18-fileops.c 		cx->mpg_data_received += len;
cx                408 drivers/media/pci/cx18/cx18-fileops.c 	struct cx18 *cx = s->cx;
cx                412 drivers/media/pci/cx18/cx18-fileops.c 	if (atomic_read(&cx->ana_capturing) == 0 && s->id == -1) {
cx                422 drivers/media/pci/cx18/cx18-fileops.c 	if (s->type == CX18_ENC_STREAM_TYPE_VBI && !cx18_raw_vbi(cx))
cx                448 drivers/media/pci/cx18/cx18-fileops.c 		if (mdl != &cx->vbi.sliced_mpeg_mdl) {
cx                454 drivers/media/pci/cx18/cx18-fileops.c 			int idx = cx->vbi.inserted_frame % CX18_VBI_FRAMES;
cx                456 drivers/media/pci/cx18/cx18-fileops.c 			cx->vbi.sliced_mpeg_size[idx] = 0;
cx                457 drivers/media/pci/cx18/cx18-fileops.c 			cx->vbi.inserted_frame++;
cx                458 drivers/media/pci/cx18/cx18-fileops.c 			cx->vbi_data_inserted += mdl->bytesused;
cx                474 drivers/media/pci/cx18/cx18-fileops.c 	struct cx18 *cx = s->cx;
cx                484 drivers/media/pci/cx18/cx18-fileops.c 	struct cx18 *cx = id->cx;
cx                485 drivers/media/pci/cx18/cx18-fileops.c 	struct cx18_stream *s = &cx->streams[id->type];
cx                507 drivers/media/pci/cx18/cx18-fileops.c 	s_vbi = &cx->streams[CX18_ENC_STREAM_TYPE_VBI];
cx                508 drivers/media/pci/cx18/cx18-fileops.c 	s_idx = &cx->streams[CX18_ENC_STREAM_TYPE_IDX];
cx                540 drivers/media/pci/cx18/cx18-fileops.c 		if (test_and_clear_bit(CX18_F_I_ENC_PAUSED, &cx->i_flags))
cx                541 drivers/media/pci/cx18/cx18-fileops.c 			cx18_vapi(cx, CX18_CPU_CAPTURE_PAUSE, 1, s->handle);
cx                575 drivers/media/pci/cx18/cx18-fileops.c 	struct cx18 *cx = id->cx;
cx                576 drivers/media/pci/cx18/cx18-fileops.c 	struct cx18_stream *s = &cx->streams[id->type];
cx                581 drivers/media/pci/cx18/cx18-fileops.c 	mutex_lock(&cx->serialize_lock);
cx                583 drivers/media/pci/cx18/cx18-fileops.c 	mutex_unlock(&cx->serialize_lock);
cx                600 drivers/media/pci/cx18/cx18-fileops.c 	struct cx18 *cx = id->cx;
cx                601 drivers/media/pci/cx18/cx18-fileops.c 	struct cx18_stream *s = &cx->streams[id->type];
cx                610 drivers/media/pci/cx18/cx18-fileops.c 		mutex_lock(&cx->serialize_lock);
cx                612 drivers/media/pci/cx18/cx18-fileops.c 		mutex_unlock(&cx->serialize_lock);
cx                649 drivers/media/pci/cx18/cx18-fileops.c 	struct cx18 *cx = id->cx;
cx                650 drivers/media/pci/cx18/cx18-fileops.c 	struct cx18_stream *s = &cx->streams[id->type];
cx                660 drivers/media/pci/cx18/cx18-fileops.c 			mutex_lock(&cx->serialize_lock);
cx                662 drivers/media/pci/cx18/cx18-fileops.c 			mutex_unlock(&cx->serialize_lock);
cx                700 drivers/media/pci/cx18/cx18-fileops.c 	struct cx18 *cx = id->cx;
cx                701 drivers/media/pci/cx18/cx18-fileops.c 	struct cx18_stream *s = &cx->streams[id->type];
cx                702 drivers/media/pci/cx18/cx18-fileops.c 	struct cx18_stream *s_vbi = &cx->streams[CX18_ENC_STREAM_TYPE_VBI];
cx                703 drivers/media/pci/cx18/cx18-fileops.c 	struct cx18_stream *s_idx = &cx->streams[CX18_ENC_STREAM_TYPE_IDX];
cx                742 drivers/media/pci/cx18/cx18-fileops.c 	struct cx18 *cx = id->cx;
cx                743 drivers/media/pci/cx18/cx18-fileops.c 	struct cx18_stream *s = &cx->streams[id->type];
cx                747 drivers/media/pci/cx18/cx18-fileops.c 	mutex_lock(&cx->serialize_lock);
cx                752 drivers/media/pci/cx18/cx18-fileops.c 		cx18_mute(cx);
cx                754 drivers/media/pci/cx18/cx18-fileops.c 		clear_bit(CX18_F_I_RADIO_USER, &cx->i_flags);
cx                756 drivers/media/pci/cx18/cx18-fileops.c 		cx18_call_all(cx, video, s_std, cx->std);
cx                758 drivers/media/pci/cx18/cx18-fileops.c 		cx18_audio_set_io(cx);
cx                759 drivers/media/pci/cx18/cx18-fileops.c 		if (atomic_read(&cx->ana_capturing) > 0) {
cx                761 drivers/media/pci/cx18/cx18-fileops.c 			cx18_vapi(cx, CX18_CPU_SET_VIDEO_MUTE, 2, s->handle,
cx                762 drivers/media/pci/cx18/cx18-fileops.c 			    (v4l2_ctrl_g_ctrl(cx->cxhdl.video_mute) |
cx                763 drivers/media/pci/cx18/cx18-fileops.c 			    (v4l2_ctrl_g_ctrl(cx->cxhdl.video_mute_yuv) << 8)));
cx                766 drivers/media/pci/cx18/cx18-fileops.c 		cx18_unmute(cx);
cx                776 drivers/media/pci/cx18/cx18-fileops.c 	mutex_unlock(&cx->serialize_lock);
cx                782 drivers/media/pci/cx18/cx18-fileops.c 	struct cx18 *cx = s->cx;
cx                795 drivers/media/pci/cx18/cx18-fileops.c 	item->cx = cx;
cx                798 drivers/media/pci/cx18/cx18-fileops.c 	item->open_id = cx->open_id++;
cx                804 drivers/media/pci/cx18/cx18-fileops.c 		if (!test_bit(CX18_F_I_RADIO_USER, &cx->i_flags)) {
cx                805 drivers/media/pci/cx18/cx18-fileops.c 			if (atomic_read(&cx->ana_capturing) > 0) {
cx                816 drivers/media/pci/cx18/cx18-fileops.c 		set_bit(CX18_F_I_RADIO_USER, &cx->i_flags);
cx                818 drivers/media/pci/cx18/cx18-fileops.c 		cx18_mute(cx);
cx                820 drivers/media/pci/cx18/cx18-fileops.c 		cx18_call_all(cx, tuner, s_radio);
cx                822 drivers/media/pci/cx18/cx18-fileops.c 		cx18_audio_set_io(cx);
cx                824 drivers/media/pci/cx18/cx18-fileops.c 		cx18_unmute(cx);
cx                834 drivers/media/pci/cx18/cx18-fileops.c 	struct cx18 *cx = s->cx;
cx                836 drivers/media/pci/cx18/cx18-fileops.c 	mutex_lock(&cx->serialize_lock);
cx                837 drivers/media/pci/cx18/cx18-fileops.c 	if (cx18_init_on_first_open(cx)) {
cx                840 drivers/media/pci/cx18/cx18-fileops.c 		mutex_unlock(&cx->serialize_lock);
cx                844 drivers/media/pci/cx18/cx18-fileops.c 	mutex_unlock(&cx->serialize_lock);
cx                848 drivers/media/pci/cx18/cx18-fileops.c void cx18_mute(struct cx18 *cx)
cx                851 drivers/media/pci/cx18/cx18-fileops.c 	if (atomic_read(&cx->ana_capturing)) {
cx                852 drivers/media/pci/cx18/cx18-fileops.c 		h = cx18_find_handle(cx);
cx                854 drivers/media/pci/cx18/cx18-fileops.c 			cx18_vapi(cx, CX18_CPU_SET_AUDIO_MUTE, 2, h, 1);
cx                861 drivers/media/pci/cx18/cx18-fileops.c void cx18_unmute(struct cx18 *cx)
cx                864 drivers/media/pci/cx18/cx18-fileops.c 	if (atomic_read(&cx->ana_capturing)) {
cx                865 drivers/media/pci/cx18/cx18-fileops.c 		h = cx18_find_handle(cx);
cx                868 drivers/media/pci/cx18/cx18-fileops.c 			cx18_vapi(cx, CX18_CPU_SET_MISC_PARAMETERS, 2, h, 12);
cx                869 drivers/media/pci/cx18/cx18-fileops.c 			cx18_vapi(cx, CX18_CPU_SET_AUDIO_MUTE, 2, h, 0);
cx                 20 drivers/media/pci/cx18/cx18-fileops.h void cx18_mute(struct cx18 *cx);
cx                 21 drivers/media/pci/cx18/cx18-fileops.h void cx18_unmute(struct cx18 *cx);
cx                 87 drivers/media/pci/cx18/cx18-firmware.c static int load_cpu_fw_direct(const char *fn, u8 __iomem *mem, struct cx18 *cx)
cx                 95 drivers/media/pci/cx18/cx18-firmware.c 	if (request_firmware(&fw, fn, &cx->pci_dev->dev)) {
cx                104 drivers/media/pci/cx18/cx18-firmware.c 		cx18_setup_page(cx, i);
cx                107 drivers/media/pci/cx18/cx18-firmware.c 			cx18_raw_writel(cx, *src, dst);
cx                108 drivers/media/pci/cx18/cx18-firmware.c 			if (cx18_raw_readl(cx, dst) != *src) {
cx                111 drivers/media/pci/cx18/cx18-firmware.c 				cx18_setup_page(cx, 0);
cx                118 drivers/media/pci/cx18/cx18-firmware.c 	if (!test_bit(CX18_F_I_LOADED_FW, &cx->i_flags))
cx                122 drivers/media/pci/cx18/cx18-firmware.c 	cx18_setup_page(cx, SCB_OFFSET);
cx                126 drivers/media/pci/cx18/cx18-firmware.c static int load_apu_fw_direct(const char *fn, u8 __iomem *dst, struct cx18 *cx,
cx                139 drivers/media/pci/cx18/cx18-firmware.c 	if (request_firmware(&fw, fn, &cx->pci_dev->dev)) {
cx                142 drivers/media/pci/cx18/cx18-firmware.c 		cx18_setup_page(cx, 0);
cx                173 drivers/media/pci/cx18/cx18-firmware.c 			cx18_setup_page(cx, seghdr.addr + i);
cx                176 drivers/media/pci/cx18/cx18-firmware.c 				cx18_raw_writel(cx, src[(offset + j) / 4],
cx                178 drivers/media/pci/cx18/cx18-firmware.c 				if (cx18_raw_readl(cx, dst + seghdr.addr + j)
cx                183 drivers/media/pci/cx18/cx18-firmware.c 					cx18_setup_page(cx, 0);
cx                190 drivers/media/pci/cx18/cx18-firmware.c 	if (!test_bit(CX18_F_I_LOADED_FW, &cx->i_flags))
cx                195 drivers/media/pci/cx18/cx18-firmware.c 	cx18_setup_page(cx, 0);
cx                199 drivers/media/pci/cx18/cx18-firmware.c void cx18_halt_firmware(struct cx18 *cx)
cx                202 drivers/media/pci/cx18/cx18-firmware.c 	cx18_write_reg_expect(cx, 0x000F000F, CX18_PROC_SOFT_RESET,
cx                204 drivers/media/pci/cx18/cx18-firmware.c 	cx18_write_reg_expect(cx, 0x00020002, CX18_ADEC_CONTROL,
cx                208 drivers/media/pci/cx18/cx18-firmware.c void cx18_init_power(struct cx18 *cx, int lowpwr)
cx                212 drivers/media/pci/cx18/cx18-firmware.c 	cx18_write_reg(cx, 0x00000008, CX18_PLL_POWER_DOWN);
cx                215 drivers/media/pci/cx18/cx18-firmware.c 	cx18_write_reg_expect(cx, 0x00020000, CX18_ADEC_CONTROL,
cx                257 drivers/media/pci/cx18/cx18-firmware.c 	cx18_write_reg(cx, lowpwr ? 0xD : 0x11, CX18_FAST_CLOCK_PLL_INT);
cx                258 drivers/media/pci/cx18/cx18-firmware.c 	cx18_write_reg(cx, lowpwr ? 0x1EFBF37 : 0x038E3D7,
cx                261 drivers/media/pci/cx18/cx18-firmware.c 	cx18_write_reg(cx, 2, CX18_FAST_CLOCK_PLL_POST);
cx                262 drivers/media/pci/cx18/cx18-firmware.c 	cx18_write_reg(cx, 1, CX18_FAST_CLOCK_PLL_PRESCALE);
cx                263 drivers/media/pci/cx18/cx18-firmware.c 	cx18_write_reg(cx, 4, CX18_FAST_CLOCK_PLL_ADJUST_BANDWIDTH);
cx                268 drivers/media/pci/cx18/cx18-firmware.c 	cx18_write_reg(cx, lowpwr ? 0xD : 0xC, CX18_SLOW_CLOCK_PLL_INT);
cx                269 drivers/media/pci/cx18/cx18-firmware.c 	cx18_write_reg(cx, lowpwr ? 0x30C344 : 0x124927F,
cx                271 drivers/media/pci/cx18/cx18-firmware.c 	cx18_write_reg(cx, 3, CX18_SLOW_CLOCK_PLL_POST);
cx                275 drivers/media/pci/cx18/cx18-firmware.c 	cx18_write_reg(cx, 0xF, CX18_MPEG_CLOCK_PLL_INT);
cx                276 drivers/media/pci/cx18/cx18-firmware.c 	cx18_write_reg(cx, 0x2BE2FE, CX18_MPEG_CLOCK_PLL_FRAC);
cx                277 drivers/media/pci/cx18/cx18-firmware.c 	cx18_write_reg(cx, 8, CX18_MPEG_CLOCK_PLL_POST);
cx                295 drivers/media/pci/cx18/cx18-firmware.c 		cx18_write_reg_expect(cx, 0xFFFF0020, CX18_CLOCK_SELECT1,
cx                297 drivers/media/pci/cx18/cx18-firmware.c 		cx18_write_reg_expect(cx, 0xFFFF0004, CX18_CLOCK_SELECT2,
cx                301 drivers/media/pci/cx18/cx18-firmware.c 		cx18_write_reg_expect(cx, 0x00060004, CX18_CLOCK_SELECT1,
cx                303 drivers/media/pci/cx18/cx18-firmware.c 		cx18_write_reg_expect(cx, 0x00060006, CX18_CLOCK_SELECT2,
cx                307 drivers/media/pci/cx18/cx18-firmware.c 	cx18_write_reg_expect(cx, 0xFFFF0002, CX18_HALF_CLOCK_SELECT1,
cx                309 drivers/media/pci/cx18/cx18-firmware.c 	cx18_write_reg_expect(cx, 0xFFFF0104, CX18_HALF_CLOCK_SELECT2,
cx                311 drivers/media/pci/cx18/cx18-firmware.c 	cx18_write_reg_expect(cx, 0xFFFF9026, CX18_CLOCK_ENABLE1,
cx                313 drivers/media/pci/cx18/cx18-firmware.c 	cx18_write_reg_expect(cx, 0xFFFF3105, CX18_CLOCK_ENABLE2,
cx                317 drivers/media/pci/cx18/cx18-firmware.c void cx18_init_memory(struct cx18 *cx)
cx                320 drivers/media/pci/cx18/cx18-firmware.c 	cx18_write_reg_expect(cx, 0x00010000, CX18_DDR_SOFT_RESET,
cx                324 drivers/media/pci/cx18/cx18-firmware.c 	cx18_write_reg(cx, cx->card->ddr.chip_config, CX18_DDR_CHIP_CONFIG);
cx                328 drivers/media/pci/cx18/cx18-firmware.c 	cx18_write_reg(cx, cx->card->ddr.refresh, CX18_DDR_REFRESH);
cx                329 drivers/media/pci/cx18/cx18-firmware.c 	cx18_write_reg(cx, cx->card->ddr.timing1, CX18_DDR_TIMING1);
cx                330 drivers/media/pci/cx18/cx18-firmware.c 	cx18_write_reg(cx, cx->card->ddr.timing2, CX18_DDR_TIMING2);
cx                335 drivers/media/pci/cx18/cx18-firmware.c 	cx18_write_reg(cx, cx->card->ddr.tune_lane, CX18_DDR_TUNE_LANE);
cx                336 drivers/media/pci/cx18/cx18-firmware.c 	cx18_write_reg(cx, cx->card->ddr.initial_emrs, CX18_DDR_INITIAL_EMRS);
cx                340 drivers/media/pci/cx18/cx18-firmware.c 	cx18_write_reg_expect(cx, 0x00020000, CX18_DDR_SOFT_RESET,
cx                345 drivers/media/pci/cx18/cx18-firmware.c 	cx18_write_reg(cx, 0x00000010, CX18_DDR_POWER_REG);
cx                347 drivers/media/pci/cx18/cx18-firmware.c 	cx18_write_reg_expect(cx, 0x00010001, CX18_REG_BUS_TIMEOUT_EN,
cx                350 drivers/media/pci/cx18/cx18-firmware.c 	cx18_write_reg(cx, 0x48, CX18_DDR_MB_PER_ROW_7);
cx                351 drivers/media/pci/cx18/cx18-firmware.c 	cx18_write_reg(cx, 0xE0000, CX18_DDR_BASE_63_ADDR);
cx                353 drivers/media/pci/cx18/cx18-firmware.c 	cx18_write_reg(cx, 0x00000101, CX18_WMB_CLIENT02);  /* AO */
cx                354 drivers/media/pci/cx18/cx18-firmware.c 	cx18_write_reg(cx, 0x00000101, CX18_WMB_CLIENT09);  /* AI2 */
cx                355 drivers/media/pci/cx18/cx18-firmware.c 	cx18_write_reg(cx, 0x00000101, CX18_WMB_CLIENT05);  /* VIM1 */
cx                356 drivers/media/pci/cx18/cx18-firmware.c 	cx18_write_reg(cx, 0x00000101, CX18_WMB_CLIENT06);  /* AI1 */
cx                357 drivers/media/pci/cx18/cx18-firmware.c 	cx18_write_reg(cx, 0x00000101, CX18_WMB_CLIENT07);  /* 3D comb */
cx                358 drivers/media/pci/cx18/cx18-firmware.c 	cx18_write_reg(cx, 0x00000101, CX18_WMB_CLIENT10);  /* ME */
cx                359 drivers/media/pci/cx18/cx18-firmware.c 	cx18_write_reg(cx, 0x00000101, CX18_WMB_CLIENT12);  /* ENC */
cx                360 drivers/media/pci/cx18/cx18-firmware.c 	cx18_write_reg(cx, 0x00000101, CX18_WMB_CLIENT13);  /* PK */
cx                361 drivers/media/pci/cx18/cx18-firmware.c 	cx18_write_reg(cx, 0x00000101, CX18_WMB_CLIENT11);  /* RC */
cx                362 drivers/media/pci/cx18/cx18-firmware.c 	cx18_write_reg(cx, 0x00000101, CX18_WMB_CLIENT14);  /* AVO */
cx                368 drivers/media/pci/cx18/cx18-firmware.c int cx18_firmware_init(struct cx18 *cx)
cx                375 drivers/media/pci/cx18/cx18-firmware.c 	cx18_write_reg(cx, 0x5, CX18_DSP0_INTERRUPT_MASK);
cx                378 drivers/media/pci/cx18/cx18-firmware.c 	cx18_write_reg_expect(cx, 0x000F000F, CX18_PROC_SOFT_RESET,
cx                384 drivers/media/pci/cx18/cx18-firmware.c 	if ((cx18_read_reg(cx, CX18_PROC_SOFT_RESET) & 8) == 0) {
cx                389 drivers/media/pci/cx18/cx18-firmware.c 	cx18_sw1_irq_enable(cx, IRQ_CPU_TO_EPU | IRQ_APU_TO_EPU);
cx                390 drivers/media/pci/cx18/cx18-firmware.c 	cx18_sw2_irq_enable(cx, IRQ_CPU_TO_EPU_ACK | IRQ_APU_TO_EPU_ACK);
cx                392 drivers/media/pci/cx18/cx18-firmware.c 	sz = load_cpu_fw_direct(CX18_CPU_FIRMWARE, cx->enc_mem, cx);
cx                397 drivers/media/pci/cx18/cx18-firmware.c 	cx18_init_scb(cx);
cx                400 drivers/media/pci/cx18/cx18-firmware.c 	sz = load_apu_fw_direct(CX18_APU_FIRMWARE, cx->enc_mem, cx,
cx                406 drivers/media/pci/cx18/cx18-firmware.c 	cx18_write_reg_expect(cx, 0x00080000, CX18_PROC_SOFT_RESET,
cx                411 drivers/media/pci/cx18/cx18-firmware.c 	     retries < 50 && (cx18_read_reg(cx, CX18_PROC_SOFT_RESET) & 1) == 1;
cx                418 drivers/media/pci/cx18/cx18-firmware.c 	    (cx18_read_reg(cx, CX18_PROC_SOFT_RESET) & 1) == 1) {
cx                432 drivers/media/pci/cx18/cx18-firmware.c 	cx18_sw2_irq_disable_cpu(cx, IRQ_CPU_TO_EPU_ACK | IRQ_APU_TO_EPU_ACK);
cx                435 drivers/media/pci/cx18/cx18-firmware.c 	sz = cx18_vapi_result(cx, api_args, CX18_CPU_DEBUG_PEEK32, 1, 0);
cx                440 drivers/media/pci/cx18/cx18-firmware.c 	cx18_write_reg_expect(cx, 0x14001400, 0xc78110, 0x00001400, 0x14001400);
cx                  8 drivers/media/pci/cx18/cx18-firmware.h int cx18_firmware_init(struct cx18 *cx);
cx                  9 drivers/media/pci/cx18/cx18-firmware.h void cx18_halt_firmware(struct cx18 *cx);
cx                 10 drivers/media/pci/cx18/cx18-firmware.h void cx18_init_memory(struct cx18 *cx);
cx                 11 drivers/media/pci/cx18/cx18-firmware.h void cx18_init_power(struct cx18 *cx, int lowpwr);
cx                 38 drivers/media/pci/cx18/cx18-gpio.c static void gpio_write(struct cx18 *cx)
cx                 40 drivers/media/pci/cx18/cx18-gpio.c 	u32 dir_lo = cx->gpio_dir & 0xffff;
cx                 41 drivers/media/pci/cx18/cx18-gpio.c 	u32 val_lo = cx->gpio_val & 0xffff;
cx                 42 drivers/media/pci/cx18/cx18-gpio.c 	u32 dir_hi = cx->gpio_dir >> 16;
cx                 43 drivers/media/pci/cx18/cx18-gpio.c 	u32 val_hi = cx->gpio_val >> 16;
cx                 45 drivers/media/pci/cx18/cx18-gpio.c 	cx18_write_reg_expect(cx, dir_lo << 16,
cx                 47 drivers/media/pci/cx18/cx18-gpio.c 	cx18_write_reg_expect(cx, (dir_lo << 16) | val_lo,
cx                 49 drivers/media/pci/cx18/cx18-gpio.c 	cx18_write_reg_expect(cx, dir_hi << 16,
cx                 51 drivers/media/pci/cx18/cx18-gpio.c 	cx18_write_reg_expect(cx, (dir_hi << 16) | val_hi,
cx                 55 drivers/media/pci/cx18/cx18-gpio.c static void gpio_update(struct cx18 *cx, u32 mask, u32 data)
cx                 60 drivers/media/pci/cx18/cx18-gpio.c 	mutex_lock(&cx->gpio_lock);
cx                 61 drivers/media/pci/cx18/cx18-gpio.c 	cx->gpio_val = (cx->gpio_val & ~mask) | (data & mask);
cx                 62 drivers/media/pci/cx18/cx18-gpio.c 	gpio_write(cx);
cx                 63 drivers/media/pci/cx18/cx18-gpio.c 	mutex_unlock(&cx->gpio_lock);
cx                 66 drivers/media/pci/cx18/cx18-gpio.c static void gpio_reset_seq(struct cx18 *cx, u32 active_lo, u32 active_hi,
cx                 83 drivers/media/pci/cx18/cx18-gpio.c 	gpio_update(cx, mask, ~active_lo);
cx                 87 drivers/media/pci/cx18/cx18-gpio.c 	gpio_update(cx, mask, ~active_hi);
cx                 96 drivers/media/pci/cx18/cx18-gpio.c 	struct cx18 *cx = v4l2_get_subdevdata(sd);
cx                 98 drivers/media/pci/cx18/cx18-gpio.c 	mutex_lock(&cx->gpio_lock);
cx                100 drivers/media/pci/cx18/cx18-gpio.c 		      cx->gpio_dir, cx->gpio_val);
cx                101 drivers/media/pci/cx18/cx18-gpio.c 	mutex_unlock(&cx->gpio_lock);
cx                107 drivers/media/pci/cx18/cx18-gpio.c 	struct cx18 *cx = v4l2_get_subdevdata(sd);
cx                114 drivers/media/pci/cx18/cx18-gpio.c 	gpio_update(cx, cx->card->gpio_audio_input.mask,
cx                115 drivers/media/pci/cx18/cx18-gpio.c 			cx->card->gpio_audio_input.radio);
cx                121 drivers/media/pci/cx18/cx18-gpio.c 	struct cx18 *cx = v4l2_get_subdevdata(sd);
cx                124 drivers/media/pci/cx18/cx18-gpio.c 	switch (cx->card->audio_inputs[cx->audio_input].muxer_input) {
cx                126 drivers/media/pci/cx18/cx18-gpio.c 		data = cx->card->gpio_audio_input.linein;
cx                129 drivers/media/pci/cx18/cx18-gpio.c 		data = cx->card->gpio_audio_input.tuner;
cx                137 drivers/media/pci/cx18/cx18-gpio.c 		data = cx->card->gpio_audio_input.tuner;
cx                140 drivers/media/pci/cx18/cx18-gpio.c 	gpio_update(cx, cx->card->gpio_audio_input.mask, data);
cx                147 drivers/media/pci/cx18/cx18-gpio.c 	struct cx18 *cx = v4l2_get_subdevdata(sd);
cx                152 drivers/media/pci/cx18/cx18-gpio.c 		data = cx->card->gpio_audio_input.tuner;
cx                155 drivers/media/pci/cx18/cx18-gpio.c 		data = cx->card->gpio_audio_input.linein;
cx                158 drivers/media/pci/cx18/cx18-gpio.c 		data = cx->card->gpio_audio_input.radio;
cx                163 drivers/media/pci/cx18/cx18-gpio.c 	gpio_update(cx, cx->card->gpio_audio_input.mask, data);
cx                195 drivers/media/pci/cx18/cx18-gpio.c 	struct cx18 *cx = v4l2_get_subdevdata(sd);
cx                197 drivers/media/pci/cx18/cx18-gpio.c 	mutex_lock(&cx->gpio_lock);
cx                199 drivers/media/pci/cx18/cx18-gpio.c 		      cx->gpio_dir, cx->gpio_val);
cx                200 drivers/media/pci/cx18/cx18-gpio.c 	mutex_unlock(&cx->gpio_lock);
cx                206 drivers/media/pci/cx18/cx18-gpio.c 	struct cx18 *cx = v4l2_get_subdevdata(sd);
cx                209 drivers/media/pci/cx18/cx18-gpio.c 	p = &cx->card->gpio_i2c_slave_reset;
cx                212 drivers/media/pci/cx18/cx18-gpio.c 		gpio_reset_seq(cx, p->active_lo_mask, p->active_hi_mask,
cx                230 drivers/media/pci/cx18/cx18-gpio.c 		gpio_reset_seq(cx, p->ir_reset_mask, 0,
cx                234 drivers/media/pci/cx18/cx18-gpio.c 		if (cx->card->tuners[0].tuner == TUNER_XC2028)
cx                235 drivers/media/pci/cx18/cx18-gpio.c 			gpio_reset_seq(cx, (1 << cx->card->xceive_pin), 0,
cx                254 drivers/media/pci/cx18/cx18-gpio.c void cx18_gpio_init(struct cx18 *cx)
cx                256 drivers/media/pci/cx18/cx18-gpio.c 	mutex_lock(&cx->gpio_lock);
cx                257 drivers/media/pci/cx18/cx18-gpio.c 	cx->gpio_dir = cx->card->gpio_init.direction;
cx                258 drivers/media/pci/cx18/cx18-gpio.c 	cx->gpio_val = cx->card->gpio_init.initial_value;
cx                260 drivers/media/pci/cx18/cx18-gpio.c 	if (cx->card->tuners[0].tuner == TUNER_XC2028) {
cx                261 drivers/media/pci/cx18/cx18-gpio.c 		cx->gpio_dir |= 1 << cx->card->xceive_pin;
cx                262 drivers/media/pci/cx18/cx18-gpio.c 		cx->gpio_val |= 1 << cx->card->xceive_pin;
cx                265 drivers/media/pci/cx18/cx18-gpio.c 	if (cx->gpio_dir == 0) {
cx                266 drivers/media/pci/cx18/cx18-gpio.c 		mutex_unlock(&cx->gpio_lock);
cx                271 drivers/media/pci/cx18/cx18-gpio.c 			cx18_read_reg(cx, CX18_REG_GPIO_DIR1),
cx                272 drivers/media/pci/cx18/cx18-gpio.c 			cx18_read_reg(cx, CX18_REG_GPIO_DIR2),
cx                273 drivers/media/pci/cx18/cx18-gpio.c 			cx18_read_reg(cx, CX18_REG_GPIO_OUT1),
cx                274 drivers/media/pci/cx18/cx18-gpio.c 			cx18_read_reg(cx, CX18_REG_GPIO_OUT2));
cx                276 drivers/media/pci/cx18/cx18-gpio.c 	gpio_write(cx);
cx                277 drivers/media/pci/cx18/cx18-gpio.c 	mutex_unlock(&cx->gpio_lock);
cx                280 drivers/media/pci/cx18/cx18-gpio.c int cx18_gpio_register(struct cx18 *cx, u32 hw)
cx                288 drivers/media/pci/cx18/cx18-gpio.c 		sd = &cx->sd_gpiomux;
cx                293 drivers/media/pci/cx18/cx18-gpio.c 		sd = &cx->sd_resetctrl;
cx                302 drivers/media/pci/cx18/cx18-gpio.c 	v4l2_set_subdevdata(sd, cx);
cx                303 drivers/media/pci/cx18/cx18-gpio.c 	snprintf(sd->name, sizeof(sd->name), "%s %s", cx->v4l2_dev.name, str);
cx                305 drivers/media/pci/cx18/cx18-gpio.c 	return v4l2_device_register_subdev(&cx->v4l2_dev, sd);
cx                310 drivers/media/pci/cx18/cx18-gpio.c 	struct cx18 *cx = to_cx18((struct v4l2_device *)data);
cx                312 drivers/media/pci/cx18/cx18-gpio.c 	if (cx->card->gpio_i2c_slave_reset.ir_reset_mask == 0)
cx                317 drivers/media/pci/cx18/cx18-gpio.c 	v4l2_subdev_call(&cx->sd_resetctrl,
cx                328 drivers/media/pci/cx18/cx18-gpio.c 	struct cx18 *cx = cb_data->cx;
cx                331 drivers/media/pci/cx18/cx18-gpio.c 	    cx->card->tuners[0].tuner != TUNER_XC2028)
cx                335 drivers/media/pci/cx18/cx18-gpio.c 	return v4l2_subdev_call(&cx->sd_resetctrl,
cx                 11 drivers/media/pci/cx18/cx18-gpio.h void cx18_gpio_init(struct cx18 *cx);
cx                 12 drivers/media/pci/cx18/cx18-gpio.h int cx18_gpio_register(struct cx18 *cx, u32 hw);
cx                 69 drivers/media/pci/cx18/cx18-i2c.c static int cx18_i2c_new_ir(struct cx18 *cx, struct i2c_adapter *adap, u32 hw,
cx                 73 drivers/media/pci/cx18/cx18-i2c.c 	struct IR_i2c_init_data *init_data = &cx->ir_i2c_init_data;
cx                 86 drivers/media/pci/cx18/cx18-i2c.c 		init_data->name = cx->card_name;
cx                 95 drivers/media/pci/cx18/cx18-i2c.c int cx18_i2c_register(struct cx18 *cx, unsigned idx)
cx                 99 drivers/media/pci/cx18/cx18-i2c.c 	struct i2c_adapter *adap = &cx->i2c_adap[bus];
cx                105 drivers/media/pci/cx18/cx18-i2c.c 		sd = v4l2_i2c_new_subdev(&cx->v4l2_dev,
cx                106 drivers/media/pci/cx18/cx18-i2c.c 				adap, type, 0, cx->card_i2c->radio);
cx                109 drivers/media/pci/cx18/cx18-i2c.c 		sd = v4l2_i2c_new_subdev(&cx->v4l2_dev,
cx                110 drivers/media/pci/cx18/cx18-i2c.c 				adap, type, 0, cx->card_i2c->demod);
cx                113 drivers/media/pci/cx18/cx18-i2c.c 		sd = v4l2_i2c_new_subdev(&cx->v4l2_dev,
cx                114 drivers/media/pci/cx18/cx18-i2c.c 				adap, type, 0, cx->card_i2c->tv);
cx                121 drivers/media/pci/cx18/cx18-i2c.c 		return cx18_i2c_new_ir(cx, adap, hw, type, hw_addrs[idx]);
cx                128 drivers/media/pci/cx18/cx18-i2c.c 	sd = v4l2_i2c_new_subdev(&cx->v4l2_dev, adap, type, hw_addrs[idx],
cx                136 drivers/media/pci/cx18/cx18-i2c.c struct v4l2_subdev *cx18_find_hw(struct cx18 *cx, u32 hw)
cx                141 drivers/media/pci/cx18/cx18-i2c.c 	spin_lock(&cx->v4l2_dev.lock);
cx                142 drivers/media/pci/cx18/cx18-i2c.c 	v4l2_device_for_each_subdev(sd, &cx->v4l2_dev) {
cx                148 drivers/media/pci/cx18/cx18-i2c.c 	spin_unlock(&cx->v4l2_dev.lock);
cx                154 drivers/media/pci/cx18/cx18-i2c.c 	struct cx18 *cx = ((struct cx18_i2c_algo_callback_data *)data)->cx;
cx                157 drivers/media/pci/cx18/cx18-i2c.c 	u32 r = cx18_read_reg(cx, addr);
cx                160 drivers/media/pci/cx18/cx18-i2c.c 		cx18_write_reg(cx, r | SETSCL_BIT, addr);
cx                162 drivers/media/pci/cx18/cx18-i2c.c 		cx18_write_reg(cx, r & ~SETSCL_BIT, addr);
cx                167 drivers/media/pci/cx18/cx18-i2c.c 	struct cx18 *cx = ((struct cx18_i2c_algo_callback_data *)data)->cx;
cx                170 drivers/media/pci/cx18/cx18-i2c.c 	u32 r = cx18_read_reg(cx, addr);
cx                173 drivers/media/pci/cx18/cx18-i2c.c 		cx18_write_reg(cx, r | SETSDL_BIT, addr);
cx                175 drivers/media/pci/cx18/cx18-i2c.c 		cx18_write_reg(cx, r & ~SETSDL_BIT, addr);
cx                180 drivers/media/pci/cx18/cx18-i2c.c 	struct cx18 *cx = ((struct cx18_i2c_algo_callback_data *)data)->cx;
cx                184 drivers/media/pci/cx18/cx18-i2c.c 	return cx18_read_reg(cx, addr) & GETSCL_BIT;
cx                189 drivers/media/pci/cx18/cx18-i2c.c 	struct cx18 *cx = ((struct cx18_i2c_algo_callback_data *)data)->cx;
cx                193 drivers/media/pci/cx18/cx18-i2c.c 	return cx18_read_reg(cx, addr) & GETSDL_BIT;
cx                217 drivers/media/pci/cx18/cx18-i2c.c int init_cx18_i2c(struct cx18 *cx)
cx                224 drivers/media/pci/cx18/cx18-i2c.c 		cx->i2c_algo[i] = cx18_i2c_algo_template;
cx                225 drivers/media/pci/cx18/cx18-i2c.c 		cx->i2c_algo_cb_data[i].cx = cx;
cx                226 drivers/media/pci/cx18/cx18-i2c.c 		cx->i2c_algo_cb_data[i].bus_index = i;
cx                227 drivers/media/pci/cx18/cx18-i2c.c 		cx->i2c_algo[i].data = &cx->i2c_algo_cb_data[i];
cx                230 drivers/media/pci/cx18/cx18-i2c.c 		cx->i2c_adap[i] = cx18_i2c_adap_template;
cx                231 drivers/media/pci/cx18/cx18-i2c.c 		cx->i2c_adap[i].algo_data = &cx->i2c_algo[i];
cx                232 drivers/media/pci/cx18/cx18-i2c.c 		sprintf(cx->i2c_adap[i].name + strlen(cx->i2c_adap[i].name),
cx                233 drivers/media/pci/cx18/cx18-i2c.c 				" #%d-%d", cx->instance, i);
cx                234 drivers/media/pci/cx18/cx18-i2c.c 		i2c_set_adapdata(&cx->i2c_adap[i], &cx->v4l2_dev);
cx                235 drivers/media/pci/cx18/cx18-i2c.c 		cx->i2c_adap[i].dev.parent = &cx->pci_dev->dev;
cx                238 drivers/media/pci/cx18/cx18-i2c.c 	if (cx18_read_reg(cx, CX18_REG_I2C_2_WR) != 0x0003c02f) {
cx                241 drivers/media/pci/cx18/cx18-i2c.c 		cx18_write_reg_expect(cx, 0x10000000, 0xc71004,
cx                244 drivers/media/pci/cx18/cx18-i2c.c 		cx18_write_reg_expect(cx, 0x10001000, 0xc71024,
cx                248 drivers/media/pci/cx18/cx18-i2c.c 	cx18_write_reg_expect(cx, 0x00c00000, 0xc7001c, 0x00000000, 0x00c000c0);
cx                250 drivers/media/pci/cx18/cx18-i2c.c 	cx18_write_reg_expect(cx, 0x00c000c0, 0xc7001c, 0x000000c0, 0x00c000c0);
cx                252 drivers/media/pci/cx18/cx18-i2c.c 	cx18_write_reg_expect(cx, 0x00c00000, 0xc7001c, 0x00000000, 0x00c000c0);
cx                256 drivers/media/pci/cx18/cx18-i2c.c 	cx18_write_reg(cx, 0x00c00000, 0xc730c8);
cx                258 drivers/media/pci/cx18/cx18-i2c.c 	cx18_write_reg_expect(cx, HW2_I2C1_INT|HW2_I2C2_INT, HW2_INT_CLR_STATUS,
cx                262 drivers/media/pci/cx18/cx18-i2c.c 	cx18_write_reg(cx, 0x00021c0f & ~4, CX18_REG_I2C_1_WR);
cx                263 drivers/media/pci/cx18/cx18-i2c.c 	cx18_setscl(&cx->i2c_algo_cb_data[0], 1);
cx                264 drivers/media/pci/cx18/cx18-i2c.c 	cx18_setsda(&cx->i2c_algo_cb_data[0], 1);
cx                267 drivers/media/pci/cx18/cx18-i2c.c 	cx18_write_reg(cx, 0x00021c0f & ~4, CX18_REG_I2C_2_WR);
cx                268 drivers/media/pci/cx18/cx18-i2c.c 	cx18_setscl(&cx->i2c_algo_cb_data[1], 1);
cx                269 drivers/media/pci/cx18/cx18-i2c.c 	cx18_setsda(&cx->i2c_algo_cb_data[1], 1);
cx                271 drivers/media/pci/cx18/cx18-i2c.c 	cx18_call_hw(cx, CX18_HW_GPIO_RESET_CTRL,
cx                274 drivers/media/pci/cx18/cx18-i2c.c 	err = i2c_bit_add_bus(&cx->i2c_adap[0]);
cx                277 drivers/media/pci/cx18/cx18-i2c.c 	err = i2c_bit_add_bus(&cx->i2c_adap[1]);
cx                283 drivers/media/pci/cx18/cx18-i2c.c 	i2c_del_adapter(&cx->i2c_adap[0]);
cx                288 drivers/media/pci/cx18/cx18-i2c.c void exit_cx18_i2c(struct cx18 *cx)
cx                292 drivers/media/pci/cx18/cx18-i2c.c 	cx18_write_reg(cx, cx18_read_reg(cx, CX18_REG_I2C_1_WR) | 4,
cx                294 drivers/media/pci/cx18/cx18-i2c.c 	cx18_write_reg(cx, cx18_read_reg(cx, CX18_REG_I2C_2_WR) | 4,
cx                298 drivers/media/pci/cx18/cx18-i2c.c 		i2c_del_adapter(&cx->i2c_adap[i]);
cx                 10 drivers/media/pci/cx18/cx18-i2c.h int cx18_i2c_register(struct cx18 *cx, unsigned idx);
cx                 11 drivers/media/pci/cx18/cx18-i2c.h struct v4l2_subdev *cx18_find_hw(struct cx18 *cx, u32 hw);
cx                 14 drivers/media/pci/cx18/cx18-i2c.h int init_cx18_i2c(struct cx18 *cx);
cx                 15 drivers/media/pci/cx18/cx18-i2c.h void exit_cx18_i2c(struct cx18 *cx);
cx                 13 drivers/media/pci/cx18/cx18-io.c void cx18_memset_io(struct cx18 *cx, void __iomem *addr, int val, size_t count)
cx                 21 drivers/media/pci/cx18/cx18-io.c 		cx18_writeb(cx, (u8) val, dst);
cx                 26 drivers/media/pci/cx18/cx18-io.c 		cx18_writew(cx, val2, dst);
cx                 31 drivers/media/pci/cx18/cx18-io.c 		cx18_writel(cx, val4, dst);
cx                 36 drivers/media/pci/cx18/cx18-io.c 		cx18_writew(cx, val2, dst);
cx                 41 drivers/media/pci/cx18/cx18-io.c 		cx18_writeb(cx, (u8) val, dst);
cx                 44 drivers/media/pci/cx18/cx18-io.c void cx18_sw1_irq_enable(struct cx18 *cx, u32 val)
cx                 46 drivers/media/pci/cx18/cx18-io.c 	cx18_write_reg_expect(cx, val, SW1_INT_STATUS, ~val, val);
cx                 47 drivers/media/pci/cx18/cx18-io.c 	cx->sw1_irq_mask = cx18_read_reg(cx, SW1_INT_ENABLE_PCI) | val;
cx                 48 drivers/media/pci/cx18/cx18-io.c 	cx18_write_reg(cx, cx->sw1_irq_mask, SW1_INT_ENABLE_PCI);
cx                 51 drivers/media/pci/cx18/cx18-io.c void cx18_sw1_irq_disable(struct cx18 *cx, u32 val)
cx                 53 drivers/media/pci/cx18/cx18-io.c 	cx->sw1_irq_mask = cx18_read_reg(cx, SW1_INT_ENABLE_PCI) & ~val;
cx                 54 drivers/media/pci/cx18/cx18-io.c 	cx18_write_reg(cx, cx->sw1_irq_mask, SW1_INT_ENABLE_PCI);
cx                 57 drivers/media/pci/cx18/cx18-io.c void cx18_sw2_irq_enable(struct cx18 *cx, u32 val)
cx                 59 drivers/media/pci/cx18/cx18-io.c 	cx18_write_reg_expect(cx, val, SW2_INT_STATUS, ~val, val);
cx                 60 drivers/media/pci/cx18/cx18-io.c 	cx->sw2_irq_mask = cx18_read_reg(cx, SW2_INT_ENABLE_PCI) | val;
cx                 61 drivers/media/pci/cx18/cx18-io.c 	cx18_write_reg(cx, cx->sw2_irq_mask, SW2_INT_ENABLE_PCI);
cx                 64 drivers/media/pci/cx18/cx18-io.c void cx18_sw2_irq_disable(struct cx18 *cx, u32 val)
cx                 66 drivers/media/pci/cx18/cx18-io.c 	cx->sw2_irq_mask = cx18_read_reg(cx, SW2_INT_ENABLE_PCI) & ~val;
cx                 67 drivers/media/pci/cx18/cx18-io.c 	cx18_write_reg(cx, cx->sw2_irq_mask, SW2_INT_ENABLE_PCI);
cx                 70 drivers/media/pci/cx18/cx18-io.c void cx18_sw2_irq_disable_cpu(struct cx18 *cx, u32 val)
cx                 73 drivers/media/pci/cx18/cx18-io.c 	r = cx18_read_reg(cx, SW2_INT_ENABLE_CPU);
cx                 74 drivers/media/pci/cx18/cx18-io.c 	cx18_write_reg(cx, r & ~val, SW2_INT_ENABLE_CPU);
cx                 77 drivers/media/pci/cx18/cx18-io.c void cx18_setup_page(struct cx18 *cx, u32 addr)
cx                 80 drivers/media/pci/cx18/cx18-io.c 	val = cx18_read_reg(cx, 0xD000F8);
cx                 82 drivers/media/pci/cx18/cx18-io.c 	cx18_write_reg(cx, val, 0xD000F8);
cx                 24 drivers/media/pci/cx18/cx18-io.h static inline u32 cx18_raw_readl(struct cx18 *cx, const void __iomem *addr)
cx                 30 drivers/media/pci/cx18/cx18-io.h void cx18_raw_writel_noretry(struct cx18 *cx, u32 val, void __iomem *addr)
cx                 35 drivers/media/pci/cx18/cx18-io.h static inline void cx18_raw_writel(struct cx18 *cx, u32 val, void __iomem *addr)
cx                 39 drivers/media/pci/cx18/cx18-io.h 		cx18_raw_writel_noretry(cx, val, addr);
cx                 40 drivers/media/pci/cx18/cx18-io.h 		if (val == cx18_raw_readl(cx, addr))
cx                 46 drivers/media/pci/cx18/cx18-io.h static inline u32 cx18_readl(struct cx18 *cx, const void __iomem *addr)
cx                 52 drivers/media/pci/cx18/cx18-io.h void cx18_writel_noretry(struct cx18 *cx, u32 val, void __iomem *addr)
cx                 57 drivers/media/pci/cx18/cx18-io.h static inline void cx18_writel(struct cx18 *cx, u32 val, void __iomem *addr)
cx                 61 drivers/media/pci/cx18/cx18-io.h 		cx18_writel_noretry(cx, val, addr);
cx                 62 drivers/media/pci/cx18/cx18-io.h 		if (val == cx18_readl(cx, addr))
cx                 68 drivers/media/pci/cx18/cx18-io.h void cx18_writel_expect(struct cx18 *cx, u32 val, void __iomem *addr,
cx                 75 drivers/media/pci/cx18/cx18-io.h 		cx18_writel_noretry(cx, val, addr);
cx                 76 drivers/media/pci/cx18/cx18-io.h 		r = cx18_readl(cx, addr);
cx                 84 drivers/media/pci/cx18/cx18-io.h static inline u16 cx18_readw(struct cx18 *cx, const void __iomem *addr)
cx                 90 drivers/media/pci/cx18/cx18-io.h void cx18_writew_noretry(struct cx18 *cx, u16 val, void __iomem *addr)
cx                 95 drivers/media/pci/cx18/cx18-io.h static inline void cx18_writew(struct cx18 *cx, u16 val, void __iomem *addr)
cx                 99 drivers/media/pci/cx18/cx18-io.h 		cx18_writew_noretry(cx, val, addr);
cx                100 drivers/media/pci/cx18/cx18-io.h 		if (val == cx18_readw(cx, addr))
cx                105 drivers/media/pci/cx18/cx18-io.h static inline u8 cx18_readb(struct cx18 *cx, const void __iomem *addr)
cx                111 drivers/media/pci/cx18/cx18-io.h void cx18_writeb_noretry(struct cx18 *cx, u8 val, void __iomem *addr)
cx                116 drivers/media/pci/cx18/cx18-io.h static inline void cx18_writeb(struct cx18 *cx, u8 val, void __iomem *addr)
cx                120 drivers/media/pci/cx18/cx18-io.h 		cx18_writeb_noretry(cx, val, addr);
cx                121 drivers/media/pci/cx18/cx18-io.h 		if (val == cx18_readb(cx, addr))
cx                127 drivers/media/pci/cx18/cx18-io.h void cx18_memcpy_fromio(struct cx18 *cx, void *to,
cx                133 drivers/media/pci/cx18/cx18-io.h void cx18_memset_io(struct cx18 *cx, void __iomem *addr, int val, size_t count);
cx                137 drivers/media/pci/cx18/cx18-io.h static inline void cx18_write_reg_noretry(struct cx18 *cx, u32 val, u32 reg)
cx                139 drivers/media/pci/cx18/cx18-io.h 	cx18_writel_noretry(cx, val, cx->reg_mem + reg);
cx                142 drivers/media/pci/cx18/cx18-io.h static inline void cx18_write_reg(struct cx18 *cx, u32 val, u32 reg)
cx                144 drivers/media/pci/cx18/cx18-io.h 	cx18_writel(cx, val, cx->reg_mem + reg);
cx                147 drivers/media/pci/cx18/cx18-io.h static inline void cx18_write_reg_expect(struct cx18 *cx, u32 val, u32 reg,
cx                150 drivers/media/pci/cx18/cx18-io.h 	cx18_writel_expect(cx, val, cx->reg_mem + reg, eval, mask);
cx                153 drivers/media/pci/cx18/cx18-io.h static inline u32 cx18_read_reg(struct cx18 *cx, u32 reg)
cx                155 drivers/media/pci/cx18/cx18-io.h 	return cx18_readl(cx, cx->reg_mem + reg);
cx                160 drivers/media/pci/cx18/cx18-io.h static inline void cx18_write_enc(struct cx18 *cx, u32 val, u32 addr)
cx                162 drivers/media/pci/cx18/cx18-io.h 	cx18_writel(cx, val, cx->enc_mem + addr);
cx                165 drivers/media/pci/cx18/cx18-io.h static inline u32 cx18_read_enc(struct cx18 *cx, u32 addr)
cx                167 drivers/media/pci/cx18/cx18-io.h 	return cx18_readl(cx, cx->enc_mem + addr);
cx                170 drivers/media/pci/cx18/cx18-io.h void cx18_sw1_irq_enable(struct cx18 *cx, u32 val);
cx                171 drivers/media/pci/cx18/cx18-io.h void cx18_sw1_irq_disable(struct cx18 *cx, u32 val);
cx                172 drivers/media/pci/cx18/cx18-io.h void cx18_sw2_irq_enable(struct cx18 *cx, u32 val);
cx                173 drivers/media/pci/cx18/cx18-io.h void cx18_sw2_irq_disable(struct cx18 *cx, u32 val);
cx                174 drivers/media/pci/cx18/cx18-io.h void cx18_sw2_irq_disable_cpu(struct cx18 *cx, u32 val);
cx                175 drivers/media/pci/cx18/cx18-io.h void cx18_setup_page(struct cx18 *cx, u32 addr);
cx                138 drivers/media/pci/cx18/cx18-ioctl.c 	struct cx18 *cx = id->cx;
cx                139 drivers/media/pci/cx18/cx18-ioctl.c 	struct cx18_stream *s = &cx->streams[id->type];
cx                142 drivers/media/pci/cx18/cx18-ioctl.c 	pixfmt->width = cx->cxhdl.width;
cx                143 drivers/media/pci/cx18/cx18-ioctl.c 	pixfmt->height = cx->cxhdl.height;
cx                161 drivers/media/pci/cx18/cx18-ioctl.c 	struct cx18 *cx = fh2id(fh)->cx;
cx                168 drivers/media/pci/cx18/cx18-ioctl.c 	vbifmt->start[0] = cx->vbi.start[0];
cx                169 drivers/media/pci/cx18/cx18-ioctl.c 	vbifmt->start[1] = cx->vbi.start[1];
cx                170 drivers/media/pci/cx18/cx18-ioctl.c 	vbifmt->count[0] = vbifmt->count[1] = cx->vbi.count;
cx                180 drivers/media/pci/cx18/cx18-ioctl.c 	struct cx18 *cx = fh2id(fh)->cx;
cx                195 drivers/media/pci/cx18/cx18-ioctl.c 	if (v4l2_subdev_call(cx->sd_av, vbi, g_sliced_fmt, &fmt->fmt.sliced))
cx                206 drivers/media/pci/cx18/cx18-ioctl.c 	struct cx18 *cx = id->cx;
cx                218 drivers/media/pci/cx18/cx18-ioctl.c 	h = min(h, cx->is_50hz ? 576 : 480);
cx                235 drivers/media/pci/cx18/cx18-ioctl.c 	struct cx18 *cx = fh2id(fh)->cx;
cx                244 drivers/media/pci/cx18/cx18-ioctl.c 		cx18_expand_service_set(vbifmt, cx->is_50hz);
cx                246 drivers/media/pci/cx18/cx18-ioctl.c 	if (check_service_set(vbifmt, cx->is_50hz))
cx                255 drivers/media/pci/cx18/cx18-ioctl.c 	struct cx18 *cx = id->cx;
cx                259 drivers/media/pci/cx18/cx18-ioctl.c 	struct cx18_stream *s = &cx->streams[id->type];
cx                269 drivers/media/pci/cx18/cx18-ioctl.c 	if (cx->cxhdl.width == w && cx->cxhdl.height == h &&
cx                273 drivers/media/pci/cx18/cx18-ioctl.c 	if (atomic_read(&cx->ana_capturing) > 0)
cx                287 drivers/media/pci/cx18/cx18-ioctl.c 	format.format.width = cx->cxhdl.width = w;
cx                288 drivers/media/pci/cx18/cx18-ioctl.c 	format.format.height = cx->cxhdl.height = h;
cx                290 drivers/media/pci/cx18/cx18-ioctl.c 	v4l2_subdev_call(cx->sd_av, pad, set_fmt, NULL, &format);
cx                298 drivers/media/pci/cx18/cx18-ioctl.c 	struct cx18 *cx = id->cx;
cx                305 drivers/media/pci/cx18/cx18-ioctl.c 	if (!cx18_raw_vbi(cx) && atomic_read(&cx->ana_capturing) > 0)
cx                313 drivers/media/pci/cx18/cx18-ioctl.c 	ret = v4l2_subdev_call(cx->sd_av, vbi, s_raw_fmt, &fmt->fmt.vbi);
cx                318 drivers/media/pci/cx18/cx18-ioctl.c 	cx->vbi.sliced_in->service_set = 0;
cx                319 drivers/media/pci/cx18/cx18-ioctl.c 	cx->vbi.in.type = V4L2_BUF_TYPE_VBI_CAPTURE;
cx                328 drivers/media/pci/cx18/cx18-ioctl.c 	struct cx18 *cx = id->cx;
cx                338 drivers/media/pci/cx18/cx18-ioctl.c 	if (cx18_raw_vbi(cx) && atomic_read(&cx->ana_capturing) > 0)
cx                346 drivers/media/pci/cx18/cx18-ioctl.c 	ret = v4l2_subdev_call(cx->sd_av, vbi, s_sliced_fmt, &fmt->fmt.sliced);
cx                350 drivers/media/pci/cx18/cx18-ioctl.c 	cx->vbi.in.type =  V4L2_BUF_TYPE_SLICED_VBI_CAPTURE;
cx                351 drivers/media/pci/cx18/cx18-ioctl.c 	memcpy(cx->vbi.sliced_in, vbifmt, sizeof(*cx->vbi.sliced_in));
cx                359 drivers/media/pci/cx18/cx18-ioctl.c 	struct cx18 *cx = fh2id(fh)->cx;
cx                366 drivers/media/pci/cx18/cx18-ioctl.c 	reg->val = cx18_read_enc(cx, reg->reg);
cx                373 drivers/media/pci/cx18/cx18-ioctl.c 	struct cx18 *cx = fh2id(fh)->cx;
cx                379 drivers/media/pci/cx18/cx18-ioctl.c 	cx18_write_enc(cx, reg->val, reg->reg);
cx                388 drivers/media/pci/cx18/cx18-ioctl.c 	struct cx18 *cx = id->cx;
cx                391 drivers/media/pci/cx18/cx18-ioctl.c 	strscpy(vcap->card, cx->card_name, sizeof(vcap->card));
cx                393 drivers/media/pci/cx18/cx18-ioctl.c 		 "PCI:%s", pci_name(cx->pci_dev));
cx                394 drivers/media/pci/cx18/cx18-ioctl.c 	vcap->capabilities = cx->v4l2_cap | V4L2_CAP_DEVICE_CAPS;
cx                400 drivers/media/pci/cx18/cx18-ioctl.c 	struct cx18 *cx = fh2id(fh)->cx;
cx                402 drivers/media/pci/cx18/cx18-ioctl.c 	return cx18_get_audio_input(cx, vin->index, vin);
cx                407 drivers/media/pci/cx18/cx18-ioctl.c 	struct cx18 *cx = fh2id(fh)->cx;
cx                409 drivers/media/pci/cx18/cx18-ioctl.c 	vin->index = cx->audio_input;
cx                410 drivers/media/pci/cx18/cx18-ioctl.c 	return cx18_get_audio_input(cx, vin->index, vin);
cx                415 drivers/media/pci/cx18/cx18-ioctl.c 	struct cx18 *cx = fh2id(fh)->cx;
cx                417 drivers/media/pci/cx18/cx18-ioctl.c 	if (vout->index >= cx->nof_audio_inputs)
cx                419 drivers/media/pci/cx18/cx18-ioctl.c 	cx->audio_input = vout->index;
cx                420 drivers/media/pci/cx18/cx18-ioctl.c 	cx18_audio_set_io(cx);
cx                426 drivers/media/pci/cx18/cx18-ioctl.c 	struct cx18 *cx = fh2id(fh)->cx;
cx                429 drivers/media/pci/cx18/cx18-ioctl.c 	return cx18_get_input(cx, vin->index, vin);
cx                435 drivers/media/pci/cx18/cx18-ioctl.c 	struct cx18 *cx = fh2id(fh)->cx;
cx                440 drivers/media/pci/cx18/cx18-ioctl.c 	f->numerator = cx->is_50hz ? 54 : 11;
cx                441 drivers/media/pci/cx18/cx18-ioctl.c 	f->denominator = cx->is_50hz ? 59 : 10;
cx                448 drivers/media/pci/cx18/cx18-ioctl.c 	struct cx18 *cx = fh2id(fh)->cx;
cx                457 drivers/media/pci/cx18/cx18-ioctl.c 		sel->r.height = cx->is_50hz ? 576 : 480;
cx                488 drivers/media/pci/cx18/cx18-ioctl.c 	struct cx18 *cx = fh2id(fh)->cx;
cx                490 drivers/media/pci/cx18/cx18-ioctl.c 	*i = cx->active_input;
cx                497 drivers/media/pci/cx18/cx18-ioctl.c 	struct cx18 *cx = id->cx;
cx                500 drivers/media/pci/cx18/cx18-ioctl.c 				cx->card->video_inputs + inp;
cx                502 drivers/media/pci/cx18/cx18-ioctl.c 	if (inp >= cx->nof_inputs)
cx                505 drivers/media/pci/cx18/cx18-ioctl.c 	if (inp == cx->active_input) {
cx                511 drivers/media/pci/cx18/cx18-ioctl.c 			cx->active_input, inp);
cx                513 drivers/media/pci/cx18/cx18-ioctl.c 	cx->active_input = inp;
cx                515 drivers/media/pci/cx18/cx18-ioctl.c 	cx->audio_input = cx->card->video_inputs[inp].audio_index;
cx                517 drivers/media/pci/cx18/cx18-ioctl.c 		std = cx->tuner_std;
cx                518 drivers/media/pci/cx18/cx18-ioctl.c 	cx->streams[CX18_ENC_STREAM_TYPE_MPG].video_dev.tvnorms = std;
cx                519 drivers/media/pci/cx18/cx18-ioctl.c 	cx->streams[CX18_ENC_STREAM_TYPE_YUV].video_dev.tvnorms = std;
cx                520 drivers/media/pci/cx18/cx18-ioctl.c 	cx->streams[CX18_ENC_STREAM_TYPE_VBI].video_dev.tvnorms = std;
cx                524 drivers/media/pci/cx18/cx18-ioctl.c 	cx18_mute(cx);
cx                525 drivers/media/pci/cx18/cx18-ioctl.c 	cx18_video_set_io(cx);
cx                526 drivers/media/pci/cx18/cx18-ioctl.c 	cx18_audio_set_io(cx);
cx                527 drivers/media/pci/cx18/cx18-ioctl.c 	cx18_unmute(cx);
cx                534 drivers/media/pci/cx18/cx18-ioctl.c 	struct cx18 *cx = fh2id(fh)->cx;
cx                539 drivers/media/pci/cx18/cx18-ioctl.c 	cx18_call_all(cx, tuner, g_frequency, vf);
cx                546 drivers/media/pci/cx18/cx18-ioctl.c 	struct cx18 *cx = id->cx;
cx                551 drivers/media/pci/cx18/cx18-ioctl.c 	cx18_mute(cx);
cx                553 drivers/media/pci/cx18/cx18-ioctl.c 	cx18_call_all(cx, tuner, s_frequency, vf);
cx                554 drivers/media/pci/cx18/cx18-ioctl.c 	cx18_unmute(cx);
cx                560 drivers/media/pci/cx18/cx18-ioctl.c 	struct cx18 *cx = fh2id(fh)->cx;
cx                562 drivers/media/pci/cx18/cx18-ioctl.c 	*std = cx->std;
cx                569 drivers/media/pci/cx18/cx18-ioctl.c 	struct cx18 *cx = id->cx;
cx                574 drivers/media/pci/cx18/cx18-ioctl.c 	if (std == cx->std)
cx                577 drivers/media/pci/cx18/cx18-ioctl.c 	if (test_bit(CX18_F_I_RADIO_USER, &cx->i_flags) ||
cx                578 drivers/media/pci/cx18/cx18-ioctl.c 	    atomic_read(&cx->ana_capturing) > 0) {
cx                585 drivers/media/pci/cx18/cx18-ioctl.c 	cx->std = std;
cx                586 drivers/media/pci/cx18/cx18-ioctl.c 	cx->is_60hz = (std & V4L2_STD_525_60) ? 1 : 0;
cx                587 drivers/media/pci/cx18/cx18-ioctl.c 	cx->is_50hz = !cx->is_60hz;
cx                588 drivers/media/pci/cx18/cx18-ioctl.c 	cx2341x_handler_set_50hz(&cx->cxhdl, cx->is_50hz);
cx                589 drivers/media/pci/cx18/cx18-ioctl.c 	cx->cxhdl.width = 720;
cx                590 drivers/media/pci/cx18/cx18-ioctl.c 	cx->cxhdl.height = cx->is_50hz ? 576 : 480;
cx                591 drivers/media/pci/cx18/cx18-ioctl.c 	cx->vbi.count = cx->is_50hz ? 18 : 12;
cx                592 drivers/media/pci/cx18/cx18-ioctl.c 	cx->vbi.start[0] = cx->is_50hz ? 6 : 10;
cx                593 drivers/media/pci/cx18/cx18-ioctl.c 	cx->vbi.start[1] = cx->is_50hz ? 318 : 273;
cx                595 drivers/media/pci/cx18/cx18-ioctl.c 			(unsigned long long) cx->std);
cx                598 drivers/media/pci/cx18/cx18-ioctl.c 	cx18_call_all(cx, video, s_std, cx->std);
cx                605 drivers/media/pci/cx18/cx18-ioctl.c 	struct cx18 *cx = id->cx;
cx                610 drivers/media/pci/cx18/cx18-ioctl.c 	cx18_call_all(cx, tuner, s_tuner, vt);
cx                616 drivers/media/pci/cx18/cx18-ioctl.c 	struct cx18 *cx = fh2id(fh)->cx;
cx                621 drivers/media/pci/cx18/cx18-ioctl.c 	cx18_call_all(cx, tuner, g_tuner, vt);
cx                633 drivers/media/pci/cx18/cx18-ioctl.c 	struct cx18 *cx = fh2id(fh)->cx;
cx                634 drivers/media/pci/cx18/cx18-ioctl.c 	int set = cx->is_50hz ? V4L2_SLICED_VBI_625 : V4L2_SLICED_VBI_525;
cx                643 drivers/media/pci/cx18/cx18-ioctl.c 			if (valid_service_line(f, l, cx->is_50hz)) {
cx                754 drivers/media/pci/cx18/cx18-ioctl.c 	struct cx18 *cx = fh2id(fh)->cx;
cx                755 drivers/media/pci/cx18/cx18-ioctl.c 	struct cx18_stream *s = &cx->streams[CX18_ENC_STREAM_TYPE_IDX];
cx                801 drivers/media/pci/cx18/cx18-ioctl.c 	struct cx18 *cx = id->cx;
cx                802 drivers/media/pci/cx18/cx18-ioctl.c 	struct cx18_stream *s = &cx->streams[id->type];
cx                820 drivers/media/pci/cx18/cx18-ioctl.c 	struct cx18 *cx = id->cx;
cx                821 drivers/media/pci/cx18/cx18-ioctl.c 	struct cx18_stream *s = &cx->streams[id->type];
cx                841 drivers/media/pci/cx18/cx18-ioctl.c 	struct cx18 *cx = id->cx;
cx                842 drivers/media/pci/cx18/cx18-ioctl.c 	struct cx18_stream *s = &cx->streams[id->type];
cx                859 drivers/media/pci/cx18/cx18-ioctl.c 	struct cx18 *cx = id->cx;
cx                860 drivers/media/pci/cx18/cx18-ioctl.c 	struct cx18_stream *s = &cx->streams[id->type];
cx                873 drivers/media/pci/cx18/cx18-ioctl.c 	struct cx18 *cx = id->cx;
cx                874 drivers/media/pci/cx18/cx18-ioctl.c 	struct cx18_stream *s = &cx->streams[id->type];
cx                886 drivers/media/pci/cx18/cx18-ioctl.c 	struct cx18 *cx = id->cx;
cx                887 drivers/media/pci/cx18/cx18-ioctl.c 	struct cx18_stream *s = &cx->streams[id->type];
cx                899 drivers/media/pci/cx18/cx18-ioctl.c 	struct cx18 *cx = id->cx;
cx                900 drivers/media/pci/cx18/cx18-ioctl.c 	struct cx18_stream *s = &cx->streams[id->type];
cx                913 drivers/media/pci/cx18/cx18-ioctl.c 	struct cx18 *cx = id->cx;
cx                932 drivers/media/pci/cx18/cx18-ioctl.c 		if (!atomic_read(&cx->ana_capturing))
cx                934 drivers/media/pci/cx18/cx18-ioctl.c 		if (test_and_set_bit(CX18_F_I_ENC_PAUSED, &cx->i_flags))
cx                936 drivers/media/pci/cx18/cx18-ioctl.c 		h = cx18_find_handle(cx);
cx                941 drivers/media/pci/cx18/cx18-ioctl.c 		cx18_mute(cx);
cx                942 drivers/media/pci/cx18/cx18-ioctl.c 		cx18_vapi(cx, CX18_CPU_CAPTURE_PAUSE, 1, h);
cx                948 drivers/media/pci/cx18/cx18-ioctl.c 		if (!atomic_read(&cx->ana_capturing))
cx                950 drivers/media/pci/cx18/cx18-ioctl.c 		if (!test_and_clear_bit(CX18_F_I_ENC_PAUSED, &cx->i_flags))
cx                952 drivers/media/pci/cx18/cx18-ioctl.c 		h = cx18_find_handle(cx);
cx                957 drivers/media/pci/cx18/cx18-ioctl.c 		cx18_vapi(cx, CX18_CPU_CAPTURE_RESUME, 1, h);
cx                958 drivers/media/pci/cx18/cx18-ioctl.c 		cx18_unmute(cx);
cx                971 drivers/media/pci/cx18/cx18-ioctl.c 	struct cx18 *cx = fh2id(fh)->cx;
cx               1003 drivers/media/pci/cx18/cx18-ioctl.c 	struct cx18 *cx = fh2id(fh)->cx;
cx               1008 drivers/media/pci/cx18/cx18-ioctl.c 	CX18_INFO("Version: %s  Card: %s\n", CX18_VERSION, cx->card_name);
cx               1009 drivers/media/pci/cx18/cx18-ioctl.c 	if (cx->hw_flags & CX18_HW_TVEEPROM) {
cx               1012 drivers/media/pci/cx18/cx18-ioctl.c 		cx18_read_eeprom(cx, &tv);
cx               1014 drivers/media/pci/cx18/cx18-ioctl.c 	cx18_call_all(cx, core, log_status);
cx               1015 drivers/media/pci/cx18/cx18-ioctl.c 	cx18_get_input(cx, cx->active_input, &vidin);
cx               1016 drivers/media/pci/cx18/cx18-ioctl.c 	cx18_get_audio_input(cx, cx->audio_input, &audin);
cx               1019 drivers/media/pci/cx18/cx18-ioctl.c 	mutex_lock(&cx->gpio_lock);
cx               1021 drivers/media/pci/cx18/cx18-ioctl.c 		cx->gpio_dir, cx->gpio_val);
cx               1022 drivers/media/pci/cx18/cx18-ioctl.c 	mutex_unlock(&cx->gpio_lock);
cx               1024 drivers/media/pci/cx18/cx18-ioctl.c 		test_bit(CX18_F_I_RADIO_USER, &cx->i_flags) ?  "Radio" : "TV");
cx               1025 drivers/media/pci/cx18/cx18-ioctl.c 	v4l2_ctrl_handler_log_status(&cx->cxhdl.hdl, cx->v4l2_dev.name);
cx               1026 drivers/media/pci/cx18/cx18-ioctl.c 	CX18_INFO("Status flags: 0x%08lx\n", cx->i_flags);
cx               1028 drivers/media/pci/cx18/cx18-ioctl.c 		struct cx18_stream *s = &cx->streams[i];
cx               1039 drivers/media/pci/cx18/cx18-ioctl.c 			(long long)cx->mpg_data_received,
cx               1040 drivers/media/pci/cx18/cx18-ioctl.c 			(long long)cx->vbi_data_inserted);
cx               1047 drivers/media/pci/cx18/cx18-ioctl.c 	struct cx18 *cx = fh2id(fh)->cx;
cx               1054 drivers/media/pci/cx18/cx18-ioctl.c 			cx18_call_hw(cx, CX18_HW_GPIO_RESET_CTRL, core, reset,
cx                 15 drivers/media/pci/cx18/cx18-irq.c static void xpu_ack(struct cx18 *cx, u32 sw2)
cx                 18 drivers/media/pci/cx18/cx18-irq.c 		wake_up(&cx->mb_cpu_waitq);
cx                 20 drivers/media/pci/cx18/cx18-irq.c 		wake_up(&cx->mb_apu_waitq);
cx                 23 drivers/media/pci/cx18/cx18-irq.c static void epu_cmd(struct cx18 *cx, u32 sw1)
cx                 26 drivers/media/pci/cx18/cx18-irq.c 		cx18_api_epu_cmd_irq(cx, CPU);
cx                 28 drivers/media/pci/cx18/cx18-irq.c 		cx18_api_epu_cmd_irq(cx, APU);
cx                 33 drivers/media/pci/cx18/cx18-irq.c 	struct cx18 *cx = (struct cx18 *)dev_id;
cx                 36 drivers/media/pci/cx18/cx18-irq.c 	sw1 = cx18_read_reg(cx, SW1_INT_STATUS) & cx->sw1_irq_mask;
cx                 37 drivers/media/pci/cx18/cx18-irq.c 	sw2 = cx18_read_reg(cx, SW2_INT_STATUS) & cx->sw2_irq_mask;
cx                 38 drivers/media/pci/cx18/cx18-irq.c 	hw2 = cx18_read_reg(cx, HW2_INT_CLR_STATUS) & cx->hw2_irq_mask;
cx                 41 drivers/media/pci/cx18/cx18-irq.c 		cx18_write_reg_expect(cx, sw1, SW1_INT_STATUS, ~sw1, sw1);
cx                 43 drivers/media/pci/cx18/cx18-irq.c 		cx18_write_reg_expect(cx, sw2, SW2_INT_STATUS, ~sw2, sw2);
cx                 45 drivers/media/pci/cx18/cx18-irq.c 		cx18_write_reg_expect(cx, hw2, HW2_INT_CLR_STATUS, ~hw2, hw2);
cx                 56 drivers/media/pci/cx18/cx18-irq.c 		epu_cmd(cx, sw1);
cx                 64 drivers/media/pci/cx18/cx18-irq.c 		xpu_ack(cx, sw2);
cx                105 drivers/media/pci/cx18/cx18-mailbox.c static void dump_mb(struct cx18 *cx, struct cx18_mailbox *mb, char *name)
cx                203 drivers/media/pci/cx18/cx18-mailbox.c static void cx18_mdl_send_to_alsa(struct cx18 *cx, struct cx18_stream *s,
cx                218 drivers/media/pci/cx18/cx18-mailbox.c 			cx->pcm_announce_callback(cx->alsa, buf->buf,
cx                226 drivers/media/pci/cx18/cx18-mailbox.c 		cx->pcm_announce_callback(cx->alsa, buf->buf, buf->bytesused);
cx                230 drivers/media/pci/cx18/cx18-mailbox.c static void epu_dma_done(struct cx18 *cx, struct cx18_in_work_order *order)
cx                241 drivers/media/pci/cx18/cx18-mailbox.c 	s = cx18_handle_to_stream(cx, handle);
cx                300 drivers/media/pci/cx18/cx18-mailbox.c 			if (cx->pcm_announce_callback != NULL) {
cx                301 drivers/media/pci/cx18/cx18-mailbox.c 				cx18_mdl_send_to_alsa(cx, s, mdl);
cx                312 drivers/media/pci/cx18/cx18-mailbox.c 				cx18_stream_rotate_idx_mdls(cx);
cx                318 drivers/media/pci/cx18/cx18-mailbox.c 	wake_up(&cx->dma_waitq);
cx                323 drivers/media/pci/cx18/cx18-mailbox.c static void epu_debug(struct cx18 *cx, struct cx18_in_work_order *order)
cx                330 drivers/media/pci/cx18/cx18-mailbox.c 	if (!test_bit(CX18_F_I_LOADED_FW, &cx->i_flags) && p && p > str)
cx                334 drivers/media/pci/cx18/cx18-mailbox.c static void epu_cmd(struct cx18 *cx, struct cx18_in_work_order *order)
cx                341 drivers/media/pci/cx18/cx18-mailbox.c 			epu_dma_done(cx, order);
cx                344 drivers/media/pci/cx18/cx18-mailbox.c 			epu_debug(cx, order);
cx                363 drivers/media/pci/cx18/cx18-mailbox.c void free_in_work_order(struct cx18 *cx, struct cx18_in_work_order *order)
cx                372 drivers/media/pci/cx18/cx18-mailbox.c 	struct cx18 *cx = order->cx;
cx                373 drivers/media/pci/cx18/cx18-mailbox.c 	epu_cmd(cx, order);
cx                374 drivers/media/pci/cx18/cx18-mailbox.c 	free_in_work_order(cx, order);
cx                382 drivers/media/pci/cx18/cx18-mailbox.c static void mb_ack_irq(struct cx18 *cx, struct cx18_in_work_order *order)
cx                390 drivers/media/pci/cx18/cx18-mailbox.c 		ack_mb = &cx->scb->apu2epu_mb;
cx                394 drivers/media/pci/cx18/cx18-mailbox.c 		ack_mb = &cx->scb->cpu2epu_mb;
cx                404 drivers/media/pci/cx18/cx18-mailbox.c 	if (req != cx18_readl(cx, &ack_mb->request) ||
cx                405 drivers/media/pci/cx18/cx18-mailbox.c 	    req == cx18_readl(cx, &ack_mb->ack)) {
cx                411 drivers/media/pci/cx18/cx18-mailbox.c 	cx18_writel(cx, req, &ack_mb->ack);
cx                412 drivers/media/pci/cx18/cx18-mailbox.c 	cx18_write_reg_expect(cx, ack_irq, SW2_INT_SET, ack_irq, ack_irq);
cx                416 drivers/media/pci/cx18/cx18-mailbox.c static int epu_dma_done_irq(struct cx18 *cx, struct cx18_in_work_order *order)
cx                430 drivers/media/pci/cx18/cx18-mailbox.c 			mb_ack_irq(cx, order);
cx                436 drivers/media/pci/cx18/cx18-mailbox.c 			cx18_readl(cx, cx->enc_mem + mdl_ack_offset + i);
cx                439 drivers/media/pci/cx18/cx18-mailbox.c 		mb_ack_irq(cx, order);
cx                444 drivers/media/pci/cx18/cx18-mailbox.c int epu_debug_irq(struct cx18 *cx, struct cx18_in_work_order *order)
cx                452 drivers/media/pci/cx18/cx18-mailbox.c 		cx18_setup_page(cx, str_offset);
cx                453 drivers/media/pci/cx18/cx18-mailbox.c 		cx18_memcpy_fromio(cx, str, cx->enc_mem + str_offset, 252);
cx                455 drivers/media/pci/cx18/cx18-mailbox.c 		cx18_setup_page(cx, SCB_OFFSET);
cx                459 drivers/media/pci/cx18/cx18-mailbox.c 		mb_ack_irq(cx, order);
cx                465 drivers/media/pci/cx18/cx18-mailbox.c int epu_cmd_irq(struct cx18 *cx, struct cx18_in_work_order *order)
cx                474 drivers/media/pci/cx18/cx18-mailbox.c 			ret = epu_dma_done_irq(cx, order);
cx                477 drivers/media/pci/cx18/cx18-mailbox.c 			ret = epu_debug_irq(cx, order);
cx                497 drivers/media/pci/cx18/cx18-mailbox.c struct cx18_in_work_order *alloc_in_work_order_irq(struct cx18 *cx)
cx                511 drivers/media/pci/cx18/cx18-mailbox.c 		if (atomic_read(&cx->in_work_order[i].pending) == 0) {
cx                512 drivers/media/pci/cx18/cx18-mailbox.c 			order = &cx->in_work_order[i];
cx                520 drivers/media/pci/cx18/cx18-mailbox.c void cx18_api_epu_cmd_irq(struct cx18 *cx, int rpu)
cx                530 drivers/media/pci/cx18/cx18-mailbox.c 		mb = &cx->scb->cpu2epu_mb;
cx                533 drivers/media/pci/cx18/cx18-mailbox.c 		mb = &cx->scb->apu2epu_mb;
cx                539 drivers/media/pci/cx18/cx18-mailbox.c 	order = alloc_in_work_order_irq(cx);
cx                551 drivers/media/pci/cx18/cx18-mailbox.c 		(&order_mb->cmd)[i] = cx18_readl(cx, &mb->cmd + i);
cx                555 drivers/media/pci/cx18/cx18-mailbox.c 		(&order_mb->request)[i] = cx18_readl(cx, &mb->request + i);
cx                561 drivers/media/pci/cx18/cx18-mailbox.c 			dump_mb(cx, order_mb, "incoming");
cx                569 drivers/media/pci/cx18/cx18-mailbox.c 	submit = epu_cmd_irq(cx, order);
cx                571 drivers/media/pci/cx18/cx18-mailbox.c 		queue_work(cx->in_work_queue, &order->work);
cx                580 drivers/media/pci/cx18/cx18-mailbox.c static int cx18_api_call(struct cx18 *cx, u32 cmd, int args, u32 data[])
cx                611 drivers/media/pci/cx18/cx18-mailbox.c 		waitq = &cx->mb_apu_waitq;
cx                612 drivers/media/pci/cx18/cx18-mailbox.c 		mb_lock = &cx->epu2apu_mb_lock;
cx                614 drivers/media/pci/cx18/cx18-mailbox.c 		mb = &cx->scb->epu2apu_mb;
cx                617 drivers/media/pci/cx18/cx18-mailbox.c 		waitq = &cx->mb_cpu_waitq;
cx                618 drivers/media/pci/cx18/cx18-mailbox.c 		mb_lock = &cx->epu2cpu_mb_lock;
cx                620 drivers/media/pci/cx18/cx18-mailbox.c 		mb = &cx->scb->epu2cpu_mb;
cx                638 drivers/media/pci/cx18/cx18-mailbox.c 	req = cx18_readl(cx, &mb->request);
cx                641 drivers/media/pci/cx18/cx18-mailbox.c 				 (ack = cx18_readl(cx, &mb->ack)) == req,
cx                645 drivers/media/pci/cx18/cx18-mailbox.c 		cx18_writel(cx, req, &mb->ack);
cx                655 drivers/media/pci/cx18/cx18-mailbox.c 	cx18_writel(cx, cmd, &mb->cmd);
cx                657 drivers/media/pci/cx18/cx18-mailbox.c 		cx18_writel(cx, data[i], &mb->args[i]);
cx                658 drivers/media/pci/cx18/cx18-mailbox.c 	cx18_writel(cx, 0, &mb->error);
cx                659 drivers/media/pci/cx18/cx18-mailbox.c 	cx18_writel(cx, req, &mb->request);
cx                660 drivers/media/pci/cx18/cx18-mailbox.c 	cx18_writel(cx, req - 1, &mb->ack); /* ensure ack & req are distinct */
cx                672 drivers/media/pci/cx18/cx18-mailbox.c 	cx18_write_reg_expect(cx, irq, SW1_INT_SET, irq, irq);
cx                675 drivers/media/pci/cx18/cx18-mailbox.c 	ack = cx18_readl(cx, &mb->ack);
cx                679 drivers/media/pci/cx18/cx18-mailbox.c 		ack = cx18_readl(cx, &mb->ack);
cx                710 drivers/media/pci/cx18/cx18-mailbox.c 		data[i] = cx18_readl(cx, &mb->args[i]);
cx                711 drivers/media/pci/cx18/cx18-mailbox.c 	err = cx18_readl(cx, &mb->error);
cx                728 drivers/media/pci/cx18/cx18-mailbox.c int cx18_api(struct cx18 *cx, u32 cmd, int args, u32 data[])
cx                730 drivers/media/pci/cx18/cx18-mailbox.c 	return cx18_api_call(cx, cmd, args, data);
cx                735 drivers/media/pci/cx18/cx18-mailbox.c 	struct cx18 *cx = s->cx;
cx                739 drivers/media/pci/cx18/cx18-mailbox.c 	mode = (cx->filter_mode & 1) ? 2 : (cx->spatial_strength ? 1 : 0);
cx                740 drivers/media/pci/cx18/cx18-mailbox.c 	ret = cx18_vapi(cx, CX18_CPU_SET_FILTER_PARAM, 4,
cx                741 drivers/media/pci/cx18/cx18-mailbox.c 			s->handle, 1, mode, cx->spatial_strength);
cx                742 drivers/media/pci/cx18/cx18-mailbox.c 	mode = (cx->filter_mode & 2) ? 2 : (cx->temporal_strength ? 1 : 0);
cx                743 drivers/media/pci/cx18/cx18-mailbox.c 	ret = ret ? ret : cx18_vapi(cx, CX18_CPU_SET_FILTER_PARAM, 4,
cx                744 drivers/media/pci/cx18/cx18-mailbox.c 			s->handle, 0, mode, cx->temporal_strength);
cx                745 drivers/media/pci/cx18/cx18-mailbox.c 	ret = ret ? ret : cx18_vapi(cx, CX18_CPU_SET_FILTER_PARAM, 4,
cx                746 drivers/media/pci/cx18/cx18-mailbox.c 			s->handle, 2, cx->filter_mode >> 2, 0);
cx                754 drivers/media/pci/cx18/cx18-mailbox.c 	struct cx18 *cx = s->cx;
cx                760 drivers/media/pci/cx18/cx18-mailbox.c 		return cx18_vapi(cx, CX18_CPU_SET_VIDEO_IN, 6,
cx                763 drivers/media/pci/cx18/cx18-mailbox.c 		return cx18_vapi(cx, CX18_CPU_SET_VIDEO_RESOLUTION, 3,
cx                766 drivers/media/pci/cx18/cx18-mailbox.c 		return cx18_vapi(cx, CX18_CPU_SET_STREAM_OUTPUT_TYPE, 2,
cx                769 drivers/media/pci/cx18/cx18-mailbox.c 		return cx18_vapi(cx, CX18_CPU_SET_ASPECT_RATIO, 2,
cx                773 drivers/media/pci/cx18/cx18-mailbox.c 		return cx18_vapi(cx, CX18_CPU_SET_GOP_STRUCTURE, 3,
cx                778 drivers/media/pci/cx18/cx18-mailbox.c 		return cx18_vapi(cx, CX18_CPU_SET_AUDIO_PARAMETERS, 2,
cx                781 drivers/media/pci/cx18/cx18-mailbox.c 		return cx18_vapi(cx, CX18_CPU_SET_AUDIO_MUTE, 2,
cx                784 drivers/media/pci/cx18/cx18-mailbox.c 		return cx18_vapi(cx, CX18_CPU_SET_VIDEO_RATE, 5,
cx                787 drivers/media/pci/cx18/cx18-mailbox.c 		return cx18_vapi(cx, CX18_CPU_SET_VIDEO_MUTE, 2,
cx                790 drivers/media/pci/cx18/cx18-mailbox.c 		return cx18_vapi(cx, CX18_CPU_SET_SKIP_INPUT_FRAME, 2,
cx                793 drivers/media/pci/cx18/cx18-mailbox.c 		return cx18_vapi(cx, CX18_CPU_SET_MISC_PARAMETERS, 4,
cx                796 drivers/media/pci/cx18/cx18-mailbox.c 		cx->filter_mode = (data[0] & 3) | (data[1] << 2);
cx                799 drivers/media/pci/cx18/cx18-mailbox.c 		cx->spatial_strength = data[0];
cx                800 drivers/media/pci/cx18/cx18-mailbox.c 		cx->temporal_strength = data[1];
cx                803 drivers/media/pci/cx18/cx18-mailbox.c 		return cx18_vapi(cx, CX18_CPU_SET_SPATIAL_FILTER_TYPE, 3,
cx                806 drivers/media/pci/cx18/cx18-mailbox.c 		return cx18_vapi(cx, CX18_CPU_SET_MEDIAN_CORING, 5,
cx                813 drivers/media/pci/cx18/cx18-mailbox.c int cx18_vapi_result(struct cx18 *cx, u32 data[MAX_MB_ARGUMENTS],
cx                823 drivers/media/pci/cx18/cx18-mailbox.c 	return cx18_api(cx, cmd, args, data);
cx                826 drivers/media/pci/cx18/cx18-mailbox.c int cx18_vapi(struct cx18 *cx, u32 cmd, int args, ...)
cx                832 drivers/media/pci/cx18/cx18-mailbox.c 	if (cx == NULL) {
cx                844 drivers/media/pci/cx18/cx18-mailbox.c 	return cx18_api(cx, cmd, args, data);
cx                 70 drivers/media/pci/cx18/cx18-mailbox.h int cx18_api(struct cx18 *cx, u32 cmd, int args, u32 data[]);
cx                 71 drivers/media/pci/cx18/cx18-mailbox.h int cx18_vapi_result(struct cx18 *cx, u32 data[MAX_MB_ARGUMENTS], u32 cmd,
cx                 73 drivers/media/pci/cx18/cx18-mailbox.h int cx18_vapi(struct cx18 *cx, u32 cmd, int args, ...);
cx                 77 drivers/media/pci/cx18/cx18-mailbox.h void cx18_api_epu_cmd_irq(struct cx18 *cx, int rpu);
cx                128 drivers/media/pci/cx18/cx18-queue.c 	struct cx18 *cx = s->cx;
cx                264 drivers/media/pci/cx18/cx18-queue.c 	struct cx18 *cx = s->cx;
cx                292 drivers/media/pci/cx18/cx18-queue.c 			cx18_writel(cx, buf->dma_handle,
cx                293 drivers/media/pci/cx18/cx18-queue.c 				    &cx->scb->cpu_mdl[mdl_id + i].paddr);
cx                294 drivers/media/pci/cx18/cx18-queue.c 			cx18_writel(cx, s->buf_size,
cx                295 drivers/media/pci/cx18/cx18-queue.c 				    &cx->scb->cpu_mdl[mdl_id + i].length);
cx                308 drivers/media/pci/cx18/cx18-queue.c 				cx18_writel(cx, partial_buf_size,
cx                309 drivers/media/pci/cx18/cx18-queue.c 				      &cx->scb->cpu_mdl[mdl_id + i - 1].length);
cx                324 drivers/media/pci/cx18/cx18-queue.c 	struct pci_dev *pci_dev = s->cx->pci_dev;
cx                334 drivers/media/pci/cx18/cx18-queue.c 	struct cx18 *cx = s->cx;
cx                345 drivers/media/pci/cx18/cx18-queue.c 	if (((char __iomem *)&cx->scb->cpu_mdl[cx->free_mdl_idx + s->buffers] -
cx                346 drivers/media/pci/cx18/cx18-queue.c 				(char __iomem *)cx->scb) > SCB_RESERVED_SIZE) {
cx                347 drivers/media/pci/cx18/cx18-queue.c 		unsigned bufsz = (((char __iomem *)cx->scb) + SCB_RESERVED_SIZE -
cx                348 drivers/media/pci/cx18/cx18-queue.c 					((char __iomem *)cx->scb->cpu_mdl));
cx                356 drivers/media/pci/cx18/cx18-queue.c 	s->mdl_base_idx = cx->free_mdl_idx;
cx                388 drivers/media/pci/cx18/cx18-queue.c 		buf->dma_handle = pci_map_single(s->cx->pci_dev,
cx                394 drivers/media/pci/cx18/cx18-queue.c 		cx->free_mdl_idx += s->buffers;
cx                406 drivers/media/pci/cx18/cx18-queue.c 	struct cx18 *cx = s->cx;
cx                422 drivers/media/pci/cx18/cx18-queue.c 		pci_unmap_single(s->cx->pci_dev, buf->dma_handle,
cx                 18 drivers/media/pci/cx18/cx18-queue.h 	pci_dma_sync_single_for_cpu(s->cx->pci_dev, buf->dma_handle,
cx                 25 drivers/media/pci/cx18/cx18-queue.h 	pci_dma_sync_single_for_device(s->cx->pci_dev, buf->dma_handle,
cx                 13 drivers/media/pci/cx18/cx18-scb.c void cx18_init_scb(struct cx18 *cx)
cx                 15 drivers/media/pci/cx18/cx18-scb.c 	cx18_setup_page(cx, SCB_OFFSET);
cx                 16 drivers/media/pci/cx18/cx18-scb.c 	cx18_memset_io(cx, cx->scb, 0, 0x10000);
cx                 18 drivers/media/pci/cx18/cx18-scb.c 	cx18_writel(cx, IRQ_APU_TO_CPU,     &cx->scb->apu2cpu_irq);
cx                 19 drivers/media/pci/cx18/cx18-scb.c 	cx18_writel(cx, IRQ_CPU_TO_APU_ACK, &cx->scb->cpu2apu_irq_ack);
cx                 20 drivers/media/pci/cx18/cx18-scb.c 	cx18_writel(cx, IRQ_HPU_TO_CPU,     &cx->scb->hpu2cpu_irq);
cx                 21 drivers/media/pci/cx18/cx18-scb.c 	cx18_writel(cx, IRQ_CPU_TO_HPU_ACK, &cx->scb->cpu2hpu_irq_ack);
cx                 22 drivers/media/pci/cx18/cx18-scb.c 	cx18_writel(cx, IRQ_PPU_TO_CPU,     &cx->scb->ppu2cpu_irq);
cx                 23 drivers/media/pci/cx18/cx18-scb.c 	cx18_writel(cx, IRQ_CPU_TO_PPU_ACK, &cx->scb->cpu2ppu_irq_ack);
cx                 24 drivers/media/pci/cx18/cx18-scb.c 	cx18_writel(cx, IRQ_EPU_TO_CPU,     &cx->scb->epu2cpu_irq);
cx                 25 drivers/media/pci/cx18/cx18-scb.c 	cx18_writel(cx, IRQ_CPU_TO_EPU_ACK, &cx->scb->cpu2epu_irq_ack);
cx                 27 drivers/media/pci/cx18/cx18-scb.c 	cx18_writel(cx, IRQ_CPU_TO_APU,     &cx->scb->cpu2apu_irq);
cx                 28 drivers/media/pci/cx18/cx18-scb.c 	cx18_writel(cx, IRQ_APU_TO_CPU_ACK, &cx->scb->apu2cpu_irq_ack);
cx                 29 drivers/media/pci/cx18/cx18-scb.c 	cx18_writel(cx, IRQ_HPU_TO_APU,     &cx->scb->hpu2apu_irq);
cx                 30 drivers/media/pci/cx18/cx18-scb.c 	cx18_writel(cx, IRQ_APU_TO_HPU_ACK, &cx->scb->apu2hpu_irq_ack);
cx                 31 drivers/media/pci/cx18/cx18-scb.c 	cx18_writel(cx, IRQ_PPU_TO_APU,     &cx->scb->ppu2apu_irq);
cx                 32 drivers/media/pci/cx18/cx18-scb.c 	cx18_writel(cx, IRQ_APU_TO_PPU_ACK, &cx->scb->apu2ppu_irq_ack);
cx                 33 drivers/media/pci/cx18/cx18-scb.c 	cx18_writel(cx, IRQ_EPU_TO_APU,     &cx->scb->epu2apu_irq);
cx                 34 drivers/media/pci/cx18/cx18-scb.c 	cx18_writel(cx, IRQ_APU_TO_EPU_ACK, &cx->scb->apu2epu_irq_ack);
cx                 36 drivers/media/pci/cx18/cx18-scb.c 	cx18_writel(cx, IRQ_CPU_TO_HPU,     &cx->scb->cpu2hpu_irq);
cx                 37 drivers/media/pci/cx18/cx18-scb.c 	cx18_writel(cx, IRQ_HPU_TO_CPU_ACK, &cx->scb->hpu2cpu_irq_ack);
cx                 38 drivers/media/pci/cx18/cx18-scb.c 	cx18_writel(cx, IRQ_APU_TO_HPU,     &cx->scb->apu2hpu_irq);
cx                 39 drivers/media/pci/cx18/cx18-scb.c 	cx18_writel(cx, IRQ_HPU_TO_APU_ACK, &cx->scb->hpu2apu_irq_ack);
cx                 40 drivers/media/pci/cx18/cx18-scb.c 	cx18_writel(cx, IRQ_PPU_TO_HPU,     &cx->scb->ppu2hpu_irq);
cx                 41 drivers/media/pci/cx18/cx18-scb.c 	cx18_writel(cx, IRQ_HPU_TO_PPU_ACK, &cx->scb->hpu2ppu_irq_ack);
cx                 42 drivers/media/pci/cx18/cx18-scb.c 	cx18_writel(cx, IRQ_EPU_TO_HPU,     &cx->scb->epu2hpu_irq);
cx                 43 drivers/media/pci/cx18/cx18-scb.c 	cx18_writel(cx, IRQ_HPU_TO_EPU_ACK, &cx->scb->hpu2epu_irq_ack);
cx                 45 drivers/media/pci/cx18/cx18-scb.c 	cx18_writel(cx, IRQ_CPU_TO_PPU,     &cx->scb->cpu2ppu_irq);
cx                 46 drivers/media/pci/cx18/cx18-scb.c 	cx18_writel(cx, IRQ_PPU_TO_CPU_ACK, &cx->scb->ppu2cpu_irq_ack);
cx                 47 drivers/media/pci/cx18/cx18-scb.c 	cx18_writel(cx, IRQ_APU_TO_PPU,     &cx->scb->apu2ppu_irq);
cx                 48 drivers/media/pci/cx18/cx18-scb.c 	cx18_writel(cx, IRQ_PPU_TO_APU_ACK, &cx->scb->ppu2apu_irq_ack);
cx                 49 drivers/media/pci/cx18/cx18-scb.c 	cx18_writel(cx, IRQ_HPU_TO_PPU,     &cx->scb->hpu2ppu_irq);
cx                 50 drivers/media/pci/cx18/cx18-scb.c 	cx18_writel(cx, IRQ_PPU_TO_HPU_ACK, &cx->scb->ppu2hpu_irq_ack);
cx                 51 drivers/media/pci/cx18/cx18-scb.c 	cx18_writel(cx, IRQ_EPU_TO_PPU,     &cx->scb->epu2ppu_irq);
cx                 52 drivers/media/pci/cx18/cx18-scb.c 	cx18_writel(cx, IRQ_PPU_TO_EPU_ACK, &cx->scb->ppu2epu_irq_ack);
cx                 54 drivers/media/pci/cx18/cx18-scb.c 	cx18_writel(cx, IRQ_CPU_TO_EPU,     &cx->scb->cpu2epu_irq);
cx                 55 drivers/media/pci/cx18/cx18-scb.c 	cx18_writel(cx, IRQ_EPU_TO_CPU_ACK, &cx->scb->epu2cpu_irq_ack);
cx                 56 drivers/media/pci/cx18/cx18-scb.c 	cx18_writel(cx, IRQ_APU_TO_EPU,     &cx->scb->apu2epu_irq);
cx                 57 drivers/media/pci/cx18/cx18-scb.c 	cx18_writel(cx, IRQ_EPU_TO_APU_ACK, &cx->scb->epu2apu_irq_ack);
cx                 58 drivers/media/pci/cx18/cx18-scb.c 	cx18_writel(cx, IRQ_HPU_TO_EPU,     &cx->scb->hpu2epu_irq);
cx                 59 drivers/media/pci/cx18/cx18-scb.c 	cx18_writel(cx, IRQ_EPU_TO_HPU_ACK, &cx->scb->epu2hpu_irq_ack);
cx                 60 drivers/media/pci/cx18/cx18-scb.c 	cx18_writel(cx, IRQ_PPU_TO_EPU,     &cx->scb->ppu2epu_irq);
cx                 61 drivers/media/pci/cx18/cx18-scb.c 	cx18_writel(cx, IRQ_EPU_TO_PPU_ACK, &cx->scb->epu2ppu_irq_ack);
cx                 63 drivers/media/pci/cx18/cx18-scb.c 	cx18_writel(cx, SCB_OFFSET + offsetof(struct cx18_scb, apu2cpu_mb),
cx                 64 drivers/media/pci/cx18/cx18-scb.c 			&cx->scb->apu2cpu_mb_offset);
cx                 65 drivers/media/pci/cx18/cx18-scb.c 	cx18_writel(cx, SCB_OFFSET + offsetof(struct cx18_scb, hpu2cpu_mb),
cx                 66 drivers/media/pci/cx18/cx18-scb.c 			&cx->scb->hpu2cpu_mb_offset);
cx                 67 drivers/media/pci/cx18/cx18-scb.c 	cx18_writel(cx, SCB_OFFSET + offsetof(struct cx18_scb, ppu2cpu_mb),
cx                 68 drivers/media/pci/cx18/cx18-scb.c 			&cx->scb->ppu2cpu_mb_offset);
cx                 69 drivers/media/pci/cx18/cx18-scb.c 	cx18_writel(cx, SCB_OFFSET + offsetof(struct cx18_scb, epu2cpu_mb),
cx                 70 drivers/media/pci/cx18/cx18-scb.c 			&cx->scb->epu2cpu_mb_offset);
cx                 71 drivers/media/pci/cx18/cx18-scb.c 	cx18_writel(cx, SCB_OFFSET + offsetof(struct cx18_scb, cpu2apu_mb),
cx                 72 drivers/media/pci/cx18/cx18-scb.c 			&cx->scb->cpu2apu_mb_offset);
cx                 73 drivers/media/pci/cx18/cx18-scb.c 	cx18_writel(cx, SCB_OFFSET + offsetof(struct cx18_scb, hpu2apu_mb),
cx                 74 drivers/media/pci/cx18/cx18-scb.c 			&cx->scb->hpu2apu_mb_offset);
cx                 75 drivers/media/pci/cx18/cx18-scb.c 	cx18_writel(cx, SCB_OFFSET + offsetof(struct cx18_scb, ppu2apu_mb),
cx                 76 drivers/media/pci/cx18/cx18-scb.c 			&cx->scb->ppu2apu_mb_offset);
cx                 77 drivers/media/pci/cx18/cx18-scb.c 	cx18_writel(cx, SCB_OFFSET + offsetof(struct cx18_scb, epu2apu_mb),
cx                 78 drivers/media/pci/cx18/cx18-scb.c 			&cx->scb->epu2apu_mb_offset);
cx                 79 drivers/media/pci/cx18/cx18-scb.c 	cx18_writel(cx, SCB_OFFSET + offsetof(struct cx18_scb, cpu2hpu_mb),
cx                 80 drivers/media/pci/cx18/cx18-scb.c 			&cx->scb->cpu2hpu_mb_offset);
cx                 81 drivers/media/pci/cx18/cx18-scb.c 	cx18_writel(cx, SCB_OFFSET + offsetof(struct cx18_scb, apu2hpu_mb),
cx                 82 drivers/media/pci/cx18/cx18-scb.c 			&cx->scb->apu2hpu_mb_offset);
cx                 83 drivers/media/pci/cx18/cx18-scb.c 	cx18_writel(cx, SCB_OFFSET + offsetof(struct cx18_scb, ppu2hpu_mb),
cx                 84 drivers/media/pci/cx18/cx18-scb.c 			&cx->scb->ppu2hpu_mb_offset);
cx                 85 drivers/media/pci/cx18/cx18-scb.c 	cx18_writel(cx, SCB_OFFSET + offsetof(struct cx18_scb, epu2hpu_mb),
cx                 86 drivers/media/pci/cx18/cx18-scb.c 			&cx->scb->epu2hpu_mb_offset);
cx                 87 drivers/media/pci/cx18/cx18-scb.c 	cx18_writel(cx, SCB_OFFSET + offsetof(struct cx18_scb, cpu2ppu_mb),
cx                 88 drivers/media/pci/cx18/cx18-scb.c 			&cx->scb->cpu2ppu_mb_offset);
cx                 89 drivers/media/pci/cx18/cx18-scb.c 	cx18_writel(cx, SCB_OFFSET + offsetof(struct cx18_scb, apu2ppu_mb),
cx                 90 drivers/media/pci/cx18/cx18-scb.c 			&cx->scb->apu2ppu_mb_offset);
cx                 91 drivers/media/pci/cx18/cx18-scb.c 	cx18_writel(cx, SCB_OFFSET + offsetof(struct cx18_scb, hpu2ppu_mb),
cx                 92 drivers/media/pci/cx18/cx18-scb.c 			&cx->scb->hpu2ppu_mb_offset);
cx                 93 drivers/media/pci/cx18/cx18-scb.c 	cx18_writel(cx, SCB_OFFSET + offsetof(struct cx18_scb, epu2ppu_mb),
cx                 94 drivers/media/pci/cx18/cx18-scb.c 			&cx->scb->epu2ppu_mb_offset);
cx                 95 drivers/media/pci/cx18/cx18-scb.c 	cx18_writel(cx, SCB_OFFSET + offsetof(struct cx18_scb, cpu2epu_mb),
cx                 96 drivers/media/pci/cx18/cx18-scb.c 			&cx->scb->cpu2epu_mb_offset);
cx                 97 drivers/media/pci/cx18/cx18-scb.c 	cx18_writel(cx, SCB_OFFSET + offsetof(struct cx18_scb, apu2epu_mb),
cx                 98 drivers/media/pci/cx18/cx18-scb.c 			&cx->scb->apu2epu_mb_offset);
cx                 99 drivers/media/pci/cx18/cx18-scb.c 	cx18_writel(cx, SCB_OFFSET + offsetof(struct cx18_scb, hpu2epu_mb),
cx                100 drivers/media/pci/cx18/cx18-scb.c 			&cx->scb->hpu2epu_mb_offset);
cx                101 drivers/media/pci/cx18/cx18-scb.c 	cx18_writel(cx, SCB_OFFSET + offsetof(struct cx18_scb, ppu2epu_mb),
cx                102 drivers/media/pci/cx18/cx18-scb.c 			&cx->scb->ppu2epu_mb_offset);
cx                104 drivers/media/pci/cx18/cx18-scb.c 	cx18_writel(cx, SCB_OFFSET + offsetof(struct cx18_scb, cpu_state),
cx                105 drivers/media/pci/cx18/cx18-scb.c 			&cx->scb->ipc_offset);
cx                107 drivers/media/pci/cx18/cx18-scb.c 	cx18_writel(cx, 1, &cx->scb->epu_state);
cx                264 drivers/media/pci/cx18/cx18-scb.h void cx18_init_scb(struct cx18 *cx);
cx                110 drivers/media/pci/cx18/cx18-streams.c 	struct cx18 *cx = s->cx;
cx                126 drivers/media/pci/cx18/cx18-streams.c 	    buf->tvnorm != cx->std) {
cx                131 drivers/media/pci/cx18/cx18-streams.c 		buf->tvnorm    = cx->std;
cx                153 drivers/media/pci/cx18/cx18-streams.c 		buf->tvnorm    = cx->std;
cx                185 drivers/media/pci/cx18/cx18-streams.c 	struct cx18 *cx = s->cx;
cx                187 drivers/media/pci/cx18/cx18-streams.c 	*size = 2 * cx->cxhdl.width * cx->cxhdl.height;
cx                207 drivers/media/pci/cx18/cx18-streams.c 	struct cx18 *cx = s->cx;
cx                210 drivers/media/pci/cx18/cx18-streams.c 		cx->cxhdl.width, cx->cxhdl.height, field);
cx                241 drivers/media/pci/cx18/cx18-streams.c static void cx18_stream_init(struct cx18 *cx, int type)
cx                243 drivers/media/pci/cx18/cx18-streams.c 	struct cx18_stream *s = &cx->streams[type];
cx                249 drivers/media/pci/cx18/cx18-streams.c 	s->cx = cx;
cx                256 drivers/media/pci/cx18/cx18-streams.c 	s->buffers = cx->stream_buffers[type];
cx                257 drivers/media/pci/cx18/cx18-streams.c 	s->buf_size = cx->stream_buf_size[type];
cx                283 drivers/media/pci/cx18/cx18-streams.c 			&cx->pci_dev->dev, &s->vbuf_q_lock,
cx                287 drivers/media/pci/cx18/cx18-streams.c 			s, &cx->serialize_lock);
cx                291 drivers/media/pci/cx18/cx18-streams.c 		s->vb_bytes_per_frame = cx->cxhdl.height * 720 * 3 / 2;
cx                296 drivers/media/pci/cx18/cx18-streams.c static int cx18_prep_dev(struct cx18 *cx, int type)
cx                298 drivers/media/pci/cx18/cx18-streams.c 	struct cx18_stream *s = &cx->streams[type];
cx                299 drivers/media/pci/cx18/cx18-streams.c 	u32 cap = cx->v4l2_cap;
cx                301 drivers/media/pci/cx18/cx18-streams.c 	int num = cx->instance + cx18_first_minor + num_offset;
cx                312 drivers/media/pci/cx18/cx18-streams.c 	s->cx = cx;
cx                328 drivers/media/pci/cx18/cx18-streams.c 	    cx->stream_buffers[type] == 0) {
cx                333 drivers/media/pci/cx18/cx18-streams.c 	cx18_stream_init(cx, type);
cx                337 drivers/media/pci/cx18/cx18-streams.c 		if (cx->card->hw_all & CX18_HW_DVB) {
cx                355 drivers/media/pci/cx18/cx18-streams.c 		 cx->v4l2_dev.name, s->name);
cx                358 drivers/media/pci/cx18/cx18-streams.c 	s->video_dev.v4l2_dev = &cx->v4l2_dev;
cx                361 drivers/media/pci/cx18/cx18-streams.c 	if (cx->card->video_inputs->video_type == CX18_CARD_INPUT_VID_TUNER)
cx                362 drivers/media/pci/cx18/cx18-streams.c 		s->video_dev.tvnorms = cx->tuner_std;
cx                365 drivers/media/pci/cx18/cx18-streams.c 	s->video_dev.lock = &cx->serialize_lock;
cx                371 drivers/media/pci/cx18/cx18-streams.c int cx18_streams_setup(struct cx18 *cx)
cx                378 drivers/media/pci/cx18/cx18-streams.c 		ret = cx18_prep_dev(cx, type);
cx                383 drivers/media/pci/cx18/cx18-streams.c 		ret = cx18_stream_alloc(&cx->streams[type]);
cx                391 drivers/media/pci/cx18/cx18-streams.c 	cx18_streams_cleanup(cx, 0);
cx                395 drivers/media/pci/cx18/cx18-streams.c static int cx18_reg_dev(struct cx18 *cx, int type)
cx                397 drivers/media/pci/cx18/cx18-streams.c 	struct cx18_stream *s = &cx->streams[type];
cx                417 drivers/media/pci/cx18/cx18-streams.c 		struct cx18_stream *s_mpg = &cx->streams[CX18_ENC_STREAM_TYPE_MPG];
cx                439 drivers/media/pci/cx18/cx18-streams.c 			  name, s->name, cx->stream_buffers[type],
cx                440 drivers/media/pci/cx18/cx18-streams.c 			  cx->stream_buf_size[type] / 1024,
cx                441 drivers/media/pci/cx18/cx18-streams.c 			  (cx->stream_buf_size[type] * 100 / 1024) % 100);
cx                449 drivers/media/pci/cx18/cx18-streams.c 		if (cx->stream_buffers[type])
cx                451 drivers/media/pci/cx18/cx18-streams.c 				  name, s->name, cx->stream_buffers[type],
cx                452 drivers/media/pci/cx18/cx18-streams.c 				  cx->stream_buf_size[type]);
cx                463 drivers/media/pci/cx18/cx18-streams.c int cx18_streams_register(struct cx18 *cx)
cx                471 drivers/media/pci/cx18/cx18-streams.c 		err = cx18_reg_dev(cx, type);
cx                480 drivers/media/pci/cx18/cx18-streams.c 	cx18_streams_cleanup(cx, 1);
cx                485 drivers/media/pci/cx18/cx18-streams.c void cx18_streams_cleanup(struct cx18 *cx, int unregister)
cx                495 drivers/media/pci/cx18/cx18-streams.c 			if (cx->streams[type].dvb != NULL) {
cx                497 drivers/media/pci/cx18/cx18-streams.c 					cx18_dvb_unregister(&cx->streams[type]);
cx                498 drivers/media/pci/cx18/cx18-streams.c 				kfree(cx->streams[type].dvb);
cx                499 drivers/media/pci/cx18/cx18-streams.c 				cx->streams[type].dvb = NULL;
cx                500 drivers/media/pci/cx18/cx18-streams.c 				cx18_stream_free(&cx->streams[type]);
cx                508 drivers/media/pci/cx18/cx18-streams.c 			if (cx->stream_buffers[type] != 0) {
cx                509 drivers/media/pci/cx18/cx18-streams.c 				cx->stream_buffers[type] = 0;
cx                516 drivers/media/pci/cx18/cx18-streams.c 				if (cx->streams[type].buffers != 0)
cx                517 drivers/media/pci/cx18/cx18-streams.c 					cx18_stream_free(&cx->streams[type]);
cx                523 drivers/media/pci/cx18/cx18-streams.c 		vdev = &cx->streams[type].video_dev;
cx                529 drivers/media/pci/cx18/cx18-streams.c 			videobuf_mmap_free(&cx->streams[type].vbuf_q);
cx                531 drivers/media/pci/cx18/cx18-streams.c 		cx18_stream_free(&cx->streams[type]);
cx                539 drivers/media/pci/cx18/cx18-streams.c 	struct cx18 *cx = s->cx;
cx                540 drivers/media/pci/cx18/cx18-streams.c 	int raw = cx18_raw_vbi(cx);
cx                544 drivers/media/pci/cx18/cx18-streams.c 	if (cx->is_60hz) {
cx                545 drivers/media/pci/cx18/cx18-streams.c 		cx->vbi.count = 12;
cx                546 drivers/media/pci/cx18/cx18-streams.c 		cx->vbi.start[0] = 10;
cx                547 drivers/media/pci/cx18/cx18-streams.c 		cx->vbi.start[1] = 273;
cx                549 drivers/media/pci/cx18/cx18-streams.c 		cx->vbi.count = 18;
cx                550 drivers/media/pci/cx18/cx18-streams.c 		cx->vbi.start[0] = 6;
cx                551 drivers/media/pci/cx18/cx18-streams.c 		cx->vbi.start[1] = 318;
cx                556 drivers/media/pci/cx18/cx18-streams.c 		v4l2_subdev_call(cx->sd_av, vbi, s_raw_fmt, &cx->vbi.in.fmt.vbi);
cx                558 drivers/media/pci/cx18/cx18-streams.c 		v4l2_subdev_call(cx->sd_av, vbi, s_sliced_fmt, &cx->vbi.in.fmt.sliced);
cx                569 drivers/media/pci/cx18/cx18-streams.c 		lines = cx->vbi.count * 2;
cx                585 drivers/media/pci/cx18/cx18-streams.c 		lines = cx->is_60hz ? (21 - 4 + 1) * 2 : (23 - 2 + 1) * 2;
cx                593 drivers/media/pci/cx18/cx18-streams.c 		       : (cx->is_60hz ? VBI_HBLANK_SAMPLES_60HZ
cx                644 drivers/media/pci/cx18/cx18-streams.c 	cx18_api(cx, CX18_CPU_SET_RAW_VBI_PARAM, 6, data);
cx                647 drivers/media/pci/cx18/cx18-streams.c void cx18_stream_rotate_idx_mdls(struct cx18 *cx)
cx                649 drivers/media/pci/cx18/cx18-streams.c 	struct cx18_stream *s = &cx->streams[CX18_ENC_STREAM_TYPE_IDX];
cx                677 drivers/media/pci/cx18/cx18-streams.c 	struct cx18 *cx = s->cx;
cx                691 drivers/media/pci/cx18/cx18-streams.c 	cx18_vapi(cx, CX18_CPU_DE_SET_MDL, 5, s->handle,
cx                692 drivers/media/pci/cx18/cx18-streams.c 		  (void __iomem *) &cx->scb->cpu_mdl[mdl->id] - cx->enc_mem,
cx                737 drivers/media/pci/cx18/cx18-streams.c 			s->mdl_size = 720 * s->cx->cxhdl.height * 3 / 2;
cx                739 drivers/media/pci/cx18/cx18-streams.c 			s->mdl_size = 720 * s->cx->cxhdl.height * 2;
cx                746 drivers/media/pci/cx18/cx18-streams.c 		if  (cx18_raw_vbi(s->cx)) {
cx                747 drivers/media/pci/cx18/cx18-streams.c 			s->mdl_size = (s->cx->is_60hz ? 12 : 18)
cx                755 drivers/media/pci/cx18/cx18-streams.c 			s->mdl_size = s->cx->is_60hz
cx                772 drivers/media/pci/cx18/cx18-streams.c 	struct cx18 *cx = s->cx;
cx                784 drivers/media/pci/cx18/cx18-streams.c 		cx->mpg_data_received = cx->vbi_data_inserted = 0;
cx                785 drivers/media/pci/cx18/cx18-streams.c 		cx->dualwatch_jiffies = jiffies;
cx                786 drivers/media/pci/cx18/cx18-streams.c 		cx->dualwatch_stereo_mode = v4l2_ctrl_g_ctrl(cx->cxhdl.audio_mode);
cx                787 drivers/media/pci/cx18/cx18-streams.c 		cx->search_pack_header = 0;
cx                804 drivers/media/pci/cx18/cx18-streams.c 		captype = cx18_raw_vbi(cx) ?
cx                813 drivers/media/pci/cx18/cx18-streams.c 		cx->vbi.frame = 0;
cx                814 drivers/media/pci/cx18/cx18-streams.c 		cx->vbi.inserted_frame = 0;
cx                815 drivers/media/pci/cx18/cx18-streams.c 		memset(cx->vbi.sliced_mpeg_size,
cx                816 drivers/media/pci/cx18/cx18-streams.c 			0, sizeof(cx->vbi.sliced_mpeg_size));
cx                825 drivers/media/pci/cx18/cx18-streams.c 	cx18_vapi_result(cx, data, CX18_CREATE_TASK, 1, CPU_CMD_MASK_CAPTURE);
cx                827 drivers/media/pci/cx18/cx18-streams.c 	cx18_vapi(cx, CX18_CPU_SET_CHANNEL_TYPE, 2, s->handle, captype);
cx                841 drivers/media/pci/cx18/cx18-streams.c 		cx18_vapi(cx, CX18_CPU_SET_VER_CROP_LINE, 2, s->handle, 0);
cx                842 drivers/media/pci/cx18/cx18-streams.c 		cx18_vapi(cx, CX18_CPU_SET_MISC_PARAMETERS, 3, s->handle, 3, 1);
cx                843 drivers/media/pci/cx18/cx18-streams.c 		cx18_vapi(cx, CX18_CPU_SET_MISC_PARAMETERS, 3, s->handle, 8, 0);
cx                844 drivers/media/pci/cx18/cx18-streams.c 		cx18_vapi(cx, CX18_CPU_SET_MISC_PARAMETERS, 3, s->handle, 4, 1);
cx                850 drivers/media/pci/cx18/cx18-streams.c 		if (atomic_read(&cx->ana_capturing) == 0)
cx                851 drivers/media/pci/cx18/cx18-streams.c 			cx18_vapi(cx, CX18_CPU_SET_MISC_PARAMETERS, 2,
cx                860 drivers/media/pci/cx18/cx18-streams.c 		cx18_vapi(cx, CX18_CPU_SET_CAPTURE_LINE_NO, 3,
cx                863 drivers/media/pci/cx18/cx18-streams.c 		if (cx->v4l2_cap & V4L2_CAP_VBI_CAPTURE)
cx                871 drivers/media/pci/cx18/cx18-streams.c 		s_idx = &cx->streams[CX18_ENC_STREAM_TYPE_IDX];
cx                872 drivers/media/pci/cx18/cx18-streams.c 		cx18_vapi_result(cx, data, CX18_CPU_SET_INDEXTABLE, 2,
cx                876 drivers/media/pci/cx18/cx18-streams.c 		cx->cxhdl.priv = s;
cx                877 drivers/media/pci/cx18/cx18-streams.c 		cx2341x_handler_setup(&cx->cxhdl);
cx                883 drivers/media/pci/cx18/cx18-streams.c 		if (!cx->cxhdl.video_mute &&
cx                884 drivers/media/pci/cx18/cx18-streams.c 		    test_bit(CX18_F_I_RADIO_USER, &cx->i_flags))
cx                885 drivers/media/pci/cx18/cx18-streams.c 			cx18_vapi(cx, CX18_CPU_SET_VIDEO_MUTE, 2, s->handle,
cx                886 drivers/media/pci/cx18/cx18-streams.c 			  (v4l2_ctrl_g_ctrl(cx->cxhdl.video_mute_yuv) << 8) | 1);
cx                893 drivers/media/pci/cx18/cx18-streams.c 				cx18_vapi(cx, CX18_CPU_SET_VFC_PARAM, 2,
cx                897 drivers/media/pci/cx18/cx18-streams.c 				cx18_vapi(cx, CX18_CPU_SET_VFC_PARAM, 2,
cx                902 drivers/media/pci/cx18/cx18-streams.c 	if (atomic_read(&cx->tot_capturing) == 0) {
cx                903 drivers/media/pci/cx18/cx18-streams.c 		cx2341x_handler_set_busy(&cx->cxhdl, 1);
cx                904 drivers/media/pci/cx18/cx18-streams.c 		clear_bit(CX18_F_I_EOS, &cx->i_flags);
cx                905 drivers/media/pci/cx18/cx18-streams.c 		cx18_write_reg(cx, 7, CX18_DSP0_INTERRUPT_MASK);
cx                908 drivers/media/pci/cx18/cx18-streams.c 	cx18_vapi(cx, CX18_CPU_DE_SET_MDL_ACK, 3, s->handle,
cx                909 drivers/media/pci/cx18/cx18-streams.c 		(void __iomem *)&cx->scb->cpu_mdl_ack[s->type][0] - cx->enc_mem,
cx                910 drivers/media/pci/cx18/cx18-streams.c 		(void __iomem *)&cx->scb->cpu_mdl_ack[s->type][1] - cx->enc_mem);
cx                917 drivers/media/pci/cx18/cx18-streams.c 	if (cx18_vapi(cx, CX18_CPU_CAPTURE_START, 1, s->handle)) {
cx                922 drivers/media/pci/cx18/cx18-streams.c 			cx18_vapi(cx, CX18_CPU_CAPTURE_STOP, 2, s->handle, 1);
cx                924 drivers/media/pci/cx18/cx18-streams.c 			cx18_vapi(cx, CX18_CPU_CAPTURE_STOP, 1, s->handle);
cx                927 drivers/media/pci/cx18/cx18-streams.c 		cx18_vapi(cx, CX18_CPU_DE_RELEASE_MDL, 1, s->handle);
cx                928 drivers/media/pci/cx18/cx18-streams.c 		cx18_vapi(cx, CX18_DESTROY_TASK, 1, s->handle);
cx                931 drivers/media/pci/cx18/cx18-streams.c 		if (atomic_read(&cx->tot_capturing) == 0) {
cx                932 drivers/media/pci/cx18/cx18-streams.c 			set_bit(CX18_F_I_EOS, &cx->i_flags);
cx                933 drivers/media/pci/cx18/cx18-streams.c 			cx18_write_reg(cx, 5, CX18_DSP0_INTERRUPT_MASK);
cx                940 drivers/media/pci/cx18/cx18-streams.c 		atomic_inc(&cx->ana_capturing);
cx                941 drivers/media/pci/cx18/cx18-streams.c 	atomic_inc(&cx->tot_capturing);
cx                946 drivers/media/pci/cx18/cx18-streams.c void cx18_stop_all_captures(struct cx18 *cx)
cx                951 drivers/media/pci/cx18/cx18-streams.c 		struct cx18_stream *s = &cx->streams[i];
cx                962 drivers/media/pci/cx18/cx18-streams.c 	struct cx18 *cx = s->cx;
cx                972 drivers/media/pci/cx18/cx18-streams.c 	if (atomic_read(&cx->tot_capturing) == 0)
cx                977 drivers/media/pci/cx18/cx18-streams.c 		cx18_vapi(cx, CX18_CPU_CAPTURE_STOP, 2, s->handle, !gop_end);
cx                979 drivers/media/pci/cx18/cx18-streams.c 		cx18_vapi(cx, CX18_CPU_CAPTURE_STOP, 1, s->handle);
cx                986 drivers/media/pci/cx18/cx18-streams.c 		atomic_dec(&cx->ana_capturing);
cx                987 drivers/media/pci/cx18/cx18-streams.c 	atomic_dec(&cx->tot_capturing);
cx                993 drivers/media/pci/cx18/cx18-streams.c 	cx18_vapi(cx, CX18_CPU_DE_RELEASE_MDL, 1, s->handle);
cx                995 drivers/media/pci/cx18/cx18-streams.c 	cx18_vapi(cx, CX18_DESTROY_TASK, 1, s->handle);
cx                999 drivers/media/pci/cx18/cx18-streams.c 	if (atomic_read(&cx->tot_capturing) > 0)
cx               1002 drivers/media/pci/cx18/cx18-streams.c 	cx2341x_handler_set_busy(&cx->cxhdl, 0);
cx               1003 drivers/media/pci/cx18/cx18-streams.c 	cx18_write_reg(cx, 5, CX18_DSP0_INTERRUPT_MASK);
cx               1010 drivers/media/pci/cx18/cx18-streams.c u32 cx18_find_handle(struct cx18 *cx)
cx               1016 drivers/media/pci/cx18/cx18-streams.c 		struct cx18_stream *s = &cx->streams[i];
cx               1024 drivers/media/pci/cx18/cx18-streams.c struct cx18_stream *cx18_handle_to_stream(struct cx18 *cx, u32 handle)
cx               1033 drivers/media/pci/cx18/cx18-streams.c 		s = &cx->streams[i];
cx                 11 drivers/media/pci/cx18/cx18-streams.h u32 cx18_find_handle(struct cx18 *cx);
cx                 12 drivers/media/pci/cx18/cx18-streams.h struct cx18_stream *cx18_handle_to_stream(struct cx18 *cx, u32 handle);
cx                 13 drivers/media/pci/cx18/cx18-streams.h int cx18_streams_setup(struct cx18 *cx);
cx                 14 drivers/media/pci/cx18/cx18-streams.h int cx18_streams_register(struct cx18 *cx);
cx                 15 drivers/media/pci/cx18/cx18-streams.h void cx18_streams_cleanup(struct cx18 *cx, int unregister);
cx                 18 drivers/media/pci/cx18/cx18-streams.h void cx18_stream_rotate_idx_mdls(struct cx18 *cx);
cx                 25 drivers/media/pci/cx18/cx18-streams.h 		s->cx->stream_buffers[CX18_ENC_STREAM_TYPE_IDX] != 0);
cx                 48 drivers/media/pci/cx18/cx18-streams.h void cx18_stop_all_captures(struct cx18 *cx);
cx                 25 drivers/media/pci/cx18/cx18-vbi.c static void copy_vbi_data(struct cx18 *cx, int lines, u32 pts_stamp)
cx                 45 drivers/media/pci/cx18/cx18-vbi.c 	int idx = cx->vbi.frame % CX18_VBI_FRAMES;
cx                 46 drivers/media/pci/cx18/cx18-vbi.c 	u8 *dst = &cx->vbi.sliced_mpeg_data[idx][0];
cx                 49 drivers/media/pci/cx18/cx18-vbi.c 		struct v4l2_sliced_vbi_data *sdata = cx->vbi.sliced_data + i;
cx                 89 drivers/media/pci/cx18/cx18-vbi.c 	cx->vbi.sliced_mpeg_size[idx] = sd + size;
cx                 95 drivers/media/pci/cx18/cx18-vbi.c static u32 compress_raw_buf(struct cx18 *cx, u8 *buf, u32 size, u32 hdr_size)
cx                 98 drivers/media/pci/cx18/cx18-vbi.c 	u32 lines = cx->vbi.count * 2;
cx                128 drivers/media/pci/cx18/cx18-vbi.c static u32 compress_sliced_buf(struct cx18 *cx, u8 *buf, u32 size,
cx                134 drivers/media/pci/cx18/cx18-vbi.c 	u32 line_size = cx->is_60hz ? VBI_HBLANK_SAMPLES_60HZ
cx                163 drivers/media/pci/cx18/cx18-vbi.c 		v4l2_subdev_call(cx->sd_av, vbi, decode_vbi_line, &vbi);
cx                165 drivers/media/pci/cx18/cx18-vbi.c 			cx->vbi.sliced_data[line].id = vbi.type;
cx                166 drivers/media/pci/cx18/cx18-vbi.c 			cx->vbi.sliced_data[line].field = vbi.is_second_field;
cx                167 drivers/media/pci/cx18/cx18-vbi.c 			cx->vbi.sliced_data[line].line = vbi.line;
cx                168 drivers/media/pci/cx18/cx18-vbi.c 			memcpy(cx->vbi.sliced_data[line].data, vbi.p, 42);
cx                175 drivers/media/pci/cx18/cx18-vbi.c static void _cx18_process_vbi_data(struct cx18 *cx, struct cx18_buffer *buf)
cx                200 drivers/media/pci/cx18/cx18-vbi.c 	if (cx18_raw_vbi(cx)) {
cx                203 drivers/media/pci/cx18/cx18-vbi.c 		     compress_raw_buf(cx, p, size, sizeof(struct vbi_data_hdr));
cx                210 drivers/media/pci/cx18/cx18-vbi.c 		memcpy(p, &cx->vbi.frame, 4);
cx                211 drivers/media/pci/cx18/cx18-vbi.c 		cx->vbi.frame++;
cx                220 drivers/media/pci/cx18/cx18-vbi.c 	lines = compress_sliced_buf(cx, p, size, sizeof(struct vbi_data_hdr));
cx                224 drivers/media/pci/cx18/cx18-vbi.c 		cx->vbi.sliced_data[0].id = 0;
cx                225 drivers/media/pci/cx18/cx18-vbi.c 		cx->vbi.sliced_data[0].line = 0;
cx                226 drivers/media/pci/cx18/cx18-vbi.c 		cx->vbi.sliced_data[0].field = 0;
cx                229 drivers/media/pci/cx18/cx18-vbi.c 	buf->bytesused = size = lines * sizeof(cx->vbi.sliced_data[0]);
cx                230 drivers/media/pci/cx18/cx18-vbi.c 	memcpy(p, &cx->vbi.sliced_data[0], size);
cx                232 drivers/media/pci/cx18/cx18-vbi.c 	if (cx->vbi.insert_mpeg)
cx                233 drivers/media/pci/cx18/cx18-vbi.c 		copy_vbi_data(cx, lines, pts);
cx                234 drivers/media/pci/cx18/cx18-vbi.c 	cx->vbi.frame++;
cx                237 drivers/media/pci/cx18/cx18-vbi.c void cx18_process_vbi_data(struct cx18 *cx, struct cx18_mdl *mdl,
cx                260 drivers/media/pci/cx18/cx18-vbi.c 		_cx18_process_vbi_data(cx, buf);
cx                 10 drivers/media/pci/cx18/cx18-vbi.h void cx18_process_vbi_data(struct cx18 *cx, struct cx18_mdl *mdl,
cx                 12 drivers/media/pci/cx18/cx18-vbi.h int cx18_used_line(struct cx18 *cx, int line, int field);
cx                 12 drivers/media/pci/cx18/cx18-video.c void cx18_video_set_io(struct cx18 *cx)
cx                 14 drivers/media/pci/cx18/cx18-video.c 	int inp = cx->active_input;
cx                 16 drivers/media/pci/cx18/cx18-video.c 	v4l2_subdev_call(cx->sd_av, video, s_routing,
cx                 17 drivers/media/pci/cx18/cx18-video.c 			cx->card->video_inputs[inp].video_input, 0, 0);
cx                  8 drivers/media/pci/cx18/cx18-video.h void cx18_video_set_io(struct cx18 *cx);
cx                216 drivers/media/pci/cx23885/cx23885-input.c 	if (kernel_ir->cx == NULL)
cx                219 drivers/media/pci/cx23885/cx23885-input.c 	return cx23885_input_ir_start(kernel_ir->cx);
cx                254 drivers/media/pci/cx23885/cx23885-input.c 	if (kernel_ir->cx != NULL)
cx                255 drivers/media/pci/cx23885/cx23885-input.c 		cx23885_input_ir_stop(kernel_ir->cx);
cx                334 drivers/media/pci/cx23885/cx23885-input.c 	kernel_ir->cx = dev;
cx                316 drivers/media/pci/cx23885/cx23885.h 	struct cx23885_dev	*cx;
cx                359 drivers/mtd/maps/vmu-flash.c 	unsigned char cx;
cx                400 drivers/mtd/maps/vmu-flash.c 			cx = vmu_flash_read_char(from + index, &retval, mtd);
cx                404 drivers/mtd/maps/vmu-flash.c 				return cx;
cx                406 drivers/mtd/maps/vmu-flash.c 			memset(buf + index, cx, 1);
cx                482 drivers/net/plip/plip.c 	unsigned int cx;
cx                486 drivers/net/plip/plip.c 		cx = nibble_timeout;
cx                495 drivers/net/plip/plip.c 			if (--cx == 0)
cx                504 drivers/net/plip/plip.c 		cx = nibble_timeout;
cx                513 drivers/net/plip/plip.c 			if (--cx == 0)
cx                707 drivers/net/plip/plip.c 	unsigned int cx;
cx                717 drivers/net/plip/plip.c 		cx = nibble_timeout;
cx                722 drivers/net/plip/plip.c 			if (--cx == 0)
cx                732 drivers/net/plip/plip.c 		cx = nibble_timeout;
cx                737 drivers/net/plip/plip.c 			if (--cx == 0)
cx                755 drivers/net/plip/plip.c 	unsigned int cx;
cx                771 drivers/net/plip/plip.c 		cx = nl->trigger;
cx                806 drivers/net/plip/plip.c 			if (--cx == 0) {
cx                 81 drivers/s390/char/tty3270.c 	unsigned int cx, cy;		/* Current output position. */
cx               1090 drivers/s390/char/tty3270.c 	if (line->len <= tp->cx) {
cx               1091 drivers/s390/char/tty3270.c 		while (line->len < tp->cx) {
cx               1100 drivers/s390/char/tty3270.c 	cell = line->cells + tp->cx;
cx               1219 drivers/s390/char/tty3270.c 	tp->cx = 0;
cx               1265 drivers/s390/char/tty3270.c 	while (line->len < tp->cx) {
cx               1271 drivers/s390/char/tty3270.c 	if (n > tp->view.cols - tp->cx)
cx               1272 drivers/s390/char/tty3270.c 		n = tp->view.cols - tp->cx;
cx               1273 drivers/s390/char/tty3270.c 	k = min_t(int, line->len - tp->cx, tp->view.cols - tp->cx - n);
cx               1275 drivers/s390/char/tty3270.c 		line->cells[tp->cx + n + k] = line->cells[tp->cx + k];
cx               1280 drivers/s390/char/tty3270.c 		line->cells[tp->cx + n].character = tp->view.ascebc[' '];
cx               1281 drivers/s390/char/tty3270.c 		line->cells[tp->cx + n].highlight = tp->highlight;
cx               1282 drivers/s390/char/tty3270.c 		line->cells[tp->cx + n].f_color = tp->f_color;
cx               1296 drivers/s390/char/tty3270.c 	if (line->len <= tp->cx)
cx               1298 drivers/s390/char/tty3270.c 	if (line->len - tp->cx <= n) {
cx               1299 drivers/s390/char/tty3270.c 		line->len = tp->cx;
cx               1302 drivers/s390/char/tty3270.c 	for (i = tp->cx; i + n < line->len; i++)
cx               1317 drivers/s390/char/tty3270.c 	while (line->len > tp->cx && n-- > 0) {
cx               1318 drivers/s390/char/tty3270.c 		cell = line->cells + tp->cx++;
cx               1323 drivers/s390/char/tty3270.c 	tp->cx += n;
cx               1324 drivers/s390/char/tty3270.c 	tp->cx = min_t(int, tp->cx, tp->view.cols - 1);
cx               1342 drivers/s390/char/tty3270.c 		line->len = tp->cx;
cx               1344 drivers/s390/char/tty3270.c 		for (i = 0; i < tp->cx; i++) {
cx               1350 drivers/s390/char/tty3270.c 		if (line->len <= tp->cx)
cx               1351 drivers/s390/char/tty3270.c 			line->len = tp->cx + 1;
cx               1454 drivers/s390/char/tty3270.c tty3270_goto_xy(struct tty3270 *tp, int cx, int cy)
cx               1456 drivers/s390/char/tty3270.c 	int max_cx = max(0, cx);
cx               1459 drivers/s390/char/tty3270.c 	tp->cx = min_t(int, tp->view.cols - 1, max_cx);
cx               1518 drivers/s390/char/tty3270.c 			tp->saved_cx = tp->cx;
cx               1530 drivers/s390/char/tty3270.c 			tp->cx = tp->saved_cx = 0;
cx               1564 drivers/s390/char/tty3270.c 			sprintf(buf, "\033[%d;%dR", tp->cy + 1, tp->cx + 1);
cx               1581 drivers/s390/char/tty3270.c 		tty3270_goto_xy(tp, tp->cx, tty3270_getpar(tp, 0) - 1);
cx               1585 drivers/s390/char/tty3270.c 		tty3270_goto_xy(tp, tp->cx, tp->cy - tty3270_getpar(tp, 0));
cx               1590 drivers/s390/char/tty3270.c 		tty3270_goto_xy(tp, tp->cx, tp->cy + tty3270_getpar(tp, 0));
cx               1594 drivers/s390/char/tty3270.c 		tty3270_goto_xy(tp, tp->cx + tty3270_getpar(tp, 0), tp->cy);
cx               1597 drivers/s390/char/tty3270.c 		tty3270_goto_xy(tp, tp->cx - tty3270_getpar(tp, 0), tp->cy);
cx               1619 drivers/s390/char/tty3270.c 		tp->saved_cx = tp->cx;
cx               1655 drivers/s390/char/tty3270.c 			if (tp->cx > 0) {
cx               1656 drivers/s390/char/tty3270.c 				tp->cx--;
cx               1661 drivers/s390/char/tty3270.c 			for (i = tp->cx % 8; i < 8; i++) {
cx               1662 drivers/s390/char/tty3270.c 				if (tp->cx >= tp->view.cols) {
cx               1668 drivers/s390/char/tty3270.c 				tp->cx++;
cx               1677 drivers/s390/char/tty3270.c 			tp->cx = tp->cy = 0;
cx               1680 drivers/s390/char/tty3270.c 			tp->cx = 0;
cx               1688 drivers/s390/char/tty3270.c 			if (tp->cx >= tp->view.cols) {
cx               1693 drivers/s390/char/tty3270.c 			tp->cx++;
cx               1841 drivers/s390/char/tty3270.c 	tp->cx = tp->saved_cx = 0;
cx                 59 drivers/xen/xen-acpi-processor.c 	struct acpi_processor_cx *cx;
cx                 69 drivers/xen/xen-acpi-processor.c 		cx = &_pr->power.states[i];
cx                 70 drivers/xen/xen-acpi-processor.c 		if (!cx->valid)
cx                 76 drivers/xen/xen-acpi-processor.c 		if (cx->entry_method == ACPI_CSTATE_SYSTEMIO) {
cx                 82 drivers/xen/xen-acpi-processor.c 			if (cx->entry_method == ACPI_CSTATE_FFH) {
cx                 89 drivers/xen/xen-acpi-processor.c 		dst_cx->reg.address = cx->address;
cx                 91 drivers/xen/xen-acpi-processor.c 		dst_cx->type = cx->type;
cx                 92 drivers/xen/xen-acpi-processor.c 		dst_cx->latency = cx->latency;
cx                117 drivers/xen/xen-acpi-processor.c 			cx = &_pr->power.states[i];
cx                118 drivers/xen/xen-acpi-processor.c 			if (!cx->valid)
cx                121 drivers/xen/xen-acpi-processor.c 				 cx->type, cx->desc, (u32)cx->latency);
cx                131 fs/orangefs/super.c 	struct orangefs_cached_xattr *cx;
cx                135 fs/orangefs/super.c 	hash_for_each_safe(orangefs_inode->xattr_cache, i, tmp, cx, node) {
cx                136 fs/orangefs/super.c 		hlist_del(&cx->node);
cx                137 fs/orangefs/super.c 		kfree(cx);
cx                 66 fs/orangefs/xattr.c 	struct orangefs_cached_xattr *cx;
cx                 72 fs/orangefs/xattr.c 	hlist_for_each_entry_safe(cx, tmp, h, node) {
cx                 78 fs/orangefs/xattr.c 		if (!strcmp(cx->key, key))
cx                 79 fs/orangefs/xattr.c 			return cx;
cx                 98 fs/orangefs/xattr.c 	struct orangefs_cached_xattr *cx;
cx                127 fs/orangefs/xattr.c 	cx = find_cached_xattr(inode, name);
cx                128 fs/orangefs/xattr.c 	if (cx && time_before(jiffies, cx->timeout)) {
cx                129 fs/orangefs/xattr.c 		if (cx->length == -1) {
cx                134 fs/orangefs/xattr.c 				ret = cx->length;
cx                137 fs/orangefs/xattr.c 			if (cx->length > size) {
cx                141 fs/orangefs/xattr.c 			memcpy(buffer, cx->val, cx->length);
cx                142 fs/orangefs/xattr.c 			memset(buffer + cx->length, 0, size - cx->length);
cx                143 fs/orangefs/xattr.c 			ret = cx->length;
cx                172 fs/orangefs/xattr.c 			cx = kmalloc(sizeof *cx, GFP_KERNEL);
cx                173 fs/orangefs/xattr.c 			if (cx) {
cx                174 fs/orangefs/xattr.c 				strcpy(cx->key, name);
cx                175 fs/orangefs/xattr.c 				cx->length = -1;
cx                176 fs/orangefs/xattr.c 				cx->timeout = jiffies +
cx                178 fs/orangefs/xattr.c 				hash_add(orangefs_inode->xattr_cache, &cx->node,
cx                179 fs/orangefs/xattr.c 				    xattr_key(cx->key));
cx                220 fs/orangefs/xattr.c 	if (cx) {
cx                221 fs/orangefs/xattr.c 		strcpy(cx->key, name);
cx                222 fs/orangefs/xattr.c 		memcpy(cx->val, buffer, length);
cx                223 fs/orangefs/xattr.c 		cx->length = length;
cx                224 fs/orangefs/xattr.c 		cx->timeout = jiffies + HZ;
cx                226 fs/orangefs/xattr.c 		cx = kmalloc(sizeof *cx, GFP_KERNEL);
cx                227 fs/orangefs/xattr.c 		if (cx) {
cx                228 fs/orangefs/xattr.c 			strcpy(cx->key, name);
cx                229 fs/orangefs/xattr.c 			memcpy(cx->val, buffer, length);
cx                230 fs/orangefs/xattr.c 			cx->length = length;
cx                231 fs/orangefs/xattr.c 			cx->timeout = jiffies + HZ;
cx                232 fs/orangefs/xattr.c 			hash_add(orangefs_inode->xattr_cache, &cx->node,
cx                233 fs/orangefs/xattr.c 			    xattr_key(cx->key));
cx                249 fs/orangefs/xattr.c 	struct orangefs_cached_xattr *cx;
cx                295 fs/orangefs/xattr.c 	hlist_for_each_entry_safe(cx, tmp, h, node) {
cx                296 fs/orangefs/xattr.c 		if (!strcmp(cx->key, name)) {
cx                297 fs/orangefs/xattr.c 			hlist_del(&cx->node);
cx                298 fs/orangefs/xattr.c 			kfree(cx);
cx                320 fs/orangefs/xattr.c 	struct orangefs_cached_xattr *cx;
cx                386 fs/orangefs/xattr.c 	hlist_for_each_entry_safe(cx, tmp, h, node) {
cx                387 fs/orangefs/xattr.c 		if (!strcmp(cx->key, name)) {
cx                388 fs/orangefs/xattr.c 			hlist_del(&cx->node);
cx                389 fs/orangefs/xattr.c 			kfree(cx);
cx                275 include/acpi/processor.h 				    struct acpi_processor_cx *cx,
cx                287 include/acpi/processor.h 						  struct acpi_processor_cx *cx,
cx                892 scripts/kconfig/gconf.c 	gint cx, cy;
cx                894 scripts/kconfig/gconf.c 	gtk_tree_view_get_path_at_pos(view, tx, ty, &path, &column, &cx,
cx               1008 scripts/kconfig/gconf.c 	gint cx, cy;
cx               1010 scripts/kconfig/gconf.c 	gtk_tree_view_get_path_at_pos(view, tx, ty, &path, &column, &cx,
cx                 71 tools/perf/arch/x86/util/perf_regs.c 	SDT_NAME_REG(ecx, cx),
cx                 72 tools/perf/arch/x86/util/perf_regs.c 	SDT_NAME_REG(rcx, cx),
cx                 73 tools/perf/arch/x86/util/perf_regs.c 	SDT_NAME_REG(cl,  cx),
cx                 74 tools/perf/arch/x86/util/perf_regs.c 	SDT_NAME_REG(ch,  cx),
cx                376 tools/testing/selftests/bpf/bpf_helpers.h #define PT_REGS_PARM4(x) ((x)->cx)
cx                 11 tools/testing/selftests/x86/check_initial_reg_state.c unsigned long ax, bx, cx, dx, si, di, bp, sp, flags;
cx                 63 tools/testing/selftests/x86/check_initial_reg_state.c 	if (ax || bx || cx || dx || si || di || bp
cx                 72 tools/testing/selftests/x86/check_initial_reg_state.c 		SHOW(cx);