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

Go to the source code of this file.

Data Structures

struct  wm2200_fll
 
struct  wm2200_priv
 
struct  _fll_div
 

Macros

#define WM2200_NUM_CORE_SUPPLIES   2
 
#define WM2200_MIXER_CONTROLS(name, base)
 
#define WM2200_MUX_ENUM_DECL(name, reg)
 
#define WM2200_MUX_CTL_DECL(name)
 
#define WM2200_MIXER_ENUMS(name, base_reg)
 
#define WM2200_MUX(name, ctrl)   SND_SOC_DAPM_VALUE_MUX(name, SND_SOC_NOPM, 0, 0, ctrl)
 
#define WM2200_MIXER_WIDGETS(name, name_str)
 
#define WM2200_MIXER_INPUT_ROUTES(name)
 
#define WM2200_MIXER_ROUTES(widget, name)
 
#define WM2200_NUM_BCLK_RATES   12
 
#define WM2200_RATES   SNDRV_PCM_RATE_8000_48000
 
#define WM2200_FORMATS
 

Functions

 WM2200_MIXER_ENUMS (OUT1L, WM2200_OUT1LMIX_INPUT_1_SOURCE)
 
 WM2200_MIXER_ENUMS (OUT1R, WM2200_OUT1RMIX_INPUT_1_SOURCE)
 
 WM2200_MIXER_ENUMS (OUT2L, WM2200_OUT2LMIX_INPUT_1_SOURCE)
 
 WM2200_MIXER_ENUMS (OUT2R, WM2200_OUT2RMIX_INPUT_1_SOURCE)
 
 WM2200_MIXER_ENUMS (AIF1TX1, WM2200_AIF1TX1MIX_INPUT_1_SOURCE)
 
 WM2200_MIXER_ENUMS (AIF1TX2, WM2200_AIF1TX2MIX_INPUT_1_SOURCE)
 
 WM2200_MIXER_ENUMS (AIF1TX3, WM2200_AIF1TX3MIX_INPUT_1_SOURCE)
 
 WM2200_MIXER_ENUMS (AIF1TX4, WM2200_AIF1TX4MIX_INPUT_1_SOURCE)
 
 WM2200_MIXER_ENUMS (AIF1TX5, WM2200_AIF1TX5MIX_INPUT_1_SOURCE)
 
 WM2200_MIXER_ENUMS (AIF1TX6, WM2200_AIF1TX6MIX_INPUT_1_SOURCE)
 
 WM2200_MIXER_ENUMS (EQL, WM2200_EQLMIX_INPUT_1_SOURCE)
 
 WM2200_MIXER_ENUMS (EQR, WM2200_EQRMIX_INPUT_1_SOURCE)
 
 WM2200_MIXER_ENUMS (DSP1L, WM2200_DSP1LMIX_INPUT_1_SOURCE)
 
 WM2200_MIXER_ENUMS (DSP1R, WM2200_DSP1RMIX_INPUT_1_SOURCE)
 
 WM2200_MIXER_ENUMS (DSP2L, WM2200_DSP2LMIX_INPUT_1_SOURCE)
 
 WM2200_MIXER_ENUMS (DSP2R, WM2200_DSP2RMIX_INPUT_1_SOURCE)
 
 WM2200_MIXER_ENUMS (LHPF1, WM2200_LHPF1MIX_INPUT_1_SOURCE)
 
 WM2200_MIXER_ENUMS (LHPF2, WM2200_LHPF2MIX_INPUT_1_SOURCE)
 
 MODULE_DEVICE_TABLE (i2c, wm2200_i2c_id)
 
 module_i2c_driver (wm2200_i2c_driver)
 
 MODULE_DESCRIPTION ("ASoC WM2200 driver")
 
 MODULE_AUTHOR ("Mark Brown <[email protected]>")
 
 MODULE_LICENSE ("GPL")
 

Macro Definition Documentation

#define WM2200_FORMATS
Value:

Definition at line 1893 of file wm2200.c.

#define WM2200_MIXER_CONTROLS (   name,
  base 
)
Value:
SOC_SINGLE_TLV(name " Input 1 Volume", base + 1 , \
WM2200_MIXER_VOL_SHIFT, 80, 0, mixer_tlv), \
SOC_SINGLE_TLV(name " Input 2 Volume", base + 3 , \
WM2200_MIXER_VOL_SHIFT, 80, 0, mixer_tlv), \
SOC_SINGLE_TLV(name " Input 3 Volume", base + 5 , \
WM2200_MIXER_VOL_SHIFT, 80, 0, mixer_tlv), \
SOC_SINGLE_TLV(name " Input 4 Volume", base + 7 , \
WM2200_MIXER_VOL_SHIFT, 80, 0, mixer_tlv)

Definition at line 951 of file wm2200.c.

#define WM2200_MIXER_ENUMS (   name,
  base_reg 
)
Value:
static WM2200_MUX_ENUM_DECL(name##_in1_enum, base_reg); \
static WM2200_MUX_ENUM_DECL(name##_in2_enum, base_reg + 2); \
static WM2200_MUX_ENUM_DECL(name##_in3_enum, base_reg + 4); \
static WM2200_MUX_ENUM_DECL(name##_in4_enum, base_reg + 6); \
static WM2200_MUX_CTL_DECL(name##_in1); \
static WM2200_MUX_CTL_DECL(name##_in2); \
static WM2200_MUX_CTL_DECL(name##_in3); \
static WM2200_MUX_CTL_DECL(name##_in4)

Definition at line 969 of file wm2200.c.

#define WM2200_MIXER_INPUT_ROUTES (   name)
Value:
{ name, "Tone Generator", "Tone Generator" }, \
{ name, "IN1L", "IN1L PGA" }, \
{ name, "IN1R", "IN1R PGA" }, \
{ name, "IN2L", "IN2L PGA" }, \
{ name, "IN2R", "IN2R PGA" }, \
{ name, "IN3L", "IN3L PGA" }, \
{ name, "IN3R", "IN3R PGA" }, \
{ name, "DSP1.1", "DSP1" }, \
{ name, "DSP1.2", "DSP1" }, \
{ name, "DSP1.3", "DSP1" }, \
{ name, "DSP1.4", "DSP1" }, \
{ name, "DSP1.5", "DSP1" }, \
{ name, "DSP1.6", "DSP1" }, \
{ name, "DSP2.1", "DSP2" }, \
{ name, "DSP2.2", "DSP2" }, \
{ name, "DSP2.3", "DSP2" }, \
{ name, "DSP2.4", "DSP2" }, \
{ name, "DSP2.5", "DSP2" }, \
{ name, "DSP2.6", "DSP2" }, \
{ name, "AIF1RX1", "AIF1RX1" }, \
{ name, "AIF1RX2", "AIF1RX2" }, \
{ name, "AIF1RX3", "AIF1RX3" }, \
{ name, "AIF1RX4", "AIF1RX4" }, \
{ name, "AIF1RX5", "AIF1RX5" }, \
{ name, "AIF1RX6", "AIF1RX6" }, \
{ name, "EQL", "EQL" }, \
{ name, "EQR", "EQR" }, \
{ name, "LHPF1", "LHPF1" }, \
{ name, "LHPF2", "LHPF2" }

Definition at line 1067 of file wm2200.c.

#define WM2200_MIXER_ROUTES (   widget,
  name 
)
Value:
{ widget, NULL, name " Mixer" }, \
{ name " Mixer", NULL, name " Input 1" }, \
{ name " Mixer", NULL, name " Input 2" }, \
{ name " Mixer", NULL, name " Input 3" }, \
{ name " Mixer", NULL, name " Input 4" }, \
WM2200_MIXER_INPUT_ROUTES(name " Input 1"), \
WM2200_MIXER_INPUT_ROUTES(name " Input 2"), \
WM2200_MIXER_INPUT_ROUTES(name " Input 3"), \
WM2200_MIXER_INPUT_ROUTES(name " Input 4")

Definition at line 1098 of file wm2200.c.

#define WM2200_MIXER_WIDGETS (   name,
  name_str 
)
Value:
WM2200_MUX(name_str " Input 1", &name##_in1_mux), \
WM2200_MUX(name_str " Input 2", &name##_in2_mux), \
WM2200_MUX(name_str " Input 3", &name##_in3_mux), \
WM2200_MUX(name_str " Input 4", &name##_in4_mux), \
SND_SOC_DAPM_MIXER(name_str " Mixer", SND_SOC_NOPM, 0, 0, NULL, 0)

Definition at line 1060 of file wm2200.c.

#define WM2200_MUX (   name,
  ctrl 
)    SND_SOC_DAPM_VALUE_MUX(name, SND_SOC_NOPM, 0, 0, ctrl)

Definition at line 1057 of file wm2200.c.

#define WM2200_MUX_CTL_DECL (   name)
Value:
const struct snd_kcontrol_new name##_mux = \
SOC_DAPM_VALUE_ENUM("Route", name##_enum)

Definition at line 965 of file wm2200.c.

#define WM2200_MUX_ENUM_DECL (   name,
  reg 
)
Value:
wm2200_mixer_texts, wm2200_mixer_values)

Definition at line 961 of file wm2200.c.

#define WM2200_NUM_BCLK_RATES   12

Definition at line 1475 of file wm2200.c.

#define WM2200_NUM_CORE_SUPPLIES   2

Definition at line 37 of file wm2200.c.

#define WM2200_RATES   SNDRV_PCM_RATE_8000_48000

Definition at line 1891 of file wm2200.c.

Function Documentation

MODULE_AUTHOR ( "Mark Brown <[email protected]>"  )
MODULE_DESCRIPTION ( "ASoC WM2200 driver )
MODULE_DEVICE_TABLE ( i2c  ,
wm2200_i2c_id   
)
module_i2c_driver ( wm2200_i2c_driver  )
MODULE_LICENSE ( "GPL"  )
WM2200_MIXER_ENUMS ( OUT1L  ,
WM2200_OUT1LMIX_INPUT_1_SOURCE   
)
WM2200_MIXER_ENUMS ( OUT1R  ,
WM2200_OUT1RMIX_INPUT_1_SOURCE   
)
WM2200_MIXER_ENUMS ( OUT2L  ,
WM2200_OUT2LMIX_INPUT_1_SOURCE   
)
WM2200_MIXER_ENUMS ( OUT2R  ,
WM2200_OUT2RMIX_INPUT_1_SOURCE   
)
WM2200_MIXER_ENUMS ( AIF1TX1  ,
WM2200_AIF1TX1MIX_INPUT_1_SOURCE   
)
WM2200_MIXER_ENUMS ( AIF1TX2  ,
WM2200_AIF1TX2MIX_INPUT_1_SOURCE   
)
WM2200_MIXER_ENUMS ( AIF1TX3  ,
WM2200_AIF1TX3MIX_INPUT_1_SOURCE   
)
WM2200_MIXER_ENUMS ( AIF1TX4  ,
WM2200_AIF1TX4MIX_INPUT_1_SOURCE   
)
WM2200_MIXER_ENUMS ( AIF1TX5  ,
WM2200_AIF1TX5MIX_INPUT_1_SOURCE   
)
WM2200_MIXER_ENUMS ( AIF1TX6  ,
WM2200_AIF1TX6MIX_INPUT_1_SOURCE   
)
WM2200_MIXER_ENUMS ( EQL  ,
WM2200_EQLMIX_INPUT_1_SOURCE   
)
WM2200_MIXER_ENUMS ( EQR  ,
WM2200_EQRMIX_INPUT_1_SOURCE   
)
WM2200_MIXER_ENUMS ( DSP1L  ,
WM2200_DSP1LMIX_INPUT_1_SOURCE   
)
WM2200_MIXER_ENUMS ( DSP1R  ,
WM2200_DSP1RMIX_INPUT_1_SOURCE   
)
WM2200_MIXER_ENUMS ( DSP2L  ,
WM2200_DSP2LMIX_INPUT_1_SOURCE   
)
WM2200_MIXER_ENUMS ( DSP2R  ,
WM2200_DSP2RMIX_INPUT_1_SOURCE   
)
WM2200_MIXER_ENUMS ( LHPF1  ,
WM2200_LHPF1MIX_INPUT_1_SOURCE   
)
WM2200_MIXER_ENUMS ( LHPF2  ,
WM2200_LHPF2MIX_INPUT_1_SOURCE   
)

Variable Documentation

u16 fll_fratio

Definition at line 1662 of file wm2200.c.

unsigned int max

Definition at line 1661 of file wm2200.c.

unsigned int min

Definition at line 1660 of file wm2200.c.

int ratio

Definition at line 1663 of file wm2200.c.