PageRenderTime 28ms CodeModel.GetById 23ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/include/linux/mfd/marimba-codec.h

https://github.com/airy09/android_kernel_sony_apq8064
C Header | 52 lines | 33 code | 7 blank | 12 comment | 0 complexity | 8ed5e09c487d11b656b2f1d98f1ad030 MD5 | raw file
 1/* Copyright (c) 2009, 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 __LINUX_MFD_MSM_MARIMBA_CODEC_H
14#define __LINUX_MFD_MSM_MARIMBA_CODEC_H
15
16#include <mach/qdsp5v2/adie_marimba.h>
17
18struct adie_codec_register {
19	u8 reg;
20	u8 mask;
21	u8 val;
22};
23
24struct adie_codec_register_image {
25	struct adie_codec_register *regs;
26	u32 img_sz;
27};
28
29struct adie_codec_path {
30	struct adie_codec_dev_profile *profile;
31	struct adie_codec_register_image img;
32	u32 hwsetting_idx;
33	u32 stage_idx;
34	u32 curr_stage;
35};
36
37int adie_codec_open(struct adie_codec_dev_profile *profile,
38	struct adie_codec_path **path_pptr);
39int adie_codec_setpath(struct adie_codec_path *path_ptr,
40	u32 freq_plan, u32 osr);
41int adie_codec_proceed_stage(struct adie_codec_path *path_ptr, u32 state);
42int adie_codec_close(struct adie_codec_path *path_ptr);
43u32 adie_codec_freq_supported(struct adie_codec_dev_profile *profile,
44							u32 requested_freq);
45int adie_codec_enable_sidetone(struct adie_codec_path *rx_path_ptr, u32 enable);
46
47int adie_codec_set_device_digital_volume(struct adie_codec_path *path_ptr,
48		u32 num_channels, u32 vol_percentage /* in percentage */);
49
50int adie_codec_set_device_analog_volume(struct adie_codec_path *path_ptr,
51		u32 num_channels, u32 volume /* in percentage */);
52#endif