blob: 60b03389b79351d3d8d60f8452af57b13fe64ca4 [file] [log] [blame]
Evgeniy Borisov960b9a32018-09-07 14:57:23 +03001/* Copyright (c) 2018, The Linux Foundation. All rights reserved.
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License version 2 and
5 * only version 2 as published by the Free Software Foundation.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
11 */
12
13#ifndef __ADSP_SHMEM_DEVICE_H_
14#define __ADSP_SHMEM_DEVICE_H_
15
16#define ADSP_VFE 0
17#define ADSP_CSID 0
18#define ADSP_CCI 0
19
20enum camera_status_state {
21 CAMERA_STATUS_STOP = 1234,
22 CAMERA_STATUS_INIT,
23 CAMERA_STATUS_START,
24 CAMERA_STATUS_END,
25};
26
27struct adsp_camera_header {
28 unsigned short debug;
29 unsigned short status;
30 uint32_t frame_idx;
31 char sensor_name[32];
32 unsigned short width;
33 unsigned short height;
34 unsigned short stride;
35 unsigned short format;
36 uint32_t frame_size;
37 unsigned short data_type;
38 uint32_t header_size;
39 char printf_buf; /* last */
40};
41
42int adsp_shmem_get_state(void);
43void adsp_shmem_set_state(enum camera_status_state state);
44const char *adsp_shmem_get_sensor_name(void);
45int adsp_shmem_is_initialized(void);
46
47/* true if ADSP is initialized AND in state INIT or START */
48int adsp_shmem_is_working(void);
49
50#endif /* __ADSP_SHMEM_DEVICE_H_ */