Lines Matching full:effect

2496 		/* find current slot for effect */  in hidpp_ff_work_handler()
2516 /* regular effect uploaded */ in hidpp_ff_work_handler()
2525 /* regular effect destroyed */ in hidpp_ff_work_handler()
2573 static int hidpp_ff_upload_effect(struct input_dev *dev, struct ff_effect *effect, struct ff_effect… in hidpp_ff_upload_effect() argument
2581 params[2] = effect->replay.length >> 8; in hidpp_ff_upload_effect()
2582 params[3] = effect->replay.length & 255; in hidpp_ff_upload_effect()
2583 params[4] = effect->replay.delay >> 8; in hidpp_ff_upload_effect()
2584 params[5] = effect->replay.delay & 255; in hidpp_ff_upload_effect()
2586 switch (effect->type) { in hidpp_ff_upload_effect()
2588 force = (effect->u.constant.level * fixp_sin16((effect->direction * 360) >> 16)) >> 15; in hidpp_ff_upload_effect()
2592 params[8] = effect->u.constant.envelope.attack_level >> 7; in hidpp_ff_upload_effect()
2593 params[9] = effect->u.constant.envelope.attack_length >> 8; in hidpp_ff_upload_effect()
2594 params[10] = effect->u.constant.envelope.attack_length & 255; in hidpp_ff_upload_effect()
2595 params[11] = effect->u.constant.envelope.fade_level >> 7; in hidpp_ff_upload_effect()
2596 params[12] = effect->u.constant.envelope.fade_length >> 8; in hidpp_ff_upload_effect()
2597 params[13] = effect->u.constant.envelope.fade_length & 255; in hidpp_ff_upload_effect()
2600 effect->u.constant.level, in hidpp_ff_upload_effect()
2601 effect->direction, force); in hidpp_ff_upload_effect()
2603 effect->u.constant.envelope.attack_level, in hidpp_ff_upload_effect()
2604 effect->u.constant.envelope.attack_length, in hidpp_ff_upload_effect()
2605 effect->u.constant.envelope.fade_level, in hidpp_ff_upload_effect()
2606 effect->u.constant.envelope.fade_length); in hidpp_ff_upload_effect()
2610 switch (effect->u.periodic.waveform) { in hidpp_ff_upload_effect()
2627 …hid_err(data->hidpp->hid_dev, "Unexpected periodic waveform type %i!\n", effect->u.periodic.wavefo… in hidpp_ff_upload_effect()
2630 force = (effect->u.periodic.magnitude * fixp_sin16((effect->direction * 360) >> 16)) >> 15; in hidpp_ff_upload_effect()
2631 params[6] = effect->u.periodic.magnitude >> 8; in hidpp_ff_upload_effect()
2632 params[7] = effect->u.periodic.magnitude & 255; in hidpp_ff_upload_effect()
2633 params[8] = effect->u.periodic.offset >> 8; in hidpp_ff_upload_effect()
2634 params[9] = effect->u.periodic.offset & 255; in hidpp_ff_upload_effect()
2635 params[10] = effect->u.periodic.period >> 8; in hidpp_ff_upload_effect()
2636 params[11] = effect->u.periodic.period & 255; in hidpp_ff_upload_effect()
2637 params[12] = effect->u.periodic.phase >> 8; in hidpp_ff_upload_effect()
2638 params[13] = effect->u.periodic.phase & 255; in hidpp_ff_upload_effect()
2639 params[14] = effect->u.periodic.envelope.attack_level >> 7; in hidpp_ff_upload_effect()
2640 params[15] = effect->u.periodic.envelope.attack_length >> 8; in hidpp_ff_upload_effect()
2641 params[16] = effect->u.periodic.envelope.attack_length & 255; in hidpp_ff_upload_effect()
2642 params[17] = effect->u.periodic.envelope.fade_level >> 7; in hidpp_ff_upload_effect()
2643 params[18] = effect->u.periodic.envelope.fade_length >> 8; in hidpp_ff_upload_effect()
2644 params[19] = effect->u.periodic.envelope.fade_length & 255; in hidpp_ff_upload_effect()
2647 effect->u.periodic.magnitude, effect->direction, in hidpp_ff_upload_effect()
2648 effect->u.periodic.offset, in hidpp_ff_upload_effect()
2649 effect->u.periodic.period, in hidpp_ff_upload_effect()
2650 effect->u.periodic.phase); in hidpp_ff_upload_effect()
2652 effect->u.periodic.envelope.attack_level, in hidpp_ff_upload_effect()
2653 effect->u.periodic.envelope.attack_length, in hidpp_ff_upload_effect()
2654 effect->u.periodic.envelope.fade_level, in hidpp_ff_upload_effect()
2655 effect->u.periodic.envelope.fade_length); in hidpp_ff_upload_effect()
2660 force = (effect->u.ramp.start_level * fixp_sin16((effect->direction * 360) >> 16)) >> 15; in hidpp_ff_upload_effect()
2663 force = (effect->u.ramp.end_level * fixp_sin16((effect->direction * 360) >> 16)) >> 15; in hidpp_ff_upload_effect()
2666 params[10] = effect->u.ramp.envelope.attack_level >> 7; in hidpp_ff_upload_effect()
2667 params[11] = effect->u.ramp.envelope.attack_length >> 8; in hidpp_ff_upload_effect()
2668 params[12] = effect->u.ramp.envelope.attack_length & 255; in hidpp_ff_upload_effect()
2669 params[13] = effect->u.ramp.envelope.fade_level >> 7; in hidpp_ff_upload_effect()
2670 params[14] = effect->u.ramp.envelope.fade_length >> 8; in hidpp_ff_upload_effect()
2671 params[15] = effect->u.ramp.envelope.fade_length & 255; in hidpp_ff_upload_effect()
2674 effect->u.ramp.start_level, in hidpp_ff_upload_effect()
2675 effect->u.ramp.end_level, in hidpp_ff_upload_effect()
2676 effect->direction, force); in hidpp_ff_upload_effect()
2678 effect->u.ramp.envelope.attack_level, in hidpp_ff_upload_effect()
2679 effect->u.ramp.envelope.attack_length, in hidpp_ff_upload_effect()
2680 effect->u.ramp.envelope.fade_level, in hidpp_ff_upload_effect()
2681 effect->u.ramp.envelope.fade_length); in hidpp_ff_upload_effect()
2687 params[1] = HIDPP_FF_CONDITION_CMDS[effect->type - FF_SPRING]; in hidpp_ff_upload_effect()
2688 params[6] = effect->u.condition[0].left_saturation >> 9; in hidpp_ff_upload_effect()
2689 params[7] = (effect->u.condition[0].left_saturation >> 1) & 255; in hidpp_ff_upload_effect()
2690 params[8] = effect->u.condition[0].left_coeff >> 8; in hidpp_ff_upload_effect()
2691 params[9] = effect->u.condition[0].left_coeff & 255; in hidpp_ff_upload_effect()
2692 params[10] = effect->u.condition[0].deadband >> 9; in hidpp_ff_upload_effect()
2693 params[11] = (effect->u.condition[0].deadband >> 1) & 255; in hidpp_ff_upload_effect()
2694 params[12] = effect->u.condition[0].center >> 8; in hidpp_ff_upload_effect()
2695 params[13] = effect->u.condition[0].center & 255; in hidpp_ff_upload_effect()
2696 params[14] = effect->u.condition[0].right_coeff >> 8; in hidpp_ff_upload_effect()
2697 params[15] = effect->u.condition[0].right_coeff & 255; in hidpp_ff_upload_effect()
2698 params[16] = effect->u.condition[0].right_saturation >> 9; in hidpp_ff_upload_effect()
2699 params[17] = (effect->u.condition[0].right_saturation >> 1) & 255; in hidpp_ff_upload_effect()
2702 HIDPP_FF_CONDITION_NAMES[effect->type - FF_SPRING], in hidpp_ff_upload_effect()
2703 effect->u.condition[0].left_coeff, in hidpp_ff_upload_effect()
2704 effect->u.condition[0].left_saturation, in hidpp_ff_upload_effect()
2705 effect->u.condition[0].right_coeff, in hidpp_ff_upload_effect()
2706 effect->u.condition[0].right_saturation); in hidpp_ff_upload_effect()
2708 effect->u.condition[0].deadband, in hidpp_ff_upload_effect()
2709 effect->u.condition[0].center); in hidpp_ff_upload_effect()
2712 hid_err(data->hidpp->hid_dev, "Unexpected force type %i!\n", effect->type); in hidpp_ff_upload_effect()
2716 return hidpp_ff_queue_work(data, effect->id, HIDPP_FF_DOWNLOAD_EFFECT, params, size); in hidpp_ff_upload_effect()
2726 dbg_hid("St%sing playback of effect %d.\n", value?"art":"opp", effect_id); in hidpp_ff_playback()
2736 dbg_hid("Erasing effect %d.\n", effect_id); in hidpp_ff_erase_effect()
2748 /* start a standard spring effect */ in hidpp_ff_set_autocenter()