PageRenderTime 33ms CodeModel.GetById 17ms app.highlight 14ms RepoModel.GetById 0ms app.codeStats 0ms

/arch/arm/mach-msm/qdsp6v2/msm_qdsp6_audio.h

https://bitbucket.org/sammyz/iscream_thunderc-2.6.35-rebase
C++ Header | 52 lines | 28 code | 9 blank | 15 comment | 0 complexity | f682d93818684258ed165cd37bc15ca9 MD5 | raw file
Possible License(s): GPL-2.0, LGPL-2.0, AGPL-1.0
 1/* arch/arm/mach-msm/include/mach/msm_qdsp6_audio.h
 2 *
 3 * Copyright (C) 2009 Google, Inc.
 4 * Author: Brian Swetland <swetland@google.com>
 5 *
 6 * This software is licensed under the terms of the GNU General Public
 7 * License version 2, as published by the Free Software Foundation, and
 8 * may be copied, distributed, and modified under those terms.
 9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 * GNU General Public License for more details.
14 *
15 */
16
17#ifndef _MACH_MSM_QDSP6_Q6AUDIO_
18#define _MACH_MSM_QDSP6_Q6AUDIO_
19
20#define AUDIO_FLAG_READ		0
21#define AUDIO_FLAG_WRITE	1
22#define AUDIO_FLAG_INCALL_MIXED	2
23
24struct audio_buffer {
25	dma_addr_t phys;
26	void *data;
27	uint32_t size;
28	uint32_t used;	/* 1 = CPU is waiting for DSP to consume this buf */
29	uint32_t actual_size; /* actual number of bytes read by DSP */
30};
31
32struct audio_client {
33	struct audio_buffer buf[2];
34	int cpu_buf;	/* next buffer the CPU will touch */
35	int dsp_buf;	/* next buffer the DSP will touch */
36	int running;
37	int session;
38
39	int state;
40
41	wait_queue_head_t wait;
42	wait_queue_head_t cmd_wait;
43
44	struct dal_client *client;
45
46	int cb_status;
47	uint32_t flags;
48	void *apr;
49	int ref_count;
50};
51
52#endif