Lines Matching refs:effect

2294 static int hidpp_ff_upload_effect(struct input_dev *dev, struct ff_effect *effect, struct ff_effect…  in hidpp_ff_upload_effect()  argument
2302 params[2] = effect->replay.length >> 8; in hidpp_ff_upload_effect()
2303 params[3] = effect->replay.length & 255; in hidpp_ff_upload_effect()
2304 params[4] = effect->replay.delay >> 8; in hidpp_ff_upload_effect()
2305 params[5] = effect->replay.delay & 255; in hidpp_ff_upload_effect()
2307 switch (effect->type) { in hidpp_ff_upload_effect()
2309 force = (effect->u.constant.level * fixp_sin16((effect->direction * 360) >> 16)) >> 15; in hidpp_ff_upload_effect()
2313 params[8] = effect->u.constant.envelope.attack_level >> 7; in hidpp_ff_upload_effect()
2314 params[9] = effect->u.constant.envelope.attack_length >> 8; in hidpp_ff_upload_effect()
2315 params[10] = effect->u.constant.envelope.attack_length & 255; in hidpp_ff_upload_effect()
2316 params[11] = effect->u.constant.envelope.fade_level >> 7; in hidpp_ff_upload_effect()
2317 params[12] = effect->u.constant.envelope.fade_length >> 8; in hidpp_ff_upload_effect()
2318 params[13] = effect->u.constant.envelope.fade_length & 255; in hidpp_ff_upload_effect()
2321 effect->u.constant.level, in hidpp_ff_upload_effect()
2322 effect->direction, force); in hidpp_ff_upload_effect()
2324 effect->u.constant.envelope.attack_level, in hidpp_ff_upload_effect()
2325 effect->u.constant.envelope.attack_length, in hidpp_ff_upload_effect()
2326 effect->u.constant.envelope.fade_level, in hidpp_ff_upload_effect()
2327 effect->u.constant.envelope.fade_length); in hidpp_ff_upload_effect()
2331 switch (effect->u.periodic.waveform) { in hidpp_ff_upload_effect()
2348 …hid_err(data->hidpp->hid_dev, "Unexpected periodic waveform type %i!\n", effect->u.periodic.wavefo… in hidpp_ff_upload_effect()
2351 force = (effect->u.periodic.magnitude * fixp_sin16((effect->direction * 360) >> 16)) >> 15; in hidpp_ff_upload_effect()
2352 params[6] = effect->u.periodic.magnitude >> 8; in hidpp_ff_upload_effect()
2353 params[7] = effect->u.periodic.magnitude & 255; in hidpp_ff_upload_effect()
2354 params[8] = effect->u.periodic.offset >> 8; in hidpp_ff_upload_effect()
2355 params[9] = effect->u.periodic.offset & 255; in hidpp_ff_upload_effect()
2356 params[10] = effect->u.periodic.period >> 8; in hidpp_ff_upload_effect()
2357 params[11] = effect->u.periodic.period & 255; in hidpp_ff_upload_effect()
2358 params[12] = effect->u.periodic.phase >> 8; in hidpp_ff_upload_effect()
2359 params[13] = effect->u.periodic.phase & 255; in hidpp_ff_upload_effect()
2360 params[14] = effect->u.periodic.envelope.attack_level >> 7; in hidpp_ff_upload_effect()
2361 params[15] = effect->u.periodic.envelope.attack_length >> 8; in hidpp_ff_upload_effect()
2362 params[16] = effect->u.periodic.envelope.attack_length & 255; in hidpp_ff_upload_effect()
2363 params[17] = effect->u.periodic.envelope.fade_level >> 7; in hidpp_ff_upload_effect()
2364 params[18] = effect->u.periodic.envelope.fade_length >> 8; in hidpp_ff_upload_effect()
2365 params[19] = effect->u.periodic.envelope.fade_length & 255; in hidpp_ff_upload_effect()
2368 effect->u.periodic.magnitude, effect->direction, in hidpp_ff_upload_effect()
2369 effect->u.periodic.offset, in hidpp_ff_upload_effect()
2370 effect->u.periodic.period, in hidpp_ff_upload_effect()
2371 effect->u.periodic.phase); in hidpp_ff_upload_effect()
2373 effect->u.periodic.envelope.attack_level, in hidpp_ff_upload_effect()
2374 effect->u.periodic.envelope.attack_length, in hidpp_ff_upload_effect()
2375 effect->u.periodic.envelope.fade_level, in hidpp_ff_upload_effect()
2376 effect->u.periodic.envelope.fade_length); in hidpp_ff_upload_effect()
2381 force = (effect->u.ramp.start_level * fixp_sin16((effect->direction * 360) >> 16)) >> 15; in hidpp_ff_upload_effect()
2384 force = (effect->u.ramp.end_level * fixp_sin16((effect->direction * 360) >> 16)) >> 15; in hidpp_ff_upload_effect()
2387 params[10] = effect->u.ramp.envelope.attack_level >> 7; in hidpp_ff_upload_effect()
2388 params[11] = effect->u.ramp.envelope.attack_length >> 8; in hidpp_ff_upload_effect()
2389 params[12] = effect->u.ramp.envelope.attack_length & 255; in hidpp_ff_upload_effect()
2390 params[13] = effect->u.ramp.envelope.fade_level >> 7; in hidpp_ff_upload_effect()
2391 params[14] = effect->u.ramp.envelope.fade_length >> 8; in hidpp_ff_upload_effect()
2392 params[15] = effect->u.ramp.envelope.fade_length & 255; in hidpp_ff_upload_effect()
2395 effect->u.ramp.start_level, in hidpp_ff_upload_effect()
2396 effect->u.ramp.end_level, in hidpp_ff_upload_effect()
2397 effect->direction, force); in hidpp_ff_upload_effect()
2399 effect->u.ramp.envelope.attack_level, in hidpp_ff_upload_effect()
2400 effect->u.ramp.envelope.attack_length, in hidpp_ff_upload_effect()
2401 effect->u.ramp.envelope.fade_level, in hidpp_ff_upload_effect()
2402 effect->u.ramp.envelope.fade_length); in hidpp_ff_upload_effect()
2408 params[1] = HIDPP_FF_CONDITION_CMDS[effect->type - FF_SPRING]; in hidpp_ff_upload_effect()
2409 params[6] = effect->u.condition[0].left_saturation >> 9; in hidpp_ff_upload_effect()
2410 params[7] = (effect->u.condition[0].left_saturation >> 1) & 255; in hidpp_ff_upload_effect()
2411 params[8] = effect->u.condition[0].left_coeff >> 8; in hidpp_ff_upload_effect()
2412 params[9] = effect->u.condition[0].left_coeff & 255; in hidpp_ff_upload_effect()
2413 params[10] = effect->u.condition[0].deadband >> 9; in hidpp_ff_upload_effect()
2414 params[11] = (effect->u.condition[0].deadband >> 1) & 255; in hidpp_ff_upload_effect()
2415 params[12] = effect->u.condition[0].center >> 8; in hidpp_ff_upload_effect()
2416 params[13] = effect->u.condition[0].center & 255; in hidpp_ff_upload_effect()
2417 params[14] = effect->u.condition[0].right_coeff >> 8; in hidpp_ff_upload_effect()
2418 params[15] = effect->u.condition[0].right_coeff & 255; in hidpp_ff_upload_effect()
2419 params[16] = effect->u.condition[0].right_saturation >> 9; in hidpp_ff_upload_effect()
2420 params[17] = (effect->u.condition[0].right_saturation >> 1) & 255; in hidpp_ff_upload_effect()
2423 HIDPP_FF_CONDITION_NAMES[effect->type - FF_SPRING], in hidpp_ff_upload_effect()
2424 effect->u.condition[0].left_coeff, in hidpp_ff_upload_effect()
2425 effect->u.condition[0].left_saturation, in hidpp_ff_upload_effect()
2426 effect->u.condition[0].right_coeff, in hidpp_ff_upload_effect()
2427 effect->u.condition[0].right_saturation); in hidpp_ff_upload_effect()
2429 effect->u.condition[0].deadband, in hidpp_ff_upload_effect()
2430 effect->u.condition[0].center); in hidpp_ff_upload_effect()
2433 hid_err(data->hidpp->hid_dev, "Unexpected force type %i!\n", effect->type); in hidpp_ff_upload_effect()
2437 return hidpp_ff_queue_work(data, effect->id, HIDPP_FF_DOWNLOAD_EFFECT, params, size); in hidpp_ff_upload_effect()