Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
wm8996.c File Reference
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/init.h>
#include <linux/completion.h>
#include <linux/delay.h>
#include <linux/pm.h>
#include <linux/gcd.h>
#include <linux/gpio.h>
#include <linux/i2c.h>
#include <linux/regmap.h>
#include <linux/regulator/consumer.h>
#include <linux/slab.h>
#include <linux/workqueue.h>
#include <sound/core.h>
#include <sound/jack.h>
#include <sound/pcm.h>
#include <sound/pcm_params.h>
#include <sound/soc.h>
#include <sound/initval.h>
#include <sound/tlv.h>
#include <trace/events/asoc.h>
#include <sound/wm8996.h>
#include "wm8996.h"

Go to the source code of this file.

Data Structures

struct  wm8996_priv
 
struct  _fll_div
 

Macros

#define WM8996_AIFS   2
 
#define HPOUT1L   1
 
#define HPOUT1R   2
 
#define HPOUT2L   4
 
#define HPOUT2R   8
 
#define WM8996_NUM_SUPPLIES   3
 
#define WM8996_REGULATOR_EVENT(n)
 
#define WM8996_RATES
 
#define WM8996_FORMATS
 

Functions

int wm8996_detect (struct snd_soc_codec *codec, struct snd_soc_jack *jack, wm8996_polarity_fn polarity_cb)
 
 EXPORT_SYMBOL_GPL (wm8996_detect)
 
 MODULE_DEVICE_TABLE (i2c, wm8996_i2c_id)
 
 module_i2c_driver (wm8996_i2c_driver)
 
 MODULE_DESCRIPTION ("ASoC WM8996 driver")
 
 MODULE_AUTHOR ("Mark Brown <[email protected]>")
 
 MODULE_LICENSE ("GPL")
 

Macro Definition Documentation

#define HPOUT1L   1

Definition at line 40 of file wm8996.c.

#define HPOUT1R   2

Definition at line 41 of file wm8996.c.

#define HPOUT2L   4

Definition at line 42 of file wm8996.c.

#define HPOUT2R   8

Definition at line 43 of file wm8996.c.

#define WM8996_AIFS   2

Definition at line 38 of file wm8996.c.

#define WM8996_FORMATS
Value:
SNDRV_PCM_FMTBIT_S20_3LE | SNDRV_PCM_FMTBIT_S24_LE |\
SNDRV_PCM_FMTBIT_S32_LE)

Definition at line 2715 of file wm8996.c.

#define WM8996_NUM_SUPPLIES   3

Definition at line 45 of file wm8996.c.

#define WM8996_RATES
Value:
SNDRV_PCM_RATE_32000 | SNDRV_PCM_RATE_44100 |\
SNDRV_PCM_RATE_48000)

Definition at line 2712 of file wm8996.c.

#define WM8996_REGULATOR_EVENT (   n)
Value:
static int wm8996_regulator_event_##n(struct notifier_block *nb, \
unsigned long event, void *data) \
{ \
disable_nb[n]); \
regcache_mark_dirty(wm8996->regmap); \
} \
return 0; \
}

Definition at line 104 of file wm8996.c.

Function Documentation

EXPORT_SYMBOL_GPL ( wm8996_detect  )
MODULE_AUTHOR ( "Mark Brown <[email protected]>"  )
MODULE_DESCRIPTION ( "ASoC WM8996 driver )
MODULE_DEVICE_TABLE ( i2c  ,
wm8996_i2c_id   
)
module_i2c_driver ( wm8996_i2c_driver  )
MODULE_LICENSE ( "GPL"  )
int wm8996_detect ( struct snd_soc_codec codec,
struct snd_soc_jack jack,
wm8996_polarity_fn  polarity_cb 
)

wm8996_detect - Enable default WM8996 jack detection

The WM8996 has advanced accessory detection support for headsets. This function provides a default implementation which integrates the majority of this functionality with minimal user configuration.

This will detect headset, headphone and short circuit button and will also detect inverted microphone ground connections and update the polarity of the connections.

Definition at line 2248 of file wm8996.c.

Variable Documentation

u16 fll_fratio

Definition at line 1909 of file wm8996.c.

unsigned int max

Definition at line 1908 of file wm8996.c.

unsigned int min

Definition at line 1907 of file wm8996.c.

int ratio

Definition at line 1910 of file wm8996.c.