Linux Kernel
3.7.1
|
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/init.h>
#include <linux/async.h>
#include <linux/delay.h>
#include <linux/pm.h>
#include <linux/bitops.h>
#include <linux/platform_device.h>
#include <linux/jiffies.h>
#include <linux/debugfs.h>
#include <linux/pm_runtime.h>
#include <linux/regulator/consumer.h>
#include <linux/clk.h>
#include <linux/slab.h>
#include <sound/core.h>
#include <sound/pcm.h>
#include <sound/pcm_params.h>
#include <sound/soc.h>
#include <sound/initval.h>
#include <trace/events/asoc.h>
Go to the source code of this file.
Macros | |
#define | DAPM_UPDATE_STAT(widget, val) widget->dapm->card->dapm_stats.val++; |
#define DAPM_UPDATE_STAT | ( | widget, | |
val | |||
) | widget->dapm->card->dapm_stats.val++; |
Definition at line 48 of file soc-dapm.c.
int dapm_clock_event | ( | struct snd_soc_dapm_widget * | w, |
struct snd_kcontrol * | kcontrol, | ||
int | event | ||
) |
Definition at line 1049 of file soc-dapm.c.
void dapm_mark_dirty | ( | struct snd_soc_dapm_widget * | w, |
const char * | reason | ||
) |
Definition at line 134 of file soc-dapm.c.
void dapm_mark_io_dirty | ( | struct snd_soc_dapm_context * | dapm | ) |
Definition at line 144 of file soc-dapm.c.
int dapm_reg_event | ( | struct snd_soc_dapm_widget * | w, |
struct snd_kcontrol * | kcontrol, | ||
int | event | ||
) |
Definition at line 997 of file soc-dapm.c.
int dapm_regulator_event | ( | struct snd_soc_dapm_widget * | w, |
struct snd_kcontrol * | kcontrol, | ||
int | event | ||
) |
Definition at line 1017 of file soc-dapm.c.
EXPORT_SYMBOL_GPL | ( | dapm_mark_dirty | ) |
EXPORT_SYMBOL_GPL | ( | dapm_mark_io_dirty | ) |
EXPORT_SYMBOL_GPL | ( | dapm_reg_event | ) |
EXPORT_SYMBOL_GPL | ( | dapm_regulator_event | ) |
EXPORT_SYMBOL_GPL | ( | dapm_clock_event | ) |
EXPORT_SYMBOL_GPL | ( | snd_soc_dapm_mux_update_power | ) |
EXPORT_SYMBOL_GPL | ( | snd_soc_dapm_mixer_update_power | ) |
EXPORT_SYMBOL_GPL | ( | snd_soc_dapm_sync | ) |
EXPORT_SYMBOL_GPL | ( | snd_soc_dapm_add_routes | ) |
EXPORT_SYMBOL_GPL | ( | snd_soc_dapm_del_routes | ) |
EXPORT_SYMBOL_GPL | ( | snd_soc_dapm_weak_routes | ) |
EXPORT_SYMBOL_GPL | ( | snd_soc_dapm_new_widgets | ) |
EXPORT_SYMBOL_GPL | ( | snd_soc_dapm_get_volsw | ) |
EXPORT_SYMBOL_GPL | ( | snd_soc_dapm_put_volsw | ) |
EXPORT_SYMBOL_GPL | ( | snd_soc_dapm_get_enum_double | ) |
EXPORT_SYMBOL_GPL | ( | snd_soc_dapm_put_enum_double | ) |
EXPORT_SYMBOL_GPL | ( | snd_soc_dapm_get_enum_virt | ) |
EXPORT_SYMBOL_GPL | ( | snd_soc_dapm_put_enum_virt | ) |
EXPORT_SYMBOL_GPL | ( | snd_soc_dapm_get_value_enum_double | ) |
EXPORT_SYMBOL_GPL | ( | snd_soc_dapm_put_value_enum_double | ) |
EXPORT_SYMBOL_GPL | ( | snd_soc_dapm_info_pin_switch | ) |
EXPORT_SYMBOL_GPL | ( | snd_soc_dapm_get_pin_switch | ) |
EXPORT_SYMBOL_GPL | ( | snd_soc_dapm_put_pin_switch | ) |
EXPORT_SYMBOL_GPL | ( | snd_soc_dapm_new_controls | ) |
EXPORT_SYMBOL_GPL | ( | snd_soc_dapm_enable_pin | ) |
EXPORT_SYMBOL_GPL | ( | snd_soc_dapm_force_enable_pin | ) |
EXPORT_SYMBOL_GPL | ( | snd_soc_dapm_disable_pin | ) |
EXPORT_SYMBOL_GPL | ( | snd_soc_dapm_nc_pin | ) |
EXPORT_SYMBOL_GPL | ( | snd_soc_dapm_get_pin_status | ) |
EXPORT_SYMBOL_GPL | ( | snd_soc_dapm_ignore_suspend | ) |
EXPORT_SYMBOL_GPL | ( | snd_soc_dapm_free | ) |
MODULE_AUTHOR | ( | "Liam | Girdwood, |
lrg @slimlogic.co.uk" | |||
) |
MODULE_LICENSE | ( | "GPL" | ) |
int snd_soc_dapm_add_routes | ( | struct snd_soc_dapm_context * | dapm, |
const struct snd_soc_dapm_route * | route, | ||
int | num | ||
) |
snd_soc_dapm_add_routes - Add routes between DAPM widgets : DAPM context : audio routes : number of routes
Connects 2 dapm widgets together via a named audio path. The sink is the widget receiving the audio signal, whilst the source is the sender of the audio signal.
Returns 0 for success else error. On error all resources can be freed with a call to snd_soc_card_free().
Definition at line 2383 of file soc-dapm.c.
void snd_soc_dapm_auto_nc_codec_pins | ( | struct snd_soc_codec * | codec | ) |
snd_soc_dapm_auto_nc_codec_pins - call snd_soc_dapm_nc_pin for unused pins : The codec whose pins should be processed
Automatically call snd_soc_dapm_nc_pin() for any external pins in the codec which are unused. Pins are used if they are connected externally to the codec, whether that be to some other device, or a loop-back connection to the codec itself.
Definition at line 3661 of file soc-dapm.c.
int snd_soc_dapm_dai_get_connected_widgets | ( | struct snd_soc_dai * | dai, |
int | stream, | ||
struct snd_soc_dapm_widget_list ** | list | ||
) |
snd_soc_dapm_get_connected_widgets - query audio path and it's widgets. : the soc DAI. : stream direction. : list of active widgets for this stream.
Queries DAPM graph as to whether an valid audio stream path exists for the initial stream specified by name. This takes into account current mixer and mux kcontrol settings. Creates list of valid widgets.
Returns the number of valid paths or negative error.
Definition at line 973 of file soc-dapm.c.
void snd_soc_dapm_debugfs_init | ( | struct snd_soc_dapm_context * | dapm, |
struct dentry * | parent | ||
) |
Definition at line 1876 of file soc-dapm.c.
int snd_soc_dapm_del_routes | ( | struct snd_soc_dapm_context * | dapm, |
const struct snd_soc_dapm_route * | route, | ||
int | num | ||
) |
snd_soc_dapm_del_routes - Remove routes between DAPM widgets : DAPM context : audio routes : number of routes
Removes routes from the DAPM context.
Definition at line 2412 of file soc-dapm.c.
int snd_soc_dapm_disable_pin | ( | struct snd_soc_dapm_context * | dapm, |
const char * | pin | ||
) |
snd_soc_dapm_disable_pin - disable pin. : DAPM context : pin name
Disables input/output pin and its parents or children widgets. NOTE: snd_soc_dapm_sync() needs to be called after this for DAPM to do any widget power switching.
Definition at line 3543 of file soc-dapm.c.
int snd_soc_dapm_enable_pin | ( | struct snd_soc_dapm_context * | dapm, |
const char * | pin | ||
) |
snd_soc_dapm_enable_pin - enable pin. : DAPM context : pin name
Enables input/output pin and its parents or children widgets iff there is a valid audio route and active audio stream. NOTE: snd_soc_dapm_sync() needs to be called after this for DAPM to do any widget power switching.
Definition at line 3497 of file soc-dapm.c.
int snd_soc_dapm_force_enable_pin | ( | struct snd_soc_dapm_context * | dapm, |
const char * | pin | ||
) |
snd_soc_dapm_force_enable_pin - force a pin to be enabled : DAPM context : pin name
Enables input/output pin regardless of any other state. This is intended for use with microphone bias supplies used in microphone jack detection.
NOTE: snd_soc_dapm_sync() needs to be called after this for DAPM to do any widget power switching.
Definition at line 3515 of file soc-dapm.c.
void snd_soc_dapm_free | ( | struct snd_soc_dapm_context * | dapm | ) |
snd_soc_dapm_free - free dapm resources : DAPM context
Free all dapm widgets and resources.
Definition at line 3697 of file soc-dapm.c.
int snd_soc_dapm_get_enum_double | ( | struct snd_kcontrol * | kcontrol, |
struct snd_ctl_elem_value * | ucontrol | ||
) |
snd_soc_dapm_get_enum_double - dapm enumerated double mixer get callback : mixer control : control element information
Callback to get the value of a dapm enumerated double mixer control.
Returns 0 for success.
Definition at line 2694 of file soc-dapm.c.
int snd_soc_dapm_get_enum_virt | ( | struct snd_kcontrol * | kcontrol, |
struct snd_ctl_elem_value * | ucontrol | ||
) |
snd_soc_dapm_get_enum_virt - Get virtual DAPM mux : mixer control : control element information
Returns 0 for success.
Definition at line 2780 of file soc-dapm.c.
int snd_soc_dapm_get_pin_status | ( | struct snd_soc_dapm_context * | dapm, |
const char * | pin | ||
) |
snd_soc_dapm_get_pin_status - get audio pin status : DAPM context : audio signal pin endpoint (or start point)
Get audio pin status - connected or disconnected.
Returns 1 for connected otherwise 0.
Definition at line 3579 of file soc-dapm.c.
int snd_soc_dapm_get_pin_switch | ( | struct snd_kcontrol * | kcontrol, |
struct snd_ctl_elem_value * | ucontrol | ||
) |
snd_soc_dapm_get_pin_switch - Get information for a pin switch
: mixer control : Value
Definition at line 2965 of file soc-dapm.c.
int snd_soc_dapm_get_value_enum_double | ( | struct snd_kcontrol * | kcontrol, |
struct snd_ctl_elem_value * | ucontrol | ||
) |
snd_soc_dapm_get_value_enum_double - dapm semi enumerated double mixer get callback : mixer control : control element information
Callback to get the value of a dapm semi enumerated double mixer control.
Semi enumerated mixer: the enumerated items are referred as values. Can be used for handling bitfield coded enumeration for example.
Returns 0 for success.
Definition at line 2846 of file soc-dapm.c.
int snd_soc_dapm_get_volsw | ( | struct snd_kcontrol * | kcontrol, |
struct snd_ctl_elem_value * | ucontrol | ||
) |
snd_soc_dapm_get_volsw - dapm mixer get callback : mixer control : control element information
Callback to get the value of a dapm mixer control.
Returns 0 for success.
Definition at line 2589 of file soc-dapm.c.
int snd_soc_dapm_ignore_suspend | ( | struct snd_soc_dapm_context * | dapm, |
const char * | pin | ||
) |
snd_soc_dapm_ignore_suspend - ignore suspend status for DAPM endpoint : DAPM context : audio signal pin endpoint (or start point)
Mark the given endpoint or pin as ignoring suspend. When the system is disabled a path between two endpoints flagged as ignoring suspend will not be disabled. The path must already be enabled via normal means at suspend time, it will not be turned on if it was not already enabled.
Definition at line 3602 of file soc-dapm.c.
int snd_soc_dapm_info_pin_switch | ( | struct snd_kcontrol * | kcontrol, |
struct snd_ctl_elem_info * | uinfo | ||
) |
snd_soc_dapm_info_pin_switch - Info for a pin switch
: mixer control : control element information
Callback to provide information about a pin switch control.
Definition at line 2947 of file soc-dapm.c.
int snd_soc_dapm_link_dai_widgets | ( | struct snd_soc_card * | card | ) |
Definition at line 3356 of file soc-dapm.c.
int snd_soc_dapm_mixer_update_power | ( | struct snd_soc_dapm_widget * | widget, |
struct snd_kcontrol * | kcontrol, | ||
int | connect | ||
) |
Definition at line 1978 of file soc-dapm.c.
int snd_soc_dapm_mux_update_power | ( | struct snd_soc_dapm_widget * | widget, |
struct snd_kcontrol * | kcontrol, | ||
int | mux, | ||
struct soc_enum * | e | ||
) |
Definition at line 1932 of file soc-dapm.c.
int snd_soc_dapm_nc_pin | ( | struct snd_soc_dapm_context * | dapm, |
const char * | pin | ||
) |
snd_soc_dapm_nc_pin - permanently disable pin. : DAPM context : pin name
Marks the specified pin as being not connected, disabling it along any parent or child widgets. At present this is identical to snd_soc_dapm_disable_pin() but in future it will be extended to do additional things such as disabling controls which only affect paths through the pin.
NOTE: snd_soc_dapm_sync() needs to be called after this for DAPM to do any widget power switching.
Definition at line 3564 of file soc-dapm.c.
int snd_soc_dapm_new_controls | ( | struct snd_soc_dapm_context * | dapm, |
const struct snd_soc_dapm_widget * | widget, | ||
int | num | ||
) |
snd_soc_dapm_new_controls - create new dapm controls : DAPM context : widget array : number of widgets
Creates new DAPM controls based upon the templates.
Returns 0 for success else error.
Definition at line 3129 of file soc-dapm.c.
int snd_soc_dapm_new_dai_widgets | ( | struct snd_soc_dapm_context * | dapm, |
struct snd_soc_dai * | dai | ||
) |
Definition at line 3306 of file soc-dapm.c.
int snd_soc_dapm_new_pcm | ( | struct snd_soc_card * | card, |
const struct snd_soc_pcm_stream * | params, | ||
struct snd_soc_dapm_widget * | source, | ||
struct snd_soc_dapm_widget * | sink | ||
) |
Definition at line 3259 of file soc-dapm.c.
int snd_soc_dapm_new_widgets | ( | struct snd_soc_dapm_context * | dapm | ) |
snd_soc_dapm_new_widgets - add new dapm widgets : DAPM context
Checks the codec for any new dapm widgets and creates them if found.
Returns 0 for success.
Definition at line 2516 of file soc-dapm.c.
int snd_soc_dapm_put_enum_double | ( | struct snd_kcontrol * | kcontrol, |
struct snd_ctl_elem_value * | ucontrol | ||
) |
snd_soc_dapm_put_enum_double - dapm enumerated double mixer set callback : mixer control : control element information
Callback to set the value of a dapm enumerated double mixer control.
Returns 0 for success.
Definition at line 2721 of file soc-dapm.c.
int snd_soc_dapm_put_enum_virt | ( | struct snd_kcontrol * | kcontrol, |
struct snd_ctl_elem_value * | ucontrol | ||
) |
snd_soc_dapm_put_enum_virt - Set virtual DAPM mux : mixer control : control element information
Returns 0 for success.
Definition at line 2799 of file soc-dapm.c.
int snd_soc_dapm_put_pin_switch | ( | struct snd_kcontrol * | kcontrol, |
struct snd_ctl_elem_value * | ucontrol | ||
) |
snd_soc_dapm_put_pin_switch - Set information for a pin switch
: mixer control : Value
Definition at line 2988 of file soc-dapm.c.
int snd_soc_dapm_put_value_enum_double | ( | struct snd_kcontrol * | kcontrol, |
struct snd_ctl_elem_value * | ucontrol | ||
) |
snd_soc_dapm_put_value_enum_double - dapm semi enumerated double mixer set callback : mixer control : control element information
Callback to set the value of a dapm semi enumerated double mixer control.
Semi enumerated mixer: the enumerated items are referred as values. Can be used for handling bitfield coded enumeration for example.
Returns 0 for success.
Definition at line 2887 of file soc-dapm.c.
int snd_soc_dapm_put_volsw | ( | struct snd_kcontrol * | kcontrol, |
struct snd_ctl_elem_value * | ucontrol | ||
) |
snd_soc_dapm_put_volsw - dapm mixer set callback : mixer control : control element information
Callback to set the value of a dapm mixer control.
Returns 0 for success.
Definition at line 2626 of file soc-dapm.c.
void snd_soc_dapm_shutdown | ( | struct snd_soc_card * | card | ) |
Definition at line 3744 of file soc-dapm.c.
void snd_soc_dapm_stream_event | ( | struct snd_soc_pcm_runtime * | rtd, |
int | stream, | ||
int | event | ||
) |
snd_soc_dapm_stream_event - send a stream event to the dapm core : PCM runtime data : stream name : stream event
Sends a stream event to the dapm core. The core then makes any necessary widget power changes.
Returns 0 for success else error.
Definition at line 3477 of file soc-dapm.c.
int snd_soc_dapm_sync | ( | struct snd_soc_dapm_context * | dapm | ) |
snd_soc_dapm_sync - scan and power dapm paths : DAPM context
Walks all dapm audio paths and powers widgets according to their stream or path usage.
Returns 0 for success.
Definition at line 2149 of file soc-dapm.c.
Definition at line 2053 of file soc-dapm.c.
int snd_soc_dapm_weak_routes | ( | struct snd_soc_dapm_context * | dapm, |
const struct snd_soc_dapm_route * | route, | ||
int | num | ||
) |
snd_soc_dapm_weak_routes - Mark routes between DAPM widgets as weak : DAPM context : audio routes : number of routes
Mark existing routes matching those specified in the passed array as being weak, meaning that they are ignored for the purpose of power decisions. The main intended use case is for sidetone paths which couple audio between other independent paths if they are both active in order to make the combination work better at the user level but which aren't intended to be "used".
Note that CODEC drivers should not use this as sidetone type paths can frequently also be used as bypass paths.
Definition at line 2489 of file soc-dapm.c.