Duy Truong | e833aca | 2013-02-12 13:35:08 -0800 | [diff] [blame] | 1 | /* Copyright (c) 2012, The Linux Foundation. All rights reserved. |
Asish Bhattacharya | 656b7a2 | 2012-03-15 00:27:42 -0700 | [diff] [blame] | 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 __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 | */ |
| 22 | struct pm8xxx_spk_platform_data { |
| 23 | bool spk_add_enable; |
Asish Bhattacharya | 4c24bca | 2012-09-07 17:22:57 +0530 | [diff] [blame] | 24 | 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 Bhattacharya | 656b7a2 | 2012-03-15 00:27:42 -0700 | [diff] [blame] | 32 | }; |
| 33 | |
| 34 | /* |
| 35 | * pm8xxx_spk_mute - mute/unmute speaker pamp |
| 36 | * |
| 37 | * @mute: bool value for mute |
| 38 | */ |
| 39 | int pm8xxx_spk_mute(bool mute); |
| 40 | |
| 41 | /* |
| 42 | * pm8xxx_spk_gain - Set Speaker gain |
| 43 | * |
| 44 | * @gain: Speaker gain |
| 45 | */ |
| 46 | int pm8xxx_spk_gain(u8 gain); |
| 47 | |
| 48 | /* |
| 49 | * pm8xxx_spk_enable - Enable/Disable Speaker |
| 50 | * |
| 51 | * @enable: bool enable/disable Speaker |
| 52 | */ |
| 53 | int pm8xxx_spk_enable(int enable); |
| 54 | |
| 55 | #endif /* __SPK_PM8XXX_H__ */ |