Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions | Variables
hda_local.h File Reference

Go to the source code of this file.

Data Structures

struct  hda_vmaster_mute_hook
 
struct  hda_ctl_ops
 
struct  hda_bind_ctls
 
struct  hda_input_mux_item
 
struct  hda_input_mux
 
struct  hda_channel_mode
 
struct  hda_multi_out
 
struct  hda_bus_unsolicited
 
struct  hda_nid_item
 
struct  hda_amp_list
 
struct  hda_loopback_check
 
struct  cea_sad
 
struct  hdmi_eld
 

Macros

#define HDA_SUBDEV_NID_FLAG   (1U << 31)
 
#define HDA_SUBDEV_AMP_FLAG   (1U << 30)
 
#define HDA_COMPOSE_AMP_VAL_OFS(nid, chs, idx, dir, ofs)   ((nid) | ((chs)<<16) | ((dir)<<18) | ((idx)<<19) | ((ofs)<<23))
 
#define HDA_AMP_VAL_MIN_MUTE   (1<<29)
 
#define HDA_COMPOSE_AMP_VAL(nid, chs, idx, dir)   HDA_COMPOSE_AMP_VAL_OFS(nid, chs, idx, dir, 0)
 
#define HDA_CODEC_VOLUME_MONO_IDX(xname, xcidx, nid, channel, xindex, dir, flags)
 
#define HDA_CODEC_VOLUME_IDX(xname, xcidx, nid, xindex, direction)   HDA_CODEC_VOLUME_MONO_IDX(xname, xcidx, nid, 3, xindex, direction, 0)
 
#define HDA_CODEC_VOLUME_MONO(xname, nid, channel, xindex, direction)   HDA_CODEC_VOLUME_MONO_IDX(xname, 0, nid, channel, xindex, direction, 0)
 
#define HDA_CODEC_VOLUME(xname, nid, xindex, direction)   HDA_CODEC_VOLUME_MONO(xname, nid, 3, xindex, direction)
 
#define HDA_CODEC_VOLUME_MIN_MUTE(xname, nid, xindex, direction)
 
#define HDA_CODEC_MUTE_MONO_IDX(xname, xcidx, nid, channel, xindex, direction)
 
#define HDA_CODEC_MUTE_IDX(xname, xcidx, nid, xindex, direction)   HDA_CODEC_MUTE_MONO_IDX(xname, xcidx, nid, 3, xindex, direction)
 
#define HDA_CODEC_MUTE_MONO(xname, nid, channel, xindex, direction)   HDA_CODEC_MUTE_MONO_IDX(xname, 0, nid, channel, xindex, direction)
 
#define HDA_CODEC_MUTE(xname, nid, xindex, direction)   HDA_CODEC_MUTE_MONO(xname, nid, 3, xindex, direction)
 
#define HDA_CODEC_MUTE_BEEP_MONO_IDX(xname, xcidx, nid, ch, xidx, dir)   HDA_CODEC_MUTE_MONO_IDX(xname, xcidx, nid, ch, xidx, dir)
 
#define HDA_CODEC_MUTE_BEEP_MONO(xname, nid, channel, xindex, direction)   HDA_CODEC_MUTE_BEEP_MONO_IDX(xname, 0, nid, channel, xindex, direction)
 
#define HDA_CODEC_MUTE_BEEP(xname, nid, xindex, direction)   HDA_CODEC_MUTE_BEEP_MONO(xname, nid, 3, xindex, direction)
 
#define snd_hda_add_vmaster(codec, name, tlv, slaves, suffix)   __snd_hda_add_vmaster(codec, name, tlv, slaves, suffix, true, NULL)
 
#define HDA_AMP_MUTE   0x80
 
#define HDA_AMP_UNMUTE   0x00
 
#define HDA_AMP_VOLMASK   0x7f
 
#define HDA_BIND_MUTE_MONO(xname, nid, channel, indices, direction)
 
#define HDA_BIND_MUTE(xname, nid, indices, dir)   HDA_BIND_MUTE_MONO(xname,nid,3,indices,dir)
 
#define HDA_BIND_VOL(xname, bindrec)
 
#define HDA_BIND_SW(xname, bindrec)
 
#define HDA_MAX_NUM_INPUTS   16
 
#define HDA_MAX_OUTS   5
 
#define SND_PRINT_BITS_ADVISED_BUFSIZE   16
 
#define HDA_UNSOL_QUEUE_SIZE   64
 
#define get_defcfg_connect(cfg)   ((cfg & AC_DEFCFG_PORT_CONN) >> AC_DEFCFG_PORT_CONN_SHIFT)
 
#define get_defcfg_association(cfg)   ((cfg & AC_DEFCFG_DEF_ASSOC) >> AC_DEFCFG_ASSOC_SHIFT)
 
#define get_defcfg_location(cfg)   ((cfg & AC_DEFCFG_LOCATION) >> AC_DEFCFG_LOCATION_SHIFT)
 
#define get_defcfg_sequence(cfg)   (cfg & AC_DEFCFG_SEQUENCE)
 
#define get_defcfg_device(cfg)   ((cfg & AC_DEFCFG_DEVICE) >> AC_DEFCFG_DEVICE_SHIFT)
 
#define get_defcfg_misc(cfg)   ((cfg & AC_DEFCFG_MISC) >> AC_DEFCFG_MISC_SHIFT)
 
#define AMP_IN_MUTE(idx)   (0x7080 | ((idx)<<8))
 
#define AMP_IN_UNMUTE(idx)   (0x7000 | ((idx)<<8))
 
#define AMP_OUT_MUTE   0xb080
 
#define AMP_OUT_UNMUTE   0xb000
 
#define AMP_OUT_ZERO   0xb000
 
#define PIN_IN   (AC_PINCTL_IN_EN)
 
#define PIN_VREFHIZ   (AC_PINCTL_IN_EN | AC_PINCTL_VREF_HIZ)
 
#define PIN_VREF50   (AC_PINCTL_IN_EN | AC_PINCTL_VREF_50)
 
#define PIN_VREFGRD   (AC_PINCTL_IN_EN | AC_PINCTL_VREF_GRD)
 
#define PIN_VREF80   (AC_PINCTL_IN_EN | AC_PINCTL_VREF_80)
 
#define PIN_VREF100   (AC_PINCTL_IN_EN | AC_PINCTL_VREF_100)
 
#define PIN_OUT   (AC_PINCTL_OUT_EN)
 
#define PIN_HP   (AC_PINCTL_OUT_EN | AC_PINCTL_HP_EN)
 
#define PIN_HP_AMP   (AC_PINCTL_HP_EN)
 
#define HDA_NID_ITEM_AMP   (1<<0)
 
#define get_amp_nid_(pv)   ((pv) & 0xffff)
 
#define get_amp_nid(kc)   get_amp_nid_((kc)->private_value)
 
#define get_amp_channels(kc)   (((kc)->private_value >> 16) & 0x3)
 
#define get_amp_direction_(pv)   (((pv) >> 18) & 0x1)
 
#define get_amp_direction(kc)   get_amp_direction_((kc)->private_value)
 
#define get_amp_index(kc)   (((kc)->private_value >> 19) & 0xf)
 
#define get_amp_offset(kc)   (((kc)->private_value >> 23) & 0x3f)
 
#define get_amp_min_mute(kc)   (((kc)->private_value >> 29) & 0x1)
 
#define ELD_FIXED_BYTES   20
 
#define ELD_MAX_SIZE   256
 
#define ELD_MAX_MNL   16
 
#define ELD_MAX_SAD   16
 
#define SND_PRINT_CHANNEL_ALLOCATION_ADVISED_BUFSIZE   80
 

Enumerations

enum  { HDA_VMUTE_OFF, HDA_VMUTE_ON, HDA_VMUTE_FOLLOW_MASTER }
 
enum  { HDA_FRONT, HDA_REAR, HDA_CLFE, HDA_SIDE }
 
enum  { HDA_DIG_NONE, HDA_DIG_EXCLUSIVE, HDA_DIG_ANALOG_DUP }
 

Functions

int snd_hda_mixer_amp_volume_info (struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 
int snd_hda_mixer_amp_volume_get (struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 
int snd_hda_mixer_amp_volume_put (struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 
int snd_hda_mixer_amp_tlv (struct snd_kcontrol *kcontrol, int op_flag, unsigned int size, unsigned int __user *tlv)
 
int snd_hda_mixer_amp_switch_info (struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 
int snd_hda_mixer_amp_switch_get (struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 
int snd_hda_mixer_amp_switch_put (struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 
int snd_hda_codec_amp_read (struct hda_codec *codec, hda_nid_t nid, int ch, int direction, int index)
 
int snd_hda_codec_amp_update (struct hda_codec *codec, hda_nid_t nid, int ch, int direction, int idx, int mask, int val)
 
int snd_hda_codec_amp_stereo (struct hda_codec *codec, hda_nid_t nid, int dir, int idx, int mask, int val)
 
void snd_hda_set_vmaster_tlv (struct hda_codec *codec, hda_nid_t nid, int dir, unsigned int *tlv)
 
struct snd_kcontrolsnd_hda_find_mixer_ctl (struct hda_codec *codec, const char *name)
 
int __snd_hda_add_vmaster (struct hda_codec *codec, char *name, unsigned int *tlv, const char *const *slaves, const char *suffix, bool init_slave_vol, struct snd_kcontrol **ctl_ret)
 
int snd_hda_codec_reset (struct hda_codec *codec)
 
int snd_hda_add_vmaster_hook (struct hda_codec *codec, struct hda_vmaster_mute_hook *hook, bool expose_enum_ctl)
 
void snd_hda_sync_vmaster_hook (struct hda_vmaster_mute_hook *hook)
 
int snd_hda_mixer_bind_switch_get (struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 
int snd_hda_mixer_bind_switch_put (struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 
int snd_hda_mixer_bind_ctls_info (struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 
int snd_hda_mixer_bind_ctls_get (struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 
int snd_hda_mixer_bind_ctls_put (struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 
int snd_hda_mixer_bind_tlv (struct snd_kcontrol *kcontrol, int op_flag, unsigned int size, unsigned int __user *tlv)
 
int snd_hda_create_spdif_out_ctls (struct hda_codec *codec, hda_nid_t associated_nid, hda_nid_t cvt_nid)
 
int snd_hda_create_spdif_in_ctls (struct hda_codec *codec, hda_nid_t nid)
 
int snd_hda_input_mux_info (const struct hda_input_mux *imux, struct snd_ctl_elem_info *uinfo)
 
int snd_hda_input_mux_put (struct hda_codec *codec, const struct hda_input_mux *imux, struct snd_ctl_elem_value *ucontrol, hda_nid_t nid, unsigned int *cur_val)
 
int snd_hda_add_imux_item (struct hda_input_mux *imux, const char *label, int index, int *type_index_ret)
 
int snd_hda_ch_mode_info (struct hda_codec *codec, struct snd_ctl_elem_info *uinfo, const struct hda_channel_mode *chmode, int num_chmodes)
 
int snd_hda_ch_mode_get (struct hda_codec *codec, struct snd_ctl_elem_value *ucontrol, const struct hda_channel_mode *chmode, int num_chmodes, int max_channels)
 
int snd_hda_ch_mode_put (struct hda_codec *codec, struct snd_ctl_elem_value *ucontrol, const struct hda_channel_mode *chmode, int num_chmodes, int *max_channelsp)
 
int snd_hda_create_spdif_share_sw (struct hda_codec *codec, struct hda_multi_out *mout)
 
int snd_hda_multi_out_dig_open (struct hda_codec *codec, struct hda_multi_out *mout)
 
int snd_hda_multi_out_dig_close (struct hda_codec *codec, struct hda_multi_out *mout)
 
int snd_hda_multi_out_dig_prepare (struct hda_codec *codec, struct hda_multi_out *mout, unsigned int stream_tag, unsigned int format, struct snd_pcm_substream *substream)
 
int snd_hda_multi_out_dig_cleanup (struct hda_codec *codec, struct hda_multi_out *mout)
 
int snd_hda_multi_out_analog_open (struct hda_codec *codec, struct hda_multi_out *mout, struct snd_pcm_substream *substream, struct hda_pcm_stream *hinfo)
 
int snd_hda_multi_out_analog_prepare (struct hda_codec *codec, struct hda_multi_out *mout, unsigned int stream_tag, unsigned int format, struct snd_pcm_substream *substream)
 
int snd_hda_multi_out_analog_cleanup (struct hda_codec *codec, struct hda_multi_out *mout)
 
void snd_print_pcm_bits (int pcm, char *buf, int buflen)
 
int snd_hda_check_board_config (struct hda_codec *codec, int num_configs, const char *const *modelnames, const struct snd_pci_quirk *pci_list)
 
int snd_hda_check_board_codec_sid_config (struct hda_codec *codec, int num_configs, const char *const *models, const struct snd_pci_quirk *tbl)
 
int snd_hda_add_new_ctls (struct hda_codec *codec, const struct snd_kcontrol_new *knew)
 
unsigned int snd_hda_get_default_vref (struct hda_codec *codec, hda_nid_t pin)
 
int _snd_hda_set_pin_ctl (struct hda_codec *codec, hda_nid_t pin, unsigned int val, bool cached)
 
u32 query_amp_caps (struct hda_codec *codec, hda_nid_t nid, int direction)
 
int snd_hda_override_amp_caps (struct hda_codec *codec, hda_nid_t nid, int dir, unsigned int caps)
 
u32 snd_hda_query_pin_caps (struct hda_codec *codec, hda_nid_t nid)
 
int snd_hda_override_pin_caps (struct hda_codec *codec, hda_nid_t nid, unsigned int caps)
 
int snd_hda_ctl_add (struct hda_codec *codec, hda_nid_t nid, struct snd_kcontrol *kctl)
 
int snd_hda_add_nid (struct hda_codec *codec, struct snd_kcontrol *kctl, unsigned int index, hda_nid_t nid)
 
void snd_hda_ctls_clear (struct hda_codec *codec)
 
void snd_hda_schedule_power_save (struct hda_codec *codec)
 
int snd_hda_check_amp_list_power (struct hda_codec *codec, struct hda_loopback_check *check, hda_nid_t nid)
 
int snd_hdmi_get_eld_size (struct hda_codec *codec, hda_nid_t nid)
 
int snd_hdmi_get_eld (struct hdmi_eld *, struct hda_codec *, hda_nid_t)
 
void snd_hdmi_show_eld (struct hdmi_eld *eld)
 
void snd_hdmi_eld_update_pcm_info (struct hdmi_eld *eld, struct hda_pcm_stream *hinfo)
 
void snd_print_channel_allocation (int spk_alloc, char *buf, int buflen)
 

Variables

const charsnd_hda_pcm_type_name []
 
struct hda_ctl_ops snd_hda_bind_vol
 
struct hda_ctl_ops snd_hda_bind_sw
 

Macro Definition Documentation

#define AMP_IN_MUTE (   idx)    (0x7080 | ((idx)<<8))

Definition at line 415 of file hda_local.h.

#define AMP_IN_UNMUTE (   idx)    (0x7000 | ((idx)<<8))

Definition at line 416 of file hda_local.h.

#define AMP_OUT_MUTE   0xb080

Definition at line 417 of file hda_local.h.

#define AMP_OUT_UNMUTE   0xb000

Definition at line 418 of file hda_local.h.

#define AMP_OUT_ZERO   0xb000

Definition at line 419 of file hda_local.h.

#define ELD_FIXED_BYTES   20

Definition at line 613 of file hda_local.h.

#define ELD_MAX_MNL   16

Definition at line 615 of file hda_local.h.

#define ELD_MAX_SAD   16

Definition at line 616 of file hda_local.h.

#define ELD_MAX_SIZE   256

Definition at line 614 of file hda_local.h.

#define get_amp_channels (   kc)    (((kc)->private_value >> 16) & 0x3)

Definition at line 594 of file hda_local.h.

#define get_amp_direction (   kc)    get_amp_direction_((kc)->private_value)

Definition at line 596 of file hda_local.h.

#define get_amp_direction_ (   pv)    (((pv) >> 18) & 0x1)

Definition at line 595 of file hda_local.h.

#define get_amp_index (   kc)    (((kc)->private_value >> 19) & 0xf)

Definition at line 597 of file hda_local.h.

#define get_amp_min_mute (   kc)    (((kc)->private_value >> 29) & 0x1)

Definition at line 599 of file hda_local.h.

#define get_amp_nid (   kc)    get_amp_nid_((kc)->private_value)

Definition at line 593 of file hda_local.h.

#define get_amp_nid_ (   pv)    ((pv) & 0xffff)

Definition at line 592 of file hda_local.h.

#define get_amp_offset (   kc)    (((kc)->private_value >> 23) & 0x3f)

Definition at line 598 of file hda_local.h.

#define get_defcfg_association (   cfg)    ((cfg & AC_DEFCFG_DEF_ASSOC) >> AC_DEFCFG_ASSOC_SHIFT)

Definition at line 403 of file hda_local.h.

#define get_defcfg_connect (   cfg)    ((cfg & AC_DEFCFG_PORT_CONN) >> AC_DEFCFG_PORT_CONN_SHIFT)

Definition at line 401 of file hda_local.h.

#define get_defcfg_device (   cfg)    ((cfg & AC_DEFCFG_DEVICE) >> AC_DEFCFG_DEVICE_SHIFT)

Definition at line 409 of file hda_local.h.

#define get_defcfg_location (   cfg)    ((cfg & AC_DEFCFG_LOCATION) >> AC_DEFCFG_LOCATION_SHIFT)

Definition at line 405 of file hda_local.h.

#define get_defcfg_misc (   cfg)    ((cfg & AC_DEFCFG_MISC) >> AC_DEFCFG_MISC_SHIFT)

Definition at line 411 of file hda_local.h.

#define get_defcfg_sequence (   cfg)    (cfg & AC_DEFCFG_SEQUENCE)

Definition at line 407 of file hda_local.h.

#define HDA_AMP_MUTE   0x80

Definition at line 175 of file hda_local.h.

#define HDA_AMP_UNMUTE   0x00

Definition at line 176 of file hda_local.h.

#define HDA_AMP_VAL_MIN_MUTE   (1<<29)

Definition at line 41 of file hda_local.h.

#define HDA_AMP_VOLMASK   0x7f

Definition at line 177 of file hda_local.h.

#define HDA_BIND_MUTE (   xname,
  nid,
  indices,
  dir 
)    HDA_BIND_MUTE_MONO(xname,nid,3,indices,dir)

Definition at line 188 of file hda_local.h.

#define HDA_BIND_MUTE_MONO (   xname,
  nid,
  channel,
  indices,
  direction 
)
Value:
{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, .index = 0, \
.private_value = HDA_COMPOSE_AMP_VAL(nid, channel, indices, direction) }

Definition at line 180 of file hda_local.h.

#define HDA_BIND_SW (   xname,
  bindrec 
)
Value:
.name = xname, \
.private_value = (long) (bindrec) }

Definition at line 232 of file hda_local.h.

#define HDA_BIND_VOL (   xname,
  bindrec 
)
Value:
.name = xname, \
SNDRV_CTL_ELEM_ACCESS_TLV_READ |\
SNDRV_CTL_ELEM_ACCESS_TLV_CALLBACK,\
.tlv = { .c = snd_hda_mixer_bind_tlv },\
.private_value = (long) (bindrec) }

Definition at line 221 of file hda_local.h.

#define HDA_CODEC_MUTE (   xname,
  nid,
  xindex,
  direction 
)    HDA_CODEC_MUTE_MONO(xname, nid, 3, xindex, direction)

Definition at line 84 of file hda_local.h.

#define HDA_CODEC_MUTE_BEEP (   xname,
  nid,
  xindex,
  direction 
)    HDA_CODEC_MUTE_BEEP_MONO(xname, nid, 3, xindex, direction)

Definition at line 104 of file hda_local.h.

#define HDA_CODEC_MUTE_BEEP_MONO (   xname,
  nid,
  channel,
  xindex,
  direction 
)    HDA_CODEC_MUTE_BEEP_MONO_IDX(xname, 0, nid, channel, xindex, direction)

Definition at line 101 of file hda_local.h.

#define HDA_CODEC_MUTE_BEEP_MONO_IDX (   xname,
  xcidx,
  nid,
  ch,
  xidx,
  dir 
)    HDA_CODEC_MUTE_MONO_IDX(xname, xcidx, nid, ch, xidx, dir)

Definition at line 97 of file hda_local.h.

#define HDA_CODEC_MUTE_IDX (   xname,
  xcidx,
  nid,
  xindex,
  direction 
)    HDA_CODEC_MUTE_MONO_IDX(xname, xcidx, nid, 3, xindex, direction)

Definition at line 78 of file hda_local.h.

#define HDA_CODEC_MUTE_MONO (   xname,
  nid,
  channel,
  xindex,
  direction 
)    HDA_CODEC_MUTE_MONO_IDX(xname, 0, nid, channel, xindex, direction)

Definition at line 81 of file hda_local.h.

#define HDA_CODEC_MUTE_MONO_IDX (   xname,
  xcidx,
  nid,
  channel,
  xindex,
  direction 
)
Value:
{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, .index = xcidx, \
.subdevice = HDA_SUBDEV_AMP_FLAG, \
.private_value = HDA_COMPOSE_AMP_VAL(nid, channel, xindex, direction) }

Definition at line 70 of file hda_local.h.

#define HDA_CODEC_VOLUME (   xname,
  nid,
  xindex,
  direction 
)    HDA_CODEC_VOLUME_MONO(xname, nid, 3, xindex, direction)

Definition at line 63 of file hda_local.h.

#define HDA_CODEC_VOLUME_IDX (   xname,
  xcidx,
  nid,
  xindex,
  direction 
)    HDA_CODEC_VOLUME_MONO_IDX(xname, xcidx, nid, 3, xindex, direction, 0)

Definition at line 57 of file hda_local.h.

#define HDA_CODEC_VOLUME_MIN_MUTE (   xname,
  nid,
  xindex,
  direction 
)
Value:

Definition at line 66 of file hda_local.h.

#define HDA_CODEC_VOLUME_MONO (   xname,
  nid,
  channel,
  xindex,
  direction 
)    HDA_CODEC_VOLUME_MONO_IDX(xname, 0, nid, channel, xindex, direction, 0)

Definition at line 60 of file hda_local.h.

#define HDA_CODEC_VOLUME_MONO_IDX (   xname,
  xcidx,
  nid,
  channel,
  xindex,
  dir,
  flags 
)
Value:
{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, .index = xcidx, \
.subdevice = HDA_SUBDEV_AMP_FLAG, \
SNDRV_CTL_ELEM_ACCESS_TLV_READ | \
SNDRV_CTL_ELEM_ACCESS_TLV_CALLBACK, \
.tlv = { .c = snd_hda_mixer_amp_tlv }, \
.private_value = HDA_COMPOSE_AMP_VAL(nid, channel, xindex, dir) | flags }

Definition at line 45 of file hda_local.h.

#define HDA_COMPOSE_AMP_VAL (   nid,
  chs,
  idx,
  dir 
)    HDA_COMPOSE_AMP_VAL_OFS(nid, chs, idx, dir, 0)

Definition at line 42 of file hda_local.h.

#define HDA_COMPOSE_AMP_VAL_OFS (   nid,
  chs,
  idx,
  dir,
  ofs 
)    ((nid) | ((chs)<<16) | ((dir)<<18) | ((idx)<<19) | ((ofs)<<23))

Definition at line 39 of file hda_local.h.

#define HDA_MAX_NUM_INPUTS   16

Definition at line 251 of file hda_local.h.

#define HDA_MAX_OUTS   5

Definition at line 300 of file hda_local.h.

#define HDA_NID_ITEM_AMP   (1<<0)

Definition at line 508 of file hda_local.h.

#define HDA_SUBDEV_AMP_FLAG   (1U << 30)

Definition at line 34 of file hda_local.h.

#define HDA_SUBDEV_NID_FLAG   (1U << 31)

Definition at line 33 of file hda_local.h.

#define HDA_UNSOL_QUEUE_SIZE   64

Definition at line 388 of file hda_local.h.

#define PIN_HP   (AC_PINCTL_OUT_EN | AC_PINCTL_HP_EN)

Definition at line 428 of file hda_local.h.

#define PIN_HP_AMP   (AC_PINCTL_HP_EN)

Definition at line 429 of file hda_local.h.

#define PIN_IN   (AC_PINCTL_IN_EN)

Definition at line 421 of file hda_local.h.

#define PIN_OUT   (AC_PINCTL_OUT_EN)

Definition at line 427 of file hda_local.h.

#define PIN_VREF100   (AC_PINCTL_IN_EN | AC_PINCTL_VREF_100)

Definition at line 426 of file hda_local.h.

#define PIN_VREF50   (AC_PINCTL_IN_EN | AC_PINCTL_VREF_50)

Definition at line 423 of file hda_local.h.

#define PIN_VREF80   (AC_PINCTL_IN_EN | AC_PINCTL_VREF_80)

Definition at line 425 of file hda_local.h.

#define PIN_VREFGRD   (AC_PINCTL_IN_EN | AC_PINCTL_VREF_GRD)

Definition at line 424 of file hda_local.h.

#define PIN_VREFHIZ   (AC_PINCTL_IN_EN | AC_PINCTL_VREF_HIZ)

Definition at line 422 of file hda_local.h.

#define snd_hda_add_vmaster (   codec,
  name,
  tlv,
  slaves,
  suffix 
)    __snd_hda_add_vmaster(codec, name, tlv, slaves, suffix, true, NULL)

Definition at line 148 of file hda_local.h.

#define SND_PRINT_BITS_ADVISED_BUFSIZE   16

Definition at line 369 of file hda_local.h.

#define SND_PRINT_CHANNEL_ALLOCATION_ADVISED_BUFSIZE   80

Definition at line 671 of file hda_local.h.

Enumeration Type Documentation

anonymous enum
Enumerator:
HDA_VMUTE_OFF 
HDA_VMUTE_ON 
HDA_VMUTE_FOLLOW_MASTER 

Definition at line 152 of file hda_local.h.

anonymous enum
Enumerator:
HDA_FRONT 
HDA_REAR 
HDA_CLFE 
HDA_SIDE 

Definition at line 297 of file hda_local.h.

anonymous enum
Enumerator:
HDA_DIG_NONE 
HDA_DIG_EXCLUSIVE 
HDA_DIG_ANALOG_DUP 

Definition at line 298 of file hda_local.h.

Function Documentation

int __snd_hda_add_vmaster ( struct hda_codec codec,
char name,
unsigned int tlv,
const char *const slaves,
const char suffix,
bool  init_slave_vol,
struct snd_kcontrol **  ctl_ret 
)

Definition at line 2508 of file hda_codec.c.

int _snd_hda_set_pin_ctl ( struct hda_codec codec,
hda_nid_t  pin,
unsigned int  val,
bool  cached 
)

Definition at line 5063 of file hda_codec.c.

u32 query_amp_caps ( struct hda_codec codec,
hda_nid_t  nid,
int  direction 
)

query_amp_caps - query AMP capabilities : the HD-auio codec : the NID to query : either HDA_INPUT or HDA_OUTPUT

Query AMP capabilities for the given widget and direction. Returns the obtained capability bits.

When cap bits have been already read, this doesn't read again but returns the cached value.

Definition at line 1714 of file hda_codec.c.

int snd_hda_add_imux_item ( struct hda_input_mux imux,
const char label,
int  index,
int type_idx 
)

snd_hda_add_imux_item - Add an item to input_mux

When the same label is used already in the existing items, the number suffix is appended to the label. This label index number is stored to type_idx when non-NULL pointer is given.

Definition at line 5096 of file hda_codec.c.

int snd_hda_add_new_ctls ( struct hda_codec codec,
const struct snd_kcontrol_new knew 
)

snd_hda_add_new_ctls - create controls from the array : the HDA codec : the array of struct snd_kcontrol_new

This helper function creates and add new controls in the given array. The array must be terminated with an empty entry as terminator.

Returns 0 if successful, or a negative error code.

Definition at line 4432 of file hda_codec.c.

int snd_hda_add_nid ( struct hda_codec codec,
struct snd_kcontrol kctl,
unsigned int  index,
hda_nid_t  nid 
)

snd_hda_add_nid - Assign a NID to a control element : HD-audio codec : corresponding NID (optional) : the control element to assign : index to kctl

Add the given control element to an array inside the codec instance. This function is used when snd_hda_ctl_add cannot be used for 1:1 NID:KCTL mapping - for example "Capture Source" selector.

Definition at line 2252 of file hda_codec.c.

int snd_hda_add_vmaster_hook ( struct hda_codec codec,
struct hda_vmaster_mute_hook hook,
bool  expose_enum_ctl 
)

Definition at line 2605 of file hda_codec.c.

int snd_hda_ch_mode_get ( struct hda_codec codec,
struct snd_ctl_elem_value ucontrol,
const struct hda_channel_mode chmode,
int  num_chmodes,
int  max_channels 
)

snd_hda_ch_mode_get - Get callback helper for the channel mode enum

Definition at line 4680 of file hda_codec.c.

int snd_hda_ch_mode_info ( struct hda_codec codec,
struct snd_ctl_elem_info uinfo,
const struct hda_channel_mode chmode,
int  num_chmodes 
)

snd_hda_ch_mode_info - Info callback helper for the channel mode enum

Definition at line 4661 of file hda_codec.c.

int snd_hda_ch_mode_put ( struct hda_codec codec,
struct snd_ctl_elem_value ucontrol,
const struct hda_channel_mode chmode,
int  num_chmodes,
int max_channelsp 
)

snd_hda_ch_mode_put - Put callback helper for the channel mode enum

Definition at line 4701 of file hda_codec.c.

int snd_hda_check_amp_list_power ( struct hda_codec codec,
struct hda_loopback_check check,
hda_nid_t  nid 
)
int snd_hda_check_board_codec_sid_config ( struct hda_codec codec,
int  num_configs,
const char *const models,
const struct snd_pci_quirk *  tbl 
)

snd_hda_check_board_codec_sid_config - compare the current codec subsystem ID with the config table

This is important for Gateway notebooks with SB450 HDA Audio where the vendor ID of the PCI device is: ATI Technologies Inc SB450 HDA Audio [1002:437b] and the vendor/subvendor are found only at the codec.

: the HDA codec : number of config enums : array of model name strings : configuration table, terminated by null entries

Compares the modelname or PCI subsystem id of the current codec with the given configuration table. If a matching entry is found, returns its config value (supposed to be 0 or positive).

If no entries are matching, the function returns a negative value.

Definition at line 4382 of file hda_codec.c.

int snd_hda_check_board_config ( struct hda_codec codec,
int  num_configs,
const char *const models,
const struct snd_pci_quirk *  tbl 
)

snd_hda_check_board_config - compare the current codec with the config table : the HDA codec : number of config enums : array of model name strings : configuration table, terminated by null entries

Compares the modelname or PCI subsystem id of the current codec with the given configuration table. If a matching entry is found, returns its config value (supposed to be 0 or positive).

If no entries are matching, the function returns a negative value.

Definition at line 4318 of file hda_codec.c.

int snd_hda_codec_amp_read ( struct hda_codec codec,
hda_nid_t  nid,
int  ch,
int  direction,
int  index 
)

snd_hda_codec_amp_read - Read AMP value : HD-audio codec : NID to read the AMP value : channel (left=0 or right=1) : HDA_INPUT or HDA_OUTPUT : the index value (only for input direction)

Read AMP value. The volume is between 0 to 0x7f, 0x80 = mute bit.

Definition at line 1848 of file hda_codec.c.

int snd_hda_codec_amp_stereo ( struct hda_codec codec,
hda_nid_t  nid,
int  direction,
int  idx,
int  mask,
int  val 
)

snd_hda_codec_amp_stereo - update the AMP stereo values : HD-audio codec : NID to read the AMP value : HDA_INPUT or HDA_OUTPUT : the index value (only for input direction) : bit mask to set : the bits value to set

Update the AMP values like snd_hda_codec_amp_update(), but for a stereo widget with the same mask and value.

Definition at line 1915 of file hda_codec.c.

int snd_hda_codec_amp_update ( struct hda_codec codec,
hda_nid_t  nid,
int  ch,
int  direction,
int  idx,
int  mask,
int  val 
)

snd_hda_codec_amp_update - update the AMP value : HD-audio codec : NID to read the AMP value : channel (left=0 or right=1) : HDA_INPUT or HDA_OUTPUT : the index value (only for input direction) : bit mask to set : the bits value to set

Update the AMP value with a bit mask. Returns 0 if the value is unchanged, 1 if changed.

Definition at line 1876 of file hda_codec.c.

int snd_hda_codec_reset ( struct hda_codec codec)

snd_hda_codec_reset - Clear all objects assigned to the codec : HD-audio codec

This frees the all PCM and control elements assigned to the codec, and clears the caches and restores the pin default configurations.

When a device is being used, it returns -EBSY. If successfully freed, returns zero.

Definition at line 2344 of file hda_codec.c.

int snd_hda_create_spdif_in_ctls ( struct hda_codec codec,
hda_nid_t  nid 
)

snd_hda_create_spdif_in_ctls - create Input SPDIF-related controls : the HDA codec : audio in widget NID

Creates controls related with the SPDIF input. Called from each patch supporting the SPDIF in.

Returns 0 if successful, or a negative error code.

Definition at line 3347 of file hda_codec.c.

int snd_hda_create_spdif_out_ctls ( struct hda_codec codec,
hda_nid_t  associated_nid,
hda_nid_t  cvt_nid 
)

snd_hda_create_spdif_out_ctls - create Output SPDIF-related controls : the HDA codec : audio out widget NID

Creates controls related with the SPDIF output. Called from each patch supporting the SPDIF out.

Returns 0 if successful, or a negative error code.

Definition at line 3147 of file hda_codec.c.

int snd_hda_create_spdif_share_sw ( struct hda_codec codec,
struct hda_multi_out mout 
)

snd_hda_create_spdif_share_sw - create Default PCM switch : the HDA codec : multi-out instance

Definition at line 3257 of file hda_codec.c.

int snd_hda_ctl_add ( struct hda_codec codec,
hda_nid_t  nid,
struct snd_kcontrol kctl 
)

snd_hda_ctl_add - Add a control element and assign to the codec : HD-audio codec : corresponding NID (optional) : the control element to assign

Add the given control element to an array inside the codec instance. All control elements belonging to a codec are supposed to be added by this function so that a proper clean-up works at the free or reconfiguration time.

If non-zero is passed, the NID is assigned to the control element. The assignment is shown in the codec proc file.

snd_hda_ctl_add() checks the control subdev id field whether HDA_SUBDEV_NID_FLAG bit is set. If set (and is zero), the lower bits value is taken as the NID to assign. The HDA_NID_ITEM_AMP bit specifies if kctl->private_value is a HDA amplifier value.

Definition at line 2212 of file hda_codec.c.

void snd_hda_ctls_clear ( struct hda_codec codec)

snd_hda_ctls_clear - Clear all controls assigned to the given codec : HD-audio codec

Definition at line 2276 of file hda_codec.c.

struct snd_kcontrol* snd_hda_find_mixer_ctl ( struct hda_codec codec,
const char name 
)
read

Definition at line 2176 of file hda_codec.c.

unsigned int snd_hda_get_default_vref ( struct hda_codec codec,
hda_nid_t  pin 
)

snd_hda_get_default_vref - Get the default (mic) VREF pin bits

Guess the suitable VREF pin bits to be set as the pin-control value. Note: the function doesn't set the AC_PINCTL_IN_EN bit.

Definition at line 5042 of file hda_codec.c.

int snd_hda_input_mux_info ( const struct hda_input_mux imux,
struct snd_ctl_elem_info uinfo 
)

snd_hda_input_mux_info_info - Info callback helper for the input-mux enum

Definition at line 4729 of file hda_codec.c.

int snd_hda_input_mux_put ( struct hda_codec codec,
const struct hda_input_mux imux,
struct snd_ctl_elem_value ucontrol,
hda_nid_t  nid,
unsigned int cur_val 
)

snd_hda_input_mux_info_put - Put callback helper for the input-mux enum

Definition at line 4750 of file hda_codec.c.

int snd_hda_mixer_amp_switch_get ( struct snd_kcontrol kcontrol,
struct snd_ctl_elem_value ucontrol 
)

snd_hda_mixer_amp_switch_get - Get callback for a standard AMP mixer switch

The control element is supposed to have the private_value field set up via HDA_COMPOSE_AMP_VAL*() or related macros.

Definition at line 2670 of file hda_codec.c.

int snd_hda_mixer_amp_switch_info ( struct snd_kcontrol kcontrol,
struct snd_ctl_elem_info uinfo 
)

snd_hda_mixer_amp_switch_info - Info callback for a standard AMP mixer switch

The control element is supposed to have the private_value field set up via HDA_COMPOSE_AMP_VAL*() or related macros.

Definition at line 2651 of file hda_codec.c.

int snd_hda_mixer_amp_switch_put ( struct snd_kcontrol kcontrol,
struct snd_ctl_elem_value ucontrol 
)

snd_hda_mixer_amp_switch_put - Put callback for a standard AMP mixer switch

The control element is supposed to have the private_value field set up via HDA_COMPOSE_AMP_VAL*() or related macros.

Definition at line 2696 of file hda_codec.c.

int snd_hda_mixer_amp_tlv ( struct snd_kcontrol kcontrol,
int  op_flag,
unsigned int  size,
unsigned int __user _tlv 
)

snd_hda_mixer_amp_volume_put - TLV callback for a standard AMP mixer volume

The control element is supposed to have the private_value field set up via HDA_COMPOSE_AMP_VAL*() or related macros.

Definition at line 2094 of file hda_codec.c.

int snd_hda_mixer_amp_volume_get ( struct snd_kcontrol kcontrol,
struct snd_ctl_elem_value ucontrol 
)

snd_hda_mixer_amp_volume_get - Get callback for a standard AMP mixer volume

The control element is supposed to have the private_value field set up via HDA_COMPOSE_AMP_VAL*() or related macros.

Definition at line 2039 of file hda_codec.c.

int snd_hda_mixer_amp_volume_info ( struct snd_kcontrol kcontrol,
struct snd_ctl_elem_info uinfo 
)

snd_hda_mixer_amp_volume_info - Info callback for a standard AMP mixer

The control element is supposed to have the private_value field set up via HDA_COMPOSE_AMP_VAL*() or related macros.

Definition at line 1978 of file hda_codec.c.

int snd_hda_mixer_amp_volume_put ( struct snd_kcontrol kcontrol,
struct snd_ctl_elem_value ucontrol 
)

snd_hda_mixer_amp_volume_put - Put callback for a standard AMP mixer volume

The control element is supposed to have the private_value field set up via HDA_COMPOSE_AMP_VAL*() or related macros.

Definition at line 2064 of file hda_codec.c.

int snd_hda_mixer_bind_ctls_get ( struct snd_kcontrol kcontrol,
struct snd_ctl_elem_value ucontrol 
)

snd_hda_mixer_bind_ctls_get - Get callback for a generic bound control

The control element is supposed to have the private_value field set up via HDA_BIND_VOL() or HDA_BIND_SW() macros.

Definition at line 2815 of file hda_codec.c.

int snd_hda_mixer_bind_ctls_info ( struct snd_kcontrol kcontrol,
struct snd_ctl_elem_info uinfo 
)

snd_hda_mixer_bind_ctls_info - Info callback for a generic bound control

The control element is supposed to have the private_value field set up via HDA_BIND_VOL() or HDA_BIND_SW() macros.

Definition at line 2792 of file hda_codec.c.

int snd_hda_mixer_bind_ctls_put ( struct snd_kcontrol kcontrol,
struct snd_ctl_elem_value ucontrol 
)

snd_hda_mixer_bind_ctls_put - Put callback for a generic bound control

The control element is supposed to have the private_value field set up via HDA_BIND_VOL() or HDA_BIND_SW() macros.

Definition at line 2838 of file hda_codec.c.

int snd_hda_mixer_bind_switch_get ( struct snd_kcontrol kcontrol,
struct snd_ctl_elem_value ucontrol 
)

snd_hda_mixer_bind_switch_get - Get callback for a bound volume control

The control element is supposed to have the private_value field set up via HDA_BIND_MUTE*() macros.

Definition at line 2739 of file hda_codec.c.

int snd_hda_mixer_bind_switch_put ( struct snd_kcontrol kcontrol,
struct snd_ctl_elem_value ucontrol 
)

snd_hda_mixer_bind_switch_put - Put callback for a bound volume control

The control element is supposed to have the private_value field set up via HDA_BIND_MUTE*() macros.

Definition at line 2762 of file hda_codec.c.

int snd_hda_mixer_bind_tlv ( struct snd_kcontrol kcontrol,
int  op_flag,
unsigned int  size,
unsigned int __user tlv 
)

snd_hda_mixer_bind_tlv - TLV callback for a generic bound control

The control element is supposed to have the private_value field set up via HDA_BIND_VOL() macro.

Definition at line 2867 of file hda_codec.c.

int snd_hda_multi_out_analog_cleanup ( struct hda_codec codec,
struct hda_multi_out mout 
)

snd_hda_multi_out_analog_cleanup - clean up the setting for analog out

Definition at line 5008 of file hda_codec.c.

int snd_hda_multi_out_analog_open ( struct hda_codec codec,
struct hda_multi_out mout,
struct snd_pcm_substream substream,
struct hda_pcm_stream hinfo 
)

snd_hda_multi_out_analog_open - open analog outputs

Open analog outputs and set up the hw-constraints. If the digital outputs can be opened as slave, open the digital outputs, too.

Definition at line 4894 of file hda_codec.c.

int snd_hda_multi_out_analog_prepare ( struct hda_codec codec,
struct hda_multi_out mout,
unsigned int  stream_tag,
unsigned int  format,
struct snd_pcm_substream substream 
)

snd_hda_multi_out_analog_prepare - Preapre the analog outputs.

Set up the i/o for analog out. When the digital out is available, copy the front out to digital out, too.

Definition at line 4943 of file hda_codec.c.

int snd_hda_multi_out_dig_cleanup ( struct hda_codec codec,
struct hda_multi_out mout 
)

snd_hda_multi_out_dig_cleanup - clean-up the digital out stream

Definition at line 4864 of file hda_codec.c.

int snd_hda_multi_out_dig_close ( struct hda_codec codec,
struct hda_multi_out mout 
)

snd_hda_multi_out_dig_close - release the digital out stream

Definition at line 4877 of file hda_codec.c.

int snd_hda_multi_out_dig_open ( struct hda_codec codec,
struct hda_multi_out mout 
)

snd_hda_multi_out_dig_open - open the digital out in the exclusive mode

Definition at line 4832 of file hda_codec.c.

int snd_hda_multi_out_dig_prepare ( struct hda_codec codec,
struct hda_multi_out mout,
unsigned int  stream_tag,
unsigned int  format,
struct snd_pcm_substream substream 
)

snd_hda_multi_out_dig_prepare - prepare the digital out stream

Definition at line 4848 of file hda_codec.c.

int snd_hda_override_amp_caps ( struct hda_codec codec,
hda_nid_t  nid,
int  dir,
unsigned int  caps 
)

snd_hda_override_amp_caps - Override the AMP capabilities : the CODEC to clean up : the NID to clean up : either HDA_INPUT or HDA_OUTPUT : the capability bits to set

Override the cached AMP caps bits value by the given one. This function is useful if the driver needs to adjust the AMP ranges, e.g. limit to 0dB, etc.

Returns zero if successful or a negative error code.

Definition at line 1735 of file hda_codec.c.

int snd_hda_override_pin_caps ( struct hda_codec codec,
hda_nid_t  nid,
unsigned int  caps 
)

snd_hda_override_pin_caps - Override the pin capabilities : the CODEC : the NID to override : the capability bits to set

Override the cached PIN capabilitiy bits value by the given one.

Returns zero if successful or a negative error code.

Definition at line 1776 of file hda_codec.c.

u32 snd_hda_query_pin_caps ( struct hda_codec codec,
hda_nid_t  nid 
)

snd_hda_query_pin_caps - Query PIN capabilities : the HD-auio codec : the NID to query

Query PIN capabilities for the given widget. Returns the obtained capability bits.

When cap bits have been already read, this doesn't read again but returns the cached value.

Definition at line 1759 of file hda_codec.c.

void snd_hda_schedule_power_save ( struct hda_codec codec)
void snd_hda_set_vmaster_tlv ( struct hda_codec codec,
hda_nid_t  nid,
int  dir,
unsigned int tlv 
)

Definition at line 2137 of file hda_codec.c.

void snd_hda_sync_vmaster_hook ( struct hda_vmaster_mute_hook hook)

Definition at line 2629 of file hda_codec.c.

void snd_hdmi_eld_update_pcm_info ( struct hdmi_eld eld,
struct hda_pcm_stream hinfo 
)

Definition at line 630 of file hda_eld.c.

int snd_hdmi_get_eld ( struct hdmi_eld ,
struct hda_codec ,
hda_nid_t   
)

Definition at line 321 of file hda_eld.c.

int snd_hdmi_get_eld_size ( struct hda_codec codec,
hda_nid_t  nid 
)

Definition at line 315 of file hda_eld.c.

void snd_hdmi_show_eld ( struct hdmi_eld eld)

Definition at line 441 of file hda_eld.c.

void snd_print_channel_allocation ( int  spk_alloc,
char buf,
int  buflen 
)

Definition at line 429 of file hda_eld.c.

void snd_print_pcm_bits ( int  pcm,
char buf,
int  buflen 
)

snd_print_pcm_bits - Print the supported PCM fmt bits to the string buffer : PCM caps bits : the string buffer to write : the max buffer length

used by hda_proc.c and hda_eld.c

Definition at line 5221 of file hda_codec.c.

Variable Documentation

struct hda_ctl_ops snd_hda_bind_sw

Definition at line 2892 of file hda_codec.c.

struct hda_ctl_ops snd_hda_bind_vol

Definition at line 2884 of file hda_codec.c.

const char* snd_hda_pcm_type_name[]

Definition at line 4159 of file hda_codec.c.