blob: 9835b85344545afda13c0fb75e5aca32b34fa805 [file] [log] [blame]
Duy Truonge833aca2013-02-12 13:35:08 -08001/* Copyright (c) 2012, The Linux Foundation. All rights reserved.
Asish Bhattacharya656b7a22012-03-15 00:27:42 -07002 *
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 __SPK_PM8XXX_H__
14#define __SPK_PM8XXX_H__
15
16#define PM8XXX_SPK_DEV_NAME "pm8xxx-spk"
17
18/**
19 * struct pm8xxx_spk_pdata - SPK driver platform data
20 * @spk_add_enable: variable stating SPK secondary input adding capability
21 */
22struct pm8xxx_spk_platform_data {
23 bool spk_add_enable;
Asish Bhattacharya4c24bca2012-09-07 17:22:57 +053024 int cd_ng_threshold;
25 int cd_nf_preamp_bias;
26 int cd_ng_hold;
27 int cd_ng_max_atten;
28 int noise_mute;
29 int cd_ng_decay_rate;
30 int cd_ng_attack_rate;
31 int cd_delay;
Asish Bhattacharya656b7a22012-03-15 00:27:42 -070032};
33
34/*
35 * pm8xxx_spk_mute - mute/unmute speaker pamp
36 *
37 * @mute: bool value for mute
38 */
39int pm8xxx_spk_mute(bool mute);
40
41/*
42 * pm8xxx_spk_gain - Set Speaker gain
43 *
44 * @gain: Speaker gain
45 */
46int pm8xxx_spk_gain(u8 gain);
47
48/*
49 * pm8xxx_spk_enable - Enable/Disable Speaker
50 *
51 * @enable: bool enable/disable Speaker
52 */
53int pm8xxx_spk_enable(int enable);
54
55#endif /* __SPK_PM8XXX_H__ */