Linux Kernel
3.7.1
|
#include <linux/mm.h>
#include <linux/init.h>
#include <linux/delay.h>
#include <linux/slab.h>
#include <linux/pci.h>
#include <linux/mutex.h>
#include <linux/module.h>
#include <sound/core.h>
#include "hda_codec.h"
#include <sound/asoundef.h>
#include <sound/tlv.h>
#include <sound/initval.h>
#include <sound/jack.h>
#include "hda_local.h"
#include "hda_beep.h"
#include "hda_jack.h"
#include <sound/hda_hwdep.h>
#include "hda_trace.h"
Go to the source code of this file.
Data Structures | |
struct | hda_vendor_id |
struct | hda_cvt_setup |
struct | hda_rate_tbl |
Macros | |
#define | CREATE_TRACE_POINTS |
#define | codec_in_pm(codec) 0 |
#define | hda_codec_is_power_on(codec) 1 |
#define | hda_call_pm_notify(bus, state) {} |
#define | snd_hda_bus_dev_register NULL |
#define | is_generic_config(codec) 0 |
#define | HDA_MODREQ_MAX_COUNT 0 /* all presets are statically linked */ |
#define | HDA_HASH_KEY(nid, dir, idx) (u32)((nid) + ((idx) << 16) + ((dir) << 24)) |
#define | HDA_HASH_PINCAP_KEY(nid) (u32)((nid) + (0x02 << 24)) |
#define | HDA_HASH_PARPCM_KEY(nid) (u32)((nid) + (0x03 << 24)) |
#define | HDA_HASH_PARSTR_KEY(nid) (u32)((nid) + (0x04 << 24)) |
#define | INFO_AMP_CAPS (1<<0) |
#define | INFO_AMP_VOL(ch) (1 << (1 + (ch))) |
#define | AC_PAR_PCM_RATE_BITS 11 |
: ctl id name string | |
snd_hda_find_mixer_ctl - Find a mixer control element with the given name : HD-audio codec Get the control element with the given id string and IFACE_MIXER. | |
typedef int(* | map_slave_func_t )(void *, struct snd_kcontrol *) |
struct snd_kcontrol * | snd_hda_find_mixer_ctl (struct hda_codec *codec, const char *name) |
EXPORT_SYMBOL_HDA (snd_hda_find_mixer_ctl) | |
int | snd_hda_ctl_add (struct hda_codec *codec, hda_nid_t nid, struct snd_kcontrol *kctl) |
EXPORT_SYMBOL_HDA (snd_hda_ctl_add) | |
int | snd_hda_add_nid (struct hda_codec *codec, struct snd_kcontrol *kctl, unsigned int index, hda_nid_t nid) |
EXPORT_SYMBOL_HDA (snd_hda_add_nid) | |
void | snd_hda_ctls_clear (struct hda_codec *codec) |
int | snd_hda_lock_devices (struct hda_bus *bus) |
EXPORT_SYMBOL_HDA (snd_hda_lock_devices) | |
void | snd_hda_unlock_devices (struct hda_bus *bus) |
EXPORT_SYMBOL_HDA (snd_hda_unlock_devices) | |
int | snd_hda_codec_reset (struct hda_codec *codec) |
#define AC_PAR_PCM_RATE_BITS 11 |
#define AMP_VAL_IDX_MASK (0x0f<<19) |
Definition at line 2731 of file hda_codec.c.
#define AMP_VAL_IDX_SHIFT 19 |
Definition at line 2730 of file hda_codec.c.
#define codec_in_pm | ( | codec | ) | 0 |
Definition at line 108 of file hda_codec.c.
#define CREATE_TRACE_POINTS |
Definition at line 40 of file hda_codec.c.
Definition at line 111 of file hda_codec.c.
#define hda_codec_is_power_on | ( | codec | ) | 1 |
Definition at line 110 of file hda_codec.c.
Definition at line 1583 of file hda_codec.c.
#define HDA_HASH_PARPCM_KEY | ( | nid | ) | (u32)((nid) + (0x03 << 24)) |
Definition at line 1585 of file hda_codec.c.
#define HDA_HASH_PARSTR_KEY | ( | nid | ) | (u32)((nid) + (0x04 << 24)) |
Definition at line 1586 of file hda_codec.c.
#define HDA_HASH_PINCAP_KEY | ( | nid | ) | (u32)((nid) + (0x02 << 24)) |
Definition at line 1584 of file hda_codec.c.
#define HDA_MODREQ_MAX_COUNT 0 /* all presets are statically linked */ |
Definition at line 808 of file hda_codec.c.
Definition at line 3763 of file hda_codec.c.
#define INFO_AMP_CAPS (1<<0) |
Definition at line 1587 of file hda_codec.c.
#define INFO_AMP_VOL | ( | ch | ) | (1 << (1 + (ch))) |
Definition at line 1588 of file hda_codec.c.
#define is_generic_config | ( | codec | ) | 0 |
Definition at line 802 of file hda_codec.c.
#define snd_hda_bus_dev_register NULL |
Definition at line 730 of file hda_codec.c.
#define snd_hda_spdif_in_switch_info snd_hda_spdif_out_switch_info |
Definition at line 3272 of file hda_codec.c.
#define snd_hda_spdif_out_switch_info snd_ctl_boolean_mono_info |
Definition at line 3054 of file hda_codec.c.
typedef int(* map_slave_func_t)(void *, struct snd_kcontrol *) |
Definition at line 2399 of file hda_codec.c.
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.
Definition at line 5063 of file hda_codec.c.
EXPORT_SYMBOL_HDA | ( | snd_hda_add_codec_preset | ) |
EXPORT_SYMBOL_HDA | ( | snd_hda_delete_codec_preset | ) |
EXPORT_SYMBOL_HDA | ( | snd_hda_get_jack_location | ) |
EXPORT_SYMBOL_HDA | ( | snd_hda_get_jack_connectivity | ) |
EXPORT_SYMBOL_HDA | ( | snd_hda_get_jack_type | ) |
EXPORT_SYMBOL_HDA | ( | snd_hda_codec_read | ) |
EXPORT_SYMBOL_HDA | ( | snd_hda_codec_write | ) |
EXPORT_SYMBOL_HDA | ( | snd_hda_sequence_write | ) |
EXPORT_SYMBOL_HDA | ( | snd_hda_get_sub_nodes | ) |
EXPORT_SYMBOL_HDA | ( | snd_hda_get_connections | ) |
EXPORT_SYMBOL_HDA | ( | snd_hda_override_conn_list | ) |
EXPORT_SYMBOL_HDA | ( | snd_hda_get_conn_index | ) |
EXPORT_SYMBOL_HDA | ( | snd_hda_queue_unsol_event | ) |
EXPORT_SYMBOL_HDA | ( | snd_hda_bus_new | ) |
EXPORT_SYMBOL_HDA | ( | snd_hda_codec_set_pincfg | ) |
EXPORT_SYMBOL_HDA | ( | snd_hda_codec_get_pincfg | ) |
EXPORT_SYMBOL_HDA | ( | snd_hda_shutup_pins | ) |
EXPORT_SYMBOL_HDA | ( | snd_hda_codec_new | ) |
EXPORT_SYMBOL_HDA | ( | snd_hda_codec_configure | ) |
EXPORT_SYMBOL_HDA | ( | snd_hda_codec_setup_stream | ) |
EXPORT_SYMBOL_HDA | ( | __snd_hda_codec_cleanup_stream | ) |
EXPORT_SYMBOL_HDA | ( | query_amp_caps | ) |
EXPORT_SYMBOL_HDA | ( | snd_hda_override_amp_caps | ) |
EXPORT_SYMBOL_HDA | ( | snd_hda_query_pin_caps | ) |
EXPORT_SYMBOL_HDA | ( | snd_hda_override_pin_caps | ) |
EXPORT_SYMBOL_HDA | ( | snd_hda_codec_amp_read | ) |
EXPORT_SYMBOL_HDA | ( | snd_hda_codec_amp_update | ) |
EXPORT_SYMBOL_HDA | ( | snd_hda_codec_amp_stereo | ) |
EXPORT_SYMBOL_HDA | ( | snd_hda_mixer_amp_volume_info | ) |
EXPORT_SYMBOL_HDA | ( | snd_hda_mixer_amp_volume_get | ) |
EXPORT_SYMBOL_HDA | ( | snd_hda_mixer_amp_volume_put | ) |
EXPORT_SYMBOL_HDA | ( | snd_hda_mixer_amp_tlv | ) |
EXPORT_SYMBOL_HDA | ( | snd_hda_set_vmaster_tlv | ) |
EXPORT_SYMBOL_HDA | ( | snd_hda_find_mixer_ctl | ) |
EXPORT_SYMBOL_HDA | ( | snd_hda_ctl_add | ) |
EXPORT_SYMBOL_HDA | ( | snd_hda_add_nid | ) |
EXPORT_SYMBOL_HDA | ( | snd_hda_lock_devices | ) |
EXPORT_SYMBOL_HDA | ( | snd_hda_unlock_devices | ) |
EXPORT_SYMBOL_HDA | ( | __snd_hda_add_vmaster | ) |
EXPORT_SYMBOL_HDA | ( | snd_hda_add_vmaster_hook | ) |
EXPORT_SYMBOL_HDA | ( | snd_hda_sync_vmaster_hook | ) |
EXPORT_SYMBOL_HDA | ( | snd_hda_mixer_amp_switch_info | ) |
EXPORT_SYMBOL_HDA | ( | snd_hda_mixer_amp_switch_get | ) |
EXPORT_SYMBOL_HDA | ( | snd_hda_mixer_amp_switch_put | ) |
EXPORT_SYMBOL_HDA | ( | snd_hda_mixer_bind_switch_get | ) |
EXPORT_SYMBOL_HDA | ( | snd_hda_mixer_bind_switch_put | ) |
EXPORT_SYMBOL_HDA | ( | snd_hda_mixer_bind_ctls_info | ) |
EXPORT_SYMBOL_HDA | ( | snd_hda_mixer_bind_ctls_get | ) |
EXPORT_SYMBOL_HDA | ( | snd_hda_mixer_bind_ctls_put | ) |
EXPORT_SYMBOL_HDA | ( | snd_hda_mixer_bind_tlv | ) |
EXPORT_SYMBOL_HDA | ( | snd_hda_bind_vol | ) |
EXPORT_SYMBOL_HDA | ( | snd_hda_bind_sw | ) |
EXPORT_SYMBOL_HDA | ( | snd_hda_create_spdif_out_ctls | ) |
EXPORT_SYMBOL_HDA | ( | snd_hda_spdif_out_of_nid | ) |
EXPORT_SYMBOL_HDA | ( | snd_hda_spdif_ctls_unassign | ) |
EXPORT_SYMBOL_HDA | ( | snd_hda_spdif_ctls_assign | ) |
EXPORT_SYMBOL_HDA | ( | snd_hda_create_spdif_share_sw | ) |
EXPORT_SYMBOL_HDA | ( | snd_hda_create_spdif_in_ctls | ) |
EXPORT_SYMBOL_HDA | ( | snd_hda_codec_set_power_to_all | ) |
EXPORT_SYMBOL_HDA | ( | snd_hda_build_controls | ) |
EXPORT_SYMBOL_HDA | ( | snd_hda_calc_stream_format | ) |
EXPORT_SYMBOL_HDA | ( | snd_hda_query_supported_pcm | ) |
EXPORT_SYMBOL_HDA | ( | snd_hda_is_supported_format | ) |
EXPORT_SYMBOL_HDA | ( | snd_hda_codec_prepare | ) |
EXPORT_SYMBOL_HDA | ( | snd_hda_codec_cleanup | ) |
EXPORT_SYMBOL_HDA | ( | snd_hda_build_pcms | ) |
EXPORT_SYMBOL_HDA | ( | snd_hda_check_board_config | ) |
EXPORT_SYMBOL_HDA | ( | snd_hda_check_board_codec_sid_config | ) |
EXPORT_SYMBOL_HDA | ( | snd_hda_add_new_ctls | ) |
EXPORT_SYMBOL_HDA | ( | snd_hda_ch_mode_info | ) |
EXPORT_SYMBOL_HDA | ( | snd_hda_ch_mode_get | ) |
EXPORT_SYMBOL_HDA | ( | snd_hda_ch_mode_put | ) |
EXPORT_SYMBOL_HDA | ( | snd_hda_input_mux_info | ) |
EXPORT_SYMBOL_HDA | ( | snd_hda_input_mux_put | ) |
EXPORT_SYMBOL_HDA | ( | snd_hda_bus_reboot_notify | ) |
EXPORT_SYMBOL_HDA | ( | snd_hda_multi_out_dig_open | ) |
EXPORT_SYMBOL_HDA | ( | snd_hda_multi_out_dig_prepare | ) |
EXPORT_SYMBOL_HDA | ( | snd_hda_multi_out_dig_cleanup | ) |
EXPORT_SYMBOL_HDA | ( | snd_hda_multi_out_dig_close | ) |
EXPORT_SYMBOL_HDA | ( | snd_hda_multi_out_analog_open | ) |
EXPORT_SYMBOL_HDA | ( | snd_hda_multi_out_analog_prepare | ) |
EXPORT_SYMBOL_HDA | ( | snd_hda_multi_out_analog_cleanup | ) |
EXPORT_SYMBOL_HDA | ( | snd_hda_get_default_vref | ) |
EXPORT_SYMBOL_HDA | ( | _snd_hda_set_pin_ctl | ) |
EXPORT_SYMBOL_HDA | ( | snd_hda_add_imux_item | ) |
EXPORT_SYMBOL_HDA | ( | snd_array_new | ) |
EXPORT_SYMBOL_HDA | ( | snd_array_free | ) |
EXPORT_SYMBOL_HDA | ( | snd_print_pcm_bits | ) |
MODULE_LICENSE | ( | "GPL" | ) |
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.
snd_array_free - free the given array elements : the array object
Definition at line 5204 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.
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_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_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.
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.
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.
snd_hda_bus_reboot_notify - call the reboot notifier of each codec : HD-audio bus
Definition at line 4815 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_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.
Definition at line 3732 of file hda_codec.c.
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_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.
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.
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.
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.
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.
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.
snd_hda_ctls_clear - Clear all controls assigned to the given codec : HD-audio codec
Definition at line 2276 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.
Definition at line 2176 of file hda_codec.c.
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.
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_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.
Definition at line 2289 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 | ||
) |
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_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.
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.
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.
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_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.
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.
Definition at line 3209 of file hda_codec.c.
Definition at line 3198 of file hda_codec.c.
|
read |
Definition at line 3184 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.
Definition at line 2323 of file hda_codec.c.
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[HDA_PCM_NTYPES] |
Definition at line 4159 of file hda_codec.c.