diff options
Diffstat (limited to 'include/soc/sprd/__sprd_audio_power.h')
| -rw-r--r-- | include/soc/sprd/__sprd_audio_power.h | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/include/soc/sprd/__sprd_audio_power.h b/include/soc/sprd/__sprd_audio_power.h new file mode 100644 index 00000000..33219b82 --- /dev/null +++ b/include/soc/sprd/__sprd_audio_power.h @@ -0,0 +1,53 @@ +/* + * Copyright (C) 2013 Spreadtrum Communications Inc. + * + * This software is licensed under the terms of the GNU General Public + * License version 2, as published by the Free Software Foundation, and + * may be copied, distributed, and modified under those terms. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#ifndef __ASM_ARCH_AUDIO_POWER_H +#define __ASM_ARCH_AUDIO_POWER_H + +#define FIXED_AUDIO_POWER 1 + +/* power setting */ +static inline int arch_audio_power_write_mask(int reg, int val, int mask) +{ + int ret = 0; + +#if FIXED_AUDIO_POWER + ret = arch_audio_codec_write_mask(reg, val, mask); +#endif + + return ret; +} + +static inline int arch_audio_power_write(int reg, int val) +{ + int ret = 0; + +#if FIXED_AUDIO_POWER + ret = arch_audio_codec_write(reg, val); +#endif + + return ret; +} + +static inline int arch_audio_power_read(int reg) +{ + int ret = 0; + +#if FIXED_AUDIO_POWER + ret = arch_audio_codec_read(reg); +#endif + + return ret; +} + +#endif |
