Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
hda_jack.c File Reference
#include <linux/init.h>
#include <linux/slab.h>
#include <linux/export.h>
#include <sound/core.h>
#include <sound/control.h>
#include <sound/jack.h>
#include "hda_codec.h"
#include "hda_local.h"
#include "hda_auto_parser.h"
#include "hda_jack.h"

Go to the source code of this file.

Macros

#define get_jack_plug_state(sense)   !!(sense & AC_PINSENSE_PRESENCE)
 

Functions

bool is_jack_detectable (struct hda_codec *codec, hda_nid_t nid)
 
 EXPORT_SYMBOL_HDA (is_jack_detectable)
 
struct hda_jack_tblsnd_hda_jack_tbl_get (struct hda_codec *codec, hda_nid_t nid)
 
 EXPORT_SYMBOL_HDA (snd_hda_jack_tbl_get)
 
struct hda_jack_tblsnd_hda_jack_tbl_get_from_tag (struct hda_codec *codec, unsigned char tag)
 
 EXPORT_SYMBOL_HDA (snd_hda_jack_tbl_get_from_tag)
 
struct hda_jack_tblsnd_hda_jack_tbl_new (struct hda_codec *codec, hda_nid_t nid)
 
 EXPORT_SYMBOL_HDA (snd_hda_jack_tbl_new)
 
void snd_hda_jack_tbl_clear (struct hda_codec *codec)
 
void snd_hda_jack_set_dirty_all (struct hda_codec *codec)
 
 EXPORT_SYMBOL_HDA (snd_hda_jack_set_dirty_all)
 
u32 snd_hda_pin_sense (struct hda_codec *codec, hda_nid_t nid)
 
 EXPORT_SYMBOL_HDA (snd_hda_pin_sense)
 
int snd_hda_jack_detect (struct hda_codec *codec, hda_nid_t nid)
 
 EXPORT_SYMBOL_HDA (snd_hda_jack_detect)
 
int snd_hda_jack_detect_enable_callback (struct hda_codec *codec, hda_nid_t nid, unsigned char action, hda_jack_callback cb)
 
 EXPORT_SYMBOL_HDA (snd_hda_jack_detect_enable_callback)
 
int snd_hda_jack_detect_enable (struct hda_codec *codec, hda_nid_t nid, unsigned char action)
 
 EXPORT_SYMBOL_HDA (snd_hda_jack_detect_enable)
 
void snd_hda_jack_report_sync (struct hda_codec *codec)
 
 EXPORT_SYMBOL_HDA (snd_hda_jack_report_sync)
 
int snd_hda_jack_add_kctl (struct hda_codec *codec, hda_nid_t nid, const char *name, int idx)
 
 EXPORT_SYMBOL_HDA (snd_hda_jack_add_kctl)
 
int snd_hda_jack_add_kctls (struct hda_codec *codec, const struct auto_pin_cfg *cfg)
 
 EXPORT_SYMBOL_HDA (snd_hda_jack_add_kctls)
 
void snd_hda_jack_unsol_event (struct hda_codec *codec, unsigned int res)
 
 EXPORT_SYMBOL_HDA (snd_hda_jack_unsol_event)
 

Macro Definition Documentation

#define get_jack_plug_state (   sense)    !!(sense & AC_PINSENSE_PRESENCE)

Definition at line 176 of file hda_jack.c.

Function Documentation

EXPORT_SYMBOL_HDA ( is_jack_detectable  )
EXPORT_SYMBOL_HDA ( snd_hda_jack_tbl_get  )
EXPORT_SYMBOL_HDA ( snd_hda_jack_tbl_get_from_tag  )
EXPORT_SYMBOL_HDA ( snd_hda_jack_tbl_new  )
EXPORT_SYMBOL_HDA ( snd_hda_jack_set_dirty_all  )
EXPORT_SYMBOL_HDA ( snd_hda_pin_sense  )
EXPORT_SYMBOL_HDA ( snd_hda_jack_detect  )
EXPORT_SYMBOL_HDA ( snd_hda_jack_detect_enable_callback  )
EXPORT_SYMBOL_HDA ( snd_hda_jack_detect_enable  )
EXPORT_SYMBOL_HDA ( snd_hda_jack_report_sync  )
EXPORT_SYMBOL_HDA ( snd_hda_jack_add_kctl  )
EXPORT_SYMBOL_HDA ( snd_hda_jack_add_kctls  )
EXPORT_SYMBOL_HDA ( snd_hda_jack_unsol_event  )
bool is_jack_detectable ( struct hda_codec codec,
hda_nid_t  nid 
)

Definition at line 23 of file hda_jack.c.

int snd_hda_jack_add_kctl ( struct hda_codec codec,
hda_nid_t  nid,
const char name,
int  idx 
)

Definition at line 319 of file hda_jack.c.

int snd_hda_jack_add_kctls ( struct hda_codec codec,
const struct auto_pin_cfg cfg 
)

snd_hda_jack_add_kctls - Add kctls for all pins included in the given pincfg

Definition at line 380 of file hda_jack.c.

int snd_hda_jack_detect ( struct hda_codec codec,
hda_nid_t  nid 
)

snd_hda_jack_detect - query pin Presence Detect status : the CODEC to sense : the pin NID to sense

Query and return the pin's Presence Detect status.

Definition at line 185 of file hda_jack.c.

int snd_hda_jack_detect_enable ( struct hda_codec codec,
hda_nid_t  nid,
unsigned char  action 
)

Definition at line 215 of file hda_jack.c.

int snd_hda_jack_detect_enable_callback ( struct hda_codec codec,
hda_nid_t  nid,
unsigned char  action,
hda_jack_callback  cb 
)

snd_hda_jack_detect_enable - enable the jack-detection

Definition at line 195 of file hda_jack.c.

void snd_hda_jack_report_sync ( struct hda_codec codec)

snd_hda_jack_report_sync - sync the states of all jacks and report if changed

Definition at line 225 of file hda_jack.c.

void snd_hda_jack_set_dirty_all ( struct hda_codec codec)

snd_hda_set_dirty_all - Mark all the cached as dirty

This function sets the dirty flag to all entries of jack table. It's called from the resume path in hda_codec.c.

Definition at line 146 of file hda_jack.c.

void snd_hda_jack_tbl_clear ( struct hda_codec codec)

Definition at line 109 of file hda_jack.c.

struct hda_jack_tbl* snd_hda_jack_tbl_get ( struct hda_codec codec,
hda_nid_t  nid 
)
read

snd_hda_jack_tbl_get - query the jack-table entry for the given NID

Definition at line 57 of file hda_jack.c.

struct hda_jack_tbl* snd_hda_jack_tbl_get_from_tag ( struct hda_codec codec,
unsigned char  tag 
)
read

snd_hda_jack_tbl_get_from_tag - query the jack-table entry for the given tag

Definition at line 75 of file hda_jack.c.

struct hda_jack_tbl* snd_hda_jack_tbl_new ( struct hda_codec codec,
hda_nid_t  nid 
)
read

snd_hda_jack_tbl_new - create a jack-table entry for the given NID

Definition at line 93 of file hda_jack.c.

void snd_hda_jack_unsol_event ( struct hda_codec codec,
unsigned int  res 
)

Definition at line 425 of file hda_jack.c.

u32 snd_hda_pin_sense ( struct hda_codec codec,
hda_nid_t  nid 
)

snd_hda_pin_sense - execute pin sense measurement : the CODEC to sense : the pin NID to sense

Execute necessary pin sense measurement and return its Presence Detect, Impedance, ELD Valid etc. status bits.

Definition at line 165 of file hda_jack.c.