]>
git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blob - include/sound/qdsp6v2/apr_tal.h
1 /* Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
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.
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.
16 #include <linux/kernel.h>
17 #include <linux/kthread.h>
18 #include <linux/uaccess.h>
21 #define APR_CLIENT_AUDIO 0x0
22 #define APR_CLIENT_VOICE 0x1
23 #define APR_CLIENT_MAX 0x2
28 #define APR_DEST_MODEM 0
29 #define APR_DEST_QDSP6 1
30 #define APR_DEST_MAX 2
32 #define APR_MAX_BUF 8192
34 #define APR_OPEN_TIMEOUT_MS 5000
36 typedef void (*apr_svc_cb_fn
)(void *buf
, int len
, void *priv
);
37 struct apr_svc_ch_dev
*apr_tal_open(uint32_t svc
, uint32_t dest
,
38 uint32_t dl
, apr_svc_cb_fn func
, void *priv
);
39 int apr_tal_write(struct apr_svc_ch_dev
*apr_ch
, void *data
, int len
);
40 int apr_tal_close(struct apr_svc_ch_dev
*apr_ch
);
41 struct apr_svc_ch_dev
{
42 struct qcom_smd_channel
*ch
;
45 char data
[APR_MAX_BUF
];
46 wait_queue_head_t wait
;
48 wait_queue_head_t dest
;