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

Go to the source code of this file.

Data Structures

struct  jz4740_i2s
 

Macros

#define JZ_REG_AIC_CONF   0x00
 
#define JZ_REG_AIC_CTRL   0x04
 
#define JZ_REG_AIC_I2S_FMT   0x10
 
#define JZ_REG_AIC_FIFO_STATUS   0x14
 
#define JZ_REG_AIC_I2S_STATUS   0x1c
 
#define JZ_REG_AIC_CLK_DIV   0x30
 
#define JZ_REG_AIC_FIFO   0x34
 
#define JZ_AIC_CONF_FIFO_RX_THRESHOLD_MASK   (0xf << 12)
 
#define JZ_AIC_CONF_FIFO_TX_THRESHOLD_MASK   (0xf << 8)
 
#define JZ_AIC_CONF_OVERFLOW_PLAY_LAST   BIT(6)
 
#define JZ_AIC_CONF_INTERNAL_CODEC   BIT(5)
 
#define JZ_AIC_CONF_I2S   BIT(4)
 
#define JZ_AIC_CONF_RESET   BIT(3)
 
#define JZ_AIC_CONF_BIT_CLK_MASTER   BIT(2)
 
#define JZ_AIC_CONF_SYNC_CLK_MASTER   BIT(1)
 
#define JZ_AIC_CONF_ENABLE   BIT(0)
 
#define JZ_AIC_CONF_FIFO_RX_THRESHOLD_OFFSET   12
 
#define JZ_AIC_CONF_FIFO_TX_THRESHOLD_OFFSET   8
 
#define JZ_AIC_CTRL_OUTPUT_SAMPLE_SIZE_MASK   (0x7 << 19)
 
#define JZ_AIC_CTRL_INPUT_SAMPLE_SIZE_MASK   (0x7 << 16)
 
#define JZ_AIC_CTRL_ENABLE_RX_DMA   BIT(15)
 
#define JZ_AIC_CTRL_ENABLE_TX_DMA   BIT(14)
 
#define JZ_AIC_CTRL_MONO_TO_STEREO   BIT(11)
 
#define JZ_AIC_CTRL_SWITCH_ENDIANNESS   BIT(10)
 
#define JZ_AIC_CTRL_SIGNED_TO_UNSIGNED   BIT(9)
 
#define JZ_AIC_CTRL_FLUSH   BIT(8)
 
#define JZ_AIC_CTRL_ENABLE_ROR_INT   BIT(6)
 
#define JZ_AIC_CTRL_ENABLE_TUR_INT   BIT(5)
 
#define JZ_AIC_CTRL_ENABLE_RFS_INT   BIT(4)
 
#define JZ_AIC_CTRL_ENABLE_TFS_INT   BIT(3)
 
#define JZ_AIC_CTRL_ENABLE_LOOPBACK   BIT(2)
 
#define JZ_AIC_CTRL_ENABLE_PLAYBACK   BIT(1)
 
#define JZ_AIC_CTRL_ENABLE_CAPTURE   BIT(0)
 
#define JZ_AIC_CTRL_OUTPUT_SAMPLE_SIZE_OFFSET   19
 
#define JZ_AIC_CTRL_INPUT_SAMPLE_SIZE_OFFSET   16
 
#define JZ_AIC_I2S_FMT_DISABLE_BIT_CLK   BIT(12)
 
#define JZ_AIC_I2S_FMT_ENABLE_SYS_CLK   BIT(4)
 
#define JZ_AIC_I2S_FMT_MSB   BIT(0)
 
#define JZ_AIC_I2S_STATUS_BUSY   BIT(2)
 
#define JZ_AIC_CLK_DIV_MASK   0xf
 
#define JZ4740_I2S_FMTS
 

Functions

 module_platform_driver (jz4740_i2s_driver)
 
 MODULE_AUTHOR ("Lars-Peter Clausen, <[email protected]>")
 
 MODULE_DESCRIPTION ("Ingenic JZ4740 SoC I2S driver")
 
 MODULE_LICENSE ("GPL")
 
 MODULE_ALIAS ("platform:jz4740-i2s")
 

Macro Definition Documentation

#define JZ4740_I2S_FMTS
Value:
SNDRV_PCM_FMTBIT_S16_LE)

Definition at line 404 of file jz4740-i2s.c.

#define JZ_AIC_CLK_DIV_MASK   0xf

Definition at line 82 of file jz4740-i2s.c.

#define JZ_AIC_CONF_BIT_CLK_MASTER   BIT(2)

Definition at line 50 of file jz4740-i2s.c.

#define JZ_AIC_CONF_ENABLE   BIT(0)

Definition at line 52 of file jz4740-i2s.c.

#define JZ_AIC_CONF_FIFO_RX_THRESHOLD_MASK   (0xf << 12)

Definition at line 44 of file jz4740-i2s.c.

#define JZ_AIC_CONF_FIFO_RX_THRESHOLD_OFFSET   12

Definition at line 54 of file jz4740-i2s.c.

#define JZ_AIC_CONF_FIFO_TX_THRESHOLD_MASK   (0xf << 8)

Definition at line 45 of file jz4740-i2s.c.

#define JZ_AIC_CONF_FIFO_TX_THRESHOLD_OFFSET   8

Definition at line 55 of file jz4740-i2s.c.

#define JZ_AIC_CONF_I2S   BIT(4)

Definition at line 48 of file jz4740-i2s.c.

#define JZ_AIC_CONF_INTERNAL_CODEC   BIT(5)

Definition at line 47 of file jz4740-i2s.c.

#define JZ_AIC_CONF_OVERFLOW_PLAY_LAST   BIT(6)

Definition at line 46 of file jz4740-i2s.c.

#define JZ_AIC_CONF_RESET   BIT(3)

Definition at line 49 of file jz4740-i2s.c.

#define JZ_AIC_CONF_SYNC_CLK_MASTER   BIT(1)

Definition at line 51 of file jz4740-i2s.c.

#define JZ_AIC_CTRL_ENABLE_CAPTURE   BIT(0)

Definition at line 71 of file jz4740-i2s.c.

#define JZ_AIC_CTRL_ENABLE_LOOPBACK   BIT(2)

Definition at line 69 of file jz4740-i2s.c.

#define JZ_AIC_CTRL_ENABLE_PLAYBACK   BIT(1)

Definition at line 70 of file jz4740-i2s.c.

#define JZ_AIC_CTRL_ENABLE_RFS_INT   BIT(4)

Definition at line 67 of file jz4740-i2s.c.

#define JZ_AIC_CTRL_ENABLE_ROR_INT   BIT(6)

Definition at line 65 of file jz4740-i2s.c.

#define JZ_AIC_CTRL_ENABLE_RX_DMA   BIT(15)

Definition at line 59 of file jz4740-i2s.c.

#define JZ_AIC_CTRL_ENABLE_TFS_INT   BIT(3)

Definition at line 68 of file jz4740-i2s.c.

#define JZ_AIC_CTRL_ENABLE_TUR_INT   BIT(5)

Definition at line 66 of file jz4740-i2s.c.

#define JZ_AIC_CTRL_ENABLE_TX_DMA   BIT(14)

Definition at line 60 of file jz4740-i2s.c.

#define JZ_AIC_CTRL_FLUSH   BIT(8)

Definition at line 64 of file jz4740-i2s.c.

#define JZ_AIC_CTRL_INPUT_SAMPLE_SIZE_MASK   (0x7 << 16)

Definition at line 58 of file jz4740-i2s.c.

#define JZ_AIC_CTRL_INPUT_SAMPLE_SIZE_OFFSET   16

Definition at line 74 of file jz4740-i2s.c.

#define JZ_AIC_CTRL_MONO_TO_STEREO   BIT(11)

Definition at line 61 of file jz4740-i2s.c.

#define JZ_AIC_CTRL_OUTPUT_SAMPLE_SIZE_MASK   (0x7 << 19)

Definition at line 57 of file jz4740-i2s.c.

#define JZ_AIC_CTRL_OUTPUT_SAMPLE_SIZE_OFFSET   19

Definition at line 73 of file jz4740-i2s.c.

#define JZ_AIC_CTRL_SIGNED_TO_UNSIGNED   BIT(9)

Definition at line 63 of file jz4740-i2s.c.

#define JZ_AIC_CTRL_SWITCH_ENDIANNESS   BIT(10)

Definition at line 62 of file jz4740-i2s.c.

#define JZ_AIC_I2S_FMT_DISABLE_BIT_CLK   BIT(12)

Definition at line 76 of file jz4740-i2s.c.

#define JZ_AIC_I2S_FMT_ENABLE_SYS_CLK   BIT(4)

Definition at line 77 of file jz4740-i2s.c.

#define JZ_AIC_I2S_FMT_MSB   BIT(0)

Definition at line 78 of file jz4740-i2s.c.

#define JZ_AIC_I2S_STATUS_BUSY   BIT(2)

Definition at line 80 of file jz4740-i2s.c.

#define JZ_REG_AIC_CLK_DIV   0x30

Definition at line 41 of file jz4740-i2s.c.

#define JZ_REG_AIC_CONF   0x00

Definition at line 36 of file jz4740-i2s.c.

#define JZ_REG_AIC_CTRL   0x04

Definition at line 37 of file jz4740-i2s.c.

#define JZ_REG_AIC_FIFO   0x34

Definition at line 42 of file jz4740-i2s.c.

#define JZ_REG_AIC_FIFO_STATUS   0x14

Definition at line 39 of file jz4740-i2s.c.

#define JZ_REG_AIC_I2S_FMT   0x10

Definition at line 38 of file jz4740-i2s.c.

#define JZ_REG_AIC_I2S_STATUS   0x1c

Definition at line 40 of file jz4740-i2s.c.

Function Documentation

MODULE_ALIAS ( "platform:jz4740-i2s"  )
MODULE_AUTHOR ( "Lars-Peter  Clausen,
< lars @metafoo.de >"   
)
MODULE_DESCRIPTION ( "Ingenic JZ4740 SoC I2S driver )
MODULE_LICENSE ( "GPL"  )
module_platform_driver ( jz4740_i2s_driver  )