Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
jz4740.c File Reference
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/slab.h>
#include <linux/io.h>
#include <linux/delay.h>
#include <sound/core.h>
#include <sound/pcm.h>
#include <sound/pcm_params.h>
#include <sound/initval.h>
#include <sound/soc.h>

Go to the source code of this file.

Data Structures

struct  jz4740_codec
 

Macros

#define JZ4740_REG_CODEC_1   0x0
 
#define JZ4740_REG_CODEC_2   0x1
 
#define JZ4740_CODEC_1_LINE_ENABLE   BIT(29)
 
#define JZ4740_CODEC_1_MIC_ENABLE   BIT(28)
 
#define JZ4740_CODEC_1_SW1_ENABLE   BIT(27)
 
#define JZ4740_CODEC_1_ADC_ENABLE   BIT(26)
 
#define JZ4740_CODEC_1_SW2_ENABLE   BIT(25)
 
#define JZ4740_CODEC_1_DAC_ENABLE   BIT(24)
 
#define JZ4740_CODEC_1_VREF_DISABLE   BIT(20)
 
#define JZ4740_CODEC_1_VREF_AMP_DISABLE   BIT(19)
 
#define JZ4740_CODEC_1_VREF_PULLDOWN   BIT(18)
 
#define JZ4740_CODEC_1_VREF_LOW_CURRENT   BIT(17)
 
#define JZ4740_CODEC_1_VREF_HIGH_CURRENT   BIT(16)
 
#define JZ4740_CODEC_1_HEADPHONE_DISABLE   BIT(14)
 
#define JZ4740_CODEC_1_HEADPHONE_AMP_CHANGE_ANY   BIT(13)
 
#define JZ4740_CODEC_1_HEADPHONE_CHARGE   BIT(12)
 
#define JZ4740_CODEC_1_HEADPHONE_PULLDOWN   (BIT(11) | BIT(10))
 
#define JZ4740_CODEC_1_HEADPHONE_POWERDOWN_M   BIT(9)
 
#define JZ4740_CODEC_1_HEADPHONE_POWERDOWN   BIT(8)
 
#define JZ4740_CODEC_1_SUSPEND   BIT(1)
 
#define JZ4740_CODEC_1_RESET   BIT(0)
 
#define JZ4740_CODEC_1_LINE_ENABLE_OFFSET   29
 
#define JZ4740_CODEC_1_MIC_ENABLE_OFFSET   28
 
#define JZ4740_CODEC_1_SW1_ENABLE_OFFSET   27
 
#define JZ4740_CODEC_1_ADC_ENABLE_OFFSET   26
 
#define JZ4740_CODEC_1_SW2_ENABLE_OFFSET   25
 
#define JZ4740_CODEC_1_DAC_ENABLE_OFFSET   24
 
#define JZ4740_CODEC_1_HEADPHONE_DISABLE_OFFSET   14
 
#define JZ4740_CODEC_1_HEADPHONE_POWERDOWN_OFFSET   8
 
#define JZ4740_CODEC_2_INPUT_VOLUME_MASK   0x1f0000
 
#define JZ4740_CODEC_2_SAMPLE_RATE_MASK   0x000f00
 
#define JZ4740_CODEC_2_MIC_BOOST_GAIN_MASK   0x000030
 
#define JZ4740_CODEC_2_HEADPHONE_VOLUME_MASK   0x000003
 
#define JZ4740_CODEC_2_INPUT_VOLUME_OFFSET   16
 
#define JZ4740_CODEC_2_SAMPLE_RATE_OFFSET   8
 
#define JZ4740_CODEC_2_MIC_BOOST_GAIN_OFFSET   4
 
#define JZ4740_CODEC_2_HEADPHONE_VOLUME_OFFSET   0
 
#define jz4740_codec_suspend   NULL
 
#define jz4740_codec_resume   NULL
 

Functions

 module_platform_driver (jz4740_codec_driver)
 
 MODULE_DESCRIPTION ("JZ4740 SoC internal codec driver")
 
 MODULE_AUTHOR ("Lars-Peter Clausen <[email protected]>")
 
 MODULE_LICENSE ("GPL v2")
 
 MODULE_ALIAS ("platform:jz4740-codec")
 

Macro Definition Documentation

#define JZ4740_CODEC_1_ADC_ENABLE   BIT(26)

Definition at line 34 of file jz4740.c.

#define JZ4740_CODEC_1_ADC_ENABLE_OFFSET   26

Definition at line 54 of file jz4740.c.

#define JZ4740_CODEC_1_DAC_ENABLE   BIT(24)

Definition at line 36 of file jz4740.c.

#define JZ4740_CODEC_1_DAC_ENABLE_OFFSET   24

Definition at line 56 of file jz4740.c.

#define JZ4740_CODEC_1_HEADPHONE_AMP_CHANGE_ANY   BIT(13)

Definition at line 43 of file jz4740.c.

#define JZ4740_CODEC_1_HEADPHONE_CHARGE   BIT(12)

Definition at line 44 of file jz4740.c.

#define JZ4740_CODEC_1_HEADPHONE_DISABLE   BIT(14)

Definition at line 42 of file jz4740.c.

#define JZ4740_CODEC_1_HEADPHONE_DISABLE_OFFSET   14

Definition at line 57 of file jz4740.c.

#define JZ4740_CODEC_1_HEADPHONE_POWERDOWN   BIT(8)

Definition at line 47 of file jz4740.c.

#define JZ4740_CODEC_1_HEADPHONE_POWERDOWN_M   BIT(9)

Definition at line 46 of file jz4740.c.

#define JZ4740_CODEC_1_HEADPHONE_POWERDOWN_OFFSET   8

Definition at line 58 of file jz4740.c.

#define JZ4740_CODEC_1_HEADPHONE_PULLDOWN   (BIT(11) | BIT(10))

Definition at line 45 of file jz4740.c.

#define JZ4740_CODEC_1_LINE_ENABLE   BIT(29)

Definition at line 31 of file jz4740.c.

#define JZ4740_CODEC_1_LINE_ENABLE_OFFSET   29

Definition at line 51 of file jz4740.c.

#define JZ4740_CODEC_1_MIC_ENABLE   BIT(28)

Definition at line 32 of file jz4740.c.

#define JZ4740_CODEC_1_MIC_ENABLE_OFFSET   28

Definition at line 52 of file jz4740.c.

#define JZ4740_CODEC_1_RESET   BIT(0)

Definition at line 49 of file jz4740.c.

#define JZ4740_CODEC_1_SUSPEND   BIT(1)

Definition at line 48 of file jz4740.c.

#define JZ4740_CODEC_1_SW1_ENABLE   BIT(27)

Definition at line 33 of file jz4740.c.

#define JZ4740_CODEC_1_SW1_ENABLE_OFFSET   27

Definition at line 53 of file jz4740.c.

#define JZ4740_CODEC_1_SW2_ENABLE   BIT(25)

Definition at line 35 of file jz4740.c.

#define JZ4740_CODEC_1_SW2_ENABLE_OFFSET   25

Definition at line 55 of file jz4740.c.

#define JZ4740_CODEC_1_VREF_AMP_DISABLE   BIT(19)

Definition at line 38 of file jz4740.c.

#define JZ4740_CODEC_1_VREF_DISABLE   BIT(20)

Definition at line 37 of file jz4740.c.

#define JZ4740_CODEC_1_VREF_HIGH_CURRENT   BIT(16)

Definition at line 41 of file jz4740.c.

#define JZ4740_CODEC_1_VREF_LOW_CURRENT   BIT(17)

Definition at line 40 of file jz4740.c.

#define JZ4740_CODEC_1_VREF_PULLDOWN   BIT(18)

Definition at line 39 of file jz4740.c.

#define JZ4740_CODEC_2_HEADPHONE_VOLUME_MASK   0x000003

Definition at line 63 of file jz4740.c.

#define JZ4740_CODEC_2_HEADPHONE_VOLUME_OFFSET   0

Definition at line 68 of file jz4740.c.

#define JZ4740_CODEC_2_INPUT_VOLUME_MASK   0x1f0000

Definition at line 60 of file jz4740.c.

#define JZ4740_CODEC_2_INPUT_VOLUME_OFFSET   16

Definition at line 65 of file jz4740.c.

#define JZ4740_CODEC_2_MIC_BOOST_GAIN_MASK   0x000030

Definition at line 62 of file jz4740.c.

#define JZ4740_CODEC_2_MIC_BOOST_GAIN_OFFSET   4

Definition at line 67 of file jz4740.c.

#define JZ4740_CODEC_2_SAMPLE_RATE_MASK   0x000f00

Definition at line 61 of file jz4740.c.

#define JZ4740_CODEC_2_SAMPLE_RATE_OFFSET   8

Definition at line 66 of file jz4740.c.

#define jz4740_codec_resume   NULL

Definition at line 326 of file jz4740.c.

#define jz4740_codec_suspend   NULL

Definition at line 325 of file jz4740.c.

#define JZ4740_REG_CODEC_1   0x0

Definition at line 28 of file jz4740.c.

#define JZ4740_REG_CODEC_2   0x1

Definition at line 29 of file jz4740.c.

Function Documentation

MODULE_ALIAS ( "platform:jz4740-codec )
MODULE_AUTHOR ( "Lars-Peter Clausen <[email protected]>"  )
MODULE_DESCRIPTION ( "JZ4740 SoC internal codec driver )
MODULE_LICENSE ( "GPL v2 )
module_platform_driver ( jz4740_codec_driver  )