Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Typedefs | Enumerations | Functions
hda_codec.h File Reference
#include <sound/info.h>
#include <sound/control.h>
#include <sound/pcm.h>
#include <sound/hwdep.h>

Go to the source code of this file.

Data Structures

struct  snd_array
 
struct  hda_bus_ops
 
struct  hda_bus_template
 
struct  hda_bus
 
struct  hda_codec_preset
 
struct  hda_codec_preset_list
 
struct  hda_codec_ops
 
struct  hda_cache_head
 
struct  hda_amp_info
 
struct  hda_cache_rec
 
struct  hda_pcm_ops
 
struct  hda_pcm_stream
 
struct  hda_pcm
 
struct  hda_codec
 
struct  hda_verb
 
struct  hda_pincfg
 
struct  hda_spdif_out
 

Macros

#define AC_NODE_ROOT   0x00
 
#define AC_VERB_GET_STREAM_FORMAT   0x0a00
 
#define AC_VERB_GET_AMP_GAIN_MUTE   0x0b00
 
#define AC_VERB_GET_PROC_COEF   0x0c00
 
#define AC_VERB_GET_COEF_INDEX   0x0d00
 
#define AC_VERB_PARAMETERS   0x0f00
 
#define AC_VERB_GET_CONNECT_SEL   0x0f01
 
#define AC_VERB_GET_CONNECT_LIST   0x0f02
 
#define AC_VERB_GET_PROC_STATE   0x0f03
 
#define AC_VERB_GET_SDI_SELECT   0x0f04
 
#define AC_VERB_GET_POWER_STATE   0x0f05
 
#define AC_VERB_GET_CONV   0x0f06
 
#define AC_VERB_GET_PIN_WIDGET_CONTROL   0x0f07
 
#define AC_VERB_GET_UNSOLICITED_RESPONSE   0x0f08
 
#define AC_VERB_GET_PIN_SENSE   0x0f09
 
#define AC_VERB_GET_BEEP_CONTROL   0x0f0a
 
#define AC_VERB_GET_EAPD_BTLENABLE   0x0f0c
 
#define AC_VERB_GET_DIGI_CONVERT_1   0x0f0d
 
#define AC_VERB_GET_DIGI_CONVERT_2   0x0f0e /* unused */
 
#define AC_VERB_GET_VOLUME_KNOB_CONTROL   0x0f0f
 
#define AC_VERB_GET_GPIO_DATA   0x0f15
 
#define AC_VERB_GET_GPIO_MASK   0x0f16
 
#define AC_VERB_GET_GPIO_DIRECTION   0x0f17
 
#define AC_VERB_GET_GPIO_WAKE_MASK   0x0f18
 
#define AC_VERB_GET_GPIO_UNSOLICITED_RSP_MASK   0x0f19
 
#define AC_VERB_GET_GPIO_STICKY_MASK   0x0f1a
 
#define AC_VERB_GET_CONFIG_DEFAULT   0x0f1c
 
#define AC_VERB_GET_SUBSYSTEM_ID   0x0f20
 
#define AC_VERB_GET_CVT_CHAN_COUNT   0x0f2d
 
#define AC_VERB_GET_HDMI_DIP_SIZE   0x0f2e
 
#define AC_VERB_GET_HDMI_ELDD   0x0f2f
 
#define AC_VERB_GET_HDMI_DIP_INDEX   0x0f30
 
#define AC_VERB_GET_HDMI_DIP_DATA   0x0f31
 
#define AC_VERB_GET_HDMI_DIP_XMIT   0x0f32
 
#define AC_VERB_GET_HDMI_CP_CTRL   0x0f33
 
#define AC_VERB_GET_HDMI_CHAN_SLOT   0x0f34
 
#define AC_VERB_SET_STREAM_FORMAT   0x200
 
#define AC_VERB_SET_AMP_GAIN_MUTE   0x300
 
#define AC_VERB_SET_PROC_COEF   0x400
 
#define AC_VERB_SET_COEF_INDEX   0x500
 
#define AC_VERB_SET_CONNECT_SEL   0x701
 
#define AC_VERB_SET_PROC_STATE   0x703
 
#define AC_VERB_SET_SDI_SELECT   0x704
 
#define AC_VERB_SET_POWER_STATE   0x705
 
#define AC_VERB_SET_CHANNEL_STREAMID   0x706
 
#define AC_VERB_SET_PIN_WIDGET_CONTROL   0x707
 
#define AC_VERB_SET_UNSOLICITED_ENABLE   0x708
 
#define AC_VERB_SET_PIN_SENSE   0x709
 
#define AC_VERB_SET_BEEP_CONTROL   0x70a
 
#define AC_VERB_SET_EAPD_BTLENABLE   0x70c
 
#define AC_VERB_SET_DIGI_CONVERT_1   0x70d
 
#define AC_VERB_SET_DIGI_CONVERT_2   0x70e
 
#define AC_VERB_SET_VOLUME_KNOB_CONTROL   0x70f
 
#define AC_VERB_SET_GPIO_DATA   0x715
 
#define AC_VERB_SET_GPIO_MASK   0x716
 
#define AC_VERB_SET_GPIO_DIRECTION   0x717
 
#define AC_VERB_SET_GPIO_WAKE_MASK   0x718
 
#define AC_VERB_SET_GPIO_UNSOLICITED_RSP_MASK   0x719
 
#define AC_VERB_SET_GPIO_STICKY_MASK   0x71a
 
#define AC_VERB_SET_CONFIG_DEFAULT_BYTES_0   0x71c
 
#define AC_VERB_SET_CONFIG_DEFAULT_BYTES_1   0x71d
 
#define AC_VERB_SET_CONFIG_DEFAULT_BYTES_2   0x71e
 
#define AC_VERB_SET_CONFIG_DEFAULT_BYTES_3   0x71f
 
#define AC_VERB_SET_EAPD   0x788
 
#define AC_VERB_SET_CODEC_RESET   0x7ff
 
#define AC_VERB_SET_CVT_CHAN_COUNT   0x72d
 
#define AC_VERB_SET_HDMI_DIP_INDEX   0x730
 
#define AC_VERB_SET_HDMI_DIP_DATA   0x731
 
#define AC_VERB_SET_HDMI_DIP_XMIT   0x732
 
#define AC_VERB_SET_HDMI_CP_CTRL   0x733
 
#define AC_VERB_SET_HDMI_CHAN_SLOT   0x734
 
#define AC_PAR_VENDOR_ID   0x00
 
#define AC_PAR_SUBSYSTEM_ID   0x01
 
#define AC_PAR_REV_ID   0x02
 
#define AC_PAR_NODE_COUNT   0x04
 
#define AC_PAR_FUNCTION_TYPE   0x05
 
#define AC_PAR_AUDIO_FG_CAP   0x08
 
#define AC_PAR_AUDIO_WIDGET_CAP   0x09
 
#define AC_PAR_PCM   0x0a
 
#define AC_PAR_STREAM   0x0b
 
#define AC_PAR_PIN_CAP   0x0c
 
#define AC_PAR_AMP_IN_CAP   0x0d
 
#define AC_PAR_CONNLIST_LEN   0x0e
 
#define AC_PAR_POWER_STATE   0x0f
 
#define AC_PAR_PROC_CAP   0x10
 
#define AC_PAR_GPIO_CAP   0x11
 
#define AC_PAR_AMP_OUT_CAP   0x12
 
#define AC_PAR_VOL_KNB_CAP   0x13
 
#define AC_PAR_HDMI_LPCM_CAP   0x20
 
#define AC_FGT_TYPE   (0xff<<0)
 
#define AC_FGT_TYPE_SHIFT   0
 
#define AC_FGT_UNSOL_CAP   (1<<8)
 
#define AC_AFG_OUT_DELAY   (0xf<<0)
 
#define AC_AFG_IN_DELAY   (0xf<<8)
 
#define AC_AFG_BEEP_GEN   (1<<16)
 
#define AC_WCAP_STEREO   (1<<0) /* stereo I/O */
 
#define AC_WCAP_IN_AMP   (1<<1) /* AMP-in present */
 
#define AC_WCAP_OUT_AMP   (1<<2) /* AMP-out present */
 
#define AC_WCAP_AMP_OVRD   (1<<3) /* AMP-parameter override */
 
#define AC_WCAP_FORMAT_OVRD   (1<<4) /* format override */
 
#define AC_WCAP_STRIPE   (1<<5) /* stripe */
 
#define AC_WCAP_PROC_WID   (1<<6) /* Proc Widget */
 
#define AC_WCAP_UNSOL_CAP   (1<<7) /* Unsol capable */
 
#define AC_WCAP_CONN_LIST   (1<<8) /* connection list */
 
#define AC_WCAP_DIGITAL   (1<<9) /* digital I/O */
 
#define AC_WCAP_POWER   (1<<10) /* power control */
 
#define AC_WCAP_LR_SWAP   (1<<11) /* L/R swap */
 
#define AC_WCAP_CP_CAPS   (1<<12) /* content protection */
 
#define AC_WCAP_CHAN_CNT_EXT   (7<<13) /* channel count ext */
 
#define AC_WCAP_DELAY   (0xf<<16)
 
#define AC_WCAP_DELAY_SHIFT   16
 
#define AC_WCAP_TYPE   (0xf<<20)
 
#define AC_WCAP_TYPE_SHIFT   20
 
#define AC_SUPPCM_RATES   (0xfff << 0)
 
#define AC_SUPPCM_BITS_8   (1<<16)
 
#define AC_SUPPCM_BITS_16   (1<<17)
 
#define AC_SUPPCM_BITS_20   (1<<18)
 
#define AC_SUPPCM_BITS_24   (1<<19)
 
#define AC_SUPPCM_BITS_32   (1<<20)
 
#define AC_SUPFMT_PCM   (1<<0)
 
#define AC_SUPFMT_FLOAT32   (1<<1)
 
#define AC_SUPFMT_AC3   (1<<2)
 
#define AC_GPIO_IO_COUNT   (0xff<<0)
 
#define AC_GPIO_O_COUNT   (0xff<<8)
 
#define AC_GPIO_O_COUNT_SHIFT   8
 
#define AC_GPIO_I_COUNT   (0xff<<16)
 
#define AC_GPIO_I_COUNT_SHIFT   16
 
#define AC_GPIO_UNSOLICITED   (1<<30)
 
#define AC_GPIO_WAKE   (1<<31)
 
#define AC_CONV_CHANNEL   (0xf<<0)
 
#define AC_CONV_STREAM   (0xf<<4)
 
#define AC_CONV_STREAM_SHIFT   4
 
#define AC_SDI_SELECT   (0xf<<0)
 
#define AC_FMT_CHAN_SHIFT   0
 
#define AC_FMT_CHAN_MASK   (0x0f << 0)
 
#define AC_FMT_BITS_SHIFT   4
 
#define AC_FMT_BITS_MASK   (7 << 4)
 
#define AC_FMT_BITS_8   (0 << 4)
 
#define AC_FMT_BITS_16   (1 << 4)
 
#define AC_FMT_BITS_20   (2 << 4)
 
#define AC_FMT_BITS_24   (3 << 4)
 
#define AC_FMT_BITS_32   (4 << 4)
 
#define AC_FMT_DIV_SHIFT   8
 
#define AC_FMT_DIV_MASK   (7 << 8)
 
#define AC_FMT_MULT_SHIFT   11
 
#define AC_FMT_MULT_MASK   (7 << 11)
 
#define AC_FMT_BASE_SHIFT   14
 
#define AC_FMT_BASE_48K   (0 << 14)
 
#define AC_FMT_BASE_44K   (1 << 14)
 
#define AC_FMT_TYPE_SHIFT   15
 
#define AC_FMT_TYPE_PCM   (0 << 15)
 
#define AC_FMT_TYPE_NON_PCM   (1 << 15)
 
#define AC_UNSOL_TAG   (0x3f<<0)
 
#define AC_UNSOL_ENABLED   (1<<7)
 
#define AC_USRSP_EN   AC_UNSOL_ENABLED
 
#define AC_UNSOL_RES_TAG   (0x3f<<26)
 
#define AC_UNSOL_RES_TAG_SHIFT   26
 
#define AC_UNSOL_RES_SUBTAG   (0x1f<<21)
 
#define AC_UNSOL_RES_SUBTAG_SHIFT   21
 
#define AC_UNSOL_RES_ELDV   (1<<1) /* ELD Data valid (for HDMI) */
 
#define AC_UNSOL_RES_PD   (1<<0) /* pinsense detect */
 
#define AC_UNSOL_RES_CP_STATE   (1<<1) /* content protection */
 
#define AC_UNSOL_RES_CP_READY   (1<<0) /* content protection */
 
#define AC_PINCAP_IMP_SENSE   (1<<0) /* impedance sense capable */
 
#define AC_PINCAP_TRIG_REQ   (1<<1) /* trigger required */
 
#define AC_PINCAP_PRES_DETECT   (1<<2) /* presence detect capable */
 
#define AC_PINCAP_HP_DRV   (1<<3) /* headphone drive capable */
 
#define AC_PINCAP_OUT   (1<<4) /* output capable */
 
#define AC_PINCAP_IN   (1<<5) /* input capable */
 
#define AC_PINCAP_BALANCE   (1<<6) /* balanced I/O capable */
 
#define AC_PINCAP_LR_SWAP   (1<<7) /* L/R swap */
 
#define AC_PINCAP_HDMI   (1<<7) /* HDMI pin */
 
#define AC_PINCAP_DP
 
#define AC_PINCAP_VREF   (0x37<<8)
 
#define AC_PINCAP_VREF_SHIFT   8
 
#define AC_PINCAP_EAPD   (1<<16) /* EAPD capable */
 
#define AC_PINCAP_HBR   (1<<27) /* High Bit Rate */
 
#define AC_PINCAP_VREF_HIZ   (1<<0) /* Hi-Z */
 
#define AC_PINCAP_VREF_50   (1<<1) /* 50% */
 
#define AC_PINCAP_VREF_GRD   (1<<2) /* ground */
 
#define AC_PINCAP_VREF_80   (1<<4) /* 80% */
 
#define AC_PINCAP_VREF_100   (1<<5) /* 100% */
 
#define AC_AMPCAP_OFFSET   (0x7f<<0) /* 0dB offset */
 
#define AC_AMPCAP_OFFSET_SHIFT   0
 
#define AC_AMPCAP_NUM_STEPS   (0x7f<<8) /* number of steps */
 
#define AC_AMPCAP_NUM_STEPS_SHIFT   8
 
#define AC_AMPCAP_STEP_SIZE
 
#define AC_AMPCAP_STEP_SIZE_SHIFT   16
 
#define AC_AMPCAP_MUTE   (1<<31) /* mute capable */
 
#define AC_AMPCAP_MUTE_SHIFT   31
 
#define AC_AMPCAP_MIN_MUTE   (1 << 30) /* min-volume = mute */
 
#define AC_CLIST_LENGTH   (0x7f<<0)
 
#define AC_CLIST_LONG   (1<<7)
 
#define AC_PWRST_D0SUP   (1<<0)
 
#define AC_PWRST_D1SUP   (1<<1)
 
#define AC_PWRST_D2SUP   (1<<2)
 
#define AC_PWRST_D3SUP   (1<<3)
 
#define AC_PWRST_D3COLDSUP   (1<<4)
 
#define AC_PWRST_S3D3COLDSUP   (1<<29)
 
#define AC_PWRST_CLKSTOP   (1<<30)
 
#define AC_PWRST_EPSS   (1U<<31)
 
#define AC_PWRST_SETTING   (0xf<<0)
 
#define AC_PWRST_ACTUAL   (0xf<<4)
 
#define AC_PWRST_ACTUAL_SHIFT   4
 
#define AC_PWRST_D0   0x00
 
#define AC_PWRST_D1   0x01
 
#define AC_PWRST_D2   0x02
 
#define AC_PWRST_D3   0x03
 
#define AC_PWRST_ERROR   (1<<8)
 
#define AC_PWRST_CLK_STOP_OK   (1<<9)
 
#define AC_PWRST_SETTING_RESET   (1<<10)
 
#define AC_PCAP_BENIGN   (1<<0)
 
#define AC_PCAP_NUM_COEF   (0xff<<8)
 
#define AC_PCAP_NUM_COEF_SHIFT   8
 
#define AC_KNBCAP_NUM_STEPS   (0x7f<<0)
 
#define AC_KNBCAP_DELTA   (1<<7)
 
#define AC_LPCMCAP_48K_CP_CHNS   (0x0f<<0) /* max channels w/ CP-on */
 
#define AC_LPCMCAP_48K_NO_CHNS   (0x0f<<4) /* max channels w/o CP-on */
 
#define AC_LPCMCAP_48K_20BIT   (1<<8) /* 20b bitrate supported */
 
#define AC_LPCMCAP_48K_24BIT   (1<<9) /* 24b bitrate supported */
 
#define AC_LPCMCAP_96K_CP_CHNS   (0x0f<<10) /* max channels w/ CP-on */
 
#define AC_LPCMCAP_96K_NO_CHNS   (0x0f<<14) /* max channels w/o CP-on */
 
#define AC_LPCMCAP_96K_20BIT   (1<<18) /* 20b bitrate supported */
 
#define AC_LPCMCAP_96K_24BIT   (1<<19) /* 24b bitrate supported */
 
#define AC_LPCMCAP_192K_CP_CHNS   (0x0f<<20) /* max channels w/ CP-on */
 
#define AC_LPCMCAP_192K_NO_CHNS   (0x0f<<24) /* max channels w/o CP-on */
 
#define AC_LPCMCAP_192K_20BIT   (1<<28) /* 20b bitrate supported */
 
#define AC_LPCMCAP_192K_24BIT   (1<<29) /* 24b bitrate supported */
 
#define AC_LPCMCAP_44K   (1<<30) /* 44.1kHz support */
 
#define AC_LPCMCAP_44K_MS   (1<<31) /* 44.1kHz-multiplies support */
 
#define AC_AMP_MUTE   (1<<7)
 
#define AC_AMP_GAIN   (0x7f)
 
#define AC_AMP_GET_INDEX   (0xf<<0)
 
#define AC_AMP_GET_LEFT   (1<<13)
 
#define AC_AMP_GET_RIGHT   (0<<13)
 
#define AC_AMP_GET_OUTPUT   (1<<15)
 
#define AC_AMP_GET_INPUT   (0<<15)
 
#define AC_AMP_SET_INDEX   (0xf<<8)
 
#define AC_AMP_SET_INDEX_SHIFT   8
 
#define AC_AMP_SET_RIGHT   (1<<12)
 
#define AC_AMP_SET_LEFT   (1<<13)
 
#define AC_AMP_SET_INPUT   (1<<14)
 
#define AC_AMP_SET_OUTPUT   (1<<15)
 
#define AC_DIG1_ENABLE   (1<<0)
 
#define AC_DIG1_V   (1<<1)
 
#define AC_DIG1_VCFG   (1<<2)
 
#define AC_DIG1_EMPHASIS   (1<<3)
 
#define AC_DIG1_COPYRIGHT   (1<<4)
 
#define AC_DIG1_NONAUDIO   (1<<5)
 
#define AC_DIG1_PROFESSIONAL   (1<<6)
 
#define AC_DIG1_LEVEL   (1<<7)
 
#define AC_DIG2_CC   (0x7f<<0)
 
#define AC_DIG3_ICT   (0xf<<0)
 
#define AC_DIG3_KAE   (1<<7)
 
#define AC_PINCTL_EPT   (0x3<<0)
 
#define AC_PINCTL_EPT_NATIVE   0
 
#define AC_PINCTL_EPT_HBR   3
 
#define AC_PINCTL_VREFEN   (0x7<<0)
 
#define AC_PINCTL_VREF_HIZ   0 /* Hi-Z */
 
#define AC_PINCTL_VREF_50   1 /* 50% */
 
#define AC_PINCTL_VREF_GRD   2 /* ground */
 
#define AC_PINCTL_VREF_80   4 /* 80% */
 
#define AC_PINCTL_VREF_100   5 /* 100% */
 
#define AC_PINCTL_IN_EN   (1<<5)
 
#define AC_PINCTL_OUT_EN   (1<<6)
 
#define AC_PINCTL_HP_EN   (1<<7)
 
#define AC_PINSENSE_IMPEDANCE_MASK   (0x7fffffff)
 
#define AC_PINSENSE_PRESENCE   (1<<31)
 
#define AC_PINSENSE_ELDV   (1<<30) /* ELD valid (HDMI) */
 
#define AC_EAPDBTL_BALANCED   (1<<0)
 
#define AC_EAPDBTL_EAPD   (1<<1)
 
#define AC_EAPDBTL_LR_SWAP   (1<<2)
 
#define AC_ELDD_ELD_VALID   (1<<31)
 
#define AC_ELDD_ELD_DATA   0xff
 
#define AC_DIPSIZE_ELD_BUF   (1<<3) /* ELD buf size of packet size */
 
#define AC_DIPSIZE_PACK_IDX   (0x07<<0) /* packet index */
 
#define AC_DIPIDX_PACK_IDX   (0x07<<5) /* packet idnex */
 
#define AC_DIPIDX_BYTE_IDX   (0x1f<<0) /* byte index */
 
#define AC_DIPXMIT_MASK   (0x3<<6)
 
#define AC_DIPXMIT_DISABLE   (0x0<<6) /* disable xmit */
 
#define AC_DIPXMIT_ONCE   (0x2<<6) /* xmit once then disable */
 
#define AC_DIPXMIT_BEST   (0x3<<6) /* best effort */
 
#define AC_CPCTRL_CES   (1<<9) /* current encryption state */
 
#define AC_CPCTRL_READY   (1<<8) /* ready bit */
 
#define AC_CPCTRL_SUBTAG   (0x1f<<3) /* subtag for unsol-resp */
 
#define AC_CPCTRL_STATE   (3<<0) /* current CP request state */
 
#define AC_CVTMAP_HDMI_SLOT   (0xf<<0) /* HDMI slot number */
 
#define AC_CVTMAP_CHAN   (0xf<<4) /* converter channel number */
 
#define AC_DEFCFG_SEQUENCE   (0xf<<0)
 
#define AC_DEFCFG_DEF_ASSOC   (0xf<<4)
 
#define AC_DEFCFG_ASSOC_SHIFT   4
 
#define AC_DEFCFG_MISC   (0xf<<8)
 
#define AC_DEFCFG_MISC_SHIFT   8
 
#define AC_DEFCFG_MISC_NO_PRESENCE   (1<<0)
 
#define AC_DEFCFG_COLOR   (0xf<<12)
 
#define AC_DEFCFG_COLOR_SHIFT   12
 
#define AC_DEFCFG_CONN_TYPE   (0xf<<16)
 
#define AC_DEFCFG_CONN_TYPE_SHIFT   16
 
#define AC_DEFCFG_DEVICE   (0xf<<20)
 
#define AC_DEFCFG_DEVICE_SHIFT   20
 
#define AC_DEFCFG_LOCATION   (0x3f<<24)
 
#define AC_DEFCFG_LOCATION_SHIFT   24
 
#define AC_DEFCFG_PORT_CONN   (0x3<<30)
 
#define AC_DEFCFG_PORT_CONN_SHIFT   30
 
#define HDA_MAX_CONNECTIONS   32
 
#define HDA_MAX_CODEC_ADDRESS   0x0f
 
#define snd_hda_param_read(codec, nid, param)   snd_hda_codec_read(codec, nid, 0, AC_VERB_PARAMETERS, param)
 
#define snd_hda_codec_write_cache   snd_hda_codec_write
 
#define snd_hda_codec_update_cache   snd_hda_codec_write
 
#define snd_hda_sequence_write_cache   snd_hda_sequence_write
 
#define snd_hda_codec_cleanup_stream(codec, nid)   __snd_hda_codec_cleanup_stream(codec, nid, 0)
 
#define EXPORT_SYMBOL_HDA(sym)
 

Typedefs

typedef u16 hda_nid_t
 

Enumerations

enum  { AC_GRP_AUDIO_FUNCTION = 0x01, AC_GRP_MODEM_FUNCTION = 0x02 }
 
enum  {
  AC_WID_AUD_OUT, AC_WID_AUD_IN, AC_WID_AUD_MIX, AC_WID_AUD_SEL,
  AC_WID_PIN, AC_WID_POWER, AC_WID_VOL_KNB, AC_WID_BEEP,
  AC_WID_VENDOR = 0x0f
}
 
enum  {
  AC_JACK_LINE_OUT, AC_JACK_SPEAKER, AC_JACK_HP_OUT, AC_JACK_CD,
  AC_JACK_SPDIF_OUT, AC_JACK_DIG_OTHER_OUT, AC_JACK_MODEM_LINE_SIDE, AC_JACK_MODEM_HAND_SIDE,
  AC_JACK_LINE_IN, AC_JACK_AUX, AC_JACK_MIC_IN, AC_JACK_TELEPHONY,
  AC_JACK_SPDIF_IN, AC_JACK_DIG_OTHER_IN, AC_JACK_OTHER = 0xf
}
 
enum  {
  AC_JACK_CONN_UNKNOWN, AC_JACK_CONN_1_8, AC_JACK_CONN_1_4, AC_JACK_CONN_ATAPI,
  AC_JACK_CONN_RCA, AC_JACK_CONN_OPTICAL, AC_JACK_CONN_OTHER_DIGITAL, AC_JACK_CONN_OTHER_ANALOG,
  AC_JACK_CONN_DIN, AC_JACK_CONN_XLR, AC_JACK_CONN_RJ11, AC_JACK_CONN_COMB,
  AC_JACK_CONN_OTHER = 0xf
}
 
enum  {
  AC_JACK_COLOR_UNKNOWN, AC_JACK_COLOR_BLACK, AC_JACK_COLOR_GREY, AC_JACK_COLOR_BLUE,
  AC_JACK_COLOR_GREEN, AC_JACK_COLOR_RED, AC_JACK_COLOR_ORANGE, AC_JACK_COLOR_YELLOW,
  AC_JACK_COLOR_PURPLE, AC_JACK_COLOR_PINK, AC_JACK_COLOR_WHITE = 0xe, AC_JACK_COLOR_OTHER
}
 
enum  {
  AC_JACK_LOC_NONE, AC_JACK_LOC_REAR, AC_JACK_LOC_FRONT, AC_JACK_LOC_LEFT,
  AC_JACK_LOC_RIGHT, AC_JACK_LOC_TOP, AC_JACK_LOC_BOTTOM
}
 
enum  { AC_JACK_LOC_EXTERNAL = 0x00, AC_JACK_LOC_INTERNAL = 0x10, AC_JACK_LOC_SEPARATE = 0x20, AC_JACK_LOC_OTHER = 0x30 }
 
enum  {
  AC_JACK_LOC_REAR_PANEL = 0x07, AC_JACK_LOC_DRIVE_BAY, AC_JACK_LOC_RISER = 0x17, AC_JACK_LOC_HDMI,
  AC_JACK_LOC_ATAPI, AC_JACK_LOC_MOBILE_IN = 0x37, AC_JACK_LOC_MOBILE_OUT
}
 
enum  { AC_JACK_PORT_COMPLEX, AC_JACK_PORT_NONE, AC_JACK_PORT_FIXED, AC_JACK_PORT_BOTH }
 
enum  {
  HDA_PCM_TYPE_AUDIO, HDA_PCM_TYPE_SPDIF, HDA_PCM_TYPE_HDMI, HDA_PCM_TYPE_MODEM,
  HDA_PCM_NTYPES
}
 
enum  { HDA_INPUT, HDA_OUTPUT }
 

Functions

voidsnd_array_new (struct snd_array *array)
 
void snd_array_free (struct snd_array *array)
 
int snd_hda_add_codec_preset (struct hda_codec_preset_list *preset)
 
int snd_hda_delete_codec_preset (struct hda_codec_preset_list *preset)
 
int snd_hda_bus_new (struct snd_card *card, const struct hda_bus_template *temp, struct hda_bus **busp)
 
int snd_hda_codec_new (struct hda_bus *bus, unsigned int codec_addr, struct hda_codec **codecp)
 
int snd_hda_codec_configure (struct hda_codec *codec)
 
unsigned int snd_hda_codec_read (struct hda_codec *codec, hda_nid_t nid, int direct, unsigned int verb, unsigned int parm)
 
int snd_hda_codec_write (struct hda_codec *codec, hda_nid_t nid, int direct, unsigned int verb, unsigned int parm)
 
int snd_hda_get_sub_nodes (struct hda_codec *codec, hda_nid_t nid, hda_nid_t *start_id)
 
int snd_hda_get_connections (struct hda_codec *codec, hda_nid_t nid, hda_nid_t *conn_list, int max_conns)
 
int snd_hda_get_raw_connections (struct hda_codec *codec, hda_nid_t nid, hda_nid_t *conn_list, int max_conns)
 
int snd_hda_override_conn_list (struct hda_codec *codec, hda_nid_t nid, int nums, const hda_nid_t *list)
 
int snd_hda_get_conn_index (struct hda_codec *codec, hda_nid_t mux, hda_nid_t nid, int recursive)
 
int snd_hda_query_supported_pcm (struct hda_codec *codec, hda_nid_t nid, u32 *ratesp, u64 *formatsp, unsigned int *bpsp)
 
void snd_hda_sequence_write (struct hda_codec *codec, const struct hda_verb *seq)
 
int snd_hda_queue_unsol_event (struct hda_bus *bus, u32 res, u32 res_ex)
 
unsigned int snd_hda_codec_get_pincfg (struct hda_codec *codec, hda_nid_t nid)
 
int snd_hda_codec_set_pincfg (struct hda_codec *codec, hda_nid_t nid, unsigned int cfg)
 
int snd_hda_add_pincfg (struct hda_codec *codec, struct snd_array *list, hda_nid_t nid, unsigned int cfg)
 
void snd_hda_shutup_pins (struct hda_codec *codec)
 
struct hda_spdif_outsnd_hda_spdif_out_of_nid (struct hda_codec *codec, hda_nid_t nid)
 
void snd_hda_spdif_ctls_unassign (struct hda_codec *codec, int idx)
 
void snd_hda_spdif_ctls_assign (struct hda_codec *codec, int idx, hda_nid_t nid)
 
int snd_hda_build_controls (struct hda_bus *bus)
 
int snd_hda_codec_build_controls (struct hda_codec *codec)
 
int snd_hda_build_pcms (struct hda_bus *bus)
 
int snd_hda_codec_build_pcms (struct hda_codec *codec)
 
int snd_hda_codec_prepare (struct hda_codec *codec, struct hda_pcm_stream *hinfo, unsigned int stream, unsigned int format, struct snd_pcm_substream *substream)
 
void snd_hda_codec_cleanup (struct hda_codec *codec, struct hda_pcm_stream *hinfo, struct snd_pcm_substream *substream)
 
void snd_hda_codec_setup_stream (struct hda_codec *codec, hda_nid_t nid, u32 stream_tag, int channel_id, int format)
 
void __snd_hda_codec_cleanup_stream (struct hda_codec *codec, hda_nid_t nid, int do_now)
 
unsigned int snd_hda_calc_stream_format (unsigned int rate, unsigned int channels, unsigned int format, unsigned int maxbps, unsigned short spdif_ctls)
 
int snd_hda_is_supported_format (struct hda_codec *codec, hda_nid_t nid, unsigned int format)
 
void snd_hda_get_codec_name (struct hda_codec *codec, char *name, int namelen)
 
void snd_hda_bus_reboot_notify (struct hda_bus *bus)
 
void snd_hda_codec_set_power_to_all (struct hda_codec *codec, hda_nid_t fg, unsigned int power_state, bool eapd_workaround)
 
int snd_hda_lock_devices (struct hda_bus *bus)
 
void snd_hda_unlock_devices (struct hda_bus *bus)
 
const charsnd_hda_get_jack_connectivity (u32 cfg)
 
const charsnd_hda_get_jack_type (u32 cfg)
 
const charsnd_hda_get_jack_location (u32 cfg)
 

Macro Definition Documentation

#define AC_AFG_BEEP_GEN   (1<<16)

Definition at line 171 of file hda_codec.h.

#define AC_AFG_IN_DELAY   (0xf<<8)

Definition at line 170 of file hda_codec.h.

#define AC_AFG_OUT_DELAY   (0xf<<0)

Definition at line 169 of file hda_codec.h.

#define AC_AMP_GAIN   (0x7f)

Definition at line 357 of file hda_codec.h.

#define AC_AMP_GET_INDEX   (0xf<<0)

Definition at line 358 of file hda_codec.h.

#define AC_AMP_GET_INPUT   (0<<15)

Definition at line 363 of file hda_codec.h.

#define AC_AMP_GET_LEFT   (1<<13)

Definition at line 360 of file hda_codec.h.

#define AC_AMP_GET_OUTPUT   (1<<15)

Definition at line 362 of file hda_codec.h.

#define AC_AMP_GET_RIGHT   (0<<13)

Definition at line 361 of file hda_codec.h.

#define AC_AMP_MUTE   (1<<7)

Definition at line 356 of file hda_codec.h.

#define AC_AMP_SET_INDEX   (0xf<<8)

Definition at line 365 of file hda_codec.h.

#define AC_AMP_SET_INDEX_SHIFT   8

Definition at line 366 of file hda_codec.h.

#define AC_AMP_SET_INPUT   (1<<14)

Definition at line 369 of file hda_codec.h.

#define AC_AMP_SET_LEFT   (1<<13)

Definition at line 368 of file hda_codec.h.

#define AC_AMP_SET_OUTPUT   (1<<15)

Definition at line 370 of file hda_codec.h.

#define AC_AMP_SET_RIGHT   (1<<12)

Definition at line 367 of file hda_codec.h.

#define AC_AMPCAP_MIN_MUTE   (1 << 30) /* min-volume = mute */

Definition at line 298 of file hda_codec.h.

#define AC_AMPCAP_MUTE   (1<<31) /* mute capable */

Definition at line 294 of file hda_codec.h.

#define AC_AMPCAP_MUTE_SHIFT   31

Definition at line 295 of file hda_codec.h.

#define AC_AMPCAP_NUM_STEPS   (0x7f<<8) /* number of steps */

Definition at line 290 of file hda_codec.h.

#define AC_AMPCAP_NUM_STEPS_SHIFT   8

Definition at line 291 of file hda_codec.h.

#define AC_AMPCAP_OFFSET   (0x7f<<0) /* 0dB offset */

Definition at line 288 of file hda_codec.h.

#define AC_AMPCAP_OFFSET_SHIFT   0

Definition at line 289 of file hda_codec.h.

#define AC_AMPCAP_STEP_SIZE
Value:
(0x7f<<16) /* step size 0-32dB
* in 0.25dB
*/

Definition at line 292 of file hda_codec.h.

#define AC_AMPCAP_STEP_SIZE_SHIFT   16

Definition at line 293 of file hda_codec.h.

#define AC_CLIST_LENGTH   (0x7f<<0)

Definition at line 301 of file hda_codec.h.

#define AC_CLIST_LONG   (1<<7)

Definition at line 302 of file hda_codec.h.

#define AC_CONV_CHANNEL   (0xf<<0)

Definition at line 216 of file hda_codec.h.

#define AC_CONV_STREAM   (0xf<<4)

Definition at line 217 of file hda_codec.h.

#define AC_CONV_STREAM_SHIFT   4

Definition at line 218 of file hda_codec.h.

#define AC_CPCTRL_CES   (1<<9) /* current encryption state */

Definition at line 432 of file hda_codec.h.

#define AC_CPCTRL_READY   (1<<8) /* ready bit */

Definition at line 433 of file hda_codec.h.

#define AC_CPCTRL_STATE   (3<<0) /* current CP request state */

Definition at line 435 of file hda_codec.h.

#define AC_CPCTRL_SUBTAG   (0x1f<<3) /* subtag for unsol-resp */

Definition at line 434 of file hda_codec.h.

#define AC_CVTMAP_CHAN   (0xf<<4) /* converter channel number */

Definition at line 439 of file hda_codec.h.

#define AC_CVTMAP_HDMI_SLOT   (0xf<<0) /* HDMI slot number */

Definition at line 438 of file hda_codec.h.

#define AC_DEFCFG_ASSOC_SHIFT   4

Definition at line 444 of file hda_codec.h.

#define AC_DEFCFG_COLOR   (0xf<<12)

Definition at line 448 of file hda_codec.h.

#define AC_DEFCFG_COLOR_SHIFT   12

Definition at line 449 of file hda_codec.h.

#define AC_DEFCFG_CONN_TYPE   (0xf<<16)

Definition at line 450 of file hda_codec.h.

#define AC_DEFCFG_CONN_TYPE_SHIFT   16

Definition at line 451 of file hda_codec.h.

#define AC_DEFCFG_DEF_ASSOC   (0xf<<4)

Definition at line 443 of file hda_codec.h.

#define AC_DEFCFG_DEVICE   (0xf<<20)

Definition at line 452 of file hda_codec.h.

#define AC_DEFCFG_DEVICE_SHIFT   20

Definition at line 453 of file hda_codec.h.

#define AC_DEFCFG_LOCATION   (0x3f<<24)

Definition at line 454 of file hda_codec.h.

#define AC_DEFCFG_LOCATION_SHIFT   24

Definition at line 455 of file hda_codec.h.

#define AC_DEFCFG_MISC   (0xf<<8)

Definition at line 445 of file hda_codec.h.

#define AC_DEFCFG_MISC_NO_PRESENCE   (1<<0)

Definition at line 447 of file hda_codec.h.

#define AC_DEFCFG_MISC_SHIFT   8

Definition at line 446 of file hda_codec.h.

#define AC_DEFCFG_PORT_CONN   (0x3<<30)

Definition at line 456 of file hda_codec.h.

#define AC_DEFCFG_PORT_CONN_SHIFT   30

Definition at line 457 of file hda_codec.h.

#define AC_DEFCFG_SEQUENCE   (0xf<<0)

Definition at line 442 of file hda_codec.h.

#define AC_DIG1_COPYRIGHT   (1<<4)

Definition at line 377 of file hda_codec.h.

#define AC_DIG1_EMPHASIS   (1<<3)

Definition at line 376 of file hda_codec.h.

#define AC_DIG1_ENABLE   (1<<0)

Definition at line 373 of file hda_codec.h.

#define AC_DIG1_LEVEL   (1<<7)

Definition at line 380 of file hda_codec.h.

#define AC_DIG1_NONAUDIO   (1<<5)

Definition at line 378 of file hda_codec.h.

#define AC_DIG1_PROFESSIONAL   (1<<6)

Definition at line 379 of file hda_codec.h.

#define AC_DIG1_V   (1<<1)

Definition at line 374 of file hda_codec.h.

#define AC_DIG1_VCFG   (1<<2)

Definition at line 375 of file hda_codec.h.

#define AC_DIG2_CC   (0x7f<<0)

Definition at line 383 of file hda_codec.h.

#define AC_DIG3_ICT   (0xf<<0)

Definition at line 386 of file hda_codec.h.

#define AC_DIG3_KAE   (1<<7)

Definition at line 387 of file hda_codec.h.

#define AC_DIPIDX_BYTE_IDX   (0x1f<<0) /* byte index */

Definition at line 423 of file hda_codec.h.

#define AC_DIPIDX_PACK_IDX   (0x07<<5) /* packet idnex */

Definition at line 422 of file hda_codec.h.

#define AC_DIPSIZE_ELD_BUF   (1<<3) /* ELD buf size of packet size */

Definition at line 418 of file hda_codec.h.

#define AC_DIPSIZE_PACK_IDX   (0x07<<0) /* packet index */

Definition at line 419 of file hda_codec.h.

#define AC_DIPXMIT_BEST   (0x3<<6) /* best effort */

Definition at line 429 of file hda_codec.h.

#define AC_DIPXMIT_DISABLE   (0x0<<6) /* disable xmit */

Definition at line 427 of file hda_codec.h.

#define AC_DIPXMIT_MASK   (0x3<<6)

Definition at line 426 of file hda_codec.h.

#define AC_DIPXMIT_ONCE   (0x2<<6) /* xmit once then disable */

Definition at line 428 of file hda_codec.h.

#define AC_EAPDBTL_BALANCED   (1<<0)

Definition at line 409 of file hda_codec.h.

#define AC_EAPDBTL_EAPD   (1<<1)

Definition at line 410 of file hda_codec.h.

#define AC_EAPDBTL_LR_SWAP   (1<<2)

Definition at line 411 of file hda_codec.h.

#define AC_ELDD_ELD_DATA   0xff

Definition at line 415 of file hda_codec.h.

#define AC_ELDD_ELD_VALID   (1<<31)

Definition at line 414 of file hda_codec.h.

#define AC_FGT_TYPE   (0xff<<0)

Definition at line 164 of file hda_codec.h.

#define AC_FGT_TYPE_SHIFT   0

Definition at line 165 of file hda_codec.h.

#define AC_FGT_UNSOL_CAP   (1<<8)

Definition at line 166 of file hda_codec.h.

#define AC_FMT_BASE_44K   (1 << 14)

Definition at line 239 of file hda_codec.h.

#define AC_FMT_BASE_48K   (0 << 14)

Definition at line 238 of file hda_codec.h.

#define AC_FMT_BASE_SHIFT   14

Definition at line 237 of file hda_codec.h.

#define AC_FMT_BITS_16   (1 << 4)

Definition at line 229 of file hda_codec.h.

#define AC_FMT_BITS_20   (2 << 4)

Definition at line 230 of file hda_codec.h.

#define AC_FMT_BITS_24   (3 << 4)

Definition at line 231 of file hda_codec.h.

#define AC_FMT_BITS_32   (4 << 4)

Definition at line 232 of file hda_codec.h.

#define AC_FMT_BITS_8   (0 << 4)

Definition at line 228 of file hda_codec.h.

#define AC_FMT_BITS_MASK   (7 << 4)

Definition at line 227 of file hda_codec.h.

#define AC_FMT_BITS_SHIFT   4

Definition at line 226 of file hda_codec.h.

#define AC_FMT_CHAN_MASK   (0x0f << 0)

Definition at line 225 of file hda_codec.h.

#define AC_FMT_CHAN_SHIFT   0

Definition at line 224 of file hda_codec.h.

#define AC_FMT_DIV_MASK   (7 << 8)

Definition at line 234 of file hda_codec.h.

#define AC_FMT_DIV_SHIFT   8

Definition at line 233 of file hda_codec.h.

#define AC_FMT_MULT_MASK   (7 << 11)

Definition at line 236 of file hda_codec.h.

#define AC_FMT_MULT_SHIFT   11

Definition at line 235 of file hda_codec.h.

#define AC_FMT_TYPE_NON_PCM   (1 << 15)

Definition at line 242 of file hda_codec.h.

#define AC_FMT_TYPE_PCM   (0 << 15)

Definition at line 241 of file hda_codec.h.

#define AC_FMT_TYPE_SHIFT   15

Definition at line 240 of file hda_codec.h.

#define AC_GPIO_I_COUNT   (0xff<<16)

Definition at line 210 of file hda_codec.h.

#define AC_GPIO_I_COUNT_SHIFT   16

Definition at line 211 of file hda_codec.h.

#define AC_GPIO_IO_COUNT   (0xff<<0)

Definition at line 207 of file hda_codec.h.

#define AC_GPIO_O_COUNT   (0xff<<8)

Definition at line 208 of file hda_codec.h.

#define AC_GPIO_O_COUNT_SHIFT   8

Definition at line 209 of file hda_codec.h.

#define AC_GPIO_UNSOLICITED   (1<<30)

Definition at line 212 of file hda_codec.h.

#define AC_GPIO_WAKE   (1<<31)

Definition at line 213 of file hda_codec.h.

#define AC_KNBCAP_DELTA   (1<<7)

Definition at line 333 of file hda_codec.h.

#define AC_KNBCAP_NUM_STEPS   (0x7f<<0)

Definition at line 332 of file hda_codec.h.

#define AC_LPCMCAP_192K_20BIT   (1<<28) /* 20b bitrate supported */

Definition at line 346 of file hda_codec.h.

#define AC_LPCMCAP_192K_24BIT   (1<<29) /* 24b bitrate supported */

Definition at line 347 of file hda_codec.h.

#define AC_LPCMCAP_192K_CP_CHNS   (0x0f<<20) /* max channels w/ CP-on */

Definition at line 344 of file hda_codec.h.

#define AC_LPCMCAP_192K_NO_CHNS   (0x0f<<24) /* max channels w/o CP-on */

Definition at line 345 of file hda_codec.h.

#define AC_LPCMCAP_44K   (1<<30) /* 44.1kHz support */

Definition at line 348 of file hda_codec.h.

#define AC_LPCMCAP_44K_MS   (1<<31) /* 44.1kHz-multiplies support */

Definition at line 349 of file hda_codec.h.

#define AC_LPCMCAP_48K_20BIT   (1<<8) /* 20b bitrate supported */

Definition at line 338 of file hda_codec.h.

#define AC_LPCMCAP_48K_24BIT   (1<<9) /* 24b bitrate supported */

Definition at line 339 of file hda_codec.h.

#define AC_LPCMCAP_48K_CP_CHNS   (0x0f<<0) /* max channels w/ CP-on */

Definition at line 336 of file hda_codec.h.

#define AC_LPCMCAP_48K_NO_CHNS   (0x0f<<4) /* max channels w/o CP-on */

Definition at line 337 of file hda_codec.h.

#define AC_LPCMCAP_96K_20BIT   (1<<18) /* 20b bitrate supported */

Definition at line 342 of file hda_codec.h.

#define AC_LPCMCAP_96K_24BIT   (1<<19) /* 24b bitrate supported */

Definition at line 343 of file hda_codec.h.

#define AC_LPCMCAP_96K_CP_CHNS   (0x0f<<10) /* max channels w/ CP-on */

Definition at line 340 of file hda_codec.h.

#define AC_LPCMCAP_96K_NO_CHNS   (0x0f<<14) /* max channels w/o CP-on */

Definition at line 341 of file hda_codec.h.

#define AC_NODE_ROOT   0x00

Definition at line 32 of file hda_codec.h.

#define AC_PAR_AMP_IN_CAP   0x0d

Definition at line 150 of file hda_codec.h.

#define AC_PAR_AMP_OUT_CAP   0x12

Definition at line 155 of file hda_codec.h.

#define AC_PAR_AUDIO_FG_CAP   0x08

Definition at line 145 of file hda_codec.h.

#define AC_PAR_AUDIO_WIDGET_CAP   0x09

Definition at line 146 of file hda_codec.h.

#define AC_PAR_CONNLIST_LEN   0x0e

Definition at line 151 of file hda_codec.h.

#define AC_PAR_FUNCTION_TYPE   0x05

Definition at line 144 of file hda_codec.h.

#define AC_PAR_GPIO_CAP   0x11

Definition at line 154 of file hda_codec.h.

#define AC_PAR_HDMI_LPCM_CAP   0x20

Definition at line 157 of file hda_codec.h.

#define AC_PAR_NODE_COUNT   0x04

Definition at line 143 of file hda_codec.h.

#define AC_PAR_PCM   0x0a

Definition at line 147 of file hda_codec.h.

#define AC_PAR_PIN_CAP   0x0c

Definition at line 149 of file hda_codec.h.

#define AC_PAR_POWER_STATE   0x0f

Definition at line 152 of file hda_codec.h.

#define AC_PAR_PROC_CAP   0x10

Definition at line 153 of file hda_codec.h.

#define AC_PAR_REV_ID   0x02

Definition at line 142 of file hda_codec.h.

#define AC_PAR_STREAM   0x0b

Definition at line 148 of file hda_codec.h.

#define AC_PAR_SUBSYSTEM_ID   0x01

Definition at line 141 of file hda_codec.h.

#define AC_PAR_VENDOR_ID   0x00

Definition at line 140 of file hda_codec.h.

#define AC_PAR_VOL_KNB_CAP   0x13

Definition at line 156 of file hda_codec.h.

#define AC_PCAP_BENIGN   (1<<0)

Definition at line 327 of file hda_codec.h.

#define AC_PCAP_NUM_COEF   (0xff<<8)

Definition at line 328 of file hda_codec.h.

#define AC_PCAP_NUM_COEF_SHIFT   8

Definition at line 329 of file hda_codec.h.

#define AC_PINCAP_BALANCE   (1<<6) /* balanced I/O capable */

Definition at line 266 of file hda_codec.h.

#define AC_PINCAP_DP
Value:
(1<<24) /* DisplayPort pin, can
* coexist with AC_PINCAP_HDMI
*/

Definition at line 275 of file hda_codec.h.

#define AC_PINCAP_EAPD   (1<<16) /* EAPD capable */

Definition at line 278 of file hda_codec.h.

#define AC_PINCAP_HBR   (1<<27) /* High Bit Rate */

Definition at line 279 of file hda_codec.h.

#define AC_PINCAP_HDMI   (1<<7) /* HDMI pin */

Definition at line 274 of file hda_codec.h.

#define AC_PINCAP_HP_DRV   (1<<3) /* headphone drive capable */

Definition at line 263 of file hda_codec.h.

#define AC_PINCAP_IMP_SENSE   (1<<0) /* impedance sense capable */

Definition at line 260 of file hda_codec.h.

#define AC_PINCAP_IN   (1<<5) /* input capable */

Definition at line 265 of file hda_codec.h.

#define AC_PINCAP_LR_SWAP   (1<<7) /* L/R swap */

Definition at line 270 of file hda_codec.h.

#define AC_PINCAP_OUT   (1<<4) /* output capable */

Definition at line 264 of file hda_codec.h.

#define AC_PINCAP_PRES_DETECT   (1<<2) /* presence detect capable */

Definition at line 262 of file hda_codec.h.

#define AC_PINCAP_TRIG_REQ   (1<<1) /* trigger required */

Definition at line 261 of file hda_codec.h.

#define AC_PINCAP_VREF   (0x37<<8)

Definition at line 276 of file hda_codec.h.

#define AC_PINCAP_VREF_100   (1<<5) /* 100% */

Definition at line 285 of file hda_codec.h.

#define AC_PINCAP_VREF_50   (1<<1) /* 50% */

Definition at line 282 of file hda_codec.h.

#define AC_PINCAP_VREF_80   (1<<4) /* 80% */

Definition at line 284 of file hda_codec.h.

#define AC_PINCAP_VREF_GRD   (1<<2) /* ground */

Definition at line 283 of file hda_codec.h.

#define AC_PINCAP_VREF_HIZ   (1<<0) /* Hi-Z */

Definition at line 281 of file hda_codec.h.

#define AC_PINCAP_VREF_SHIFT   8

Definition at line 277 of file hda_codec.h.

#define AC_PINCTL_EPT   (0x3<<0)

Definition at line 390 of file hda_codec.h.

#define AC_PINCTL_EPT_HBR   3

Definition at line 392 of file hda_codec.h.

#define AC_PINCTL_EPT_NATIVE   0

Definition at line 391 of file hda_codec.h.

#define AC_PINCTL_HP_EN   (1<<7)

Definition at line 401 of file hda_codec.h.

#define AC_PINCTL_IN_EN   (1<<5)

Definition at line 399 of file hda_codec.h.

#define AC_PINCTL_OUT_EN   (1<<6)

Definition at line 400 of file hda_codec.h.

#define AC_PINCTL_VREF_100   5 /* 100% */

Definition at line 398 of file hda_codec.h.

#define AC_PINCTL_VREF_50   1 /* 50% */

Definition at line 395 of file hda_codec.h.

#define AC_PINCTL_VREF_80   4 /* 80% */

Definition at line 397 of file hda_codec.h.

#define AC_PINCTL_VREF_GRD   2 /* ground */

Definition at line 396 of file hda_codec.h.

#define AC_PINCTL_VREF_HIZ   0 /* Hi-Z */

Definition at line 394 of file hda_codec.h.

#define AC_PINCTL_VREFEN   (0x7<<0)

Definition at line 393 of file hda_codec.h.

#define AC_PINSENSE_ELDV   (1<<30) /* ELD valid (HDMI) */

Definition at line 406 of file hda_codec.h.

#define AC_PINSENSE_IMPEDANCE_MASK   (0x7fffffff)

Definition at line 404 of file hda_codec.h.

#define AC_PINSENSE_PRESENCE   (1<<31)

Definition at line 405 of file hda_codec.h.

#define AC_PWRST_ACTUAL   (0xf<<4)

Definition at line 316 of file hda_codec.h.

#define AC_PWRST_ACTUAL_SHIFT   4

Definition at line 317 of file hda_codec.h.

#define AC_PWRST_CLK_STOP_OK   (1<<9)

Definition at line 323 of file hda_codec.h.

#define AC_PWRST_CLKSTOP   (1<<30)

Definition at line 311 of file hda_codec.h.

#define AC_PWRST_D0   0x00

Definition at line 318 of file hda_codec.h.

#define AC_PWRST_D0SUP   (1<<0)

Definition at line 305 of file hda_codec.h.

#define AC_PWRST_D1   0x01

Definition at line 319 of file hda_codec.h.

#define AC_PWRST_D1SUP   (1<<1)

Definition at line 306 of file hda_codec.h.

#define AC_PWRST_D2   0x02

Definition at line 320 of file hda_codec.h.

#define AC_PWRST_D2SUP   (1<<2)

Definition at line 307 of file hda_codec.h.

#define AC_PWRST_D3   0x03

Definition at line 321 of file hda_codec.h.

#define AC_PWRST_D3COLDSUP   (1<<4)

Definition at line 309 of file hda_codec.h.

#define AC_PWRST_D3SUP   (1<<3)

Definition at line 308 of file hda_codec.h.

#define AC_PWRST_EPSS   (1U<<31)

Definition at line 312 of file hda_codec.h.

#define AC_PWRST_ERROR   (1<<8)

Definition at line 322 of file hda_codec.h.

#define AC_PWRST_S3D3COLDSUP   (1<<29)

Definition at line 310 of file hda_codec.h.

#define AC_PWRST_SETTING   (0xf<<0)

Definition at line 315 of file hda_codec.h.

#define AC_PWRST_SETTING_RESET   (1<<10)

Definition at line 324 of file hda_codec.h.

#define AC_SDI_SELECT   (0xf<<0)

Definition at line 221 of file hda_codec.h.

#define AC_SUPFMT_AC3   (1<<2)

Definition at line 204 of file hda_codec.h.

#define AC_SUPFMT_FLOAT32   (1<<1)

Definition at line 203 of file hda_codec.h.

#define AC_SUPFMT_PCM   (1<<0)

Definition at line 202 of file hda_codec.h.

#define AC_SUPPCM_BITS_16   (1<<17)

Definition at line 196 of file hda_codec.h.

#define AC_SUPPCM_BITS_20   (1<<18)

Definition at line 197 of file hda_codec.h.

#define AC_SUPPCM_BITS_24   (1<<19)

Definition at line 198 of file hda_codec.h.

#define AC_SUPPCM_BITS_32   (1<<20)

Definition at line 199 of file hda_codec.h.

#define AC_SUPPCM_BITS_8   (1<<16)

Definition at line 195 of file hda_codec.h.

#define AC_SUPPCM_RATES   (0xfff << 0)

Definition at line 194 of file hda_codec.h.

#define AC_UNSOL_ENABLED   (1<<7)

Definition at line 246 of file hda_codec.h.

#define AC_UNSOL_RES_CP_READY   (1<<0) /* content protection */

Definition at line 257 of file hda_codec.h.

#define AC_UNSOL_RES_CP_STATE   (1<<1) /* content protection */

Definition at line 256 of file hda_codec.h.

#define AC_UNSOL_RES_ELDV   (1<<1) /* ELD Data valid (for HDMI) */

Definition at line 254 of file hda_codec.h.

#define AC_UNSOL_RES_PD   (1<<0) /* pinsense detect */

Definition at line 255 of file hda_codec.h.

#define AC_UNSOL_RES_SUBTAG   (0x1f<<21)

Definition at line 252 of file hda_codec.h.

#define AC_UNSOL_RES_SUBTAG_SHIFT   21

Definition at line 253 of file hda_codec.h.

#define AC_UNSOL_RES_TAG   (0x3f<<26)

Definition at line 250 of file hda_codec.h.

#define AC_UNSOL_RES_TAG_SHIFT   26

Definition at line 251 of file hda_codec.h.

#define AC_UNSOL_TAG   (0x3f<<0)

Definition at line 245 of file hda_codec.h.

#define AC_USRSP_EN   AC_UNSOL_ENABLED

Definition at line 247 of file hda_codec.h.

#define AC_VERB_GET_AMP_GAIN_MUTE   0x0b00

Definition at line 61 of file hda_codec.h.

#define AC_VERB_GET_BEEP_CONTROL   0x0f0a

Definition at line 74 of file hda_codec.h.

#define AC_VERB_GET_COEF_INDEX   0x0d00

Definition at line 63 of file hda_codec.h.

#define AC_VERB_GET_CONFIG_DEFAULT   0x0f1c

Definition at line 86 of file hda_codec.h.

#define AC_VERB_GET_CONNECT_LIST   0x0f02

Definition at line 66 of file hda_codec.h.

#define AC_VERB_GET_CONNECT_SEL   0x0f01

Definition at line 65 of file hda_codec.h.

#define AC_VERB_GET_CONV   0x0f06

Definition at line 70 of file hda_codec.h.

#define AC_VERB_GET_CVT_CHAN_COUNT   0x0f2d

Definition at line 89 of file hda_codec.h.

#define AC_VERB_GET_DIGI_CONVERT_1   0x0f0d

Definition at line 76 of file hda_codec.h.

#define AC_VERB_GET_DIGI_CONVERT_2   0x0f0e /* unused */

Definition at line 77 of file hda_codec.h.

#define AC_VERB_GET_EAPD_BTLENABLE   0x0f0c

Definition at line 75 of file hda_codec.h.

#define AC_VERB_GET_GPIO_DATA   0x0f15

Definition at line 80 of file hda_codec.h.

#define AC_VERB_GET_GPIO_DIRECTION   0x0f17

Definition at line 82 of file hda_codec.h.

#define AC_VERB_GET_GPIO_MASK   0x0f16

Definition at line 81 of file hda_codec.h.

#define AC_VERB_GET_GPIO_STICKY_MASK   0x0f1a

Definition at line 85 of file hda_codec.h.

#define AC_VERB_GET_GPIO_UNSOLICITED_RSP_MASK   0x0f19

Definition at line 84 of file hda_codec.h.

#define AC_VERB_GET_GPIO_WAKE_MASK   0x0f18

Definition at line 83 of file hda_codec.h.

#define AC_VERB_GET_HDMI_CHAN_SLOT   0x0f34

Definition at line 96 of file hda_codec.h.

#define AC_VERB_GET_HDMI_CP_CTRL   0x0f33

Definition at line 95 of file hda_codec.h.

#define AC_VERB_GET_HDMI_DIP_DATA   0x0f31

Definition at line 93 of file hda_codec.h.

#define AC_VERB_GET_HDMI_DIP_INDEX   0x0f30

Definition at line 92 of file hda_codec.h.

#define AC_VERB_GET_HDMI_DIP_SIZE   0x0f2e

Definition at line 90 of file hda_codec.h.

#define AC_VERB_GET_HDMI_DIP_XMIT   0x0f32

Definition at line 94 of file hda_codec.h.

#define AC_VERB_GET_HDMI_ELDD   0x0f2f

Definition at line 91 of file hda_codec.h.

#define AC_VERB_GET_PIN_SENSE   0x0f09

Definition at line 73 of file hda_codec.h.

#define AC_VERB_GET_PIN_WIDGET_CONTROL   0x0f07

Definition at line 71 of file hda_codec.h.

#define AC_VERB_GET_POWER_STATE   0x0f05

Definition at line 69 of file hda_codec.h.

#define AC_VERB_GET_PROC_COEF   0x0c00

Definition at line 62 of file hda_codec.h.

#define AC_VERB_GET_PROC_STATE   0x0f03

Definition at line 67 of file hda_codec.h.

#define AC_VERB_GET_SDI_SELECT   0x0f04

Definition at line 68 of file hda_codec.h.

#define AC_VERB_GET_STREAM_FORMAT   0x0a00

Definition at line 60 of file hda_codec.h.

#define AC_VERB_GET_SUBSYSTEM_ID   0x0f20

Definition at line 88 of file hda_codec.h.

#define AC_VERB_GET_UNSOLICITED_RESPONSE   0x0f08

Definition at line 72 of file hda_codec.h.

#define AC_VERB_GET_VOLUME_KNOB_CONTROL   0x0f0f

Definition at line 78 of file hda_codec.h.

#define AC_VERB_PARAMETERS   0x0f00

Definition at line 64 of file hda_codec.h.

#define AC_VERB_SET_AMP_GAIN_MUTE   0x300

Definition at line 102 of file hda_codec.h.

#define AC_VERB_SET_BEEP_CONTROL   0x70a

Definition at line 113 of file hda_codec.h.

#define AC_VERB_SET_CHANNEL_STREAMID   0x706

Definition at line 109 of file hda_codec.h.

#define AC_VERB_SET_CODEC_RESET   0x7ff

Definition at line 129 of file hda_codec.h.

#define AC_VERB_SET_COEF_INDEX   0x500

Definition at line 104 of file hda_codec.h.

#define AC_VERB_SET_CONFIG_DEFAULT_BYTES_0   0x71c

Definition at line 124 of file hda_codec.h.

#define AC_VERB_SET_CONFIG_DEFAULT_BYTES_1   0x71d

Definition at line 125 of file hda_codec.h.

#define AC_VERB_SET_CONFIG_DEFAULT_BYTES_2   0x71e

Definition at line 126 of file hda_codec.h.

#define AC_VERB_SET_CONFIG_DEFAULT_BYTES_3   0x71f

Definition at line 127 of file hda_codec.h.

#define AC_VERB_SET_CONNECT_SEL   0x701

Definition at line 105 of file hda_codec.h.

#define AC_VERB_SET_CVT_CHAN_COUNT   0x72d

Definition at line 130 of file hda_codec.h.

#define AC_VERB_SET_DIGI_CONVERT_1   0x70d

Definition at line 115 of file hda_codec.h.

#define AC_VERB_SET_DIGI_CONVERT_2   0x70e

Definition at line 116 of file hda_codec.h.

#define AC_VERB_SET_EAPD   0x788

Definition at line 128 of file hda_codec.h.

#define AC_VERB_SET_EAPD_BTLENABLE   0x70c

Definition at line 114 of file hda_codec.h.

#define AC_VERB_SET_GPIO_DATA   0x715

Definition at line 118 of file hda_codec.h.

#define AC_VERB_SET_GPIO_DIRECTION   0x717

Definition at line 120 of file hda_codec.h.

#define AC_VERB_SET_GPIO_MASK   0x716

Definition at line 119 of file hda_codec.h.

#define AC_VERB_SET_GPIO_STICKY_MASK   0x71a

Definition at line 123 of file hda_codec.h.

#define AC_VERB_SET_GPIO_UNSOLICITED_RSP_MASK   0x719

Definition at line 122 of file hda_codec.h.

#define AC_VERB_SET_GPIO_WAKE_MASK   0x718

Definition at line 121 of file hda_codec.h.

#define AC_VERB_SET_HDMI_CHAN_SLOT   0x734

Definition at line 135 of file hda_codec.h.

#define AC_VERB_SET_HDMI_CP_CTRL   0x733

Definition at line 134 of file hda_codec.h.

#define AC_VERB_SET_HDMI_DIP_DATA   0x731

Definition at line 132 of file hda_codec.h.

#define AC_VERB_SET_HDMI_DIP_INDEX   0x730

Definition at line 131 of file hda_codec.h.

#define AC_VERB_SET_HDMI_DIP_XMIT   0x732

Definition at line 133 of file hda_codec.h.

#define AC_VERB_SET_PIN_SENSE   0x709

Definition at line 112 of file hda_codec.h.

#define AC_VERB_SET_PIN_WIDGET_CONTROL   0x707

Definition at line 110 of file hda_codec.h.

#define AC_VERB_SET_POWER_STATE   0x705

Definition at line 108 of file hda_codec.h.

#define AC_VERB_SET_PROC_COEF   0x400

Definition at line 103 of file hda_codec.h.

#define AC_VERB_SET_PROC_STATE   0x703

Definition at line 106 of file hda_codec.h.

#define AC_VERB_SET_SDI_SELECT   0x704

Definition at line 107 of file hda_codec.h.

#define AC_VERB_SET_STREAM_FORMAT   0x200

Definition at line 101 of file hda_codec.h.

#define AC_VERB_SET_UNSOLICITED_ENABLE   0x708

Definition at line 111 of file hda_codec.h.

#define AC_VERB_SET_VOLUME_KNOB_CONTROL   0x70f

Definition at line 117 of file hda_codec.h.

#define AC_WCAP_AMP_OVRD   (1<<3) /* AMP-parameter override */

Definition at line 177 of file hda_codec.h.

#define AC_WCAP_CHAN_CNT_EXT   (7<<13) /* channel count ext */

Definition at line 187 of file hda_codec.h.

#define AC_WCAP_CONN_LIST   (1<<8) /* connection list */

Definition at line 182 of file hda_codec.h.

#define AC_WCAP_CP_CAPS   (1<<12) /* content protection */

Definition at line 186 of file hda_codec.h.

#define AC_WCAP_DELAY   (0xf<<16)

Definition at line 188 of file hda_codec.h.

#define AC_WCAP_DELAY_SHIFT   16

Definition at line 189 of file hda_codec.h.

#define AC_WCAP_DIGITAL   (1<<9) /* digital I/O */

Definition at line 183 of file hda_codec.h.

#define AC_WCAP_FORMAT_OVRD   (1<<4) /* format override */

Definition at line 178 of file hda_codec.h.

#define AC_WCAP_IN_AMP   (1<<1) /* AMP-in present */

Definition at line 175 of file hda_codec.h.

#define AC_WCAP_LR_SWAP   (1<<11) /* L/R swap */

Definition at line 185 of file hda_codec.h.

#define AC_WCAP_OUT_AMP   (1<<2) /* AMP-out present */

Definition at line 176 of file hda_codec.h.

#define AC_WCAP_POWER   (1<<10) /* power control */

Definition at line 184 of file hda_codec.h.

#define AC_WCAP_PROC_WID   (1<<6) /* Proc Widget */

Definition at line 180 of file hda_codec.h.

#define AC_WCAP_STEREO   (1<<0) /* stereo I/O */

Definition at line 174 of file hda_codec.h.

#define AC_WCAP_STRIPE   (1<<5) /* stripe */

Definition at line 179 of file hda_codec.h.

#define AC_WCAP_TYPE   (0xf<<20)

Definition at line 190 of file hda_codec.h.

#define AC_WCAP_TYPE_SHIFT   20

Definition at line 191 of file hda_codec.h.

#define AC_WCAP_UNSOL_CAP   (1<<7) /* Unsol capable */

Definition at line 181 of file hda_codec.h.

#define EXPORT_SYMBOL_HDA (   sym)

Definition at line 1141 of file hda_codec.h.

#define HDA_MAX_CODEC_ADDRESS   0x0f

Definition at line 554 of file hda_codec.h.

#define HDA_MAX_CONNECTIONS   32

Definition at line 551 of file hda_codec.h.

#define snd_hda_codec_cleanup_stream (   codec,
  nid 
)    __snd_hda_codec_cleanup_stream(codec, nid, 0)

Definition at line 1013 of file hda_codec.h.

#define snd_hda_codec_update_cache   snd_hda_codec_write

Definition at line 957 of file hda_codec.h.

#define snd_hda_codec_write_cache   snd_hda_codec_write

Definition at line 956 of file hda_codec.h.

#define snd_hda_param_read (   codec,
  nid,
  param 
)    snd_hda_codec_read(codec, nid, 0, AC_VERB_PARAMETERS, param)

Definition at line 914 of file hda_codec.h.

#define snd_hda_sequence_write_cache   snd_hda_sequence_write

Definition at line 958 of file hda_codec.h.

Typedef Documentation

typedef u16 hda_nid_t

Definition at line 595 of file hda_codec.h.

Enumeration Type Documentation

anonymous enum
Enumerator:
AC_GRP_AUDIO_FUNCTION 
AC_GRP_MODEM_FUNCTION 

Definition at line 37 of file hda_codec.h.

anonymous enum
Enumerator:
AC_WID_AUD_OUT 
AC_WID_AUD_IN 
AC_WID_AUD_MIX 
AC_WID_AUD_SEL 
AC_WID_PIN 
AC_WID_POWER 
AC_WID_VOL_KNB 
AC_WID_BEEP 
AC_WID_VENDOR 

Definition at line 45 of file hda_codec.h.

anonymous enum
Enumerator:
AC_JACK_LINE_OUT 
AC_JACK_SPEAKER 
AC_JACK_HP_OUT 
AC_JACK_CD 
AC_JACK_SPDIF_OUT 
AC_JACK_DIG_OTHER_OUT 
AC_JACK_MODEM_LINE_SIDE 
AC_JACK_MODEM_HAND_SIDE 
AC_JACK_LINE_IN 
AC_JACK_AUX 
AC_JACK_MIC_IN 
AC_JACK_TELEPHONY 
AC_JACK_SPDIF_IN 
AC_JACK_DIG_OTHER_IN 
AC_JACK_OTHER 

Definition at line 460 of file hda_codec.h.

anonymous enum
Enumerator:
AC_JACK_CONN_UNKNOWN 
AC_JACK_CONN_1_8 
AC_JACK_CONN_1_4 
AC_JACK_CONN_ATAPI 
AC_JACK_CONN_RCA 
AC_JACK_CONN_OPTICAL 
AC_JACK_CONN_OTHER_DIGITAL 
AC_JACK_CONN_OTHER_ANALOG 
AC_JACK_CONN_DIN 
AC_JACK_CONN_XLR 
AC_JACK_CONN_RJ11 
AC_JACK_CONN_COMB 
AC_JACK_CONN_OTHER 

Definition at line 479 of file hda_codec.h.

anonymous enum
Enumerator:
AC_JACK_COLOR_UNKNOWN 
AC_JACK_COLOR_BLACK 
AC_JACK_COLOR_GREY 
AC_JACK_COLOR_BLUE 
AC_JACK_COLOR_GREEN 
AC_JACK_COLOR_RED 
AC_JACK_COLOR_ORANGE 
AC_JACK_COLOR_YELLOW 
AC_JACK_COLOR_PURPLE 
AC_JACK_COLOR_PINK 
AC_JACK_COLOR_WHITE 
AC_JACK_COLOR_OTHER 

Definition at line 496 of file hda_codec.h.

anonymous enum
Enumerator:
AC_JACK_LOC_NONE 
AC_JACK_LOC_REAR 
AC_JACK_LOC_FRONT 
AC_JACK_LOC_LEFT 
AC_JACK_LOC_RIGHT 
AC_JACK_LOC_TOP 
AC_JACK_LOC_BOTTOM 

Definition at line 513 of file hda_codec.h.

anonymous enum
Enumerator:
AC_JACK_LOC_EXTERNAL 
AC_JACK_LOC_INTERNAL 
AC_JACK_LOC_SEPARATE 
AC_JACK_LOC_OTHER 

Definition at line 523 of file hda_codec.h.

anonymous enum
Enumerator:
AC_JACK_LOC_REAR_PANEL 
AC_JACK_LOC_DRIVE_BAY 
AC_JACK_LOC_RISER 
AC_JACK_LOC_HDMI 
AC_JACK_LOC_ATAPI 
AC_JACK_LOC_MOBILE_IN 
AC_JACK_LOC_MOBILE_OUT 

Definition at line 529 of file hda_codec.h.

anonymous enum
Enumerator:
AC_JACK_PORT_COMPLEX 
AC_JACK_PORT_NONE 
AC_JACK_PORT_FIXED 
AC_JACK_PORT_BOTH 

Definition at line 543 of file hda_codec.h.

anonymous enum
Enumerator:
HDA_PCM_TYPE_AUDIO 
HDA_PCM_TYPE_SPDIF 
HDA_PCM_TYPE_HDMI 
HDA_PCM_TYPE_MODEM 
HDA_PCM_NTYPES 

Definition at line 760 of file hda_codec.h.

anonymous enum
Enumerator:
HDA_INPUT 
HDA_OUTPUT 

Definition at line 892 of file hda_codec.h.

Function Documentation

void __snd_hda_codec_cleanup_stream ( struct hda_codec codec,
hda_nid_t  nid,
int  do_now 
)

__snd_hda_codec_cleanup_stream - clean up the codec for closing : the CODEC to clean up : the NID to clean up : really clean up the stream instead of clearing the active flag

Definition at line 1509 of file hda_codec.c.

void snd_array_free ( struct snd_array array)

snd_array_free - free the given array elements : the array object

Definition at line 5204 of file hda_codec.c.

void* snd_array_new ( struct snd_array array)

snd_array_new - get a new element from the given array : the array object

Get a new element from the given array. If it exceeds the pre-allocated array size, re-allocate the array.

Returns NULL if allocation failed.

Definition at line 5178 of file hda_codec.c.

int snd_hda_add_codec_preset ( struct hda_codec_preset_list preset)

Definition at line 79 of file hda_codec.c.

int snd_hda_add_pincfg ( struct hda_codec codec,
struct snd_array list,
hda_nid_t  nid,
unsigned int  cfg 
)

Definition at line 1012 of file hda_codec.c.

int snd_hda_build_controls ( struct hda_bus bus)

snd_hda_build_controls - build mixer controls : the BUS

Creates mixer controls for each codec included in the bus.

Returns 0 if successful, otherwise a negative error code.

Definition at line 3681 of file hda_codec.c.

int snd_hda_build_pcms ( struct hda_bus bus)

snd_hda_build_pcms - build PCM information : the BUS

Create PCM information for each codec included in the bus.

The build_pcms codec patch is requested to set up codec->num_pcms and codec->pcm_info properly. The array is referred by the top-level driver to create its PCM instances. The allocated codec->pcm_info should be released in codec->patch_ops.free callback.

At least, substreams, channels_min and channels_max must be filled for each stream. substreams = 0 indicates that the stream doesn't exist. When rates and/or formats are zero, the supported values are queried from the given nid. The nid is used also by the default ops.prepare and ops.cleanup callbacks.

The driver needs to call ops.open in its open callback. Similarly, ops.close is supposed to be called in the close callback. ops.prepare should be called in the prepare or hw_params callback with the proper parameters for set up. ops.cleanup should be called in hw_free for clean up of streams.

This function returns 0 if successful, or a negative error code.

Definition at line 4292 of file hda_codec.c.

int snd_hda_bus_new ( struct snd_card card,
const struct hda_bus_template temp,
struct hda_bus **  busp 
)

snd_hda_bus_new - create a HDA bus : the card entry : the template for hda_bus information : the pointer to store the created bus instance

Returns 0 if successful, or a negative error code.

Definition at line 741 of file hda_codec.c.

void snd_hda_bus_reboot_notify ( struct hda_bus bus)

snd_hda_bus_reboot_notify - call the reboot notifier of each codec : HD-audio bus

Definition at line 4815 of file hda_codec.c.

unsigned int snd_hda_calc_stream_format ( unsigned int  rate,
unsigned int  channels,
unsigned int  format,
unsigned int  maxbps,
unsigned short  spdif_ctls 
)

snd_hda_calc_stream_format - calculate format bitset : the sample rate : the number of channels : the PCM format (SNDRV_PCM_FORMAT_XXX) : the max. bps

Calculate the format bitset from the given rate, channels and th PCM format.

Return zero if invalid.

Definition at line 3802 of file hda_codec.c.

int snd_hda_codec_build_controls ( struct hda_codec codec)

Definition at line 3732 of file hda_codec.c.

int snd_hda_codec_build_pcms ( struct hda_codec codec)

Definition at line 4222 of file hda_codec.c.

void snd_hda_codec_cleanup ( struct hda_codec codec,
struct hda_pcm_stream hinfo,
struct snd_pcm_substream substream 
)

Definition at line 4148 of file hda_codec.c.

int snd_hda_codec_configure ( struct hda_codec codec)

snd_hda_codec_configure - (Re-)configure the HD-audio codec : the HDA codec

Start parsing of the given codec tree and (re-)initialize the whole patch instance.

Returns 0 if successful or a negative error code.

Definition at line 1376 of file hda_codec.c.

unsigned int snd_hda_codec_get_pincfg ( struct hda_codec codec,
hda_nid_t  nid 
)

snd_hda_codec_get_pincfg - Obtain a pin-default configuration : the HDA codec : NID to get the pin config

Get the current pin config value of the given pin NID. If the pincfg value is cached or overridden via sysfs or driver, returns the cached value.

Definition at line 1066 of file hda_codec.c.

int snd_hda_codec_new ( struct hda_bus bus,
unsigned int  codec_addr,
struct hda_codec **  codecp 
)

snd_hda_codec_new - create a HDA codec : the bus to assign : the codec address : the pointer to store the generated codec

Returns 0 if successful, or a negative error code.

Definition at line 1238 of file hda_codec.c.

int snd_hda_codec_prepare ( struct hda_codec codec,
struct hda_pcm_stream hinfo,
unsigned int  stream,
unsigned int  format,
struct snd_pcm_substream substream 
)

Definition at line 4132 of file hda_codec.c.

unsigned int snd_hda_codec_read ( struct hda_codec codec,
hda_nid_t  nid,
int  direct,
unsigned int  verb,
unsigned int  parm 
)

snd_hda_codec_read - send a command and get the response : the HDA codec : NID to send the command : direct flag : the verb to send : the parameter for the verb

Send a single command and read the corresponding response.

Returns the obtained response value, or -1 for an error.

Definition at line 260 of file hda_codec.c.

int snd_hda_codec_set_pincfg ( struct hda_codec codec,
hda_nid_t  nid,
unsigned int  cfg 
)

snd_hda_codec_set_pincfg - Override a pin default configuration : the HDA codec : NID to set the pin config : the pin default config value

Override a pin default configuration value in the cache. This value can be read by snd_hda_codec_get_pincfg() in a higher priority than the real hardware value.

Definition at line 1050 of file hda_codec.c.

void snd_hda_codec_set_power_to_all ( struct hda_codec codec,
hda_nid_t  fg,
unsigned int  power_state,
bool  eapd_workaround 
)

Definition at line 3495 of file hda_codec.c.

void snd_hda_codec_setup_stream ( struct hda_codec codec,
hda_nid_t  nid,
u32  stream_tag,
int  channel_id,
int  format 
)

snd_hda_codec_setup_stream - set up the codec for streaming : the CODEC to set up : the NID to set up : stream tag to pass, it's between 0x1 and 0xf. : channel id to pass, zero based. : stream format.

Definition at line 1459 of file hda_codec.c.

int snd_hda_codec_write ( struct hda_codec codec,
hda_nid_t  nid,
int  direct,
unsigned int  verb,
unsigned int  parm 
)

snd_hda_codec_write - send a single command without waiting for response : the HDA codec : NID to send the command : direct flag : the verb to send : the parameter for the verb

Send a single command without waiting for response.

Returns 0 if successful, or a negative error code.

Definition at line 284 of file hda_codec.c.

int snd_hda_delete_codec_preset ( struct hda_codec_preset_list preset)

Definition at line 88 of file hda_codec.c.

void snd_hda_get_codec_name ( struct hda_codec codec,
char name,
int  namelen 
)
int snd_hda_get_conn_index ( struct hda_codec codec,
hda_nid_t  mux,
hda_nid_t  nid,
int  recursive 
)

snd_hda_get_conn_index - get the connection index of the given NID : the HDA codec : NID containing the list : NID to select : 1 when searching NID recursively, otherwise 0

Parses the connection list of the widget and checks whether the widget is present. If it is, return the connection index. Otherwise it returns -1.

Definition at line 575 of file hda_codec.c.

int snd_hda_get_connections ( struct hda_codec codec,
hda_nid_t  nid,
hda_nid_t conn_list,
int  max_conns 
)

snd_hda_get_connections - copy connection list : the HDA codec : NID to parse : connection list array; when NULL, checks only the size : max. number of connections to store

Parses the connection list of the given widget and stores the list of NIDs.

Returns the number of connections, or a negative error code.

Definition at line 369 of file hda_codec.c.

const char* snd_hda_get_jack_connectivity ( u32  cfg)

snd_hda_get_jack_connectivity - Give a connectivity string of the jack : pin default config value

Parse the pin default config value and returns the string of the jack connectivity, i.e. external or internal connection.

Definition at line 155 of file hda_codec.c.

const char* snd_hda_get_jack_location ( u32  cfg)

snd_hda_get_jack_location - Give a location string of the jack : pin default config value

Parse the pin default config value and returns the string of the jack location, e.g. "Rear", "Front", etc.

Definition at line 121 of file hda_codec.c.

const char* snd_hda_get_jack_type ( u32  cfg)

snd_hda_get_jack_type - Give a type string of the jack : pin default config value

Parse the pin default config value and returns the string of the jack type, i.e. the purpose of the jack, such as Line-Out or CD.

Definition at line 170 of file hda_codec.c.

int snd_hda_get_raw_connections ( struct hda_codec codec,
hda_nid_t  nid,
hda_nid_t conn_list,
int  max_conns 
)

snd_hda_get_raw_connections - copy connection list without cache : the HDA codec : NID to parse : connection list array : max. number of connections to store

Like snd_hda_get_connections(), copy the connection list but without checking through the connection-list cache. Currently called only from hda_proc.c, so not exported.

Definition at line 419 of file hda_codec.c.

int snd_hda_get_sub_nodes ( struct hda_codec codec,
hda_nid_t  nid,
hda_nid_t start_id 
)

snd_hda_get_sub_nodes - get the range of sub nodes : the HDA codec : NID to parse : the pointer to store the start NID

Parse the NID and store the start NID of its sub-nodes. Returns the number of sub-nodes.

Definition at line 318 of file hda_codec.c.

int snd_hda_is_supported_format ( struct hda_codec codec,
hda_nid_t  nid,
unsigned int  format 
)

snd_hda_is_supported_format - Check the validity of the format : HD-audio codec : NID to check : the HD-audio format value to check

Check whether the given node supports the format value.

Returns 1 if supported, 0 if not.

Definition at line 4013 of file hda_codec.c.

int snd_hda_lock_devices ( struct hda_bus bus)

Definition at line 2289 of file hda_codec.c.

int snd_hda_override_conn_list ( struct hda_codec codec,
hda_nid_t  nid,
int  len,
const hda_nid_t list 
)

snd_hda_override_conn_list - add/modify the connection-list to cache : the HDA codec : NID to parse : number of connection list entries : the list of connection entries

Add or modify the given connection-list to the cache. If the corresponding cache already exists, invalidate it and append a new one.

Returns zero or a negative error code.

Definition at line 536 of file hda_codec.c.

int snd_hda_query_supported_pcm ( struct hda_codec codec,
hda_nid_t  nid,
u32 ratesp,
u64 formatsp,
unsigned int bpsp 
)

snd_hda_query_supported_pcm - query the supported PCM rates and formats : the HDA codec : NID to query : the pointer to store the detected rate bitflags : the pointer to store the detected formats : the pointer to store the detected format widths

Queries the supported PCM rates and formats. The NULL , or argument is ignored.

Returns 0 if successful, otherwise a negative error code.

Definition at line 3907 of file hda_codec.c.

int snd_hda_queue_unsol_event ( struct hda_bus bus,
u32  res,
u32  res_ex 
)

snd_hda_queue_unsol_event - add an unsolicited event to queue : the BUS : unsolicited event (lower 32bit of RIRB entry) : codec addr and flags (upper 32bit or RIRB entry)

Adds the given event to the queue. The events are processed in the workqueue asynchronously. Call this function in the interrupt hanlder when RIRB receives an unsolicited event.

Returns 0 if successful, or a negative error code.

Definition at line 615 of file hda_codec.c.

void snd_hda_sequence_write ( struct hda_codec codec,
const struct hda_verb seq 
)

snd_hda_sequence_write - sequence writes : the HDA codec : VERB array to send

Send the commands sequentially from the given array. The array must be terminated with NID=0.

Definition at line 302 of file hda_codec.c.

void snd_hda_shutup_pins ( struct hda_codec codec)

snd_hda_shutup_pins - Shut up all pins : the HDA codec

Clear all pin controls to shup up before suspend for avoiding click noise. The controls aren't cached so that they can be resumed properly.

Definition at line 1103 of file hda_codec.c.

void snd_hda_spdif_ctls_assign ( struct hda_codec codec,
int  idx,
hda_nid_t  nid 
)

Definition at line 3209 of file hda_codec.c.

void snd_hda_spdif_ctls_unassign ( struct hda_codec codec,
int  idx 
)

Definition at line 3198 of file hda_codec.c.

struct hda_spdif_out* snd_hda_spdif_out_of_nid ( struct hda_codec codec,
hda_nid_t  nid 
)
read

Definition at line 3184 of file hda_codec.c.

void snd_hda_unlock_devices ( struct hda_bus bus)

Definition at line 2323 of file hda_codec.c.