blob: af2c7251a7992c0f38680fc75666727b179a877f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
|
/* include/uapi/linux/hwmmsqz.h
*
* Userspace API for Samsung MMSQZ driver
*
* Copyright (c) 2019 Samsung Electronics Co., Ltd.
* http://www.samsung.com
*
* Author: Jungik Seo <jungik.seo@samsung.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
#ifndef __HWMMSQZ_H__
#define __HWMMSQZ_H__
#include <linux/ioctl.h>
#include <linux/types.h>
#include <linux/hwjsqz.h>
#ifndef __cplusplus
#include <stdbool.h>
#endif
/*
* NOTE: THESE ENUMS ARE ALSO USED BY USERSPACE TO SPECIFY SETTINGS AND THEY'RE
* SUPPOSED TO WORK WITH FUTURE HARDWARE AS WELL (WHICH MAY OR MAY NOT
* SUPPORT ALL THE SETTINGS.
*
* FOR THAT REASON, YOU MUST NOT CHANGE THE ORDER OF VALUES,
* AND NEW VALUES MUST BE ADDED AT THE END OF THE ENUMS TO AVOID
* API BREAKAGES.
*/
/**
* @brief the video size
*/
struct hwMSQZ_video_info {
__u32 width; /**< width of the image */
__u32 height; /**< height of the image */
__u32 stride; /**<: stride of the image */
};
/**
* @brief the gyro data
*/
struct hwMSQZ_velocity {
__u32 vel_x; /**< Gyro X data */
__u32 vel_y; /**< Gyro Y data */
};
/**
* @brief the tune data of DC
*/
struct hwMSQZ_tune_dc {
unsigned short base; /**< Gyro X data */
unsigned char reduce; /**< Gyro X data */
unsigned char wshift; /**< Gyro X data */
};
/**
* @brief the tune data of Alpha
*/
struct hwMSQZ_tune_alpha {
short jnd;
short dqp;
};
/**
* @brief the tune data of DQP
*/
struct hwMSQZ_tune_dqp {
short dqp_max;
short dqp_min;
};
/**
* @brief the task information to be sent to the driver
*
* This is the struct holding all the task information that the driver needs
* to process a task.
*
* The client needs to fill it in with the necessary information and send it
* to the driver through the IOCTL.
*/
struct hwMSQZ_task {
struct hwMSQZ_video_info video_info; /**< info related to the video sent to the HW for processing */
struct hwMSQZ_velocity vel_info; /**< info related to gyro data sent to the HW for processing */
struct hwMSQZ_tune_dc dc_tune; /**< info related to tuning dc value sent to the HW for processing */
struct hwMSQZ_tune_alpha alpha_tune; /**< info related to tuning alpha value sent to the HW for processing */
struct hwMSQZ_tune_dqp dqp_tune; /**< info related to tuning dqp value sent to the HW for processing */
struct hwSQZ_buffer buf_in; /**< info related to the input buffer sent to the HW for processing */
struct hwSQZ_buffer buf_out; /**< info related to the output buffer sent to the HW for processing */
int frame_dqp; /**< frame average dqp */
};
#define HWMSQZ_IOC_PROCESS _IOWR('M', 1, struct hwMSQZ_task)
#endif // __HWJSQZ_H__
|