Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
soc-dai.h File Reference
#include <linux/list.h>

Go to the source code of this file.

Data Structures

struct  snd_soc_dai_ops
 
struct  snd_soc_dai_driver
 
struct  snd_soc_dai
 

Macros

#define SND_SOC_DAIFMT_I2S   1 /* I2S mode */
 
#define SND_SOC_DAIFMT_RIGHT_J   2 /* Right Justified mode */
 
#define SND_SOC_DAIFMT_LEFT_J   3 /* Left Justified mode */
 
#define SND_SOC_DAIFMT_DSP_A   4 /* L data MSB after FRM LRC */
 
#define SND_SOC_DAIFMT_DSP_B   5 /* L data MSB during FRM LRC */
 
#define SND_SOC_DAIFMT_AC97   6 /* AC97 */
 
#define SND_SOC_DAIFMT_PDM   7 /* Pulse density modulation */
 
#define SND_SOC_DAIFMT_MSB   SND_SOC_DAIFMT_LEFT_J
 
#define SND_SOC_DAIFMT_LSB   SND_SOC_DAIFMT_RIGHT_J
 
#define SND_SOC_DAIFMT_CONT   (1 << 4) /* continuous clock */
 
#define SND_SOC_DAIFMT_GATED   (2 << 4) /* clock is gated */
 
#define SND_SOC_DAIFMT_NB_NF   (1 << 8) /* normal bit clock + frame */
 
#define SND_SOC_DAIFMT_NB_IF   (2 << 8) /* normal BCLK + inv FRM */
 
#define SND_SOC_DAIFMT_IB_NF   (3 << 8) /* invert BCLK + nor FRM */
 
#define SND_SOC_DAIFMT_IB_IF   (4 << 8) /* invert BCLK + FRM */
 
#define SND_SOC_DAIFMT_CBM_CFM   (1 << 12) /* codec clk & FRM master */
 
#define SND_SOC_DAIFMT_CBS_CFM   (2 << 12) /* codec clk slave & FRM master */
 
#define SND_SOC_DAIFMT_CBM_CFS   (3 << 12) /* codec clk master & frame slave */
 
#define SND_SOC_DAIFMT_CBS_CFS   (4 << 12) /* codec clk & FRM slave */
 
#define SND_SOC_DAIFMT_FORMAT_MASK   0x000f
 
#define SND_SOC_DAIFMT_CLOCK_MASK   0x00f0
 
#define SND_SOC_DAIFMT_INV_MASK   0x0f00
 
#define SND_SOC_DAIFMT_MASTER_MASK   0xf000
 
#define SND_SOC_CLOCK_IN   0
 
#define SND_SOC_CLOCK_OUT   1
 
#define SND_SOC_STD_AC97_FMTS
 

Functions

int snd_soc_register_dai (struct device *dev, struct snd_soc_dai_driver *dai_drv)
 
void snd_soc_unregister_dai (struct device *dev)
 
int snd_soc_register_dais (struct device *dev, struct snd_soc_dai_driver *dai_drv, size_t count)
 
void snd_soc_unregister_dais (struct device *dev, size_t count)
 
int snd_soc_dai_set_sysclk (struct snd_soc_dai *dai, int clk_id, unsigned int freq, int dir)
 
int snd_soc_dai_set_clkdiv (struct snd_soc_dai *dai, int div_id, int div)
 
int snd_soc_dai_set_pll (struct snd_soc_dai *dai, int pll_id, int source, unsigned int freq_in, unsigned int freq_out)
 
int snd_soc_dai_set_fmt (struct snd_soc_dai *dai, unsigned int fmt)
 
int snd_soc_dai_set_tdm_slot (struct snd_soc_dai *dai, unsigned int tx_mask, unsigned int rx_mask, int slots, int slot_width)
 
int snd_soc_dai_set_channel_map (struct snd_soc_dai *dai, unsigned int tx_num, unsigned int *tx_slot, unsigned int rx_num, unsigned int *rx_slot)
 
int snd_soc_dai_set_tristate (struct snd_soc_dai *dai, int tristate)
 
int snd_soc_dai_digital_mute (struct snd_soc_dai *dai, int mute)
 

Macro Definition Documentation

#define SND_SOC_CLOCK_IN   0

Definition at line 81 of file soc-dai.h.

#define SND_SOC_CLOCK_OUT   1

Definition at line 82 of file soc-dai.h.

#define SND_SOC_DAIFMT_AC97   6 /* AC97 */

Definition at line 34 of file soc-dai.h.

#define SND_SOC_DAIFMT_CBM_CFM   (1 << 12) /* codec clk & FRM master */

Definition at line 68 of file soc-dai.h.

#define SND_SOC_DAIFMT_CBM_CFS   (3 << 12) /* codec clk master & frame slave */

Definition at line 70 of file soc-dai.h.

#define SND_SOC_DAIFMT_CBS_CFM   (2 << 12) /* codec clk slave & FRM master */

Definition at line 69 of file soc-dai.h.

#define SND_SOC_DAIFMT_CBS_CFS   (4 << 12) /* codec clk & FRM slave */

Definition at line 71 of file soc-dai.h.

#define SND_SOC_DAIFMT_CLOCK_MASK   0x00f0

Definition at line 74 of file soc-dai.h.

#define SND_SOC_DAIFMT_CONT   (1 << 4) /* continuous clock */

Definition at line 47 of file soc-dai.h.

#define SND_SOC_DAIFMT_DSP_A   4 /* L data MSB after FRM LRC */

Definition at line 32 of file soc-dai.h.

#define SND_SOC_DAIFMT_DSP_B   5 /* L data MSB during FRM LRC */

Definition at line 33 of file soc-dai.h.

#define SND_SOC_DAIFMT_FORMAT_MASK   0x000f

Definition at line 73 of file soc-dai.h.

#define SND_SOC_DAIFMT_GATED   (2 << 4) /* clock is gated */

Definition at line 48 of file soc-dai.h.

#define SND_SOC_DAIFMT_I2S   1 /* I2S mode */

Definition at line 29 of file soc-dai.h.

#define SND_SOC_DAIFMT_IB_IF   (4 << 8) /* invert BCLK + FRM */

Definition at line 59 of file soc-dai.h.

#define SND_SOC_DAIFMT_IB_NF   (3 << 8) /* invert BCLK + nor FRM */

Definition at line 58 of file soc-dai.h.

#define SND_SOC_DAIFMT_INV_MASK   0x0f00

Definition at line 75 of file soc-dai.h.

#define SND_SOC_DAIFMT_LEFT_J   3 /* Left Justified mode */

Definition at line 31 of file soc-dai.h.

#define SND_SOC_DAIFMT_LSB   SND_SOC_DAIFMT_RIGHT_J

Definition at line 39 of file soc-dai.h.

#define SND_SOC_DAIFMT_MASTER_MASK   0xf000

Definition at line 76 of file soc-dai.h.

#define SND_SOC_DAIFMT_MSB   SND_SOC_DAIFMT_LEFT_J

Definition at line 38 of file soc-dai.h.

#define SND_SOC_DAIFMT_NB_IF   (2 << 8) /* normal BCLK + inv FRM */

Definition at line 57 of file soc-dai.h.

#define SND_SOC_DAIFMT_NB_NF   (1 << 8) /* normal bit clock + frame */

Definition at line 56 of file soc-dai.h.

#define SND_SOC_DAIFMT_PDM   7 /* Pulse density modulation */

Definition at line 35 of file soc-dai.h.

#define SND_SOC_DAIFMT_RIGHT_J   2 /* Right Justified mode */

Definition at line 30 of file soc-dai.h.

#define SND_SOC_STD_AC97_FMTS
Value:
SNDRV_PCM_FMTBIT_S16_LE |\
SNDRV_PCM_FMTBIT_S16_BE |\
SNDRV_PCM_FMTBIT_S20_3LE |\
SNDRV_PCM_FMTBIT_S20_3BE |\
SNDRV_PCM_FMTBIT_S24_3LE |\
SNDRV_PCM_FMTBIT_S24_3BE |\
SNDRV_PCM_FMTBIT_S32_LE |\
SNDRV_PCM_FMTBIT_S32_BE)

Definition at line 84 of file soc-dai.h.

Function Documentation

int snd_soc_dai_digital_mute ( struct snd_soc_dai dai,
int  mute 
)

snd_soc_dai_digital_mute - configure DAI system or master clock. : DAI : mute enable

Mutes the DAI DAC.

Definition at line 3507 of file soc-core.c.

int snd_soc_dai_set_channel_map ( struct snd_soc_dai dai,
unsigned int  tx_num,
unsigned int tx_slot,
unsigned int  rx_num,
unsigned int rx_slot 
)

snd_soc_dai_set_channel_map - configure DAI audio channel map : DAI : how many TX channels : pointer to an array which imply the TX slot number channel 0~num-1 uses : how many RX channels : pointer to an array which imply the RX slot number channel 0~num-1 uses

configure the relationship between channel number and TDM slot number.

Definition at line 3472 of file soc-core.c.

int snd_soc_dai_set_clkdiv ( struct snd_soc_dai dai,
int  div_id,
int  div 
)

snd_soc_dai_set_clkdiv - configure DAI clock dividers. : DAI : DAI specific clock divider ID : new clock divisor.

Configures the clock dividers. This is used to derive the best DAI bit and frame clocks from the system or master clock. It's best to set the DAI bit and frame clocks as low as possible to save system power.

Definition at line 3366 of file soc-core.c.

int snd_soc_dai_set_fmt ( struct snd_soc_dai dai,
unsigned int  fmt 
)

snd_soc_dai_set_fmt - configure DAI hardware audio format. : DAI : SND_SOC_DAIFMT_ format value.

Configures the DAI hardware format and clocking.

Definition at line 3428 of file soc-core.c.

int snd_soc_dai_set_pll ( struct snd_soc_dai dai,
int  pll_id,
int  source,
unsigned int  freq_in,
unsigned int  freq_out 
)

snd_soc_dai_set_pll - configure DAI PLL. : DAI : DAI specific PLL ID : DAI specific source for the PLL : PLL input clock frequency in Hz : requested PLL output clock frequency in Hz

Configures and enables PLL to generate output clock based on input clock.

Definition at line 3386 of file soc-core.c.

int snd_soc_dai_set_sysclk ( struct snd_soc_dai dai,
int  clk_id,
unsigned int  freq,
int  dir 
)

Definition at line 3322 of file soc-core.c.

int snd_soc_dai_set_tdm_slot ( struct snd_soc_dai dai,
unsigned int  tx_mask,
unsigned int  rx_mask,
int  slots,
int  slot_width 
)

snd_soc_dai_set_tdm_slot - configure DAI TDM. : DAI : bitmask representing active TX slots. : bitmask representing active RX slots. : Number of slots in use. : Width in bits for each slot.

Configures a DAI for TDM operation. Both mask and slots are codec and DAI specific.

Definition at line 3449 of file soc-core.c.

int snd_soc_dai_set_tristate ( struct snd_soc_dai dai,
int  tristate 
)

snd_soc_dai_set_tristate - configure DAI system or master clock. : DAI : tristate enable

Tristates the DAI so that others can use it.

Definition at line 3491 of file soc-core.c.

int snd_soc_register_dai ( struct device dev,
struct snd_soc_dai_driver dai_drv 
)

snd_soc_register_dai - Register a DAI with the ASoC core

: DAI to register

Definition at line 3695 of file soc-core.c.

int snd_soc_register_dais ( struct device dev,
struct snd_soc_dai_driver dai_drv,
size_t  count 
)

snd_soc_register_dais - Register multiple DAIs with the ASoC core

: Array of DAIs to register : Number of DAIs

Definition at line 3776 of file soc-core.c.

void snd_soc_unregister_dai ( struct device dev)

snd_soc_unregister_dai - Unregister a DAI from the ASoC core

: DAI to unregister

Definition at line 3749 of file soc-core.c.

void snd_soc_unregister_dais ( struct device dev,
size_t  count 
)

snd_soc_unregister_dais - Unregister multiple DAIs from the ASoC core

: Array of DAIs to unregister : Number of DAIs

Definition at line 3848 of file soc-core.c.