Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
mc13783.c File Reference
#include <linux/module.h>
#include <linux/device.h>
#include <linux/mfd/mc13xxx.h>
#include <linux/slab.h>
#include <sound/core.h>
#include <sound/control.h>
#include <sound/pcm.h>
#include <sound/soc.h>
#include <sound/initval.h>
#include <sound/soc-dapm.h>
#include "mc13783.h"

Go to the source code of this file.

Data Structures

struct  mc13783_priv
 

Macros

#define MC13783_AUDIO_RX0   36
 
#define MC13783_AUDIO_RX1   37
 
#define MC13783_AUDIO_TX   38
 
#define MC13783_SSI_NETWORK   39
 
#define MC13783_AUDIO_CODEC   40
 
#define MC13783_AUDIO_DAC   41
 
#define AUDIO_RX0_ALSPEN   (1 << 5)
 
#define AUDIO_RX0_ALSPSEL   (1 << 7)
 
#define AUDIO_RX0_ADDCDC   (1 << 21)
 
#define AUDIO_RX0_ADDSTDC   (1 << 22)
 
#define AUDIO_RX0_ADDRXIN   (1 << 23)
 
#define AUDIO_RX1_PGARXEN   (1 << 0);
 
#define AUDIO_RX1_PGASTEN   (1 << 5)
 
#define AUDIO_RX1_ARXINEN   (1 << 10)
 
#define AUDIO_TX_AMC1REN   (1 << 5)
 
#define AUDIO_TX_AMC1LEN   (1 << 7)
 
#define AUDIO_TX_AMC2EN   (1 << 9)
 
#define AUDIO_TX_ATXINEN   (1 << 11)
 
#define AUDIO_TX_RXINREC   (1 << 13)
 
#define SSI_NETWORK_CDCTXRXSLOT(x)   (((x) & 0x3) << 2)
 
#define SSI_NETWORK_CDCTXSECSLOT(x)   (((x) & 0x3) << 4)
 
#define SSI_NETWORK_CDCRXSECSLOT(x)   (((x) & 0x3) << 6)
 
#define SSI_NETWORK_CDCRXSECGAIN(x)   (((x) & 0x3) << 8)
 
#define SSI_NETWORK_CDCSUMGAIN(x)   (1 << 10)
 
#define SSI_NETWORK_CDCFSDLY(x)   (1 << 11)
 
#define SSI_NETWORK_DAC_SLOTS_8   (1 << 12)
 
#define SSI_NETWORK_DAC_SLOTS_4   (2 << 12)
 
#define SSI_NETWORK_DAC_SLOTS_2   (3 << 12)
 
#define SSI_NETWORK_DAC_SLOT_MASK   (3 << 12)
 
#define SSI_NETWORK_DAC_RXSLOT_0_1   (0 << 14)
 
#define SSI_NETWORK_DAC_RXSLOT_2_3   (1 << 14)
 
#define SSI_NETWORK_DAC_RXSLOT_4_5   (2 << 14)
 
#define SSI_NETWORK_DAC_RXSLOT_6_7   (3 << 14)
 
#define SSI_NETWORK_DAC_RXSLOT_MASK   (3 << 14)
 
#define SSI_NETWORK_STDCRXSECSLOT(x)   (((x) & 0x3) << 16)
 
#define SSI_NETWORK_STDCRXSECGAIN(x)   (((x) & 0x3) << 18)
 
#define SSI_NETWORK_STDCSUMGAIN   (1 << 20)
 
#define AUDIO_SSI_SEL   (1 << 0)
 
#define AUDIO_CLK_SEL   (1 << 1)
 
#define AUDIO_CSM   (1 << 2)
 
#define AUDIO_BCL_INV   (1 << 3)
 
#define AUDIO_CFS_INV   (1 << 4)
 
#define AUDIO_CFS(x)   (((x) & 0x3) << 5)
 
#define AUDIO_CLK(x)   (((x) & 0x7) << 7)
 
#define AUDIO_C_EN   (1 << 11)
 
#define AUDIO_C_CLK_EN   (1 << 12)
 
#define AUDIO_C_RESET   (1 << 15)
 
#define AUDIO_CODEC_CDCFS8K16K   (1 << 10)
 
#define AUDIO_DAC_CFS_DLY_B   (1 << 10)
 
#define MC13783_RATES_RECORD   (SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_16000)
 
#define MC13783_FORMATS
 

Functions

 module_platform_driver (mc13783_codec_driver)
 
 MODULE_DESCRIPTION ("ASoC MC13783 driver")
 
 MODULE_AUTHOR ("Sascha Hauer, Pengutronix <[email protected]>")
 
 MODULE_AUTHOR ("Philippe Retornaz <[email protected]>")
 
 MODULE_LICENSE ("GPL")
 

Macro Definition Documentation

#define AUDIO_BCL_INV   (1 << 3)

Definition at line 85 of file mc13783.c.

#define AUDIO_C_CLK_EN   (1 << 12)

Definition at line 90 of file mc13783.c.

#define AUDIO_C_EN   (1 << 11)

Definition at line 89 of file mc13783.c.

#define AUDIO_C_RESET   (1 << 15)

Definition at line 91 of file mc13783.c.

#define AUDIO_CFS (   x)    (((x) & 0x3) << 5)

Definition at line 87 of file mc13783.c.

#define AUDIO_CFS_INV   (1 << 4)

Definition at line 86 of file mc13783.c.

#define AUDIO_CLK (   x)    (((x) & 0x7) << 7)

Definition at line 88 of file mc13783.c.

#define AUDIO_CLK_SEL   (1 << 1)

Definition at line 83 of file mc13783.c.

#define AUDIO_CODEC_CDCFS8K16K   (1 << 10)

Definition at line 93 of file mc13783.c.

#define AUDIO_CSM   (1 << 2)

Definition at line 84 of file mc13783.c.

#define AUDIO_DAC_CFS_DLY_B   (1 << 10)

Definition at line 94 of file mc13783.c.

#define AUDIO_RX0_ADDCDC   (1 << 21)

Definition at line 45 of file mc13783.c.

#define AUDIO_RX0_ADDRXIN   (1 << 23)

Definition at line 47 of file mc13783.c.

#define AUDIO_RX0_ADDSTDC   (1 << 22)

Definition at line 46 of file mc13783.c.

#define AUDIO_RX0_ALSPEN   (1 << 5)

Definition at line 43 of file mc13783.c.

#define AUDIO_RX0_ALSPSEL   (1 << 7)

Definition at line 44 of file mc13783.c.

#define AUDIO_RX1_ARXINEN   (1 << 10)

Definition at line 51 of file mc13783.c.

#define AUDIO_RX1_PGARXEN   (1 << 0);

Definition at line 49 of file mc13783.c.

#define AUDIO_RX1_PGASTEN   (1 << 5)

Definition at line 50 of file mc13783.c.

#define AUDIO_SSI_SEL   (1 << 0)

Definition at line 82 of file mc13783.c.

#define AUDIO_TX_AMC1LEN   (1 << 7)

Definition at line 54 of file mc13783.c.

#define AUDIO_TX_AMC1REN   (1 << 5)

Definition at line 53 of file mc13783.c.

#define AUDIO_TX_AMC2EN   (1 << 9)

Definition at line 55 of file mc13783.c.

#define AUDIO_TX_ATXINEN   (1 << 11)

Definition at line 56 of file mc13783.c.

#define AUDIO_TX_RXINREC   (1 << 13)

Definition at line 57 of file mc13783.c.

#define MC13783_AUDIO_CODEC   40

Definition at line 40 of file mc13783.c.

#define MC13783_AUDIO_DAC   41

Definition at line 41 of file mc13783.c.

#define MC13783_AUDIO_RX0   36

Definition at line 36 of file mc13783.c.

#define MC13783_AUDIO_RX1   37

Definition at line 37 of file mc13783.c.

#define MC13783_AUDIO_TX   38

Definition at line 38 of file mc13783.c.

#define MC13783_FORMATS
Value:
SNDRV_PCM_FMTBIT_S24_LE)

Definition at line 633 of file mc13783.c.

#define MC13783_RATES_RECORD   (SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_16000)

Definition at line 631 of file mc13783.c.

#define MC13783_SSI_NETWORK   39

Definition at line 39 of file mc13783.c.

#define SSI_NETWORK_CDCFSDLY (   x)    (1 << 11)

Definition at line 64 of file mc13783.c.

#define SSI_NETWORK_CDCRXSECGAIN (   x)    (((x) & 0x3) << 8)

Definition at line 62 of file mc13783.c.

#define SSI_NETWORK_CDCRXSECSLOT (   x)    (((x) & 0x3) << 6)

Definition at line 61 of file mc13783.c.

#define SSI_NETWORK_CDCSUMGAIN (   x)    (1 << 10)

Definition at line 63 of file mc13783.c.

#define SSI_NETWORK_CDCTXRXSLOT (   x)    (((x) & 0x3) << 2)

Definition at line 59 of file mc13783.c.

#define SSI_NETWORK_CDCTXSECSLOT (   x)    (((x) & 0x3) << 4)

Definition at line 60 of file mc13783.c.

#define SSI_NETWORK_DAC_RXSLOT_0_1   (0 << 14)

Definition at line 69 of file mc13783.c.

#define SSI_NETWORK_DAC_RXSLOT_2_3   (1 << 14)

Definition at line 70 of file mc13783.c.

#define SSI_NETWORK_DAC_RXSLOT_4_5   (2 << 14)

Definition at line 71 of file mc13783.c.

#define SSI_NETWORK_DAC_RXSLOT_6_7   (3 << 14)

Definition at line 72 of file mc13783.c.

#define SSI_NETWORK_DAC_RXSLOT_MASK   (3 << 14)

Definition at line 73 of file mc13783.c.

#define SSI_NETWORK_DAC_SLOT_MASK   (3 << 12)

Definition at line 68 of file mc13783.c.

#define SSI_NETWORK_DAC_SLOTS_2   (3 << 12)

Definition at line 67 of file mc13783.c.

#define SSI_NETWORK_DAC_SLOTS_4   (2 << 12)

Definition at line 66 of file mc13783.c.

#define SSI_NETWORK_DAC_SLOTS_8   (1 << 12)

Definition at line 65 of file mc13783.c.

#define SSI_NETWORK_STDCRXSECGAIN (   x)    (((x) & 0x3) << 18)

Definition at line 75 of file mc13783.c.

#define SSI_NETWORK_STDCRXSECSLOT (   x)    (((x) & 0x3) << 16)

Definition at line 74 of file mc13783.c.

#define SSI_NETWORK_STDCSUMGAIN   (1 << 20)

Definition at line 76 of file mc13783.c.

Function Documentation

MODULE_AUTHOR ( "Sascha  Hauer,
Pengutronix< s.hauer @pengutronix.de >"   
)
MODULE_AUTHOR ( "Philippe Retornaz <[email protected]>"  )
MODULE_DESCRIPTION ( "ASoC MC13783 driver )
MODULE_LICENSE ( "GPL"  )
module_platform_driver ( mc13783_codec_driver  )