Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
arizona.c File Reference
#include <linux/gcd.h>
#include <linux/module.h>
#include <linux/pm_runtime.h>
#include <sound/pcm.h>
#include <sound/pcm_params.h>
#include <sound/tlv.h>
#include <linux/mfd/arizona/core.h>
#include <linux/mfd/arizona/registers.h>
#include "arizona.h"

Go to the source code of this file.

Data Structures

struct  arizona_fll_cfg
 

Macros

#define ARIZONA_AIF_BCLK_CTRL   0x00
 
#define ARIZONA_AIF_TX_PIN_CTRL   0x01
 
#define ARIZONA_AIF_RX_PIN_CTRL   0x02
 
#define ARIZONA_AIF_RATE_CTRL   0x03
 
#define ARIZONA_AIF_FORMAT   0x04
 
#define ARIZONA_AIF_TX_BCLK_RATE   0x05
 
#define ARIZONA_AIF_RX_BCLK_RATE   0x06
 
#define ARIZONA_AIF_FRAME_CTRL_1   0x07
 
#define ARIZONA_AIF_FRAME_CTRL_2   0x08
 
#define ARIZONA_AIF_FRAME_CTRL_3   0x09
 
#define ARIZONA_AIF_FRAME_CTRL_4   0x0A
 
#define ARIZONA_AIF_FRAME_CTRL_5   0x0B
 
#define ARIZONA_AIF_FRAME_CTRL_6   0x0C
 
#define ARIZONA_AIF_FRAME_CTRL_7   0x0D
 
#define ARIZONA_AIF_FRAME_CTRL_8   0x0E
 
#define ARIZONA_AIF_FRAME_CTRL_9   0x0F
 
#define ARIZONA_AIF_FRAME_CTRL_10   0x10
 
#define ARIZONA_AIF_FRAME_CTRL_11   0x11
 
#define ARIZONA_AIF_FRAME_CTRL_12   0x12
 
#define ARIZONA_AIF_FRAME_CTRL_13   0x13
 
#define ARIZONA_AIF_FRAME_CTRL_14   0x14
 
#define ARIZONA_AIF_FRAME_CTRL_15   0x15
 
#define ARIZONA_AIF_FRAME_CTRL_16   0x16
 
#define ARIZONA_AIF_FRAME_CTRL_17   0x17
 
#define ARIZONA_AIF_FRAME_CTRL_18   0x18
 
#define ARIZONA_AIF_TX_ENABLES   0x19
 
#define ARIZONA_AIF_RX_ENABLES   0x1A
 
#define ARIZONA_AIF_FORCE_WRITE   0x1B
 
#define arizona_fll_err(_fll, fmt,...)   dev_err(_fll->arizona->dev, "FLL%d: " fmt, _fll->id, ##__VA_ARGS__)
 
#define arizona_fll_warn(_fll, fmt,...)   dev_warn(_fll->arizona->dev, "FLL%d: " fmt, _fll->id, ##__VA_ARGS__)
 
#define arizona_fll_dbg(_fll, fmt,...)   dev_err(_fll->arizona->dev, "FLL%d: " fmt, _fll->id, ##__VA_ARGS__)
 
#define arizona_aif_err(_dai, fmt,...)   dev_err(_dai->dev, "AIF%d: " fmt, _dai->id, ##__VA_ARGS__)
 
#define arizona_aif_warn(_dai, fmt,...)   dev_warn(_dai->dev, "AIF%d: " fmt, _dai->id, ##__VA_ARGS__)
 
#define arizona_aif_dbg(_dai, fmt,...)   dev_err(_dai->dev, "AIF%d: " fmt, _dai->id, ##__VA_ARGS__)
 

Functions

 EXPORT_SYMBOL_GPL (arizona_mixer_texts)
 
 EXPORT_SYMBOL_GPL (arizona_mixer_values)
 
const DECLARE_TLV_DB_SCALE (arizona_mixer_tlv,-3200, 100, 0)
 
 EXPORT_SYMBOL_GPL (arizona_mixer_tlv)
 
 EXPORT_SYMBOL_GPL (arizona_lhpf1_mode)
 
 EXPORT_SYMBOL_GPL (arizona_lhpf2_mode)
 
 EXPORT_SYMBOL_GPL (arizona_lhpf3_mode)
 
 EXPORT_SYMBOL_GPL (arizona_lhpf4_mode)
 
int arizona_in_ev (struct snd_soc_dapm_widget *w, struct snd_kcontrol *kcontrol, int event)
 
 EXPORT_SYMBOL_GPL (arizona_in_ev)
 
int arizona_out_ev (struct snd_soc_dapm_widget *w, struct snd_kcontrol *kcontrol, int event)
 
 EXPORT_SYMBOL_GPL (arizona_out_ev)
 
int arizona_set_sysclk (struct snd_soc_codec *codec, int clk_id, int source, unsigned int freq, int dir)
 
 EXPORT_SYMBOL_GPL (arizona_set_sysclk)
 
 EXPORT_SYMBOL_GPL (arizona_dai_ops)
 
int arizona_init_dai (struct arizona_priv *priv, int id)
 
 EXPORT_SYMBOL_GPL (arizona_init_dai)
 
int arizona_set_fll (struct arizona_fll *fll, int source, unsigned int Fref, unsigned int Fout)
 
 EXPORT_SYMBOL_GPL (arizona_set_fll)
 
int arizona_init_fll (struct arizona *arizona, int id, int base, int lock_irq, int ok_irq, struct arizona_fll *fll)
 
 EXPORT_SYMBOL_GPL (arizona_init_fll)
 
 MODULE_DESCRIPTION ("ASoC Wolfson Arizona class device support")
 
 MODULE_AUTHOR ("Mark Brown <[email protected]>")
 
 MODULE_LICENSE ("GPL")
 

Variables

const chararizona_mixer_texts [ARIZONA_NUM_MIXER_INPUTS]
 
int arizona_mixer_values [ARIZONA_NUM_MIXER_INPUTS]
 
struct soc_enum arizona_lhpf1_mode
 
struct soc_enum arizona_lhpf2_mode
 
struct soc_enum arizona_lhpf3_mode
 
struct soc_enum arizona_lhpf4_mode
 
struct snd_soc_dai_ops arizona_dai_ops
 

Macro Definition Documentation

#define ARIZONA_AIF_BCLK_CTRL   0x00

Definition at line 25 of file arizona.c.

#define arizona_aif_dbg (   _dai,
  fmt,
  ... 
)    dev_err(_dai->dev, "AIF%d: " fmt, _dai->id, ##__VA_ARGS__)

Definition at line 65 of file arizona.c.

#define arizona_aif_err (   _dai,
  fmt,
  ... 
)    dev_err(_dai->dev, "AIF%d: " fmt, _dai->id, ##__VA_ARGS__)

Definition at line 61 of file arizona.c.

#define ARIZONA_AIF_FORCE_WRITE   0x1B

Definition at line 52 of file arizona.c.

#define ARIZONA_AIF_FORMAT   0x04

Definition at line 29 of file arizona.c.

#define ARIZONA_AIF_FRAME_CTRL_1   0x07

Definition at line 32 of file arizona.c.

#define ARIZONA_AIF_FRAME_CTRL_10   0x10

Definition at line 41 of file arizona.c.

#define ARIZONA_AIF_FRAME_CTRL_11   0x11

Definition at line 42 of file arizona.c.

#define ARIZONA_AIF_FRAME_CTRL_12   0x12

Definition at line 43 of file arizona.c.

#define ARIZONA_AIF_FRAME_CTRL_13   0x13

Definition at line 44 of file arizona.c.

#define ARIZONA_AIF_FRAME_CTRL_14   0x14

Definition at line 45 of file arizona.c.

#define ARIZONA_AIF_FRAME_CTRL_15   0x15

Definition at line 46 of file arizona.c.

#define ARIZONA_AIF_FRAME_CTRL_16   0x16

Definition at line 47 of file arizona.c.

#define ARIZONA_AIF_FRAME_CTRL_17   0x17

Definition at line 48 of file arizona.c.

#define ARIZONA_AIF_FRAME_CTRL_18   0x18

Definition at line 49 of file arizona.c.

#define ARIZONA_AIF_FRAME_CTRL_2   0x08

Definition at line 33 of file arizona.c.

#define ARIZONA_AIF_FRAME_CTRL_3   0x09

Definition at line 34 of file arizona.c.

#define ARIZONA_AIF_FRAME_CTRL_4   0x0A

Definition at line 35 of file arizona.c.

#define ARIZONA_AIF_FRAME_CTRL_5   0x0B

Definition at line 36 of file arizona.c.

#define ARIZONA_AIF_FRAME_CTRL_6   0x0C

Definition at line 37 of file arizona.c.

#define ARIZONA_AIF_FRAME_CTRL_7   0x0D

Definition at line 38 of file arizona.c.

#define ARIZONA_AIF_FRAME_CTRL_8   0x0E

Definition at line 39 of file arizona.c.

#define ARIZONA_AIF_FRAME_CTRL_9   0x0F

Definition at line 40 of file arizona.c.

#define ARIZONA_AIF_RATE_CTRL   0x03

Definition at line 28 of file arizona.c.

#define ARIZONA_AIF_RX_BCLK_RATE   0x06

Definition at line 31 of file arizona.c.

#define ARIZONA_AIF_RX_ENABLES   0x1A

Definition at line 51 of file arizona.c.

#define ARIZONA_AIF_RX_PIN_CTRL   0x02

Definition at line 27 of file arizona.c.

#define ARIZONA_AIF_TX_BCLK_RATE   0x05

Definition at line 30 of file arizona.c.

#define ARIZONA_AIF_TX_ENABLES   0x19

Definition at line 50 of file arizona.c.

#define ARIZONA_AIF_TX_PIN_CTRL   0x01

Definition at line 26 of file arizona.c.

#define arizona_aif_warn (   _dai,
  fmt,
  ... 
)    dev_warn(_dai->dev, "AIF%d: " fmt, _dai->id, ##__VA_ARGS__)

Definition at line 63 of file arizona.c.

#define arizona_fll_dbg (   _fll,
  fmt,
  ... 
)    dev_err(_fll->arizona->dev, "FLL%d: " fmt, _fll->id, ##__VA_ARGS__)

Definition at line 58 of file arizona.c.

#define arizona_fll_err (   _fll,
  fmt,
  ... 
)    dev_err(_fll->arizona->dev, "FLL%d: " fmt, _fll->id, ##__VA_ARGS__)

Definition at line 54 of file arizona.c.

#define arizona_fll_warn (   _fll,
  fmt,
  ... 
)    dev_warn(_fll->arizona->dev, "FLL%d: " fmt, _fll->id, ##__VA_ARGS__)

Definition at line 56 of file arizona.c.

Function Documentation

int arizona_in_ev ( struct snd_soc_dapm_widget w,
struct snd_kcontrol kcontrol,
int  event 
)

Definition at line 253 of file arizona.c.

int arizona_init_dai ( struct arizona_priv priv,
int  id 
)

Definition at line 763 of file arizona.c.

int arizona_init_fll ( struct arizona arizona,
int  id,
int  base,
int  lock_irq,
int  ok_irq,
struct arizona_fll fll 
)

Definition at line 1009 of file arizona.c.

int arizona_out_ev ( struct snd_soc_dapm_widget w,
struct snd_kcontrol kcontrol,
int  event 
)

Definition at line 260 of file arizona.c.

int arizona_set_fll ( struct arizona_fll fll,
int  source,
unsigned int  Fref,
unsigned int  Fout 
)

Definition at line 918 of file arizona.c.

int arizona_set_sysclk ( struct snd_soc_codec codec,
int  clk_id,
int  source,
unsigned int  freq,
int  dir 
)

Definition at line 337 of file arizona.c.

const DECLARE_TLV_DB_SCALE ( arizona_mixer_tlv  ,
3200,
100  ,
 
)
EXPORT_SYMBOL_GPL ( arizona_mixer_texts  )
EXPORT_SYMBOL_GPL ( arizona_mixer_values  )
EXPORT_SYMBOL_GPL ( arizona_mixer_tlv  )
EXPORT_SYMBOL_GPL ( arizona_lhpf1_mode  )
EXPORT_SYMBOL_GPL ( arizona_lhpf2_mode  )
EXPORT_SYMBOL_GPL ( arizona_lhpf3_mode  )
EXPORT_SYMBOL_GPL ( arizona_lhpf4_mode  )
EXPORT_SYMBOL_GPL ( arizona_in_ev  )
EXPORT_SYMBOL_GPL ( arizona_out_ev  )
EXPORT_SYMBOL_GPL ( arizona_set_sysclk  )
EXPORT_SYMBOL_GPL ( arizona_dai_ops  )
EXPORT_SYMBOL_GPL ( arizona_init_dai  )
EXPORT_SYMBOL_GPL ( arizona_set_fll  )
EXPORT_SYMBOL_GPL ( arizona_init_fll  )
MODULE_AUTHOR ( "Mark Brown <[email protected]>"  )
MODULE_DESCRIPTION ( "ASoC Wolfson Arizona class device support )
MODULE_LICENSE ( "GPL"  )

Variable Documentation

struct snd_soc_dai_ops arizona_dai_ops
Initial value:
= {
.startup = arizona_startup,
.set_fmt = arizona_set_fmt,
.hw_params = arizona_hw_params,
.set_sysclk = arizona_dai_set_sysclk,
}

Definition at line 755 of file arizona.c.

struct soc_enum arizona_lhpf1_mode
Initial value:

Definition at line 233 of file arizona.c.

struct soc_enum arizona_lhpf2_mode
Initial value:

Definition at line 238 of file arizona.c.

struct soc_enum arizona_lhpf3_mode
Initial value:

Definition at line 243 of file arizona.c.

struct soc_enum arizona_lhpf4_mode
Initial value:

Definition at line 248 of file arizona.c.

const char* arizona_mixer_texts[ARIZONA_NUM_MIXER_INPUTS]

Definition at line 68 of file arizona.c.

int arizona_mixer_values[ARIZONA_NUM_MIXER_INPUTS]

Definition at line 147 of file arizona.c.

u16 fratio

Definition at line 798 of file arizona.c.

unsigned int max

Definition at line 797 of file arizona.c.

unsigned int min

Definition at line 796 of file arizona.c.

int ratio

Definition at line 799 of file arizona.c.