Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros
fsl_ssi.c File Reference
#include <linux/init.h>
#include <linux/io.h>
#include <linux/module.h>
#include <linux/interrupt.h>
#include <linux/clk.h>
#include <linux/device.h>
#include <linux/delay.h>
#include <linux/slab.h>
#include <linux/of_address.h>
#include <linux/of_irq.h>
#include <linux/of_platform.h>
#include <sound/core.h>
#include <sound/pcm.h>
#include <sound/pcm_params.h>
#include <sound/initval.h>
#include <sound/soc.h>
#include "fsl_ssi.h"
#include "imx-pcm.h"

Go to the source code of this file.

Data Structures

struct  fsl_ssi_private
 

Macros

#define FSLSSI_I2S_RATES
 
#define FSLSSI_I2S_FORMATS
 
#define SIER_FLAGS
 

: name for this device

fsl_ssi_private: per-SSI private data

: pointer to the SSI's registers : physical address of the SSI registers : IRQ of this SSI : pointer to the stream that was opened first : pointer to second stream : the number of playback streams opened : the number of capture streams opened : the CPU DAI for this device : the sysfs device attribute structure : SSI statistics

#define SIER_SHOW(flag, name)
 
 MODULE_DEVICE_TABLE (of, fsl_ssi_ids)
 
 module_platform_driver (fsl_ssi_driver)
 
 MODULE_AUTHOR ("Timur Tabi <[email protected]>")
 
 MODULE_DESCRIPTION ("Freescale Synchronous Serial Interface (SSI) ASoC Driver")
 
 MODULE_LICENSE ("GPL v2")
 

Macro Definition Documentation

#define FSLSSI_I2S_FORMATS
Value:
SNDRV_PCM_FMTBIT_S18_3LE | SNDRV_PCM_FMTBIT_S20_3LE | \
SNDRV_PCM_FMTBIT_S24_3LE | SNDRV_PCM_FMTBIT_S24_LE)

FSLSSI_I2S_FORMATS: audio formats supported by the SSI

This driver currently only supports the SSI running in I2S slave mode.

The SSI has a limitation in that the samples must be in the same byte order as the host CPU. This is because when multiple bytes are written to the STX register, the bytes and bits must be written in the same order. The STX is a shift register, so all the bits need to be aligned (bit-endianness must match byte-endianness). Processors typically write the bits within a byte in the same order that the bytes of a word are written in. So if the host CPU is big-endian, then only big-endian samples will be written to STX properly.

Definition at line 83 of file fsl_ssi.c.

#define FSLSSI_I2S_RATES
Value:
SNDRV_PCM_RATE_CONTINUOUS)

FSLSSI_I2S_RATES: sample rates supported by the I2S

This driver currently only supports the SSI running in I2S slave mode, which means the codec determines the sample rate. Therefore, we tell ALSA that we support all rates and let the codec driver decide what rates are really supported.

Definition at line 61 of file fsl_ssi.c.

#define SIER_FLAGS
Value:
CCSR_SSI_SIER_TIE | CCSR_SSI_SIER_TUE0_EN | \
CCSR_SSI_SIER_TUE1_EN | CCSR_SSI_SIER_RFRC_EN | \
CCSR_SSI_SIER_RDMAE | CCSR_SSI_SIER_RIE | \
CCSR_SSI_SIER_ROE0_EN | CCSR_SSI_SIER_ROE1_EN)

Definition at line 89 of file fsl_ssi.c.

#define SIER_SHOW (   flag,
  name 
)
Value:
do { \
if (SIER_FLAGS & CCSR_SSI_SIER_##flag) \
length += sprintf(buf + length, #name "=%u\n", \
ssi_private->stats.name); \
} while (0)

Definition at line 581 of file fsl_ssi.c.

Function Documentation

MODULE_AUTHOR ( "Timur Tabi <[email protected]>"  )
MODULE_DESCRIPTION ( "Freescale Synchronous Serial Interface (SSI) ASoC Driver"  )
MODULE_DEVICE_TABLE ( of  ,
fsl_ssi_ids   
)
MODULE_LICENSE ( "GPL v2 )
module_platform_driver ( fsl_ssi_driver  )