type
stringclasses
5 values
content
stringlengths
9
163k
functions
bool dapm_dirty_widget(struct snd_soc_dapm_widget *w) { return !list_empty(&w->dirty); }
functions
void dapm_mark_dirty(struct snd_soc_dapm_widget *w, const char *reason) { if (!dapm_dirty_widget(w)) { dev_vdbg(w->dapm->dev, "Marking %s dirty due to %s\n", w->name, reason); list_add_tail(&w->dirty, &w->dapm->card->dapm_dirty); }
functions
void dapm_reset(struct snd_soc_card *card) { struct snd_soc_dapm_widget *w; memset(&card->dapm_stats, 0, sizeof(card->dapm_stats)); list_for_each_entry(w, &card->widgets, list) { w->power_checked = false; w->inputs = -1; w->outputs = -1; }
functions
int soc_widget_read(struct snd_soc_dapm_widget *w, int reg) { if (w->codec) return snd_soc_read(w->codec, reg); else if (w->platform) return snd_soc_platform_read(w->platform, reg); dev_err(w->dapm->dev, "no valid widget read method\n"); return -1; }
functions
int soc_widget_write(struct snd_soc_dapm_widget *w, int reg, int val) { if (w->codec) return snd_soc_write(w->codec, reg, val); else if (w->platform) return snd_soc_platform_write(w->platform, reg, val); dev_err(w->dapm->dev, "no valid widget write method\n"); return -1; }
functions
int soc_widget_update_bits(struct snd_soc_dapm_widget *w, unsigned short reg, unsigned int mask, unsigned int value) { bool change; unsigned int old, new; int ret; if (w->codec && w->codec->using_regmap) { ret = regmap_update_bits_check(w->codec->control_data, reg, mask, value, &change); if (ret !...
functions
int snd_soc_dapm_set_bias_level(struct snd_soc_dapm_context *dapm, enum snd_soc_bias_level level) { struct snd_soc_card *card = dapm->card; int ret = 0; trace_snd_soc_bias_level_start(card, level); if (card && card->set_bias_level) ret = card->set_bias_level(card, dapm, level); if (ret != 0) goto ...
functions
void dapm_set_path_status(struct snd_soc_dapm_widget *w, struct snd_soc_dapm_path *p, int i) { switch (w->id) { case snd_soc_dapm_switch: case snd_soc_dapm_mixer: case snd_soc_dapm_mixer_named_ctl: { int val; struct soc_mixer_control *mc = (struct soc_mixer_control *) w->kcontrol_news[i].private_value; un...
functions
int dapm_connect_mux(struct snd_soc_dapm_context *dapm, struct snd_soc_dapm_widget *src, struct snd_soc_dapm_widget *dest, struct snd_soc_dapm_path *path, const char *control_name, const struct snd_kcontrol_new *kcontrol) { struct soc_enum *e = (struct soc_enum *)kcontrol->private_value; int i; for (i = 0; i < e...
functions
int dapm_connect_mixer(struct snd_soc_dapm_context *dapm, struct snd_soc_dapm_widget *src, struct snd_soc_dapm_widget *dest, struct snd_soc_dapm_path *path, const char *control_name) { int i; /* search for mixer kcontrol */ for (i = 0; i < dest->num_kcontrols; i++) { if (!strcmp(control_name, dest->kcontrol_new...
functions
int dapm_is_shared_kcontrol(struct snd_soc_dapm_context *dapm, struct snd_soc_dapm_widget *kcontrolw, const struct snd_kcontrol_new *kcontrol_new, struct snd_kcontrol **kcontrol) { struct snd_soc_dapm_widget *w; int i; *kcontrol = NULL; list_for_each_entry(w, &dapm->card->widgets, list) { if (w == kcontrolw ...
functions
int dapm_new_mixer(struct snd_soc_dapm_widget *w) { struct snd_soc_dapm_context *dapm = w->dapm; int i, ret = 0; size_t name_len, prefix_len; struct snd_soc_dapm_path *path; struct snd_card *card = dapm->card->snd_card; const char *prefix; struct snd_soc_dapm_widget_list *wlist; size_t wlistsize; if (dapm->co...
functions
int dapm_new_mux(struct snd_soc_dapm_widget *w) { struct snd_soc_dapm_context *dapm = w->dapm; struct snd_soc_dapm_path *path = NULL; struct snd_kcontrol *kcontrol; struct snd_card *card = dapm->card->snd_card; const char *prefix; size_t prefix_len; int ret; struct snd_soc_dapm_widget_list *wlist; int shared, ...
functions
int dapm_new_pga(struct snd_soc_dapm_widget *w) { if (w->num_kcontrols) dev_err(w->dapm->dev, "asoc: PGA controls not supported: '%s'\n", w->name); return 0; }
functions
void dapm_clear_walk(struct snd_soc_dapm_context *dapm) { struct snd_soc_dapm_path *p; list_for_each_entry(p, &dapm->card->paths, list) p->walked = 0; }
functions
int snd_soc_dapm_suspend_check(struct snd_soc_dapm_widget *widget) { int level = snd_power_get_state(widget->dapm->card->snd_card); switch (level) { case SNDRV_CTL_POWER_D3hot: case SNDRV_CTL_POWER_D3cold: if (widget->ignore_suspend) dev_dbg(widget->dapm->dev, "%s ignoring suspend\n", widget->name); ret...
functions
int is_connected_output_ep(struct snd_soc_dapm_widget *widget) { struct snd_soc_dapm_path *path; int con = 0; if (widget->outputs >= 0) return widget->outputs; DAPM_UPDATE_STAT(widget, path_checks); switch (widget->id) { case snd_soc_dapm_supply: case snd_soc_dapm_regulator_supply: return 0; default: b...
functions
int is_connected_input_ep(struct snd_soc_dapm_widget *widget) { struct snd_soc_dapm_path *path; int con = 0; if (widget->inputs >= 0) return widget->inputs; DAPM_UPDATE_STAT(widget, path_checks); switch (widget->id) { case snd_soc_dapm_supply: case snd_soc_dapm_regulator_supply: return 0; default: brea...
functions
int dapm_reg_event(struct snd_soc_dapm_widget *w, struct snd_kcontrol *kcontrol, int event) { unsigned int val; if (SND_SOC_DAPM_EVENT_ON(event)) val = w->on_val; else val = w->off_val; soc_widget_update_bits(w, -(w->reg + 1), w->mask << w->shift, val << w->shift); return 0; }
functions
int dapm_regulator_event(struct snd_soc_dapm_widget *w, struct snd_kcontrol *kcontrol, int event) { if (SND_SOC_DAPM_EVENT_ON(event)) return regulator_enable(w->priv); else return regulator_disable_deferred(w->priv, w->shift); }
functions
int dapm_widget_power_check(struct snd_soc_dapm_widget *w) { if (w->power_checked) return w->new_power; if (w->force) w->new_power = 1; else w->new_power = w->power_check(w); w->power_checked = true; return w->new_power; }
functions
int dapm_generic_check_power(struct snd_soc_dapm_widget *w) { int in, out; DAPM_UPDATE_STAT(w, power_checks); in = is_connected_input_ep(w); dapm_clear_walk(w->dapm); out = is_connected_output_ep(w); dapm_clear_walk(w->dapm); return out != 0 && in != 0; }
functions
int dapm_dai_check_power(struct snd_soc_dapm_widget *w) { DAPM_UPDATE_STAT(w, power_checks); return w->active; }
functions
int dapm_adc_check_power(struct snd_soc_dapm_widget *w) { int in; DAPM_UPDATE_STAT(w, power_checks); if (w->active) { in = is_connected_input_ep(w); dapm_clear_walk(w->dapm); return in != 0; }
functions
int dapm_dac_check_power(struct snd_soc_dapm_widget *w) { int out; DAPM_UPDATE_STAT(w, power_checks); if (w->active) { out = is_connected_output_ep(w); dapm_clear_walk(w->dapm); return out != 0; }
functions
int dapm_supply_check_power(struct snd_soc_dapm_widget *w) { struct snd_soc_dapm_path *path; DAPM_UPDATE_STAT(w, power_checks); /* Check if one of our outputs is connected */ list_for_each_entry(path, &w->sinks, list_source) { DAPM_UPDATE_STAT(w, neighbour_checks); if (path->weak) continue; if (path->c...
functions
int dapm_always_on_check_power(struct snd_soc_dapm_widget *w) { return 1; }
functions
int dapm_seq_compare(struct snd_soc_dapm_widget *a, struct snd_soc_dapm_widget *b, bool power_up) { int *sort; if (power_up) sort = dapm_up_seq; else sort = dapm_down_seq; if (sort[a->id] != sort[b->id]) return sort[a->id] - sort[b->id]; if (a->subseq != b->subseq) { if (power_up) return...
functions
void dapm_seq_insert(struct snd_soc_dapm_widget *new_widget, struct list_head *list, bool power_up) { struct snd_soc_dapm_widget *w; list_for_each_entry(w, list, power_list) if (dapm_seq_compare(new_widget, w, power_up) < 0) { list_add_tail(&new_widget->power_list, &w->power_list); return; }
functions
void dapm_seq_check_event(struct snd_soc_dapm_context *dapm, struct snd_soc_dapm_widget *w, int event) { struct snd_soc_card *card = dapm->card; const char *ev_name; int power, ret; switch (event) { case SND_SOC_DAPM_PRE_PMU: ev_name = "PRE_PMU"; power = 1; break; case SND_SOC_DAPM_POST_PMU: ev_name...
functions
void dapm_seq_run_coalesced(struct snd_soc_dapm_context *dapm, struct list_head *pending) { struct snd_soc_card *card = dapm->card; struct snd_soc_dapm_widget *w; int reg, power; unsigned int value = 0; unsigned int mask = 0; unsigned int cur_mask; reg = list_first_entry(pending, struct snd_soc_dapm_widg...
functions
void dapm_seq_run(struct snd_soc_dapm_context *dapm, struct list_head *list, int event, bool power_up) { struct snd_soc_dapm_widget *w, *n; LIST_HEAD(pending); int cur_sort = -1; int cur_subseq = -1; int cur_reg = SND_SOC_NOPM; struct snd_soc_dapm_context *cur_dapm = NULL; int ret, i; int *sort; if (power...
functions
void dapm_widget_update(struct snd_soc_dapm_context *dapm) { struct snd_soc_dapm_update *update = dapm->update; struct snd_soc_dapm_widget *w; int ret; if (!update) return; w = update->widget; if (w->event && (w->event_flags & SND_SOC_DAPM_PRE_REG)) { ret = w->event(w, update->kcontrol, SND_SOC_DAPM_P...
functions
void dapm_pre_sequence_async(void *data, async_cookie_t cookie) { struct snd_soc_dapm_context *d = data; int ret; /* If we're off and we're not supposed to be go into STANDBY */ if (d->bias_level == SND_SOC_BIAS_OFF && d->target_bias_level != SND_SOC_BIAS_OFF) { if (d->dev) pm_runtime_get_sync(d->dev); ...
functions
void dapm_post_sequence_async(void *data, async_cookie_t cookie) { struct snd_soc_dapm_context *d = data; int ret; /* If we just powered the last thing off drop to standby bias */ if (d->bias_level == SND_SOC_BIAS_PREPARE && (d->target_bias_level == SND_SOC_BIAS_STANDBY || d->target_bias_level == SND_SO...
functions
void dapm_widget_set_peer_power(struct snd_soc_dapm_widget *peer, bool power, bool connect) { /* If a connection is being made or broken then that update * will have marked the peer dirty, otherwise the widgets are * not connected and this update has no impact. */ if (!connect) return; /* If the pe...
functions
void dapm_widget_set_power(struct snd_soc_dapm_widget *w, bool power, struct list_head *up_list, struct list_head *down_list) { struct snd_soc_dapm_path *path; if (w->power == power) return; trace_snd_soc_dapm_widget_power(w, power); /* If we changed our power state perhaps our neigbours changed ...
functions
void dapm_power_one_widget(struct snd_soc_dapm_widget *w, struct list_head *up_list, struct list_head *down_list) { int power; switch (w->id) { case snd_soc_dapm_pre: dapm_seq_insert(w, down_list, false); break; case snd_soc_dapm_post: dapm_seq_insert(w, up_list, true); break; default: powe...
functions
int dapm_power_widgets(struct snd_soc_dapm_context *dapm, int event) { struct snd_soc_card *card = dapm->card; struct snd_soc_dapm_widget *w; struct snd_soc_dapm_context *d; LIST_HEAD(up_list); LIST_HEAD(down_list); LIST_HEAD(async_domain); enum snd_soc_bias_level bias; trace_snd_soc_dapm_start(card); list_f...
functions
ssize_t dapm_widget_power_read_file(struct file *file, char __user *user_buf, size_t count, loff_t *ppos) { struct snd_soc_dapm_widget *w = file->private_data; char *buf; int in, out; ssize_t ret; struct snd_soc_dapm_path *p = NULL; buf = kmalloc(PAGE_SIZE, GFP_KERNEL); if (!buf) return -ENOME...
functions
ssize_t dapm_bias_read_file(struct file *file, char __user *user_buf, size_t count, loff_t *ppos) { struct snd_soc_dapm_context *dapm = file->private_data; char *level; switch (dapm->bias_level) { case SND_SOC_BIAS_ON: level = "On\n"; break; case SND_SOC_BIAS_PREPARE: level = "Prepare\n"; break; c...
functions
void snd_soc_dapm_debugfs_init(struct snd_soc_dapm_context *dapm, struct dentry *parent) { struct dentry *d; dapm->debugfs_dapm = debugfs_create_dir("dapm", parent); if (!dapm->debugfs_dapm) { dev_warn(dapm->dev, "Failed to create DAPM debugfs directory\n"); return; }
functions
void dapm_debugfs_add_widget(struct snd_soc_dapm_widget *w) { struct snd_soc_dapm_context *dapm = w->dapm; struct dentry *d; if (!dapm->debugfs_dapm || !w->name) return; d = debugfs_create_file(w->name, 0444, dapm->debugfs_dapm, w, &dapm_widget_power_fops); if (!d) dev_warn(w->dapm->dev, "ASoC: Fa...
functions
void dapm_debugfs_cleanup(struct snd_soc_dapm_context *dapm) { debugfs_remove_recursive(dapm->debugfs_dapm); }
functions
void snd_soc_dapm_debugfs_init(struct snd_soc_dapm_context *dapm, struct dentry *parent) { }
functions
void dapm_debugfs_add_widget(struct snd_soc_dapm_widget *w) { }
functions
void dapm_debugfs_cleanup(struct snd_soc_dapm_context *dapm) { }
functions
int snd_soc_dapm_mux_update_power(struct snd_soc_dapm_widget *widget, struct snd_kcontrol *kcontrol, int mux, struct soc_enum *e) { struct snd_soc_dapm_path *path; int found = 0; if (widget->id != snd_soc_dapm_mux && widget->id != snd_soc_dapm_virt_mux && widget->id != snd_soc_dapm_value_mux) retur...
functions
int snd_soc_dapm_mixer_update_power(struct snd_soc_dapm_widget *widget, struct snd_kcontrol *kcontrol, int connect) { struct snd_soc_dapm_path *path; int found = 0; if (widget->id != snd_soc_dapm_mixer && widget->id != snd_soc_dapm_mixer_named_ctl && widget->id != snd_soc_dapm_switch) return -ENO...
functions
ssize_t dapm_widget_show(struct device *dev, struct device_attribute *attr, char *buf) { struct snd_soc_pcm_runtime *rtd = dev_get_drvdata(dev); struct snd_soc_codec *codec =rtd->codec; struct snd_soc_dapm_widget *w; int count = 0; char *state = "not set"; list_for_each_entry(w, &codec->card->widgets, list) { ...
functions
int snd_soc_dapm_sys_add(struct device *dev) { return device_create_file(dev, &dev_attr_dapm_widget); }
functions
void snd_soc_dapm_sys_remove(struct device *dev) { device_remove_file(dev, &dev_attr_dapm_widget); }
functions
void dapm_free_widgets(struct snd_soc_dapm_context *dapm) { struct snd_soc_dapm_widget *w, *next_w; struct snd_soc_dapm_path *p, *next_p; list_for_each_entry_safe(w, next_w, &dapm->card->widgets, list) { if (w->dapm != dapm) continue; list_del(&w->list); /* * remove source and sink paths associated to t...
functions
int snd_soc_dapm_set_pin(struct snd_soc_dapm_context *dapm, const char *pin, int status) { struct snd_soc_dapm_widget *w = dapm_find_widget(dapm, pin, true); if (!w) { dev_err(dapm->dev, "dapm: unknown pin %s\n", pin); return -EINVAL; }
functions
int snd_soc_dapm_sync(struct snd_soc_dapm_context *dapm) { int ret; /* * Suppress early reports (eg, jacks syncing their state) to avoid * silly DAPM runs during card startup. */ if (!dapm->card || !dapm->card->instantiated) return 0; mutex_lock_nested(&dapm->card->dapm_mutex, SND_SOC_DAPM_CLASS_PCM); re...
functions
int snd_soc_dapm_add_route(struct snd_soc_dapm_context *dapm, const struct snd_soc_dapm_route *route) { struct snd_soc_dapm_path *path; struct snd_soc_dapm_widget *wsource = NULL, *wsink = NULL, *w; struct snd_soc_dapm_widget *wtsource = NULL, *wtsink = NULL; const char *sink; const char *control = route->co...
functions
int snd_soc_dapm_del_route(struct snd_soc_dapm_context *dapm, const struct snd_soc_dapm_route *route) { struct snd_soc_dapm_path *path, *p; const char *sink; const char *source; char prefixed_sink[80]; char prefixed_source[80]; if (route->control) { dev_err(dapm->dev, "Removal of routes with controls ...
functions
int snd_soc_dapm_add_routes(struct snd_soc_dapm_context *dapm, const struct snd_soc_dapm_route *route, int num) { int i, ret = 0; mutex_lock_nested(&dapm->card->dapm_mutex, SND_SOC_DAPM_CLASS_INIT); for (i = 0; i < num; i++) { ret = snd_soc_dapm_add_route(dapm, route); if (ret < 0) { dev_err(dapm->dev...
functions
int snd_soc_dapm_del_routes(struct snd_soc_dapm_context *dapm, const struct snd_soc_dapm_route *route, int num) { int i, ret = 0; for (i = 0; i < num; i++) { snd_soc_dapm_del_route(dapm, route); route++; }
functions
int snd_soc_dapm_weak_route(struct snd_soc_dapm_context *dapm, const struct snd_soc_dapm_route *route) { struct snd_soc_dapm_widget *source = dapm_find_widget(dapm, route->source, true); struct snd_soc_dapm_widget *sink = dapm_find_widget(dapm, route->sink, true)...
functions
int snd_soc_dapm_weak_routes(struct snd_soc_dapm_context *dapm, const struct snd_soc_dapm_route *route, int num) { int i, err; int ret = 0; mutex_lock_nested(&dapm->card->dapm_mutex, SND_SOC_DAPM_CLASS_INIT); for (i = 0; i < num; i++) { err = snd_soc_dapm_weak_route(dapm, route); if (err) ret = err;...
functions
int snd_soc_dapm_new_widgets(struct snd_soc_dapm_context *dapm) { struct snd_soc_dapm_widget *w; unsigned int val; mutex_lock_nested(&dapm->card->dapm_mutex, SND_SOC_DAPM_CLASS_INIT); list_for_each_entry(w, &dapm->card->widgets, list) { if (w->new) continue; if (w->num_kcontrols) { w->kcontrols = kzal...
functions
int snd_soc_dapm_get_volsw(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_soc_dapm_widget_list *wlist = snd_kcontrol_chip(kcontrol); struct snd_soc_dapm_widget *widget = wlist->widgets[0]; struct soc_mixer_control *mc = (struct soc_mixer_control *)kcontrol->private_value; unsign...
functions
int snd_soc_dapm_put_volsw(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_soc_dapm_widget_list *wlist = snd_kcontrol_chip(kcontrol); struct snd_soc_dapm_widget *widget = wlist->widgets[0]; struct snd_soc_codec *codec = widget->codec; struct snd_soc_card *card = codec->card; struc...
functions
int snd_soc_dapm_get_enum_double(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_soc_dapm_widget_list *wlist = snd_kcontrol_chip(kcontrol); struct snd_soc_dapm_widget *widget = wlist->widgets[0]; struct soc_enum *e = (struct soc_enum *)kcontrol->private_value; unsigned int val, bit...
functions
int snd_soc_dapm_put_enum_double(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_soc_dapm_widget_list *wlist = snd_kcontrol_chip(kcontrol); struct snd_soc_dapm_widget *widget = wlist->widgets[0]; struct snd_soc_codec *codec = widget->codec; struct snd_soc_card *card = codec->card; ...
functions
int snd_soc_dapm_get_enum_virt(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_soc_dapm_widget_list *wlist = snd_kcontrol_chip(kcontrol); struct snd_soc_dapm_widget *widget = wlist->widgets[0]; ucontrol->value.enumerated.item[0] = widget->value; return 0; }
functions
int snd_soc_dapm_put_enum_virt(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_soc_dapm_widget_list *wlist = snd_kcontrol_chip(kcontrol); struct snd_soc_dapm_widget *widget = wlist->widgets[0]; struct snd_soc_codec *codec = widget->codec; struct snd_soc_card *card = codec-...
functions
int snd_soc_dapm_get_value_enum_double(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_soc_dapm_widget_list *wlist = snd_kcontrol_chip(kcontrol); struct snd_soc_dapm_widget *widget = wlist->widgets[0]; struct soc_enum *e = (struct soc_enum *)kcontrol->private_value; unsigned int re...
functions
int snd_soc_dapm_put_value_enum_double(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_soc_dapm_widget_list *wlist = snd_kcontrol_chip(kcontrol); struct snd_soc_dapm_widget *widget = wlist->widgets[0]; struct snd_soc_codec *codec = widget->codec; struct snd_soc_card *card = codec->...
functions
int snd_soc_dapm_info_pin_switch(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) { uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; uinfo->count = 1; uinfo->value.integer.min = 0; uinfo->value.integer.max = 1; return 0; }
functions
int snd_soc_dapm_get_pin_switch(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_soc_card *card = snd_kcontrol_chip(kcontrol); const char *pin = (const char *)kcontrol->private_value; mutex_lock_nested(&card->dapm_mutex, SND_SOC_DAPM_CLASS_PCM); ucontrol->value.integer.value[0]...
functions
int snd_soc_dapm_put_pin_switch(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_soc_card *card = snd_kcontrol_chip(kcontrol); const char *pin = (const char *)kcontrol->private_value; mutex_lock_nested(&card->dapm_mutex, SND_SOC_DAPM_CLASS_PCM); if (ucontrol->value.integer.valu...
functions
int snd_soc_dapm_new_controls(struct snd_soc_dapm_context *dapm, const struct snd_soc_dapm_widget *widget, int num) { struct snd_soc_dapm_widget *w; int i; int ret = 0; mutex_lock_nested(&dapm->card->dapm_mutex, SND_SOC_DAPM_CLASS_INIT); for (i = 0; i < num; i++) { w = snd_soc_dapm_new_control(dapm, widget); ...
functions
int snd_soc_dapm_new_dai_widgets(struct snd_soc_dapm_context *dapm, struct snd_soc_dai *dai) { struct snd_soc_dapm_widget template; struct snd_soc_dapm_widget *w; WARN_ON(dapm->dev != dai->dev); memset(&template, 0, sizeof(template)); template.reg = SND_SOC_NOPM; if (dai->driver->playback.stream_name) { ...
functions
int snd_soc_dapm_link_dai_widgets(struct snd_soc_card *card) { struct snd_soc_dapm_widget *dai_w, *w; struct snd_soc_dai *dai; struct snd_soc_dapm_route r; memset(&r, 0, sizeof(r)); /* For each DAI widget... */ list_for_each_entry(dai_w, &card->widgets, list) { if (dai_w->id != snd_soc_dapm_dai) continue; ...
functions
void soc_dapm_stream_event(struct snd_soc_dapm_context *dapm, int stream, struct snd_soc_dai *dai, int event) { struct snd_soc_dapm_widget *w; if (stream == SNDRV_PCM_STREAM_PLAYBACK) w = dai->playback_widget; else w = dai->capture_widget; if (!w) return; dapm_mark_dirty(w, "stream event"); ...
functions
int snd_soc_dapm_stream_event(struct snd_soc_pcm_runtime *rtd, int stream, struct snd_soc_dai *dai, int event) { struct snd_soc_card *card = rtd->card; mutex_lock_nested(&card->dapm_mutex, SND_SOC_DAPM_CLASS_PCM); soc_dapm_stream_event(&card->dapm, stream, dai, event); mutex_unlock(&card->dapm_mutex); re...
functions
int snd_soc_dapm_enable_pin(struct snd_soc_dapm_context *dapm, const char *pin) { return snd_soc_dapm_set_pin(dapm, pin, 1); }
functions
int snd_soc_dapm_force_enable_pin(struct snd_soc_dapm_context *dapm, const char *pin) { struct snd_soc_dapm_widget *w = dapm_find_widget(dapm, pin, true); if (!w) { dev_err(dapm->dev, "dapm: unknown pin %s\n", pin); return -EINVAL; }
functions
int snd_soc_dapm_disable_pin(struct snd_soc_dapm_context *dapm, const char *pin) { return snd_soc_dapm_set_pin(dapm, pin, 0); }
functions
int snd_soc_dapm_nc_pin(struct snd_soc_dapm_context *dapm, const char *pin) { return snd_soc_dapm_set_pin(dapm, pin, 0); }
functions
int snd_soc_dapm_get_pin_status(struct snd_soc_dapm_context *dapm, const char *pin) { struct snd_soc_dapm_widget *w = dapm_find_widget(dapm, pin, true); if (w) return w->connected; return 0; }
functions
int snd_soc_dapm_ignore_suspend(struct snd_soc_dapm_context *dapm, const char *pin) { struct snd_soc_dapm_widget *w = dapm_find_widget(dapm, pin, false); if (!w) { dev_err(dapm->dev, "dapm: unknown pin %s\n", pin); return -EINVAL; }
functions
bool snd_soc_dapm_widget_in_card_paths(struct snd_soc_card *card, struct snd_soc_dapm_widget *w) { struct snd_soc_dapm_path *p; list_for_each_entry(p, &card->paths, list) { if ((p->source == w) || (p->sink == w)) { dev_dbg(card->dev, "... Path %s(id:%d dapm:%p) - %s(id:%d dapm:%p)\n", p...
functions
void snd_soc_dapm_auto_nc_codec_pins(struct snd_soc_codec *codec) { struct snd_soc_card *card = codec->card; struct snd_soc_dapm_context *dapm = &codec->dapm; struct snd_soc_dapm_widget *w; dev_dbg(codec->dev, "Auto NC: DAPMs: card:%p codec:%p\n", &card->dapm, &codec->dapm); list_for_each_entry(w, &card->widge...
functions
void snd_soc_dapm_free(struct snd_soc_dapm_context *dapm) { snd_soc_dapm_sys_remove(dapm->dev); dapm_debugfs_cleanup(dapm); dapm_free_widgets(dapm); list_del(&dapm->list); }
functions
void soc_dapm_shutdown_codec(struct snd_soc_dapm_context *dapm) { struct snd_soc_dapm_widget *w; LIST_HEAD(down_list); int powerdown = 0; list_for_each_entry(w, &dapm->card->widgets, list) { if (w->dapm != dapm) continue; if (w->power) { dapm_seq_insert(w, &down_list, false); w->power = 0; powerdow...
functions
void snd_soc_dapm_shutdown(struct snd_soc_card *card) { struct snd_soc_codec *codec; list_for_each_entry(codec, &card->codec_dev_list, card_list) { soc_dapm_shutdown_codec(&codec->dapm); if (codec->dapm.bias_level == SND_SOC_BIAS_STANDBY) snd_soc_dapm_set_bias_level(&codec->dapm, SND_SOC_BIAS_OFF); ...
includes
#include <linux/errno.h>
includes
#include <linux/types.h>
includes
#include <linux/kernel.h>
includes
#include <linux/socket.h>
includes
#include <linux/sockios.h>
includes
#include <linux/net.h>
includes
#include <linux/in6.h>
includes
#include <linux/netdevice.h>
includes
#include <linux/if_addr.h>
includes
#include <linux/if_arp.h>
includes
#include <linux/if_arcnet.h>