|
Linux Kernel
3.7.1
|
#include <linux/kernel.h>#include <linux/module.h>#include <linux/i2c.h>#include <linux/platform_device.h>#include <linux/mfd/88pm860x.h>#include <linux/slab.h>#include <linux/delay.h>#include <sound/core.h>#include <sound/pcm.h>#include <sound/pcm_params.h>#include <sound/soc.h>#include <sound/tlv.h>#include <sound/initval.h>#include <sound/jack.h>#include <trace/events/asoc.h>#include "88pm860x-codec.h"Go to the source code of this file.
Data Structures | |
| struct | pm860x_det |
| struct | pm860x_priv |
| struct | st_gain |
Macros | |
| #define | MAX_NAME_LEN 20 |
| #define | REG_CACHE_SIZE 0x40 |
| #define | REG_CACHE_BASE 0xb0 |
| #define | REG_STATUS_1 0x01 |
| #define | MIC_STATUS (1 << 7) |
| #define | HOOK_STATUS (1 << 6) |
| #define | HEADSET_STATUS (1 << 5) |
| #define | REG_MIC_DET 0x37 |
| #define | CONTINUOUS_POLLING (3 << 1) |
| #define | EN_MIC_DET (1 << 0) |
| #define | MICDET_MASK 0x07 |
| #define | REG_HS_DET 0x38 |
| #define | EN_HS_DET (1 << 0) |
| #define | REG_MISC2 0x42 |
| #define | AUDIO_PLL (1 << 5) |
| #define | AUDIO_SECTION_RESET (1 << 4) |
| #define | AUDIO_SECTION_ON (1 << 3) |
| #define | PCM_INF2_BCLK (1 << 6) /* Bit clock polarity */ |
| #define | PCM_INF2_FS (1 << 5) /* Frame Sync polarity */ |
| #define | PCM_INF2_MASTER (1 << 4) /* Master / Slave */ |
| #define | PCM_INF2_18WL (1 << 3) /* 18 / 16 bits */ |
| #define | PCM_GENERAL_I2S 0 |
| #define | PCM_EXACT_I2S 1 |
| #define | PCM_LEFT_I2S 2 |
| #define | PCM_RIGHT_I2S 3 |
| #define | PCM_SHORT_FS 4 |
| #define | PCM_LONG_FS 5 |
| #define | PCM_MODE_MASK 7 |
| #define | I2S_EQU_BYP (1 << 6) |
| #define | DAC_MUTE (1 << 7) |
| #define | MUTE_LEFT (1 << 6) |
| #define | MUTE_RIGHT (1 << 2) |
| #define | REG_ADC_ANA_1 0xd0 |
| #define | MIC1BIAS_MASK 0x60 |
| #define | REG_EAR2 0xda |
| #define | RSYNC_CHANGE (1 << 2) |
| #define | REG_SUPPLIES2 0xdc |
| #define | LDO15_READY (1 << 4) |
| #define | LDO15_EN (1 << 3) |
| #define | CPUMP_READY (1 << 2) |
| #define | CPUMP_EN (1 << 1) |
| #define | AUDIO_EN (1 << 0) |
| #define | SUPPLY_MASK (LDO15_EN | CPUMP_EN | AUDIO_EN) |
| #define | ADC_MOD_RIGHT (1 << 1) |
| #define | ADC_MOD_LEFT (1 << 0) |
| #define | ADC_LEFT (1 << 5) |
| #define | ADC_RIGHT (1 << 4) |
| #define | DAC_LEFT (1 << 5) |
| #define | DAC_RIGHT (1 << 4) |
| #define | MODULATOR (1 << 3) |
| #define | REG_SHORTS 0xeb |
| #define | CLR_SHORT_LO2 (1 << 7) |
| #define | SHORT_LO2 (1 << 6) |
| #define | CLR_SHORT_LO1 (1 << 5) |
| #define | SHORT_LO1 (1 << 4) |
| #define | CLR_SHORT_HS2 (1 << 3) |
| #define | SHORT_HS2 (1 << 2) |
| #define | CLR_SHORT_HS1 (1 << 1) |
| #define | SHORT_HS1 (1 << 0) |
| #define | PM860X_DAPM_OUTPUT(wname, wevent) |
| #define | PM860X_RATES |
Functions | |
| int | pm860x_hs_jack_detect (struct snd_soc_codec *codec, struct snd_soc_jack *jack, int det, int hook, int hs_shrt, int lo_shrt) |
| EXPORT_SYMBOL_GPL (pm860x_hs_jack_detect) | |
| int | pm860x_mic_jack_detect (struct snd_soc_codec *codec, struct snd_soc_jack *jack, int det) |
| EXPORT_SYMBOL_GPL (pm860x_mic_jack_detect) | |
| module_platform_driver (pm860x_codec_driver) | |
| MODULE_DESCRIPTION ("ASoC 88PM860x driver") | |
| MODULE_AUTHOR ("Haojian Zhuang <[email protected]>") | |
| MODULE_LICENSE ("GPL") | |
| MODULE_ALIAS ("platform:88pm860x-codec") | |
| #define ADC_LEFT (1 << 5) |
Definition at line 99 of file 88pm860x-codec.c.
| #define ADC_MOD_LEFT (1 << 0) |
Definition at line 96 of file 88pm860x-codec.c.
| #define ADC_MOD_RIGHT (1 << 1) |
Definition at line 95 of file 88pm860x-codec.c.
| #define ADC_RIGHT (1 << 4) |
Definition at line 100 of file 88pm860x-codec.c.
| #define AUDIO_EN (1 << 0) |
Definition at line 91 of file 88pm860x-codec.c.
| #define AUDIO_PLL (1 << 5) |
Definition at line 52 of file 88pm860x-codec.c.
| #define AUDIO_SECTION_ON (1 << 3) |
Definition at line 54 of file 88pm860x-codec.c.
| #define AUDIO_SECTION_RESET (1 << 4) |
Definition at line 53 of file 88pm860x-codec.c.
| #define CLR_SHORT_HS1 (1 << 1) |
Definition at line 115 of file 88pm860x-codec.c.
| #define CLR_SHORT_HS2 (1 << 3) |
Definition at line 113 of file 88pm860x-codec.c.
| #define CLR_SHORT_LO1 (1 << 5) |
Definition at line 111 of file 88pm860x-codec.c.
| #define CLR_SHORT_LO2 (1 << 7) |
Definition at line 109 of file 88pm860x-codec.c.
| #define CONTINUOUS_POLLING (3 << 1) |
Definition at line 42 of file 88pm860x-codec.c.
| #define CPUMP_EN (1 << 1) |
Definition at line 90 of file 88pm860x-codec.c.
| #define CPUMP_READY (1 << 2) |
Definition at line 89 of file 88pm860x-codec.c.
| #define DAC_LEFT (1 << 5) |
Definition at line 103 of file 88pm860x-codec.c.
| #define DAC_MUTE (1 << 7) |
Definition at line 73 of file 88pm860x-codec.c.
| #define DAC_RIGHT (1 << 4) |
Definition at line 104 of file 88pm860x-codec.c.
| #define EN_HS_DET (1 << 0) |
Definition at line 48 of file 88pm860x-codec.c.
| #define EN_MIC_DET (1 << 0) |
Definition at line 43 of file 88pm860x-codec.c.
| #define HEADSET_STATUS (1 << 5) |
Definition at line 38 of file 88pm860x-codec.c.
| #define HOOK_STATUS (1 << 6) |
Definition at line 37 of file 88pm860x-codec.c.
| #define I2S_EQU_BYP (1 << 6) |
Definition at line 70 of file 88pm860x-codec.c.
| #define LDO15_EN (1 << 3) |
Definition at line 88 of file 88pm860x-codec.c.
| #define LDO15_READY (1 << 4) |
Definition at line 87 of file 88pm860x-codec.c.
| #define MAX_NAME_LEN 20 |
Definition at line 30 of file 88pm860x-codec.c.
| #define MIC1BIAS_MASK 0x60 |
Definition at line 79 of file 88pm860x-codec.c.
| #define MIC_STATUS (1 << 7) |
Definition at line 36 of file 88pm860x-codec.c.
| #define MICDET_MASK 0x07 |
Definition at line 44 of file 88pm860x-codec.c.
| #define MODULATOR (1 << 3) |
Definition at line 105 of file 88pm860x-codec.c.
| #define MUTE_LEFT (1 << 6) |
Definition at line 74 of file 88pm860x-codec.c.
| #define MUTE_RIGHT (1 << 2) |
Definition at line 75 of file 88pm860x-codec.c.
| #define PCM_EXACT_I2S 1 |
Definition at line 62 of file 88pm860x-codec.c.
| #define PCM_GENERAL_I2S 0 |
Definition at line 61 of file 88pm860x-codec.c.
| #define PCM_INF2_18WL (1 << 3) /* 18 / 16 bits */ |
Definition at line 60 of file 88pm860x-codec.c.
Definition at line 57 of file 88pm860x-codec.c.
| #define PCM_INF2_FS (1 << 5) /* Frame Sync polarity */ |
Definition at line 58 of file 88pm860x-codec.c.
| #define PCM_INF2_MASTER (1 << 4) /* Master / Slave */ |
Definition at line 59 of file 88pm860x-codec.c.
| #define PCM_LEFT_I2S 2 |
Definition at line 63 of file 88pm860x-codec.c.
| #define PCM_LONG_FS 5 |
Definition at line 66 of file 88pm860x-codec.c.
| #define PCM_MODE_MASK 7 |
Definition at line 67 of file 88pm860x-codec.c.
| #define PCM_RIGHT_I2S 3 |
Definition at line 64 of file 88pm860x-codec.c.
| #define PCM_SHORT_FS 4 |
Definition at line 65 of file 88pm860x-codec.c.
| #define PM860X_DAPM_OUTPUT | ( | wname, | |
| wevent | |||
| ) |
Definition at line 122 of file 88pm860x-codec.c.
| #define PM860X_RATES |
Definition at line 1215 of file 88pm860x-codec.c.
| #define REG_ADC_ANA_1 0xd0 |
Definition at line 78 of file 88pm860x-codec.c.
| #define REG_CACHE_BASE 0xb0 |
Definition at line 32 of file 88pm860x-codec.c.
| #define REG_CACHE_SIZE 0x40 |
Definition at line 31 of file 88pm860x-codec.c.
| #define REG_EAR2 0xda |
Definition at line 82 of file 88pm860x-codec.c.
| #define REG_HS_DET 0x38 |
Definition at line 47 of file 88pm860x-codec.c.
| #define REG_MIC_DET 0x37 |
Definition at line 41 of file 88pm860x-codec.c.
| #define REG_MISC2 0x42 |
Definition at line 51 of file 88pm860x-codec.c.
| #define REG_SHORTS 0xeb |
Definition at line 108 of file 88pm860x-codec.c.
| #define REG_STATUS_1 0x01 |
Definition at line 35 of file 88pm860x-codec.c.
| #define REG_SUPPLIES2 0xdc |
Definition at line 86 of file 88pm860x-codec.c.
| #define RSYNC_CHANGE (1 << 2) |
Definition at line 83 of file 88pm860x-codec.c.
| #define SHORT_HS1 (1 << 0) |
Definition at line 116 of file 88pm860x-codec.c.
| #define SHORT_HS2 (1 << 2) |
Definition at line 114 of file 88pm860x-codec.c.
| #define SHORT_LO1 (1 << 4) |
Definition at line 112 of file 88pm860x-codec.c.
| #define SHORT_LO2 (1 << 6) |
Definition at line 110 of file 88pm860x-codec.c.
Definition at line 92 of file 88pm860x-codec.c.
| EXPORT_SYMBOL_GPL | ( | pm860x_hs_jack_detect | ) |
| EXPORT_SYMBOL_GPL | ( | pm860x_mic_jack_detect | ) |
| MODULE_ALIAS | ( | "platform:88pm860x-codec" | ) |
| MODULE_AUTHOR | ( | "Haojian Zhuang <[email protected]>" | ) |
| MODULE_DESCRIPTION | ( | "ASoC 88PM860x driver" | ) |
| MODULE_LICENSE | ( | "GPL" | ) |
| module_platform_driver | ( | pm860x_codec_driver | ) |
| int pm860x_hs_jack_detect | ( | struct snd_soc_codec * | codec, |
| struct snd_soc_jack * | jack, | ||
| int | det, | ||
| int | hook, | ||
| int | hs_shrt, | ||
| int | lo_shrt | ||
| ) |
Definition at line 1310 of file 88pm860x-codec.c.
| int pm860x_mic_jack_detect | ( | struct snd_soc_codec * | codec, |
| struct snd_soc_jack * | jack, | ||
| int | det | ||
| ) |
Definition at line 1343 of file 88pm860x-codec.c.
1.8.2