Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions
patch_sigmatel.c File Reference
#include <linux/init.h>
#include <linux/delay.h>
#include <linux/slab.h>
#include <linux/pci.h>
#include <linux/dmi.h>
#include <linux/module.h>
#include <sound/core.h>
#include <sound/asoundef.h>
#include <sound/jack.h>
#include <sound/tlv.h>
#include "hda_codec.h"
#include "hda_local.h"
#include "hda_auto_parser.h"
#include "hda_beep.h"
#include "hda_jack.h"

Go to the source code of this file.

Data Structures

struct  sigmatel_mic_route
 
struct  sigmatel_spec
 

Macros

#define MAX_PINS_NUM   16
 
#define MAX_ADCS_NUM   4
 
#define MAX_DMICS_NUM   4
 
#define AC_VERB_IDT_SET_POWER_MAP   0x7ec
 
#define AC_VERB_IDT_GET_POWER_MAP   0xfec
 
#define STAC92HD73XX_NUM_DMICS   2
 
#define STAC92HD73_DAC_COUNT   5
 
#define STAC92HD73XX_NUM_CAPS   2
 
#define stac92hd73xx_capsws   stac92hd73xx_capvols
 
#define STAC92HD83_DAC_COUNT   3
 
#define STAC92HD71BXX_NUM_DMICS   2
 
#define STAC92HD71BXX_NUM_CAPS   2
 
#define stac92hd71bxx_capsws   stac92hd71bxx_capvols
 
#define STAC925X_NUM_DMICS   1
 
#define STAC922X_NUM_CAPS   2
 
#define stac922x_capsws   stac922x_capvols
 
#define STAC927X_NUM_DMICS   2
 
#define STAC927X_NUM_CAPS   3
 
#define STAC9205_NUM_DMICS   2
 
#define STAC9205_NUM_CAPS   2
 
#define STAC92HD71BXX_NUM_PINS   13
 
#define stac92xx_aloopback_info   snd_ctl_boolean_mono_info
 
#define STAC_MONO_MUX
 
#define STAC_ANALOG_LOOPBACK(verb_read, verb_write, cnt)
 
#define DC_BIAS(xname, idx, nid)
 
#define stac92xx_hp_switch_info   snd_ctl_boolean_mono_info
 
#define stac92xx_clfe_switch_info   snd_ctl_boolean_mono_info
 
#define STAC_CODEC_HP_SWITCH(xname)
 
#define STAC_CODEC_IO_SWITCH(xname, xpval)
 
#define STAC_CODEC_CLFE_SWITCH(xname, xpval)
 
#define create_controls(codec, pfx, nid, chs)   create_controls_idx(codec, pfx, 0, nid, chs)
 
#define get_connection_index(codec, mux, nid)   snd_hda_get_conn_index(codec, mux, nid, 1)
 
#define stac92hd_proc_hook   NULL
 
#define stac92hd7x_proc_hook   NULL
 
#define stac9205_proc_hook   NULL
 
#define stac927x_proc_hook   NULL
 
#define stac92xx_suspend   NULL
 
#define stac92xx_resume   NULL
 
#define stac92xx_set_power_state   NULL
 
#define stac_hp_bass_gpio_info   snd_ctl_boolean_mono_info
 
#define stac9872_capsws   stac9872_capvols
 

Enumerations

enum  {
  STAC_VREF_EVENT = 1, STAC_INSERT_EVENT, STAC_PWR_EVENT, STAC_HP_EVENT,
  STAC_LO_EVENT, STAC_MIC_EVENT
}
 
enum  {
  STAC_AUTO, STAC_REF, STAC_9200_OQO, STAC_9200_DELL_D21,
  STAC_9200_DELL_D22, STAC_9200_DELL_D23, STAC_9200_DELL_M21, STAC_9200_DELL_M22,
  STAC_9200_DELL_M23, STAC_9200_DELL_M24, STAC_9200_DELL_M25, STAC_9200_DELL_M26,
  STAC_9200_DELL_M27, STAC_9200_M4, STAC_9200_M4_2, STAC_9200_PANASONIC,
  STAC_9200_MODELS
}
 
enum  {
  STAC_9205_AUTO, STAC_9205_REF, STAC_9205_DELL_M42, STAC_9205_DELL_M43,
  STAC_9205_DELL_M44, STAC_9205_EAPD, STAC_9205_MODELS
}
 
enum  {
  STAC_92HD73XX_AUTO, STAC_92HD73XX_NO_JD, STAC_92HD73XX_REF, STAC_92HD73XX_INTEL,
  STAC_DELL_M6_AMIC, STAC_DELL_M6_DMIC, STAC_DELL_M6_BOTH, STAC_DELL_EQ,
  STAC_ALIENWARE_M17X, STAC_92HD73XX_MODELS
}
 
enum  {
  STAC_92HD83XXX_AUTO, STAC_92HD83XXX_REF, STAC_92HD83XXX_PWR_REF, STAC_DELL_S14,
  STAC_DELL_VOSTRO_3500, STAC_92HD83XXX_HP_cNB11_INTQUAD, STAC_HP_DV7_4000, STAC_HP_ZEPHYR,
  STAC_92HD83XXX_HP_LED, STAC_92HD83XXX_HP_INV_LED, STAC_92HD83XXX_HP_MIC_LED, STAC_92HD83XXX_HEADSET_JACK,
  STAC_92HD83XXX_MODELS
}
 
enum  {
  STAC_92HD71BXX_AUTO, STAC_92HD71BXX_REF, STAC_DELL_M4_1, STAC_DELL_M4_2,
  STAC_DELL_M4_3, STAC_HP_M4, STAC_HP_DV4, STAC_HP_DV5,
  STAC_HP_HDX, STAC_HP_DV4_1222NR, STAC_92HD71BXX_MODELS
}
 
enum  {
  STAC_925x_AUTO, STAC_925x_REF, STAC_M1, STAC_M1_2,
  STAC_M2, STAC_M2_2, STAC_M3, STAC_M5,
  STAC_M6, STAC_925x_MODELS
}
 
enum  {
  STAC_922X_AUTO, STAC_D945_REF, STAC_D945GTP3, STAC_D945GTP5,
  STAC_INTEL_MAC_V1, STAC_INTEL_MAC_V2, STAC_INTEL_MAC_V3, STAC_INTEL_MAC_V4,
  STAC_INTEL_MAC_V5, STAC_INTEL_MAC_AUTO, STAC_MACMINI, STAC_MACBOOK,
  STAC_MACBOOK_PRO_V1, STAC_MACBOOK_PRO_V2, STAC_IMAC_INTEL, STAC_IMAC_INTEL_20,
  STAC_ECS_202, STAC_922X_DELL_D81, STAC_922X_DELL_D82, STAC_922X_DELL_M81,
  STAC_922X_DELL_M82, STAC_922X_MODELS
}
 
enum  {
  STAC_927X_AUTO, STAC_D965_REF_NO_JD, STAC_D965_REF, STAC_D965_3ST,
  STAC_D965_5ST, STAC_D965_5ST_NO_FP, STAC_DELL_3ST, STAC_DELL_BIOS,
  STAC_927X_VOLKNOB, STAC_927X_MODELS
}
 
enum  { STAC_9872_AUTO, STAC_9872_VAIO, STAC_9872_MODELS }
 
enum  {
  STAC_CTL_WIDGET_VOL, STAC_CTL_WIDGET_MUTE, STAC_CTL_WIDGET_MUTE_BEEP, STAC_CTL_WIDGET_MONO_MUX,
  STAC_CTL_WIDGET_HP_SWITCH, STAC_CTL_WIDGET_IO_SWITCH, STAC_CTL_WIDGET_CLFE_SWITCH, STAC_CTL_WIDGET_DC_BIAS
}
 

Functions

 MODULE_ALIAS ("snd-hda-codec-id:8384*")
 
 MODULE_ALIAS ("snd-hda-codec-id:111d*")
 
 MODULE_LICENSE ("GPL")
 
 MODULE_DESCRIPTION ("IDT/Sigmatel HD-audio codec")
 

Macro Definition Documentation

#define AC_VERB_IDT_GET_POWER_MAP   0xfec

Definition at line 328 of file patch_sigmatel.c.

#define AC_VERB_IDT_SET_POWER_MAP   0x7ec

Definition at line 327 of file patch_sigmatel.c.

#define create_controls (   codec,
  pfx,
  nid,
  chs 
)    create_controls_idx(codec, pfx, 0, nid, chs)

Definition at line 3189 of file patch_sigmatel.c.

#define DC_BIAS (   xname,
  idx,
  nid 
)
Value:
{ \
.name = xname, \
.index = idx, \
.info = stac92xx_dc_bias_info, \
.get = stac92xx_dc_bias_get, \
.put = stac92xx_dc_bias_put, \
.private_value = nid, \
}

Definition at line 1009 of file patch_sigmatel.c.

#define get_connection_index (   codec,
  mux,
  nid 
)    snd_hda_get_conn_index(codec, mux, nid, 1)

Definition at line 3570 of file patch_sigmatel.c.

#define MAX_ADCS_NUM   4

Definition at line 192 of file patch_sigmatel.c.

#define MAX_DMICS_NUM   4

Definition at line 193 of file patch_sigmatel.c.

#define MAX_PINS_NUM   16

Definition at line 191 of file patch_sigmatel.c.

#define STAC9205_NUM_CAPS   2

Definition at line 546 of file patch_sigmatel.c.

#define STAC9205_NUM_DMICS   2

Definition at line 541 of file patch_sigmatel.c.

#define stac9205_proc_hook   NULL

Definition at line 5071 of file patch_sigmatel.c.

#define stac922x_capsws   stac922x_capvols

Definition at line 477 of file patch_sigmatel.c.

#define STAC922X_NUM_CAPS   2

Definition at line 472 of file patch_sigmatel.c.

#define STAC925X_NUM_DMICS   1

Definition at line 448 of file patch_sigmatel.c.

#define STAC927X_NUM_CAPS   3

Definition at line 508 of file patch_sigmatel.c.

#define STAC927X_NUM_DMICS   2

Definition at line 503 of file patch_sigmatel.c.

#define stac927x_proc_hook   NULL

Definition at line 5072 of file patch_sigmatel.c.

#define stac92hd71bxx_capsws   stac92hd71bxx_capvols

Definition at line 434 of file patch_sigmatel.c.

#define STAC92HD71BXX_NUM_CAPS   2

Definition at line 429 of file patch_sigmatel.c.

#define STAC92HD71BXX_NUM_DMICS   2

Definition at line 416 of file patch_sigmatel.c.

#define STAC92HD71BXX_NUM_PINS   13

Definition at line 577 of file patch_sigmatel.c.

#define STAC92HD73_DAC_COUNT   5

Definition at line 360 of file patch_sigmatel.c.

#define stac92hd73xx_capsws   stac92hd73xx_capvols

Definition at line 379 of file patch_sigmatel.c.

#define STAC92HD73XX_NUM_CAPS   2

Definition at line 374 of file patch_sigmatel.c.

#define STAC92HD73XX_NUM_DMICS   2

Definition at line 355 of file patch_sigmatel.c.

#define stac92hd7x_proc_hook   NULL

Definition at line 5070 of file patch_sigmatel.c.

#define STAC92HD83_DAC_COUNT   3

Definition at line 381 of file patch_sigmatel.c.

#define stac92hd_proc_hook   NULL

Definition at line 5069 of file patch_sigmatel.c.

#define stac92xx_aloopback_info   snd_ctl_boolean_mono_info

Definition at line 823 of file patch_sigmatel.c.

#define stac92xx_clfe_switch_info   snd_ctl_boolean_mono_info

Definition at line 2717 of file patch_sigmatel.c.

#define stac92xx_hp_switch_info   snd_ctl_boolean_mono_info

Definition at line 2553 of file patch_sigmatel.c.

#define stac92xx_resume   NULL

Definition at line 5114 of file patch_sigmatel.c.

#define stac92xx_set_power_state   NULL

Definition at line 5115 of file patch_sigmatel.c.

#define stac92xx_suspend   NULL

Definition at line 5113 of file patch_sigmatel.c.

#define stac9872_capsws   stac9872_capvols

Definition at line 6396 of file patch_sigmatel.c.

#define STAC_ANALOG_LOOPBACK (   verb_read,
  verb_write,
  cnt 
)
Value:
{ \
.name = "Analog Loopback", \
.count = cnt, \
.get = stac92xx_aloopback_get, \
.put = stac92xx_aloopback_put, \
.private_value = verb_read | (verb_write << 16), \
}

Definition at line 998 of file patch_sigmatel.c.

#define STAC_CODEC_CLFE_SWITCH (   xname,
  xpval 
)
Value:
.name = xname, \
.index = 0, \
.get = stac92xx_clfe_switch_get, \
.put = stac92xx_clfe_switch_put, \
.private_value = xpval, \
}

Definition at line 2767 of file patch_sigmatel.c.

#define STAC_CODEC_HP_SWITCH (   xname)
Value:
.name = xname, \
.index = 0, \
.get = stac92xx_hp_switch_get, \
.put = stac92xx_hp_switch_put, \
}

Definition at line 2748 of file patch_sigmatel.c.

#define STAC_CODEC_IO_SWITCH (   xname,
  xpval 
)
Value:
.name = xname, \
.index = 0, \
.info = stac92xx_io_switch_info, \
.get = stac92xx_io_switch_get, \
.put = stac92xx_io_switch_put, \
.private_value = xpval, \
}

Definition at line 2757 of file patch_sigmatel.c.

#define stac_hp_bass_gpio_info   snd_ctl_boolean_mono_info

Definition at line 5730 of file patch_sigmatel.c.

#define STAC_MONO_MUX
Value:
{ \
.name = "Mono Mux", \
.count = 1, \
.info = stac92xx_mono_mux_enum_info, \
.get = stac92xx_mono_mux_enum_get, \
.put = stac92xx_mono_mux_enum_put, \
}

Definition at line 988 of file patch_sigmatel.c.

Enumeration Type Documentation

anonymous enum
Enumerator:
STAC_VREF_EVENT 
STAC_INSERT_EVENT 
STAC_PWR_EVENT 
STAC_HP_EVENT 
STAC_LO_EVENT 
STAC_MIC_EVENT 

Definition at line 43 of file patch_sigmatel.c.

anonymous enum
Enumerator:
STAC_AUTO 
STAC_REF 
STAC_9200_OQO 
STAC_9200_DELL_D21 
STAC_9200_DELL_D22 
STAC_9200_DELL_D23 
STAC_9200_DELL_M21 
STAC_9200_DELL_M22 
STAC_9200_DELL_M23 
STAC_9200_DELL_M24 
STAC_9200_DELL_M25 
STAC_9200_DELL_M26 
STAC_9200_DELL_M27 
STAC_9200_M4 
STAC_9200_M4_2 
STAC_9200_PANASONIC 
STAC_9200_MODELS 

Definition at line 52 of file patch_sigmatel.c.

anonymous enum
Enumerator:
STAC_9205_AUTO 
STAC_9205_REF 
STAC_9205_DELL_M42 
STAC_9205_DELL_M43 
STAC_9205_DELL_M44 
STAC_9205_EAPD 
STAC_9205_MODELS 

Definition at line 72 of file patch_sigmatel.c.

anonymous enum
Enumerator:
STAC_92HD73XX_AUTO 
STAC_92HD73XX_NO_JD 
STAC_92HD73XX_REF 
STAC_92HD73XX_INTEL 
STAC_DELL_M6_AMIC 
STAC_DELL_M6_DMIC 
STAC_DELL_M6_BOTH 
STAC_DELL_EQ 
STAC_ALIENWARE_M17X 
STAC_92HD73XX_MODELS 

Definition at line 82 of file patch_sigmatel.c.

anonymous enum
Enumerator:
STAC_92HD83XXX_AUTO 
STAC_92HD83XXX_REF 
STAC_92HD83XXX_PWR_REF 
STAC_DELL_S14 
STAC_DELL_VOSTRO_3500 
STAC_92HD83XXX_HP_cNB11_INTQUAD 
STAC_HP_DV7_4000 
STAC_HP_ZEPHYR 
STAC_92HD83XXX_HP_LED 
STAC_92HD83XXX_HP_INV_LED 
STAC_92HD83XXX_HP_MIC_LED 
STAC_92HD83XXX_HEADSET_JACK 
STAC_92HD83XXX_MODELS 

Definition at line 95 of file patch_sigmatel.c.

anonymous enum
Enumerator:
STAC_92HD71BXX_AUTO 
STAC_92HD71BXX_REF 
STAC_DELL_M4_1 
STAC_DELL_M4_2 
STAC_DELL_M4_3 
STAC_HP_M4 
STAC_HP_DV4 
STAC_HP_DV5 
STAC_HP_HDX 
STAC_HP_DV4_1222NR 
STAC_92HD71BXX_MODELS 

Definition at line 111 of file patch_sigmatel.c.

anonymous enum
Enumerator:
STAC_925x_AUTO 
STAC_925x_REF 
STAC_M1 
STAC_M1_2 
STAC_M2 
STAC_M2_2 
STAC_M3 
STAC_M5 
STAC_M6 
STAC_925x_MODELS 

Definition at line 125 of file patch_sigmatel.c.

anonymous enum
Enumerator:
STAC_922X_AUTO 
STAC_D945_REF 
STAC_D945GTP3 
STAC_D945GTP5 
STAC_INTEL_MAC_V1 
STAC_INTEL_MAC_V2 
STAC_INTEL_MAC_V3 
STAC_INTEL_MAC_V4 
STAC_INTEL_MAC_V5 
STAC_INTEL_MAC_AUTO 
STAC_MACMINI 
STAC_MACBOOK 
STAC_MACBOOK_PRO_V1 
STAC_MACBOOK_PRO_V2 
STAC_IMAC_INTEL 
STAC_IMAC_INTEL_20 
STAC_ECS_202 
STAC_922X_DELL_D81 
STAC_922X_DELL_D82 
STAC_922X_DELL_M81 
STAC_922X_DELL_M82 
STAC_922X_MODELS 

Definition at line 138 of file patch_sigmatel.c.

anonymous enum
Enumerator:
STAC_927X_AUTO 
STAC_D965_REF_NO_JD 
STAC_D965_REF 
STAC_D965_3ST 
STAC_D965_5ST 
STAC_D965_5ST_NO_FP 
STAC_DELL_3ST 
STAC_DELL_BIOS 
STAC_927X_VOLKNOB 
STAC_927X_MODELS 

Definition at line 166 of file patch_sigmatel.c.

anonymous enum
Enumerator:
STAC_9872_AUTO 
STAC_9872_VAIO 
STAC_9872_MODELS 

Definition at line 179 of file patch_sigmatel.c.

anonymous enum
Enumerator:
STAC_CTL_WIDGET_VOL 
STAC_CTL_WIDGET_MUTE 
STAC_CTL_WIDGET_MUTE_BEEP 
STAC_CTL_WIDGET_MONO_MUX 
STAC_CTL_WIDGET_HP_SWITCH 
STAC_CTL_WIDGET_IO_SWITCH 
STAC_CTL_WIDGET_CLFE_SWITCH 
STAC_CTL_WIDGET_DC_BIAS 

Definition at line 2777 of file patch_sigmatel.c.

Function Documentation

MODULE_ALIAS ( "snd-hda-codec-id:8384*"  )
MODULE_ALIAS ( "snd-hda-codec-id:111d*"  )
MODULE_DESCRIPTION ( "IDT/Sigmatel HD-audio codec )
MODULE_LICENSE ( "GPL"  )