]> bbs.cooldavid.org Git - net-next-2.6.git/blame - drivers/staging/dream/include/linux/msm_adsp.h
Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jwessel...
[net-next-2.6.git] / drivers / staging / dream / include / linux / msm_adsp.h
CommitLineData
e79753ed
PM
1/* drivers/staging/dream/include/linux/msm_adsp.h
2 *
3 * Copyright (c) QUALCOMM Incorporated
4 * Copyright (C) 2007 Google, Inc.
5 * Author: Iliyan Malchev <ibm@android.com>
6 *
7 * This software is licensed under the terms of the GNU General Public
8 * License version 2, as published by the Free Software Foundation, and
9 * may be copied, distributed, and modified under those terms.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 */
17#ifndef __LINUX_MSM_ADSP_H
18#define __LINUX_MSM_ADSP_H
19
20#include <linux/types.h>
21#include <linux/ioctl.h>
22
23#define ADSP_IOCTL_MAGIC 'q'
24
25/* ADSP_IOCTL_WRITE_COMMAND */
26struct adsp_command_t {
27 uint16_t queue;
28 uint32_t len; /* bytes */
29 uint8_t *data;
30};
31
32/* ADSP_IOCTL_GET_EVENT */
33struct adsp_event_t {
34 uint16_t type; /* 1 == event (RPC), 0 == message (adsp) */
35 uint32_t timeout_ms; /* -1 for infinite, 0 for immediate return */
36 uint16_t msg_id;
37 uint16_t flags; /* 1 == 16--bit event, 0 == 32-bit event */
38 uint32_t len; /* size in, number of bytes out */
39 uint8_t *data;
40};
41
42#define ADSP_IOCTL_ENABLE \
43 _IOR(ADSP_IOCTL_MAGIC, 1, unsigned)
44
45#define ADSP_IOCTL_DISABLE \
46 _IOR(ADSP_IOCTL_MAGIC, 2, unsigned)
47
48#define ADSP_IOCTL_DISABLE_ACK \
49 _IOR(ADSP_IOCTL_MAGIC, 3, unsigned)
50
51#define ADSP_IOCTL_WRITE_COMMAND \
52 _IOR(ADSP_IOCTL_MAGIC, 4, struct adsp_command_t *)
53
54#define ADSP_IOCTL_GET_EVENT \
55 _IOWR(ADSP_IOCTL_MAGIC, 5, struct adsp_event_data_t *)
56
57#define ADSP_IOCTL_SET_CLKRATE \
58 _IOR(ADSP_IOCTL_MAGIC, 6, unsigned)
59
60#define ADSP_IOCTL_DISABLE_EVENT_RSP \
61 _IOR(ADSP_IOCTL_MAGIC, 10, unsigned)
62
63struct adsp_pmem_info {
64 int fd;
65 void *vaddr;
66};
67
68#define ADSP_IOCTL_REGISTER_PMEM \
69 _IOW(ADSP_IOCTL_MAGIC, 13, unsigned)
70
71#define ADSP_IOCTL_UNREGISTER_PMEM \
72 _IOW(ADSP_IOCTL_MAGIC, 14, unsigned)
73
74/* Cause any further GET_EVENT ioctls to fail (-ENODEV)
75 * until the device is closed and reopened. Useful for
76 * terminating event dispatch threads
77 */
78#define ADSP_IOCTL_ABORT_EVENT_READ \
79 _IOW(ADSP_IOCTL_MAGIC, 15, unsigned)
80
81#define ADSP_IOCTL_LINK_TASK \
82 _IOW(ADSP_IOCTL_MAGIC, 16, unsigned)
83
84#endif