Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
adau1701.c File Reference
#include <linux/module.h>
#include <linux/init.h>
#include <linux/i2c.h>
#include <linux/delay.h>
#include <linux/slab.h>
#include <sound/core.h>
#include <sound/pcm.h>
#include <sound/pcm_params.h>
#include <sound/soc.h>
#include "sigmadsp.h"
#include "adau1701.h"

Go to the source code of this file.

Data Structures

struct  adau1701
 

Macros

#define ADAU1701_DSPCTRL   0x1c
 
#define ADAU1701_SEROCTL   0x1e
 
#define ADAU1701_SERICTL   0x1f
 
#define ADAU1701_AUXNPOW   0x22
 
#define ADAU1701_OSCIPOW   0x26
 
#define ADAU1701_DACSET   0x27
 
#define ADAU1701_NUM_REGS   0x28
 
#define ADAU1701_DSPCTRL_CR   (1 << 2)
 
#define ADAU1701_DSPCTRL_DAM   (1 << 3)
 
#define ADAU1701_DSPCTRL_ADM   (1 << 4)
 
#define ADAU1701_DSPCTRL_SR_48   0x00
 
#define ADAU1701_DSPCTRL_SR_96   0x01
 
#define ADAU1701_DSPCTRL_SR_192   0x02
 
#define ADAU1701_DSPCTRL_SR_MASK   0x03
 
#define ADAU1701_SEROCTL_INV_LRCLK   0x2000
 
#define ADAU1701_SEROCTL_INV_BCLK   0x1000
 
#define ADAU1701_SEROCTL_MASTER   0x0800
 
#define ADAU1701_SEROCTL_OBF16   0x0000
 
#define ADAU1701_SEROCTL_OBF8   0x0200
 
#define ADAU1701_SEROCTL_OBF4   0x0400
 
#define ADAU1701_SEROCTL_OBF2   0x0600
 
#define ADAU1701_SEROCTL_OBF_MASK   0x0600
 
#define ADAU1701_SEROCTL_OLF1024   0x0000
 
#define ADAU1701_SEROCTL_OLF512   0x0080
 
#define ADAU1701_SEROCTL_OLF256   0x0100
 
#define ADAU1701_SEROCTL_OLF_MASK   0x0180
 
#define ADAU1701_SEROCTL_MSB_DEALY1   0x0000
 
#define ADAU1701_SEROCTL_MSB_DEALY0   0x0004
 
#define ADAU1701_SEROCTL_MSB_DEALY8   0x0008
 
#define ADAU1701_SEROCTL_MSB_DEALY12   0x000c
 
#define ADAU1701_SEROCTL_MSB_DEALY16   0x0010
 
#define ADAU1701_SEROCTL_MSB_DEALY_MASK   0x001c
 
#define ADAU1701_SEROCTL_WORD_LEN_24   0x0000
 
#define ADAU1701_SEROCTL_WORD_LEN_20   0x0001
 
#define ADAU1701_SEROCTL_WORD_LEN_16   0x0010
 
#define ADAU1701_SEROCTL_WORD_LEN_MASK   0x0003
 
#define ADAU1701_AUXNPOW_VBPD   0x40
 
#define ADAU1701_AUXNPOW_VRPD   0x20
 
#define ADAU1701_SERICTL_I2S   0
 
#define ADAU1701_SERICTL_LEFTJ   1
 
#define ADAU1701_SERICTL_TDM   2
 
#define ADAU1701_SERICTL_RIGHTJ_24   3
 
#define ADAU1701_SERICTL_RIGHTJ_20   4
 
#define ADAU1701_SERICTL_RIGHTJ_18   5
 
#define ADAU1701_SERICTL_RIGHTJ_16   6
 
#define ADAU1701_SERICTL_MODE_MASK   7
 
#define ADAU1701_SERICTL_INV_BCLK   BIT(3)
 
#define ADAU1701_SERICTL_INV_LRCLK   BIT(4)
 
#define ADAU1701_OSCIPOW_OPD   0x04
 
#define ADAU1701_DACSET_DACINIT   1
 
#define ADAU1701_FIRMWARE   "adau1701.bin"
 
#define ADAU1701_RATES
 
#define ADAU1701_FORMATS
 

Functions

 MODULE_DEVICE_TABLE (i2c, adau1701_i2c_id)
 
 module_i2c_driver (adau1701_i2c_driver)
 
 MODULE_DESCRIPTION ("ASoC ADAU1701 SigmaDSP driver")
 
 MODULE_AUTHOR ("Cliff Cai <[email protected]>")
 
 MODULE_AUTHOR ("Lars-Peter Clausen <[email protected]>")
 
 MODULE_LICENSE ("GPL")
 

Macro Definition Documentation

#define ADAU1701_AUXNPOW   0x22

Definition at line 28 of file adau1701.c.

#define ADAU1701_AUXNPOW_VBPD   0x40

Definition at line 70 of file adau1701.c.

#define ADAU1701_AUXNPOW_VRPD   0x20

Definition at line 71 of file adau1701.c.

#define ADAU1701_DACSET   0x27

Definition at line 31 of file adau1701.c.

#define ADAU1701_DACSET_DACINIT   1

Definition at line 85 of file adau1701.c.

#define ADAU1701_DSPCTRL   0x1c

Definition at line 24 of file adau1701.c.

#define ADAU1701_DSPCTRL_ADM   (1 << 4)

Definition at line 37 of file adau1701.c.

#define ADAU1701_DSPCTRL_CR   (1 << 2)

Definition at line 35 of file adau1701.c.

#define ADAU1701_DSPCTRL_DAM   (1 << 3)

Definition at line 36 of file adau1701.c.

#define ADAU1701_DSPCTRL_SR_192   0x02

Definition at line 40 of file adau1701.c.

#define ADAU1701_DSPCTRL_SR_48   0x00

Definition at line 38 of file adau1701.c.

#define ADAU1701_DSPCTRL_SR_96   0x01

Definition at line 39 of file adau1701.c.

#define ADAU1701_DSPCTRL_SR_MASK   0x03

Definition at line 41 of file adau1701.c.

#define ADAU1701_FIRMWARE   "adau1701.bin"

Definition at line 87 of file adau1701.c.

#define ADAU1701_FORMATS
Value:
SNDRV_PCM_FMTBIT_S24_LE)

Definition at line 426 of file adau1701.c.

#define ADAU1701_NUM_REGS   0x28

Definition at line 33 of file adau1701.c.

#define ADAU1701_OSCIPOW   0x26

Definition at line 30 of file adau1701.c.

#define ADAU1701_OSCIPOW_OPD   0x04

Definition at line 84 of file adau1701.c.

#define ADAU1701_RATES
Value:
SNDRV_PCM_RATE_192000)

Definition at line 423 of file adau1701.c.

#define ADAU1701_SERICTL   0x1f

Definition at line 26 of file adau1701.c.

#define ADAU1701_SERICTL_I2S   0

Definition at line 73 of file adau1701.c.

#define ADAU1701_SERICTL_INV_BCLK   BIT(3)

Definition at line 81 of file adau1701.c.

#define ADAU1701_SERICTL_INV_LRCLK   BIT(4)

Definition at line 82 of file adau1701.c.

#define ADAU1701_SERICTL_LEFTJ   1

Definition at line 74 of file adau1701.c.

#define ADAU1701_SERICTL_MODE_MASK   7

Definition at line 80 of file adau1701.c.

#define ADAU1701_SERICTL_RIGHTJ_16   6

Definition at line 79 of file adau1701.c.

#define ADAU1701_SERICTL_RIGHTJ_18   5

Definition at line 78 of file adau1701.c.

#define ADAU1701_SERICTL_RIGHTJ_20   4

Definition at line 77 of file adau1701.c.

#define ADAU1701_SERICTL_RIGHTJ_24   3

Definition at line 76 of file adau1701.c.

#define ADAU1701_SERICTL_TDM   2

Definition at line 75 of file adau1701.c.

#define ADAU1701_SEROCTL   0x1e

Definition at line 25 of file adau1701.c.

#define ADAU1701_SEROCTL_INV_BCLK   0x1000

Definition at line 44 of file adau1701.c.

#define ADAU1701_SEROCTL_INV_LRCLK   0x2000

Definition at line 43 of file adau1701.c.

#define ADAU1701_SEROCTL_MASTER   0x0800

Definition at line 45 of file adau1701.c.

#define ADAU1701_SEROCTL_MSB_DEALY0   0x0004

Definition at line 59 of file adau1701.c.

#define ADAU1701_SEROCTL_MSB_DEALY1   0x0000

Definition at line 58 of file adau1701.c.

#define ADAU1701_SEROCTL_MSB_DEALY12   0x000c

Definition at line 61 of file adau1701.c.

#define ADAU1701_SEROCTL_MSB_DEALY16   0x0010

Definition at line 62 of file adau1701.c.

#define ADAU1701_SEROCTL_MSB_DEALY8   0x0008

Definition at line 60 of file adau1701.c.

#define ADAU1701_SEROCTL_MSB_DEALY_MASK   0x001c

Definition at line 63 of file adau1701.c.

#define ADAU1701_SEROCTL_OBF16   0x0000

Definition at line 47 of file adau1701.c.

#define ADAU1701_SEROCTL_OBF2   0x0600

Definition at line 50 of file adau1701.c.

#define ADAU1701_SEROCTL_OBF4   0x0400

Definition at line 49 of file adau1701.c.

#define ADAU1701_SEROCTL_OBF8   0x0200

Definition at line 48 of file adau1701.c.

#define ADAU1701_SEROCTL_OBF_MASK   0x0600

Definition at line 51 of file adau1701.c.

#define ADAU1701_SEROCTL_OLF1024   0x0000

Definition at line 53 of file adau1701.c.

#define ADAU1701_SEROCTL_OLF256   0x0100

Definition at line 55 of file adau1701.c.

#define ADAU1701_SEROCTL_OLF512   0x0080

Definition at line 54 of file adau1701.c.

#define ADAU1701_SEROCTL_OLF_MASK   0x0180

Definition at line 56 of file adau1701.c.

#define ADAU1701_SEROCTL_WORD_LEN_16   0x0010

Definition at line 67 of file adau1701.c.

#define ADAU1701_SEROCTL_WORD_LEN_20   0x0001

Definition at line 66 of file adau1701.c.

#define ADAU1701_SEROCTL_WORD_LEN_24   0x0000

Definition at line 65 of file adau1701.c.

#define ADAU1701_SEROCTL_WORD_LEN_MASK   0x0003

Definition at line 68 of file adau1701.c.

Function Documentation

MODULE_AUTHOR ( "Cliff Cai <[email protected]>"  )
MODULE_AUTHOR ( "Lars-Peter Clausen <[email protected]>"  )
MODULE_DESCRIPTION ( "ASoC ADAU1701 SigmaDSP driver )
MODULE_DEVICE_TABLE ( i2c  ,
adau1701_i2c_id   
)
module_i2c_driver ( adau1701_i2c_driver  )
MODULE_LICENSE ( "GPL"  )