Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Typedefs | Enumerations | Functions | Variables
soc.h File Reference
#include <linux/platform_device.h>
#include <linux/types.h>
#include <linux/notifier.h>
#include <linux/workqueue.h>
#include <linux/interrupt.h>
#include <linux/kernel.h>
#include <linux/regmap.h>
#include <linux/log2.h>
#include <sound/core.h>
#include <sound/pcm.h>
#include <sound/compress_driver.h>
#include <sound/control.h>
#include <sound/ac97_codec.h>
#include <sound/soc-dapm.h>
#include <sound/soc-dpcm.h>
#include <sound/soc-dai.h>

Go to the source code of this file.

Data Structures

struct  snd_soc_reg_access
 
struct  snd_soc_jack_pin
 
struct  snd_soc_jack_zone
 
struct  snd_soc_jack
 
struct  snd_soc_pcm_stream
 
struct  snd_soc_ops
 
struct  snd_soc_compr_ops
 
struct  snd_soc_cache_ops
 
struct  snd_soc_codec
 
struct  snd_soc_codec_driver
 
struct  snd_soc_platform_driver
 
struct  snd_soc_platform
 
struct  snd_soc_dai_link
 
struct  snd_soc_codec_conf
 
struct  snd_soc_aux_dev
 
struct  snd_soc_card
 
struct  snd_soc_pcm_runtime
 
struct  soc_mixer_control
 
struct  soc_bytes
 
struct  soc_mreg_control
 
struct  soc_enum
 

Macros

#define SOC_DOUBLE_VALUE(xreg, shift_left, shift_right, xmax, xinvert)
 
#define SOC_SINGLE_VALUE(xreg, xshift, xmax, xinvert)   SOC_DOUBLE_VALUE(xreg, xshift, xshift, xmax, xinvert)
 
#define SOC_SINGLE_VALUE_EXT(xreg, xmax, xinvert)
 
#define SOC_DOUBLE_R_VALUE(xlreg, xrreg, xshift, xmax, xinvert)
 
#define SOC_DOUBLE_R_RANGE_VALUE(xlreg, xrreg, xshift, xmin, xmax, xinvert)
 
#define SOC_SINGLE(xname, reg, shift, max, invert)
 
#define SOC_SINGLE_RANGE(xname, xreg, xshift, xmin, xmax, xinvert)
 
#define SOC_SINGLE_TLV(xname, reg, shift, max, invert, tlv_array)
 
#define SOC_SINGLE_SX_TLV(xname, xreg, xshift, xmin, xmax, tlv_array)
 
#define SOC_SINGLE_RANGE_TLV(xname, xreg, xshift, xmin, xmax, xinvert, tlv_array)
 
#define SOC_DOUBLE(xname, reg, shift_left, shift_right, max, invert)
 
#define SOC_DOUBLE_R(xname, reg_left, reg_right, xshift, xmax, xinvert)
 
#define SOC_DOUBLE_R_RANGE(xname, reg_left, reg_right, xshift, xmin, xmax, xinvert)
 
#define SOC_DOUBLE_TLV(xname, reg, shift_left, shift_right, max, invert, tlv_array)
 
#define SOC_DOUBLE_R_TLV(xname, reg_left, reg_right, xshift, xmax, xinvert, tlv_array)
 
#define SOC_DOUBLE_R_RANGE_TLV(xname, reg_left, reg_right, xshift, xmin, xmax, xinvert, tlv_array)
 
#define SOC_DOUBLE_R_SX_TLV(xname, xreg, xrreg, xshift, xmin, xmax, tlv_array)
 
#define SOC_DOUBLE_S8_TLV(xname, xreg, xmin, xmax, tlv_array)
 
#define SOC_ENUM_DOUBLE(xreg, xshift_l, xshift_r, xmax, xtexts)
 
#define SOC_ENUM_SINGLE(xreg, xshift, xmax, xtexts)   SOC_ENUM_DOUBLE(xreg, xshift, xshift, xmax, xtexts)
 
#define SOC_ENUM_SINGLE_EXT(xmax, xtexts)   { .max = xmax, .texts = xtexts }
 
#define SOC_VALUE_ENUM_DOUBLE(xreg, xshift_l, xshift_r, xmask, xmax, xtexts, xvalues)
 
#define SOC_VALUE_ENUM_SINGLE(xreg, xshift, xmask, xmax, xtexts, xvalues)   SOC_VALUE_ENUM_DOUBLE(xreg, xshift, xshift, xmask, xmax, xtexts, xvalues)
 
#define SOC_ENUM(xname, xenum)
 
#define SOC_VALUE_ENUM(xname, xenum)
 
#define SOC_SINGLE_EXT(xname, xreg, xshift, xmax, xinvert, xhandler_get, xhandler_put)
 
#define SOC_DOUBLE_EXT(xname, reg, shift_left, shift_right, max, invert, xhandler_get, xhandler_put)
 
#define SOC_SINGLE_EXT_TLV(xname, xreg, xshift, xmax, xinvert, xhandler_get, xhandler_put, tlv_array)
 
#define SOC_DOUBLE_EXT_TLV(xname, xreg, shift_left, shift_right, xmax, xinvert, xhandler_get, xhandler_put, tlv_array)
 
#define SOC_DOUBLE_R_EXT_TLV(xname, reg_left, reg_right, xshift, xmax, xinvert, xhandler_get, xhandler_put, tlv_array)
 
#define SOC_SINGLE_BOOL_EXT(xname, xdata, xhandler_get, xhandler_put)
 
#define SOC_ENUM_EXT(xname, xenum, xhandler_get, xhandler_put)
 
#define SND_SOC_BYTES(xname, xbase, xregs)
 
#define SND_SOC_BYTES_MASK(xname, xbase, xregs, xmask)
 
#define SOC_SINGLE_XR_SX(xname, xregbase, xregcount, xnbits, xmin, xmax, xinvert)
 
#define SOC_SINGLE_STROBE(xname, xreg, xshift, xinvert)
 
#define SOC_ENUM_DOUBLE_DECL(name, xreg, xshift_l, xshift_r, xtexts)
 
#define SOC_ENUM_SINGLE_DECL(name, xreg, xshift, xtexts)   SOC_ENUM_DOUBLE_DECL(name, xreg, xshift, xshift, xtexts)
 
#define SOC_ENUM_SINGLE_EXT_DECL(name, xtexts)   struct soc_enum name = SOC_ENUM_SINGLE_EXT(ARRAY_SIZE(xtexts), xtexts)
 
#define SOC_VALUE_ENUM_DOUBLE_DECL(name, xreg, xshift_l, xshift_r, xmask, xtexts, xvalues)
 
#define SOC_VALUE_ENUM_SINGLE_DECL(name, xreg, xshift, xmask, xtexts, xvalues)   SOC_VALUE_ENUM_DOUBLE_DECL(name, xreg, xshift, xshift, xmask, xtexts, xvalues)
 
#define SND_SOC_COMP_ORDER_FIRST   -2
 
#define SND_SOC_COMP_ORDER_EARLY   -1
 
#define SND_SOC_COMP_ORDER_NORMAL   0
 
#define SND_SOC_COMP_ORDER_LATE   1
 
#define SND_SOC_COMP_ORDER_LAST   2
 
#define snd_soc_info_bool_ext   snd_ctl_boolean_mono_info
 
#define snd_soc_get_volsw_2r   snd_soc_get_volsw
 
#define snd_soc_put_volsw_2r   snd_soc_put_volsw
 

Typedefs

typedef int(* hw_write_t )(void *, const char *, int)
 

Enumerations

enum  snd_soc_bias_level { SND_SOC_BIAS_OFF = 0, SND_SOC_BIAS_STANDBY = 1, SND_SOC_BIAS_PREPARE = 2, SND_SOC_BIAS_ON = 3 }
 
enum  snd_soc_control_type { SND_SOC_I2C = 1, SND_SOC_SPI, SND_SOC_REGMAP }
 
enum  snd_soc_compress_type { SND_SOC_FLAT_COMPRESSION = 1 }
 
enum  snd_soc_pcm_subclass { SND_SOC_PCM_CLASS_PCM = 0, SND_SOC_PCM_CLASS_BE = 1 }
 
enum  snd_soc_card_subclass { SND_SOC_CARD_CLASS_INIT = 0, SND_SOC_CARD_CLASS_RUNTIME = 1 }
 

Functions

int snd_soc_codec_set_sysclk (struct snd_soc_codec *codec, int clk_id, int source, unsigned int freq, int dir)
 
int snd_soc_codec_set_pll (struct snd_soc_codec *codec, int pll_id, int source, unsigned int freq_in, unsigned int freq_out)
 
int snd_soc_register_card (struct snd_soc_card *card)
 
int snd_soc_unregister_card (struct snd_soc_card *card)
 
int snd_soc_suspend (struct device *dev)
 
int snd_soc_resume (struct device *dev)
 
int snd_soc_poweroff (struct device *dev)
 
int snd_soc_register_platform (struct device *dev, struct snd_soc_platform_driver *platform_drv)
 
void snd_soc_unregister_platform (struct device *dev)
 
int snd_soc_register_codec (struct device *dev, const struct snd_soc_codec_driver *codec_drv, struct snd_soc_dai_driver *dai_drv, int num_dai)
 
void snd_soc_unregister_codec (struct device *dev)
 
int snd_soc_codec_volatile_register (struct snd_soc_codec *codec, unsigned int reg)
 
int snd_soc_codec_readable_register (struct snd_soc_codec *codec, unsigned int reg)
 
int snd_soc_codec_writable_register (struct snd_soc_codec *codec, unsigned int reg)
 
int snd_soc_codec_set_cache_io (struct snd_soc_codec *codec, int addr_bits, int data_bits, enum snd_soc_control_type control)
 
int snd_soc_cache_sync (struct snd_soc_codec *codec)
 
int snd_soc_cache_init (struct snd_soc_codec *codec)
 
int snd_soc_cache_exit (struct snd_soc_codec *codec)
 
int snd_soc_cache_write (struct snd_soc_codec *codec, unsigned int reg, unsigned int value)
 
int snd_soc_cache_read (struct snd_soc_codec *codec, unsigned int reg, unsigned int *value)
 
int snd_soc_default_volatile_register (struct snd_soc_codec *codec, unsigned int reg)
 
int snd_soc_default_readable_register (struct snd_soc_codec *codec, unsigned int reg)
 
int snd_soc_default_writable_register (struct snd_soc_codec *codec, unsigned int reg)
 
int snd_soc_platform_read (struct snd_soc_platform *platform, unsigned int reg)
 
int snd_soc_platform_write (struct snd_soc_platform *platform, unsigned int reg, unsigned int val)
 
int soc_new_pcm (struct snd_soc_pcm_runtime *rtd, int num)
 
int soc_new_compress (struct snd_soc_pcm_runtime *rtd, int num)
 
struct snd_pcm_substreamsnd_soc_get_dai_substream (struct snd_soc_card *card, const char *dai_link, int stream)
 
struct snd_soc_pcm_runtimesnd_soc_get_pcm_runtime (struct snd_soc_card *card, const char *dai_link)
 
int snd_soc_calc_frame_size (int sample_size, int channels, int tdm_slots)
 
int snd_soc_params_to_frame_size (struct snd_pcm_hw_params *params)
 
int snd_soc_calc_bclk (int fs, int sample_size, int channels, int tdm_slots)
 
int snd_soc_params_to_bclk (struct snd_pcm_hw_params *parms)
 
int snd_soc_set_runtime_hwparams (struct snd_pcm_substream *substream, const struct snd_pcm_hardware *hw)
 
int snd_soc_platform_trigger (struct snd_pcm_substream *substream, int cmd, struct snd_soc_platform *platform)
 
int snd_soc_jack_new (struct snd_soc_codec *codec, const char *id, int type, struct snd_soc_jack *jack)
 
void snd_soc_jack_report (struct snd_soc_jack *jack, int status, int mask)
 
int snd_soc_jack_add_pins (struct snd_soc_jack *jack, int count, struct snd_soc_jack_pin *pins)
 
void snd_soc_jack_notifier_register (struct snd_soc_jack *jack, struct notifier_block *nb)
 
void snd_soc_jack_notifier_unregister (struct snd_soc_jack *jack, struct notifier_block *nb)
 
int snd_soc_jack_add_zones (struct snd_soc_jack *jack, int count, struct snd_soc_jack_zone *zones)
 
int snd_soc_jack_get_type (struct snd_soc_jack *jack, int micbias_voltage)
 
int snd_soc_update_bits (struct snd_soc_codec *codec, unsigned short reg, unsigned int mask, unsigned int value)
 
int snd_soc_update_bits_locked (struct snd_soc_codec *codec, unsigned short reg, unsigned int mask, unsigned int value)
 
int snd_soc_test_bits (struct snd_soc_codec *codec, unsigned short reg, unsigned int mask, unsigned int value)
 
int snd_soc_new_ac97_codec (struct snd_soc_codec *codec, struct snd_ac97_bus_ops *ops, int num)
 
void snd_soc_free_ac97_codec (struct snd_soc_codec *codec)
 
struct snd_kcontrolsnd_soc_cnew (const struct snd_kcontrol_new *_template, void *data, const char *long_name, const char *prefix)
 
int snd_soc_add_codec_controls (struct snd_soc_codec *codec, const struct snd_kcontrol_new *controls, int num_controls)
 
int snd_soc_add_platform_controls (struct snd_soc_platform *platform, const struct snd_kcontrol_new *controls, int num_controls)
 
int snd_soc_add_card_controls (struct snd_soc_card *soc_card, const struct snd_kcontrol_new *controls, int num_controls)
 
int snd_soc_add_dai_controls (struct snd_soc_dai *dai, const struct snd_kcontrol_new *controls, int num_controls)
 
int snd_soc_info_enum_double (struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 
int snd_soc_info_enum_ext (struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 
int snd_soc_get_enum_double (struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 
int snd_soc_put_enum_double (struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 
int snd_soc_get_value_enum_double (struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 
int snd_soc_put_value_enum_double (struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 
int snd_soc_info_volsw (struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 
int snd_soc_info_volsw_ext (struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 
int snd_soc_get_volsw (struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 
int snd_soc_put_volsw (struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 
int snd_soc_get_volsw_sx (struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 
int snd_soc_put_volsw_sx (struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 
int snd_soc_info_volsw_s8 (struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 
int snd_soc_get_volsw_s8 (struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 
int snd_soc_put_volsw_s8 (struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 
int snd_soc_info_volsw_range (struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 
int snd_soc_put_volsw_range (struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 
int snd_soc_get_volsw_range (struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 
int snd_soc_limit_volume (struct snd_soc_codec *codec, const char *name, int max)
 
int snd_soc_bytes_info (struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 
int snd_soc_bytes_get (struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 
int snd_soc_bytes_put (struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 
int snd_soc_info_xr_sx (struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 
int snd_soc_get_xr_sx (struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 
int snd_soc_put_xr_sx (struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 
int snd_soc_get_strobe (struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 
int snd_soc_put_strobe (struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 

Variables

struct snd_ac97_bus_ops soc_ac97_ops
 

: gpio name

struct snd_soc_jack_gpio - Describes a gpio pin for jack detection

: gpio number

: value to report when jack detected : report presence in low state : debouce time in ms : enable as wake source : callback function which overrides the detection to provide more complex checks (eg, reading an ADC).

struct dev_pm_ops snd_soc_pm_ops
 
unsigned int snd_soc_read (struct snd_soc_codec *codec, unsigned int reg)
 
unsigned int snd_soc_write (struct snd_soc_codec *codec, unsigned int reg, unsigned int val)
 
unsigned int snd_soc_bulk_write_raw (struct snd_soc_codec *codec, unsigned int reg, const void *data, size_t len)
 
int snd_soc_util_init (void)
 
void snd_soc_util_exit (void)
 
int snd_soc_of_parse_card_name (struct snd_soc_card *card, const char *propname)
 
int snd_soc_of_parse_audio_routing (struct snd_soc_card *card, const char *propname)
 

Macro Definition Documentation

#define SND_SOC_BYTES (   xname,
  xbase,
  xregs 
)
Value:
{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \
.put = snd_soc_bytes_put, .private_value = \
((unsigned long)&(struct soc_bytes) \
{.base = xbase, .num_regs = xregs }) }

Definition at line 239 of file soc.h.

#define SND_SOC_BYTES_MASK (   xname,
  xbase,
  xregs,
  xmask 
)
Value:
{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \
.put = snd_soc_bytes_put, .private_value = \
((unsigned long)&(struct soc_bytes) \
{.base = xbase, .num_regs = xregs, \
.mask = xmask }) }

Definition at line 246 of file soc.h.

#define SND_SOC_COMP_ORDER_EARLY   -1

Definition at line 289 of file soc.h.

#define SND_SOC_COMP_ORDER_FIRST   -2

Definition at line 288 of file soc.h.

#define SND_SOC_COMP_ORDER_LAST   2

Definition at line 292 of file soc.h.

#define SND_SOC_COMP_ORDER_LATE   1

Definition at line 291 of file soc.h.

#define SND_SOC_COMP_ORDER_NORMAL   0

Definition at line 290 of file soc.h.

#define snd_soc_get_volsw_2r   snd_soc_get_volsw

Definition at line 493 of file soc.h.

#define snd_soc_info_bool_ext   snd_ctl_boolean_mono_info

Definition at line 488 of file soc.h.

#define snd_soc_put_volsw_2r   snd_soc_put_volsw

Definition at line 494 of file soc.h.

#define SOC_DOUBLE (   xname,
  reg,
  shift_left,
  shift_right,
  max,
  invert 
)
Value:
{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = (xname),\
.private_value = SOC_DOUBLE_VALUE(reg, shift_left, shift_right, \
max, invert) }

Definition at line 93 of file soc.h.

#define SOC_DOUBLE_EXT (   xname,
  reg,
  shift_left,
  shift_right,
  max,
  invert,
  xhandler_get,
  xhandler_put 
)
Value:
{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = (xname),\
.get = xhandler_get, .put = xhandler_put, \
.private_value = \
SOC_DOUBLE_VALUE(reg, shift_left, shift_right, max, invert) }

Definition at line 192 of file soc.h.

#define SOC_DOUBLE_EXT_TLV (   xname,
  xreg,
  shift_left,
  shift_right,
  xmax,
  xinvert,
  xhandler_get,
  xhandler_put,
  tlv_array 
)
Value:
{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = (xname), \
.tlv.p = (tlv_array), \
.info = snd_soc_info_volsw, \
.get = xhandler_get, .put = xhandler_put, \
.private_value = SOC_DOUBLE_VALUE(xreg, shift_left, shift_right, \
xmax, xinvert) }

Definition at line 208 of file soc.h.

#define SOC_DOUBLE_R (   xname,
  reg_left,
  reg_right,
  xshift,
  xmax,
  xinvert 
)
Value:
{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = (xname), \
.private_value = SOC_DOUBLE_R_VALUE(reg_left, reg_right, xshift, \
xmax, xinvert) }

Definition at line 99 of file soc.h.

#define SOC_DOUBLE_R_EXT_TLV (   xname,
  reg_left,
  reg_right,
  xshift,
  xmax,
  xinvert,
  xhandler_get,
  xhandler_put,
  tlv_array 
)
Value:
{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = (xname), \
.tlv.p = (tlv_array), \
.info = snd_soc_info_volsw, \
.get = xhandler_get, .put = xhandler_put, \
.private_value = SOC_DOUBLE_R_VALUE(reg_left, reg_right, xshift, \
xmax, xinvert) }

Definition at line 218 of file soc.h.

#define SOC_DOUBLE_R_RANGE (   xname,
  reg_left,
  reg_right,
  xshift,
  xmin,
  xmax,
  xinvert 
)
Value:
{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = (xname),\
.private_value = SOC_DOUBLE_R_RANGE_VALUE(reg_left, reg_right, \
xshift, xmin, xmax, xinvert) }

Definition at line 105 of file soc.h.

#define SOC_DOUBLE_R_RANGE_TLV (   xname,
  reg_left,
  reg_right,
  xshift,
  xmin,
  xmax,
  xinvert,
  tlv_array 
)
Value:
{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = (xname),\
.tlv.p = (tlv_array), \
.private_value = SOC_DOUBLE_R_RANGE_VALUE(reg_left, reg_right, \
xshift, xmin, xmax, xinvert) }

Definition at line 130 of file soc.h.

#define SOC_DOUBLE_R_RANGE_VALUE (   xlreg,
  xrreg,
  xshift,
  xmin,
  xmax,
  xinvert 
)
Value:
((unsigned long)&(struct soc_mixer_control) \
{.reg = xlreg, .rreg = xrreg, .shift = xshift, .rshift = xshift, \
.min = xmin, .max = xmax, .platform_max = xmax, .invert = xinvert})

Definition at line 47 of file soc.h.

#define SOC_DOUBLE_R_SX_TLV (   xname,
  xreg,
  xrreg,
  xshift,
  xmin,
  xmax,
  tlv_array 
)
Value:
{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = (xname), \
.tlv.p = (tlv_array), \
.info = snd_soc_info_volsw, \
.private_value = (unsigned long)&(struct soc_mixer_control) \
{.reg = xreg, .rreg = xrreg, \
.shift = xshift, .rshift = xshift, \
.max = xmax, .min = xmin} }

Definition at line 140 of file soc.h.

#define SOC_DOUBLE_R_TLV (   xname,
  reg_left,
  reg_right,
  xshift,
  xmax,
  xinvert,
  tlv_array 
)
Value:
{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = (xname),\
.tlv.p = (tlv_array), \
.info = snd_soc_info_volsw, \
.private_value = SOC_DOUBLE_R_VALUE(reg_left, reg_right, xshift, \
xmax, xinvert) }

Definition at line 121 of file soc.h.

#define SOC_DOUBLE_R_VALUE (   xlreg,
  xrreg,
  xshift,
  xmax,
  xinvert 
)
Value:
((unsigned long)&(struct soc_mixer_control) \
{.reg = xlreg, .rreg = xrreg, .shift = xshift, .rshift = xshift, \
.max = xmax, .platform_max = xmax, .invert = xinvert})

Definition at line 43 of file soc.h.

#define SOC_DOUBLE_S8_TLV (   xname,
  xreg,
  xmin,
  xmax,
  tlv_array 
)
Value:
{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = (xname), \
.tlv.p = (tlv_array), \
.private_value = (unsigned long)&(struct soc_mixer_control) \
{.reg = xreg, .min = xmin, .max = xmax, \
.platform_max = xmax} }

Definition at line 152 of file soc.h.

#define SOC_DOUBLE_TLV (   xname,
  reg,
  shift_left,
  shift_right,
  max,
  invert,
  tlv_array 
)
Value:
{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = (xname),\
.tlv.p = (tlv_array), \
.private_value = SOC_DOUBLE_VALUE(reg, shift_left, shift_right, \
max, invert) }

Definition at line 112 of file soc.h.

#define SOC_DOUBLE_VALUE (   xreg,
  shift_left,
  shift_right,
  xmax,
  xinvert 
)
Value:
((unsigned long)&(struct soc_mixer_control) \
{.reg = xreg, .rreg = xreg, .shift = shift_left, \
.rshift = shift_right, .max = xmax, .platform_max = xmax, \
.invert = xinvert})

Definition at line 33 of file soc.h.

#define SOC_ENUM (   xname,
  xenum 
)
Value:
{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname,\
.private_value = (unsigned long)&xenum }

Definition at line 175 of file soc.h.

#define SOC_ENUM_DOUBLE (   xreg,
  xshift_l,
  xshift_r,
  xmax,
  xtexts 
)
Value:
{ .reg = xreg, .shift_l = xshift_l, .shift_r = xshift_r, \
.max = xmax, .texts = xtexts, \
.mask = xmax ? roundup_pow_of_two(xmax) - 1 : 0}

Definition at line 162 of file soc.h.

#define SOC_ENUM_DOUBLE_DECL (   name,
  xreg,
  xshift_l,
  xshift_r,
  xtexts 
)
Value:
struct soc_enum name = SOC_ENUM_DOUBLE(xreg, xshift_l, xshift_r, \
ARRAY_SIZE(xtexts), xtexts)

Definition at line 271 of file soc.h.

#define SOC_ENUM_EXT (   xname,
  xenum,
  xhandler_get,
  xhandler_put 
)
Value:
{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \
.get = xhandler_get, .put = xhandler_put, \
.private_value = (unsigned long)&xenum }

Definition at line 233 of file soc.h.

#define SOC_ENUM_SINGLE (   xreg,
  xshift,
  xmax,
  xtexts 
)    SOC_ENUM_DOUBLE(xreg, xshift, xshift, xmax, xtexts)

Definition at line 166 of file soc.h.

#define SOC_ENUM_SINGLE_DECL (   name,
  xreg,
  xshift,
  xtexts 
)    SOC_ENUM_DOUBLE_DECL(name, xreg, xshift, xshift, xtexts)

Definition at line 274 of file soc.h.

#define SOC_ENUM_SINGLE_EXT (   xmax,
  xtexts 
)    { .max = xmax, .texts = xtexts }

Definition at line 168 of file soc.h.

#define SOC_ENUM_SINGLE_EXT_DECL (   name,
  xtexts 
)    struct soc_enum name = SOC_ENUM_SINGLE_EXT(ARRAY_SIZE(xtexts), xtexts)

Definition at line 276 of file soc.h.

#define SOC_SINGLE (   xname,
  reg,
  shift,
  max,
  invert 
)
Value:
{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \
.private_value = SOC_SINGLE_VALUE(reg, shift, max, invert) }

Definition at line 51 of file soc.h.

#define SOC_SINGLE_BOOL_EXT (   xname,
  xdata,
  xhandler_get,
  xhandler_put 
)
Value:
{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \
.get = xhandler_get, .put = xhandler_put, \
.private_value = xdata }

Definition at line 228 of file soc.h.

#define SOC_SINGLE_EXT (   xname,
  xreg,
  xshift,
  xmax,
  xinvert,
  xhandler_get,
  xhandler_put 
)
Value:
{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \
.info = snd_soc_info_volsw, \
.get = xhandler_get, .put = xhandler_put, \
.private_value = SOC_SINGLE_VALUE(xreg, xshift, xmax, xinvert) }

Definition at line 186 of file soc.h.

#define SOC_SINGLE_EXT_TLV (   xname,
  xreg,
  xshift,
  xmax,
  xinvert,
  xhandler_get,
  xhandler_put,
  tlv_array 
)
Value:
{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \
SNDRV_CTL_ELEM_ACCESS_READWRITE,\
.tlv.p = (tlv_array), \
.get = xhandler_get, .put = xhandler_put, \
.private_value = SOC_SINGLE_VALUE(xreg, xshift, xmax, xinvert) }

Definition at line 199 of file soc.h.

#define SOC_SINGLE_RANGE (   xname,
  xreg,
  xshift,
  xmin,
  xmax,
  xinvert 
)
Value:
{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = (xname),\
.private_value = (unsigned long)&(struct soc_mixer_control) \
{.reg = xreg, .shift = xshift, .min = xmin,\
.max = xmax, .platform_max = xmax, .invert = xinvert} }

Definition at line 56 of file soc.h.

#define SOC_SINGLE_RANGE_TLV (   xname,
  xreg,
  xshift,
  xmin,
  xmax,
  xinvert,
  tlv_array 
)
Value:
{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = (xname),\
.tlv.p = (tlv_array), \
.private_value = (unsigned long)&(struct soc_mixer_control) \
{.reg = xreg, .shift = xshift, .min = xmin,\
.max = xmax, .platform_max = xmax, .invert = xinvert} }

Definition at line 83 of file soc.h.

#define SOC_SINGLE_STROBE (   xname,
  xreg,
  xshift,
  xinvert 
)
Value:
SOC_SINGLE_EXT(xname, xreg, xshift, 1, xinvert, \

Definition at line 263 of file soc.h.

#define SOC_SINGLE_SX_TLV (   xname,
  xreg,
  xshift,
  xmin,
  xmax,
  tlv_array 
)
Value:
{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \
SNDRV_CTL_ELEM_ACCESS_READWRITE, \
.tlv.p = (tlv_array),\
.private_value = (unsigned long)&(struct soc_mixer_control) \
{.reg = xreg, .rreg = xreg, \
.shift = xshift, .rshift = xshift, \
.max = xmax, .min = xmin} }

Definition at line 71 of file soc.h.

#define SOC_SINGLE_TLV (   xname,
  reg,
  shift,
  max,
  invert,
  tlv_array 
)
Value:
{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \
SNDRV_CTL_ELEM_ACCESS_READWRITE,\
.tlv.p = (tlv_array), \
.private_value = SOC_SINGLE_VALUE(reg, shift, max, invert) }

Definition at line 63 of file soc.h.

#define SOC_SINGLE_VALUE (   xreg,
  xshift,
  xmax,
  xinvert 
)    SOC_DOUBLE_VALUE(xreg, xshift, xshift, xmax, xinvert)

Definition at line 38 of file soc.h.

#define SOC_SINGLE_VALUE_EXT (   xreg,
  xmax,
  xinvert 
)
Value:
((unsigned long)&(struct soc_mixer_control) \
{.reg = xreg, .max = xmax, .platform_max = xmax, .invert = xinvert})

Definition at line 40 of file soc.h.

#define SOC_SINGLE_XR_SX (   xname,
  xregbase,
  xregcount,
  xnbits,
  xmin,
  xmax,
  xinvert 
)
Value:
{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = (xname), \
.private_value = (unsigned long)&(struct soc_mreg_control) \
{.regbase = xregbase, .regcount = xregcount, .nbits = xnbits, \
.invert = xinvert, .min = xmin, .max = xmax} }

Definition at line 254 of file soc.h.

#define SOC_VALUE_ENUM (   xname,
  xenum 
)
Value:
{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname,\
.private_value = (unsigned long)&xenum }

Definition at line 180 of file soc.h.

#define SOC_VALUE_ENUM_DOUBLE (   xreg,
  xshift_l,
  xshift_r,
  xmask,
  xmax,
  xtexts,
  xvalues 
)
Value:
{ .reg = xreg, .shift_l = xshift_l, .shift_r = xshift_r, \
.mask = xmask, .max = xmax, .texts = xtexts, .values = xvalues}

Definition at line 170 of file soc.h.

#define SOC_VALUE_ENUM_DOUBLE_DECL (   name,
  xreg,
  xshift_l,
  xshift_r,
  xmask,
  xtexts,
  xvalues 
)
Value:
struct soc_enum name = SOC_VALUE_ENUM_DOUBLE(xreg, xshift_l, xshift_r, xmask, \
ARRAY_SIZE(xtexts), xtexts, xvalues)

Definition at line 278 of file soc.h.

#define SOC_VALUE_ENUM_SINGLE (   xreg,
  xshift,
  xmask,
  xmax,
  xtexts,
  xvalues 
)    SOC_VALUE_ENUM_DOUBLE(xreg, xshift, xshift, xmask, xmax, xtexts, xvalues)

Definition at line 173 of file soc.h.

#define SOC_VALUE_ENUM_SINGLE_DECL (   name,
  xreg,
  xshift,
  xmask,
  xtexts,
  xvalues 
)    SOC_VALUE_ENUM_DOUBLE_DECL(name, xreg, xshift, xshift, xmask, xtexts, xvalues)

Definition at line 281 of file soc.h.

Typedef Documentation

typedef int(* hw_write_t)(void *, const char *,int)

Definition at line 337 of file soc.h.

Enumeration Type Documentation

Enumerator:
SND_SOC_BIAS_OFF 
SND_SOC_BIAS_STANDBY 
SND_SOC_BIAS_PREPARE 
SND_SOC_BIAS_ON 

Definition at line 305 of file soc.h.

Enumerator:
SND_SOC_CARD_CLASS_INIT 
SND_SOC_CARD_CLASS_RUNTIME 

Definition at line 356 of file soc.h.

Enumerator:
SND_SOC_FLAT_COMPRESSION 

Definition at line 347 of file soc.h.

Enumerator:
SND_SOC_I2C 
SND_SOC_SPI 
SND_SOC_REGMAP 

Definition at line 341 of file soc.h.

Enumerator:
SND_SOC_PCM_CLASS_PCM 
SND_SOC_PCM_CLASS_BE 

Definition at line 351 of file soc.h.

Function Documentation

int snd_soc_add_card_controls ( struct snd_soc_card soc_card,
const struct snd_kcontrol_new controls,
int  num_controls 
)

snd_soc_add_card_controls - add an array of controls to a SoC card. Convenience function to add a list of controls.

: SoC card to add controls to : array of controls to add : number of elements in the array

Return 0 for success, else error.

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

int snd_soc_add_codec_controls ( struct snd_soc_codec codec,
const struct snd_kcontrol_new controls,
int  num_controls 
)

snd_soc_add_codec_controls - add an array of controls to a codec. Convenience function to add a list of controls. Many codecs were duplicating this code.

: codec to add controls to : array of controls to add : number of elements in the array

Return 0 for success, else error.

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

int snd_soc_add_dai_controls ( struct snd_soc_dai dai,
const struct snd_kcontrol_new controls,
int  num_controls 
)

snd_soc_add_dai_controls - add an array of controls to a DAI. Convienience function to add a list of controls.

: DAI to add controls to : array of controls to add : number of elements in the array

Return 0 for success, else error.

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

int snd_soc_add_platform_controls ( struct snd_soc_platform platform,
const struct snd_kcontrol_new controls,
int  num_controls 
)

snd_soc_add_platform_controls - add an array of controls to a platform. Convenience function to add a list of controls.

: platform to add controls to : array of controls to add : number of elements in the array

Return 0 for success, else error.

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

unsigned int snd_soc_bulk_write_raw ( struct snd_soc_codec codec,
unsigned int  reg,
const void data,
size_t  len 
)

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

int snd_soc_bytes_get ( struct snd_kcontrol kcontrol,
struct snd_ctl_elem_value ucontrol 
)

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

int snd_soc_bytes_info ( struct snd_kcontrol kcontrol,
struct snd_ctl_elem_info uinfo 
)

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

int snd_soc_bytes_put ( struct snd_kcontrol kcontrol,
struct snd_ctl_elem_value ucontrol 
)

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

int snd_soc_cache_exit ( struct snd_soc_codec codec)

Definition at line 180 of file soc-cache.c.

int snd_soc_cache_init ( struct snd_soc_codec codec)

Definition at line 149 of file soc-cache.c.

int snd_soc_cache_read ( struct snd_soc_codec codec,
unsigned int  reg,
unsigned int value 
)

snd_soc_cache_read: Fetch the value of a given register from the cache.

: CODEC to configure. : The register index. : The value to be returned.

Definition at line 198 of file soc-cache.c.

int snd_soc_cache_sync ( struct snd_soc_codec codec)

snd_soc_cache_sync: Sync the register cache with the hardware.

: CODEC to configure.

Any registers that should not be synced should be marked as volatile. In general drivers can choose not to use the provided syncing functionality if they so require.

Definition at line 250 of file soc-cache.c.

int snd_soc_cache_write ( struct snd_soc_codec codec,
unsigned int  reg,
unsigned int  value 
)

snd_soc_cache_write: Set the value of a given register in the cache.

: CODEC to configure. : The register index. : The new register value.

Definition at line 223 of file soc-cache.c.

int snd_soc_calc_bclk ( int  fs,
int  sample_size,
int  channels,
int  tdm_slots 
)

Definition at line 42 of file soc-utils.c.

int snd_soc_calc_frame_size ( int  sample_size,
int  channels,
int  tdm_slots 
)

Definition at line 23 of file soc-utils.c.

struct snd_kcontrol* snd_soc_cnew ( const struct snd_kcontrol_new _template,
void data,
const char long_name,
const char prefix 
)
read

snd_soc_cnew - create new control : control template : control private data : control long name : control name prefix

Create a new mixer control from a template control.

Returns 0 for success, else error.

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

int snd_soc_codec_readable_register ( struct snd_soc_codec codec,
unsigned int  reg 
)

snd_soc_codec_readable_register: Report if a register is readable.

: CODEC to query. : Register to query.

Boolean function indicating if a CODEC register is readable.

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

int snd_soc_codec_set_cache_io ( struct snd_soc_codec codec,
int  addr_bits,
int  data_bits,
enum snd_soc_control_type  control 
)

Definition at line 168 of file soc-io.c.

int snd_soc_codec_set_pll ( struct snd_soc_codec codec,
int  pll_id,
int  source,
unsigned int  freq_in,
unsigned int  freq_out 
)

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

int snd_soc_codec_set_sysclk ( struct snd_soc_codec codec,
int  clk_id,
int  source,
unsigned int  freq,
int  dir 
)

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

int snd_soc_codec_volatile_register ( struct snd_soc_codec codec,
unsigned int  reg 
)

snd_soc_codec_volatile_register: Report if a register is volatile.

: CODEC to query. : Register to query.

Boolean function indiciating if a CODEC register is volatile.

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

int snd_soc_codec_writable_register ( struct snd_soc_codec codec,
unsigned int  reg 
)

snd_soc_codec_writable_register: Report if a register is writable.

: CODEC to query. : Register to query.

Boolean function indicating if a CODEC register is writable.

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

int snd_soc_default_readable_register ( struct snd_soc_codec codec,
unsigned int  reg 
)

Definition at line 314 of file soc-cache.c.

int snd_soc_default_volatile_register ( struct snd_soc_codec codec,
unsigned int  reg 
)

Definition at line 300 of file soc-cache.c.

int snd_soc_default_writable_register ( struct snd_soc_codec codec,
unsigned int  reg 
)

Definition at line 328 of file soc-cache.c.

void snd_soc_free_ac97_codec ( struct snd_soc_codec codec)

snd_soc_free_ac97_codec - free AC97 codec device : audio codec

Frees AC97 codec device resources.

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

struct snd_pcm_substream* snd_soc_get_dai_substream ( struct snd_soc_card card,
const char dai_link,
int  stream 
)
read

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

int snd_soc_get_enum_double ( struct snd_kcontrol kcontrol,
struct snd_ctl_elem_value ucontrol 
)

snd_soc_get_enum_double - enumerated double mixer get callback : mixer control : control element information

Callback to get the value of a double enumerated mixer.

Returns 0 for success.

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

struct snd_soc_pcm_runtime* snd_soc_get_pcm_runtime ( struct snd_soc_card card,
const char dai_link 
)
read

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

int snd_soc_get_strobe ( struct snd_kcontrol kcontrol,
struct snd_ctl_elem_value ucontrol 
)

snd_soc_get_strobe - strobe get callback : mixer control : control element information

Callback get the value of a strobe mixer control.

Returns 0 for success.

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

int snd_soc_get_value_enum_double ( struct snd_kcontrol kcontrol,
struct snd_ctl_elem_value ucontrol 
)

snd_soc_get_value_enum_double - semi enumerated double mixer get callback : mixer control : control element information

Callback to get the value of a double semi enumerated mixer.

Semi enumerated mixer: the enumerated items are referred as values. Can be used for handling bitfield coded enumeration for example.

Returns 0 for success.

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

int snd_soc_get_volsw ( struct snd_kcontrol kcontrol,
struct snd_ctl_elem_value ucontrol 
)

snd_soc_get_volsw - single mixer get callback : mixer control : control element information

Callback to get the value of a single mixer control, or a double mixer control that spans 2 registers.

Returns 0 for success.

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

int snd_soc_get_volsw_range ( struct snd_kcontrol kcontrol,
struct snd_ctl_elem_value ucontrol 
)

snd_soc_get_volsw_range - single mixer get callback with range : mixer control : control element information

Callback to get the value, within a range, of a single mixer control.

Returns 0 for success.

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

int snd_soc_get_volsw_s8 ( struct snd_kcontrol kcontrol,
struct snd_ctl_elem_value ucontrol 
)

snd_soc_get_volsw_s8 - signed mixer get callback : mixer control : control element information

Callback to get the value of a signed mixer control.

Returns 0 for success.

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

int snd_soc_get_volsw_sx ( struct snd_kcontrol kcontrol,
struct snd_ctl_elem_value ucontrol 
)

snd_soc_get_volsw_sx - single mixer get callback : mixer control : control element information

Callback to get the value of a single mixer control, or a double mixer control that spans 2 registers.

Returns 0 for success.

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

int snd_soc_get_xr_sx ( struct snd_kcontrol kcontrol,
struct snd_ctl_elem_value ucontrol 
)

snd_soc_get_xr_sx - signed multi register get callback : mreg control : control element information

Callback to get the value of a control that can span multiple codec registers which together forms a single signed value in a MSB/LSB manner. The control supports specifying total no of bits used to allow for bitfields across the multiple codec registers.

Returns 0 for success.

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

int snd_soc_info_enum_double ( struct snd_kcontrol kcontrol,
struct snd_ctl_elem_info uinfo 
)

snd_soc_info_enum_double - enumerated double mixer info callback : mixer control : control element information

Callback to provide information about a double enumerated mixer control.

Returns 0 for success.

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

int snd_soc_info_enum_ext ( struct snd_kcontrol kcontrol,
struct snd_ctl_elem_info uinfo 
)

snd_soc_info_enum_ext - external enumerated single mixer info callback : mixer control : control element information

Callback to provide information about an external enumerated single mixer.

Returns 0 for success.

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

int snd_soc_info_volsw ( struct snd_kcontrol kcontrol,
struct snd_ctl_elem_info uinfo 
)

snd_soc_info_volsw - single mixer info callback : mixer control : control element information

Callback to provide information about a single mixer control, or a double mixer control that spans 2 registers.

Returns 0 for success.

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

int snd_soc_info_volsw_ext ( struct snd_kcontrol kcontrol,
struct snd_ctl_elem_info uinfo 
)

snd_soc_info_volsw_ext - external single mixer info callback : mixer control : control element information

Callback to provide information about a single external mixer control.

Returns 0 for success.

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

int snd_soc_info_volsw_range ( struct snd_kcontrol kcontrol,
struct snd_ctl_elem_info uinfo 
)

snd_soc_info_volsw_range - single mixer info callback with range. : mixer control : control element information

Callback to provide information, within a range, about a single mixer control.

returns 0 for success.

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

int snd_soc_info_volsw_s8 ( struct snd_kcontrol kcontrol,
struct snd_ctl_elem_info uinfo 
)

snd_soc_info_volsw_s8 - signed mixer info callback : mixer control : control element information

Callback to provide information about a signed mixer control.

Returns 0 for success.

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

int snd_soc_info_xr_sx ( struct snd_kcontrol kcontrol,
struct snd_ctl_elem_info uinfo 
)

snd_soc_info_xr_sx - signed multi register info callback : mreg control : control element information

Callback to provide information of a control that can span multiple codec registers which together forms a single signed value in a MSB/LSB manner.

Returns 0 for success.

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

int snd_soc_jack_add_pins ( struct snd_soc_jack jack,
int  count,
struct snd_soc_jack_pin pins 
)

snd_soc_jack_add_pins - Associate DAPM pins with an ASoC jack

: ASoC jack : Number of pins : Array of pins

After this function has been called the DAPM pins specified in the pins array will have their status updated to reflect the current state of the jack whenever the jack status is updated.

Definition at line 168 of file soc-jack.c.

int snd_soc_jack_add_zones ( struct snd_soc_jack jack,
int  count,
struct snd_soc_jack_zone zones 
)

snd_soc_jack_add_zones - Associate voltage zones with jack

: ASoC jack : Number of zones : Array of zones

After this function has been called the zones specified in the array will be associated with the jack.

Definition at line 121 of file soc-jack.c.

int snd_soc_jack_get_type ( struct snd_soc_jack jack,
int  micbias_voltage 
)

snd_soc_jack_get_type - Based on the mic bias value, this function returns the type of jack from the zones declared in the jack type

: ASoC jack : mic bias voltage at adc channel when jack is plugged in

Based on the mic bias value passed, this function helps identify the type of jack from the already declared jack zones

Definition at line 144 of file soc-jack.c.

int snd_soc_jack_new ( struct snd_soc_codec codec,
const char id,
int  type,
struct snd_soc_jack jack 
)

snd_soc_jack_new - Create a new jack : ASoC codec : an identifying string for this jack : a bitmask of enum snd_jack_type values that can be detected by this jack : structure to use for the jack

Creates a new jack object.

Returns zero if successful, or a negative error code on failure. On success jack will be initialised.

Definition at line 36 of file soc-jack.c.

void snd_soc_jack_notifier_register ( struct snd_soc_jack jack,
struct notifier_block nb 
)

snd_soc_jack_notifier_register - Register a notifier for jack status

: ASoC jack : Notifier block to register

Register for notification of the current status of the jack. Note that it is not possible to report additional jack events in the callback from the notifier, this is intended to support applications such as enabling electrical detection only when a mechanical detection event has occurred.

Definition at line 212 of file soc-jack.c.

void snd_soc_jack_notifier_unregister ( struct snd_soc_jack jack,
struct notifier_block nb 
)

snd_soc_jack_notifier_unregister - Unregister a notifier for jack status

: ASoC jack : Notifier block to unregister

Stop notifying for status changes.

Definition at line 227 of file soc-jack.c.

void snd_soc_jack_report ( struct snd_soc_jack jack,
int  status,
int  mask 
)

snd_soc_jack_report - Report the current status for a jack

: the jack : a bitmask of enum snd_jack_type values that are currently detected. : a bitmask of enum snd_jack_type values that being reported.

If configured using snd_soc_jack_add_pins() then the associated DAPM pins will be enabled or disabled as appropriate and DAPM synchronised.

Note: This function uses mutexes and should be called from a context which can sleep (such as a workqueue).

Definition at line 63 of file soc-jack.c.

int snd_soc_limit_volume ( struct snd_soc_codec codec,
const char name,
int  max 
)

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

int snd_soc_new_ac97_codec ( struct snd_soc_codec codec,
struct snd_ac97_bus_ops ops,
int  num 
)

snd_soc_new_ac97_codec - initailise AC97 device : audio codec : AC97 bus operations : AC97 codec number

Initialises AC97 codec resources for use by ad-hoc devices only.

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

int snd_soc_of_parse_audio_routing ( struct snd_soc_card card,
const char propname 
)

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

int snd_soc_of_parse_card_name ( struct snd_soc_card card,
const char propname 
)

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

int snd_soc_params_to_bclk ( struct snd_pcm_hw_params parms)

Definition at line 48 of file soc-utils.c.

int snd_soc_params_to_frame_size ( struct snd_pcm_hw_params params)

Definition at line 29 of file soc-utils.c.

int snd_soc_platform_read ( struct snd_soc_platform platform,
unsigned int  reg 
)

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

int snd_soc_platform_trigger ( struct snd_pcm_substream substream,
int  cmd,
struct snd_soc_platform platform 
)

Definition at line 2212 of file soc-pcm.c.

int snd_soc_platform_write ( struct snd_soc_platform platform,
unsigned int  reg,
unsigned int  val 
)

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

int snd_soc_poweroff ( struct device dev)

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

int snd_soc_put_enum_double ( struct snd_kcontrol kcontrol,
struct snd_ctl_elem_value ucontrol 
)

snd_soc_put_enum_double - enumerated double mixer put callback : mixer control : control element information

Callback to set the value of a double enumerated mixer.

Returns 0 for success.

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

int snd_soc_put_strobe ( struct snd_kcontrol kcontrol,
struct snd_ctl_elem_value ucontrol 
)

snd_soc_put_strobe - strobe put callback : mixer control : control element information

Callback strobe a register bit to high then low (or the inverse) in one pass of a single mixer enum control.

Returns 1 for success.

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

int snd_soc_put_value_enum_double ( struct snd_kcontrol kcontrol,
struct snd_ctl_elem_value ucontrol 
)

snd_soc_put_value_enum_double - semi enumerated double mixer put callback : mixer control : control element information

Callback to set the value of a double semi enumerated mixer.

Semi enumerated mixer: the enumerated items are referred as values. Can be used for handling bitfield coded enumeration for example.

Returns 0 for success.

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

int snd_soc_put_volsw ( struct snd_kcontrol kcontrol,
struct snd_ctl_elem_value ucontrol 
)

snd_soc_put_volsw - single mixer put callback : mixer control : control element information

Callback to set the value of a single mixer control, or a double mixer control that spans 2 registers.

Returns 0 for success.

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

int snd_soc_put_volsw_range ( struct snd_kcontrol kcontrol,
struct snd_ctl_elem_value ucontrol 
)

snd_soc_put_volsw_range - single mixer put value callback with range. : mixer control : control element information

Callback to set the value, within a range, for a single mixer control.

Returns 0 for success.

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

int snd_soc_put_volsw_s8 ( struct snd_kcontrol kcontrol,
struct snd_ctl_elem_value ucontrol 
)

snd_soc_put_volsw_sgn - signed mixer put callback : mixer control : control element information

Callback to set the value of a signed mixer control.

Returns 0 for success.

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

int snd_soc_put_volsw_sx ( struct snd_kcontrol kcontrol,
struct snd_ctl_elem_value ucontrol 
)

snd_soc_put_volsw_sx - double mixer set callback : mixer control : control element information

Callback to set the value of a double mixer control that spans 2 registers.

Returns 0 for success.

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

int snd_soc_put_xr_sx ( struct snd_kcontrol kcontrol,
struct snd_ctl_elem_value ucontrol 
)

snd_soc_put_xr_sx - signed multi register get callback : mreg control : control element information

Callback to set the value of a control that can span multiple codec registers which together forms a single signed value in a MSB/LSB manner. The control supports specifying total no of bits used to allow for bitfields across the multiple codec registers.

Returns 0 for success.

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

unsigned int snd_soc_read ( struct snd_soc_codec codec,
unsigned int  reg 
)

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

int snd_soc_register_card ( struct snd_soc_card card)

snd_soc_register_card - Register a card with the ASoC core

: Card to register

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

int snd_soc_register_codec ( struct device dev,
const struct snd_soc_codec_driver codec_drv,
struct snd_soc_dai_driver dai_drv,
int  num_dai 
)

snd_soc_register_codec - Register a codec with the ASoC core

: codec to register

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

int snd_soc_register_platform ( struct device dev,
struct snd_soc_platform_driver platform_drv 
)

snd_soc_register_platform - Register a platform with the ASoC core

: platform to register

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

int snd_soc_resume ( struct device dev)
int snd_soc_set_runtime_hwparams ( struct snd_pcm_substream substream,
const struct snd_pcm_hardware hw 
)

snd_soc_set_runtime_hwparams - set the runtime hardware parameters : the pcm substream : the hardware parameters

Sets the substream runtime hardware parameters.

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

int snd_soc_suspend ( struct device dev)
int snd_soc_test_bits ( struct snd_soc_codec codec,
unsigned short  reg,
unsigned int  mask,
unsigned int  value 
)

snd_soc_test_bits - test register for change : audio codec : codec register : register mask : new value

Tests a register with a new value and checks if the new value is different from the old value.

Returns 1 for change else 0.

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

int snd_soc_unregister_card ( struct snd_soc_card card)

snd_soc_unregister_card - Unregister a card with the ASoC core

: Card to unregister

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

void snd_soc_unregister_codec ( struct device dev)

snd_soc_unregister_codec - Unregister a codec from the ASoC core

: codec to unregister

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

void snd_soc_unregister_platform ( struct device dev)

snd_soc_unregister_platform - Unregister a platform from the ASoC core

: platform to unregister

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

int snd_soc_update_bits ( struct snd_soc_codec codec,
unsigned short  reg,
unsigned int  mask,
unsigned int  value 
)

snd_soc_update_bits - update codec register bits : audio codec : codec register : register mask : new value

Writes new register value.

Returns 1 for change, 0 for no change, or negative error code.

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

int snd_soc_update_bits_locked ( struct snd_soc_codec codec,
unsigned short  reg,
unsigned int  mask,
unsigned int  value 
)

snd_soc_update_bits_locked - update codec register bits : audio codec : codec register : register mask : new value

Writes new register value, and takes the codec mutex.

Returns 1 for change else 0.

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

void snd_soc_util_exit ( void  )

Definition at line 154 of file soc-utils.c.

int snd_soc_util_init ( void  )

Definition at line 133 of file soc-utils.c.

unsigned int snd_soc_write ( struct snd_soc_codec codec,
unsigned int  reg,
unsigned int  val 
)

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

int soc_new_compress ( struct snd_soc_pcm_runtime rtd,
int  num 
)

Definition at line 259 of file soc-compress.c.

int soc_new_pcm ( struct snd_soc_pcm_runtime rtd,
int  num 
)

Definition at line 2002 of file soc-pcm.c.

Variable Documentation

struct dev_pm_ops snd_soc_pm_ops

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

struct snd_ac97_bus_ops soc_ac97_ops

Definition at line 182 of file ac97c.c.