Projectname
large_stringclasses
15 values
Filepath
large_stringlengths
4
106
⌀
Function
large_stringlengths
11
3.45k
Label
list
Linux Kernel
sound/soc/soc-dai.c
int snd_soc_dai_set_channel_map(struct snd_soc_dai *dai, unsigned int tx_num, unsigned int *tx_slot, unsigned int rx_num, unsigned int *rx_slot) { int ret = -ENOTSUPP; if (dai->driver->ops && dai->driver->ops->set_channel_map) ret = dai->driver->o...
[ 1, 0 ]
Linux Kernel
sound/soc/soc-dai.c
int snd_soc_dai_digital_mute(struct snd_soc_dai *dai, int mute, int direction) { int ret = -ENOTSUPP; if (dai->driver->ops && dai->driver->ops->mute_stream && (direction == SNDRV_PCM_STREAM_PLAYBACK || !dai->driver->ops->no_capture_mute)) ret = dai->driver->ops->mute_stream(dai, mute, direction); ...
[ 1, 0 ]
Linux Kernel
sound/soc/soc-dai.c
int snd_soc_dai_hw_params(struct snd_soc_dai *dai, struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params) { int ret = 0; if (dai->driver->ops && dai->driver->ops->hw_params) ret = dai->driver->ops->hw_params(substream, params, dai); if (ret...
[ 1, 0 ]
Linux Kernel
sound/soc/soc-dai.c
void snd_soc_dai_link_set_capabilities(struct snd_soc_dai_link *dai_link) { bool supported[SNDRV_PCM_STREAM_LAST + 1]; int direction; for_each_pcm_streams(direction) { struct snd_soc_dai_link_component *cpu; struct snd_soc_dai_link_component *codec; struct snd_soc_dai *dai; bool supported_cpu = f...
[ 0, 0 ]
Linux Kernel
sound/soc/soc-dai.c
int snd_soc_dai_active(struct snd_soc_dai *dai) { int stream, active; active = 0; for_each_pcm_streams(stream) active += dai->stream_active[stream]; return active; }
[ 0, 0 ]
Linux Kernel
sound/soc/soc-dai.c
int snd_soc_pcm_dai_remove(struct snd_soc_pcm_runtime *rtd, int order) { struct snd_soc_dai *dai; int i, r, ret = 0; for_each_rtd_dais(rtd, i, dai) { if (dai->driver->remove_order != order) continue; if (dai->probed && dai->driver->remove) { r = dai->driver->remove(dai); if (r < 0) ...
[ 1, 0 ]
Linux Kernel
sound/soc/soc-dai.c
int snd_soc_pcm_dai_prepare(struct snd_pcm_substream *substream) { struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); struct snd_soc_dai *dai; int i, ret; for_each_rtd_dais(rtd, i, dai) { if (dai->driver->ops && dai->driver->ops->prepare) { ret = dai->driver->ops->prepare(substream,...
[ 1, 0 ]
Linux Kernel
sound/soc/soc-dai.c
static int soc_dai_trigger(struct snd_soc_dai *dai, struct snd_pcm_substream *substream, int cmd) { int ret = 0; if (dai->driver->ops && dai->driver->ops->trigger) ret = dai->driver->ops->trigger(substream, cmd, dai); return soc_dai_ret(dai, ret); }
[ 1, 0 ]
Linux Kernel
sound/soc/soc-dai.c
int snd_soc_pcm_dai_trigger(struct snd_pcm_substream *substream, int cmd, int rollback) { struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); struct snd_soc_dai *dai; int i, r, ret = 0; switch (cmd) { case SNDRV_PCM_TRIGGER_START: case SNDRV_PCM_TRIGGER_RESUME: ...
[ 1, 0 ]
Linux Kernel
sound/soc/soc-dai.c
int snd_soc_pcm_dai_bespoke_trigger(struct snd_pcm_substream *substream, int cmd) { struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); struct snd_soc_dai *dai; int i, ret; for_each_rtd_dais(rtd, i, dai) { if (dai->driver->ops && dai->driver->ops->bespok...
[ 1, 0 ]
Linux Kernel
sound/soc/soc-dai.c
int snd_soc_dai_compr_startup(struct snd_soc_dai *dai, struct snd_compr_stream *cstream) { int ret = 0; if (dai->driver->cops && dai->driver->cops->startup) ret = dai->driver->cops->startup(cstream, dai); if (ret == 0) soc_dai_mark_push(dai, cstream, compr_startup); retu...
[ 1, 0 ]
Linux Kernel
sound/soc/soc-dai.c
int snd_soc_dai_compr_get_params(struct snd_soc_dai *dai, struct snd_compr_stream *cstream, struct snd_codec *params) { int ret = 0; if (dai->driver->cops && dai->driver->cops->get_params) ret = dai->driver->cops->get_params(cstream, params, da...
[ 1, 0 ]
Linux Kernel
sound/soc/soc-dai.c
int snd_soc_dai_compr_pointer(struct snd_soc_dai *dai, struct snd_compr_stream *cstream, struct snd_compr_tstamp *tstamp) { int ret = 0; if (dai->driver->cops && dai->driver->cops->pointer) ret = dai->driver->cops->pointer(cstream, tstamp, dai); r...
[ 1, 0 ]
Linux Kernel
sound/soc/soc-dai.c
int snd_soc_dai_compr_get_metadata(struct snd_soc_dai *dai, struct snd_compr_stream *cstream, struct snd_compr_metadata *metadata) { int ret = 0; if (dai->driver->cops && dai->driver->cops->get_metadata) ret = dai->driver->cops->get_metadat...
[ 1, 0 ]
Linux Kernel
sound/soc/soc-dapm.c
static void dapm_assert_locked(struct snd_soc_dapm_context *dapm) { if (dapm->card && dapm->card->instantiated) lockdep_assert_held(&dapm->card->dapm_mutex); }
[ 1, 0 ]
Linux Kernel
sound/soc/soc-dapm.c
static void pop_wait(u32 pop_time) { if (pop_time) schedule_timeout_uninterruptible(msecs_to_jiffies(pop_time)); }
[ 0, 0 ]
Linux Kernel
sound/soc/soc-dapm.c
static void pop_dbg(struct device *dev, u32 pop_time, const char *fmt, ...) { va_list args; char *buf; if (!pop_time) return; buf = kmalloc(PAGE_SIZE, GFP_KERNEL); if (buf == NULL) return; va_start(args, fmt); vsnprintf(buf, PAGE_SIZE, fmt, args); dev_info(dev, "%s", buf); va_end(args); ...
[ 1, 0 ]
Linux Kernel
sound/soc/soc-dapm.c
static void dapm_path_invalidate(struct snd_soc_dapm_path *p) { if (p->weak || p->is_supply) return; /* * The number of connected endpoints is the sum of the number of * connected endpoints of all neighbors. If a node with 0 connected * endpoints is either connected or disconnected that sum won't cha...
[ 1, 0 ]
Linux Kernel
sound/soc/soc-dapm.c
void dapm_mark_endpoints_dirty(struct snd_soc_card *card) { struct snd_soc_dapm_widget *w; mutex_lock(&card->dapm_mutex); for_each_card_widgets(card, w) { if (w->is_ep) { dapm_mark_dirty(w, "Rechecking endpoints"); if (w->is_ep & SND_SOC_DAPM_EP_SINK) dapm_widget_invalidate_output_paths...
[ 0, 0 ]
Linux Kernel
sound/soc/soc-dapm.c
static inline struct snd_soc_dapm_widget * dapm_cnew_widget(const struct snd_soc_dapm_widget *_widget) { struct snd_soc_dapm_widget *w; w = kmemdup(_widget, sizeof(*_widget), GFP_KERNEL); if (!w) return NULL; if (_widget->sname) { w->sname = kstrdup_const(_widget->sname, GFP_KERNEL); if (!w->sname...
[ 1, 0 ]
Linux Kernel
sound/soc/soc-dapm.c
static void dapm_kcontrol_add_path(const struct snd_kcontrol *kcontrol, struct snd_soc_dapm_path *path) { struct dapm_kcontrol_data *data = snd_kcontrol_chip(kcontrol); list_add_tail(&path->list_kcontrol, &data->paths); }
[ 0, 0 ]
Linux Kernel
sound/soc/soc-dapm.c
static bool dapm_kcontrol_is_powered(const struct snd_kcontrol *kcontrol) { struct dapm_kcontrol_data *data = snd_kcontrol_chip(kcontrol); if (!data->widget) return true; return data->widget->power; }
[ 0, 0 ]
Linux Kernel
sound/soc/soc-dapm.c
static bool dapm_kcontrol_set_value(const struct snd_kcontrol *kcontrol, unsigned int value) { struct dapm_kcontrol_data *data = snd_kcontrol_chip(kcontrol); if (data->value == value) return false; if (data->widget) { switch (dapm_kcontrol_get_wlist(kcontrol)->widget...
[ 1, 0 ]
Linux Kernel
sound/soc/soc-dapm.c
struct snd_soc_dapm_widget * snd_soc_dapm_kcontrol_widget(struct snd_kcontrol *kcontrol) { return dapm_kcontrol_get_wlist(kcontrol)->widgets[0]; }
[ 0, 0 ]
Linux Kernel
sound/soc/soc-dapm.c
static void dapm_reset(struct snd_soc_card *card) { struct snd_soc_dapm_widget *w; lockdep_assert_held(&card->dapm_mutex); memset(&card->dapm_stats, 0, sizeof(card->dapm_stats)); for_each_card_widgets(card, w) { w->new_power = w->power; w->power_checked = false; } }
[ 1, 0 ]
Linux Kernel
sound/soc/soc-dapm.c
static const char *soc_dapm_prefix(struct snd_soc_dapm_context *dapm) { if (!dapm->component) return NULL; return dapm->component->name_prefix; }
[ 0, 0 ]
Linux Kernel
sound/soc/soc-dapm.c
static struct snd_soc_dapm_widget * dapm_wcache_lookup(struct snd_soc_dapm_widget *w, const char *name) { if (w) { struct list_head *wlist = &w->dapm->card->widgets; const int depth = 2; int i = 0; list_for_each_entry_from(w, wlist, list) { if (!strcmp(name, w->name)) return w; ...
[ 0, 0 ]
Linux Kernel
sound/soc/soc-dapm.c
static int dapm_connect_mux(struct snd_soc_dapm_context *dapm, struct snd_soc_dapm_path *path, const char *control_name, struct snd_soc_dapm_widget *w) { const struct snd_kcontrol_new *kcontrol = &w->kcontrol_news[0]; struct soc_enu...
[ 0, 0 ]
Linux Kernel
sound/soc/soc-dapm.c
static void invalidate_paths_ep(struct snd_soc_dapm_widget *widget, enum snd_soc_dapm_direction dir) { enum snd_soc_dapm_direction rdir = SND_SOC_DAPM_DIR_REVERSE(dir); struct snd_soc_dapm_path *path; widget->endpoints[dir] = -1; snd_soc_dapm_widget_for_each_path(widget, rdir, ...
[ 1, 0 ]
Linux Kernel
sound/soc/soc-dapm.c
static int is_connected_input_ep( struct snd_soc_dapm_widget *widget, struct list_head *list, bool (*custom_stop_condition)(struct snd_soc_dapm_widget *i, enum snd_soc_dapm_direction)) { return is_connected_ep(widget, list, SND_SOC_DAPM_DIR_IN, is_con...
[ 0, 0 ]
Linux Kernel
sound/soc/soc-dapm.c
int dapm_pinctrl_event(struct snd_soc_dapm_widget *w, struct snd_kcontrol *kcontrol, int event) { struct snd_soc_dapm_pinctrl_priv *priv = w->priv; struct pinctrl *p = w->pinctrl; struct pinctrl_state *s; if (!p || !priv) return -EIO; if (SND_SOC_DAPM_EVENT_ON(event)) s = pinc...
[ 0, 0 ]
Linux Kernel
sound/soc/soc-dapm.c
static 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-...
[ 0, 0 ]
Linux Kernel
sound/soc/soc-dapm.c
static void dapm_seq_run_coalesced(struct snd_soc_card *card, struct list_head *pending) { struct snd_soc_dapm_context *dapm; struct snd_soc_dapm_widget *w; int reg; unsigned int value = 0; unsigned int mask = 0; w = list_first_entry(pending, struct snd_soc_dapm_widget, p...
[ 1, 0 ]
Linux Kernel
sound/soc/soc-dapm.c
static void dapm_widget_update(struct snd_soc_card *card) { struct snd_soc_dapm_update *update = card->update; struct snd_soc_dapm_widget_list *wlist; struct snd_soc_dapm_widget *w = NULL; unsigned int wi; int ret; if (!update || !dapm_kcontrol_is_powered(update->kcontrol)) return; wlist = dapm_kco...
[ 1, 0 ]
Linux Kernel
sound/soc/soc-dapm.c
static void dapm_pre_sequence_async(void *data, async_cookie_t cookie) { struct snd_soc_dapm_context *d = data; int ret; if (d->bias_level == SND_SOC_BIAS_OFF && d->target_bias_level != SND_SOC_BIAS_OFF) { if (d->dev && cookie) pm_runtime_get_sync(d->dev); ret = snd_soc_dapm_set_bias_level(d...
[ 1, 0 ]
Linux Kernel
sound/soc/soc-dapm.c
static void dapm_post_sequence_async(void *data, async_cookie_t cookie) { struct snd_soc_dapm_context *d = data; int ret; if (d->bias_level == SND_SOC_BIAS_PREPARE && (d->target_bias_level == SND_SOC_BIAS_STANDBY || d->target_bias_level == SND_SOC_BIAS_OFF)) { ret = snd_soc_dapm_set_bias_level(d...
[ 0, 0 ]
Linux Kernel
sound/soc/soc-dapm.c
static bool dapm_idle_bias_off(struct snd_soc_dapm_context *dapm) { if (dapm->idle_bias_off) return true; switch (snd_power_get_state(dapm->card->snd_card)) { case SNDRV_CTL_POWER_D3hot: case SNDRV_CTL_POWER_D3cold: return dapm->suspend_bias_off; default: break; } return false; }
[ 0, 0 ]
Linux Kernel
sound/soc/soc-dapm.c
static 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_BIA...
[ 0, 0 ]
Linux Kernel
sound/soc/soc-dapm.c
void snd_soc_dapm_debugfs_init(struct snd_soc_dapm_context *dapm, struct dentry *parent) { if (!parent || IS_ERR(parent)) return; dapm->debugfs_dapm = debugfs_create_dir("dapm", parent); debugfs_create_file("bias_level", 0444, dapm->debugfs_dapm, dapm, &...
[ 0, 0 ]
Linux Kernel
sound/soc/soc-dapm.c
static void dapm_debugfs_cleanup(struct snd_soc_dapm_context *dapm) { debugfs_remove_recursive(dapm->debugfs_dapm); dapm->debugfs_dapm = NULL; } #else
[ 0, 0 ]
Linux Kernel
sound/soc/soc-dapm.c
static void soc_dapm_connect_path(struct snd_soc_dapm_path *path, bool connect, const char *reason) { if (path->connect == connect) return; path->connect = connect; dapm_mark_dirty(path->source, reason); dapm_mark_dirty(path->sink, reason); dapm_path_invalidate(path); }
[ 0, 0 ]
Linux Kernel
sound/soc/soc-dapm.c
static int soc_dapm_mixer_update_power(struct snd_soc_card *card, struct snd_kcontrol *kcontrol, int connect, int rconnect) { struct snd_soc_dapm_path *path; int found = 0; lockdep_assert_held(&card->dapm_mutex); dapm_kcontrol_for_e...
[ 0, 0 ]
Linux Kernel
sound/soc/soc-dapm.c
void snd_soc_dapm_free_widget(struct snd_soc_dapm_widget *w) { struct snd_soc_dapm_path *p, *next_p; enum snd_soc_dapm_direction dir; if (!w) return; list_del(&w->list); list_del(&w->dirty); snd_soc_dapm_for_each_direction(dir) { snd_soc_dapm_widget_for_each_path_safe(w, dir, p, next_p) dapm_free...
[ 0, 0 ]
Linux Kernel
sound/soc/soc-dapm.c
int snd_soc_dapm_new_widgets(struct snd_soc_card *card) { struct snd_soc_dapm_widget *w; unsigned int val; mutex_lock_nested(&card->dapm_mutex, SND_SOC_DAPM_CLASS_INIT); for_each_card_widgets(card, w) { if (w->new) continue; if (w->num_kcontrols) { w->kcontrols = kcalloc(w->num_...
[ 1, 0 ]
Linux Kernel
sound/soc/soc-dapm.c
int snd_soc_dapm_get_volsw(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_soc_dapm_context *dapm = snd_soc_dapm_kcontrol_dapm(kcontrol); struct snd_soc_card *card = dapm->card; struct soc_mixer_control *mc = (struct soc_mixer_control *)kcontrol->p...
[ 1, 0 ]
Linux Kernel
sound/soc/soc-dapm.c
static int snd_soc_dapm_dai_link_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_soc_dapm_widget *w = snd_kcontrol_chip(kcontrol); struct snd_soc_pcm_runtime *rtd = w->priv; if (w->power) return -EBUSY; if (ucontrol->value.enumerate...
[ 1, 0 ]
Linux Kernel
sound/soc/soc-dapm.c
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-...
[ 1, 0 ]
Linux Kernel
sound/soc/soc-dapm.c
int snd_soc_dapm_link_dai_widgets(struct snd_soc_card *card) { struct snd_soc_dapm_widget *dai_w, *w; struct snd_soc_dapm_widget *src, *sink; struct snd_soc_dai *dai; for_each_card_widgets(card, dai_w) { switch (dai_w->id) { case snd_soc_dapm_dai_in: case snd_soc_dapm_dai_out: break; defa...
[ 1, 0 ]
Linux Kernel
sound/soc/soc-dapm.c
static void dapm_connect_dai_routes(struct snd_soc_dapm_context *dapm, struct snd_soc_dai *src_dai, struct snd_soc_dapm_widget *src, struct snd_soc_dapm_widget *dai, struct sn...
[ 0, 0 ]
Linux Kernel
sound/soc/soc-dapm.c
void snd_soc_dapm_connect_dai_link_widgets(struct snd_soc_card *card) { struct snd_soc_pcm_runtime *rtd; struct snd_soc_dai *codec_dai; int i; for_each_card_rtds(card, rtd) { /* * dynamic FE links have no fixed DAI mapping. * CODEC<->CODEC links have no direct connection. */ if (rtd->dai...
[ 1, 0 ]
Linux Kernel
sound/soc/soc-dapm.c
void snd_soc_dapm_stream_stop(struct snd_soc_pcm_runtime *rtd, int stream) { if (stream == SNDRV_PCM_STREAM_PLAYBACK) { if (snd_soc_runtime_ignore_pmdown_time(rtd)) { snd_soc_dapm_stream_event(rtd, SNDRV_PCM_STREAM_PLAYBACK, SND_SOC_DAPM_STREAM_STOP); } else { /* s...
[ 0, 0 ]
Linux Kernel
sound/soc/soc-dapm.c
int snd_soc_dapm_disable_pin(struct snd_soc_dapm_context *dapm, const char *pin) { int ret; mutex_lock_nested(&dapm->card->dapm_mutex, SND_SOC_DAPM_CLASS_RUNTIME); ret = snd_soc_dapm_set_pin(dapm, pin, 0); mutex_unlock(&dapm->card->dapm_mutex); return ret; }
[ 0, 0 ]
Linux Kernel
sound/soc/soc-dapm.c
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, "ASoC: unknown pin %s\n", pin); return -EINVAL; } w->ignore_suspend = 1; return 0; }
[ 0, 0 ]
Linux Kernel
sound/soc/soc-dapm.c
void snd_soc_dapm_free(struct snd_soc_dapm_context *dapm) { dapm_debugfs_cleanup(dapm); dapm_free_widgets(dapm); list_del(&dapm->list); }
[ 0, 0 ]
Linux Kernel
sound/soc/soc-dapm.c
void snd_soc_dapm_shutdown(struct snd_soc_card *card) { struct snd_soc_dapm_context *dapm; for_each_card_dapms(card, dapm) { if (dapm != &card->dapm) { soc_dapm_shutdown_dapm(dapm); if (dapm->bias_level == SND_SOC_BIAS_STANDBY) snd_soc_dapm_set_bias_level(dapm, SND_SOC_BIAS_OFF); } } ...
[ 0, 0 ]
Linux Kernel
sound/soc/soc-devres.c
static void devm_dai_release(struct device *dev, void *res) { snd_soc_unregister_dai(*(struct snd_soc_dai **)res); }
[ 0, 0 ]
Linux Kernel
sound/soc/soc-devres.c
int devm_snd_soc_register_component( struct device *dev, const struct snd_soc_component_driver *cmpnt_drv, struct snd_soc_dai_driver *dai_drv, int num_dai) { const struct snd_soc_component_driver **ptr; int ret; ptr = devres_alloc(devm_component_release, sizeof(*ptr), GFP_KERNEL); if (!ptr) return ...
[ 1, 0 ]
Linux Kernel
sound/soc/soc-generic-dmaengine-pcm.c
static struct device *dmaengine_dma_dev(struct dmaengine_pcm *pcm, struct snd_pcm_substream *substream) { if (!pcm->chan[substream->stream]) return NULL; return pcm->chan[substream->stream]->device->dev; }
[ 1, 0 ]
Linux Kernel
sound/soc/soc-generic-dmaengine-pcm.c
int snd_dmaengine_pcm_prepare_slave_config( struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params, struct dma_slave_config *slave_config) { struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); struct snd_dmaengine_dai_dma_data *dma_data; int ret; if (rtd->dai_link->num_cp...
[ 1, 0 ]
Linux Kernel
sound/soc/soc-generic-dmaengine-pcm.c
static int dmaengine_pcm_set_runtime_hwparams(struct snd_soc_component *component, struct snd_pcm_substream *substream) { struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); struct dmaengine_pcm *pcm = soc_component_to_pcm(component); struct device *dma_dev = dma...
[ 1, 1 ]
Linux Kernel
sound/soc/soc-generic-dmaengine-pcm.c
static int dmaengine_pcm_new(struct snd_soc_component *component, struct snd_soc_pcm_runtime *rtd) { struct dmaengine_pcm *pcm = soc_component_to_pcm(component); const struct snd_dmaengine_pcm_config *config = pcm->config; struct device *dev = component->dev; size_t prealloc_buffer...
[ 1, 0 ]
Linux Kernel
sound/soc/soc-generic-dmaengine-pcm.c
void snd_dmaengine_pcm_unregister(struct device *dev) { struct snd_soc_component *component; struct dmaengine_pcm *pcm; component = snd_soc_lookup_component(dev, SND_DMAENGINE_PCM_DRV_NAME); if (!component) return; pcm = soc_component_to_pcm(component); snd_soc_unregister_component_by_driver(dev, com...
[ 0, 0 ]
Linux Kernel
sound/soc/soc-jack.c
void snd_soc_jack_report(struct snd_soc_jack *jack, int status, int mask) { struct snd_soc_dapm_context *dapm; struct snd_soc_jack_pin *pin; unsigned int sync = 0; if (!jack) return; trace_snd_soc_jack_report(jack, mask, status); dapm = &jack->card->dapm; mutex_lock(&jack->mutex); jack->status &...
[ 1, 0 ]
Linux Kernel
sound/soc/soc-jack.c
static int snd_soc_jack_pm_notifier(struct notifier_block *nb, unsigned long action, void *data) { struct snd_soc_jack_gpio *gpio = container_of(nb, struct snd_soc_jack_gpio, pm_notifier); switch (action) { case PM_POST_SUSPEND: case PM_POST_HIBERNATION: case PM_POST...
[ 1, 0 ]
Linux Kernel
sound/soc/soc-jack.c
static void jack_free_gpios(struct snd_soc_jack *jack, int count, struct snd_soc_jack_gpio *gpios) { int i; for (i = 0; i < count; i++) { gpiod_unexport(gpios[i].desc); unregister_pm_notifier(&gpios[i].pm_notifier); free_irq(gpiod_to_irq(gpios[i].desc), &gpios[i]); canc...
[ 0, 0 ]
Linux Kernel
sound/soc/soc-link.c
static inline int _soc_link_ret(struct snd_soc_pcm_runtime *rtd, const char *func, int ret) { if (ret >= 0) return ret; /* Negative values might be errors */ switch (ret) { case -EPROBE_DEFER: case -ENOTSUPP: break; default: dev_err(rtd->dev, "ASoC: error at %s ...
[ 0, 0 ]
Linux Kernel
sound/soc/soc-link.c
int snd_soc_link_init(struct snd_soc_pcm_runtime *rtd) { int ret = 0; if (rtd->dai_link->init) ret = rtd->dai_link->init(rtd); return soc_link_ret(rtd, ret); }
[ 0, 0 ]
Linux Kernel
sound/soc/soc-link.c
int snd_soc_link_be_hw_params_fixup(struct snd_soc_pcm_runtime *rtd, struct snd_pcm_hw_params *params) { int ret = 0; if (rtd->dai_link->be_hw_params_fixup) ret = rtd->dai_link->be_hw_params_fixup(rtd, params); return soc_link_ret(rtd, ret); }
[ 0, 0 ]
Linux Kernel
sound/soc/soc-link.c
int snd_soc_link_trigger(struct snd_pcm_substream *substream, int cmd, int rollback) { struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); int ret = 0; switch (cmd) { case SNDRV_PCM_TRIGGER_START: case SNDRV_PCM_TRIGGER_RESUME: case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:...
[ 1, 0 ]
Linux Kernel
sound/soc/soc-link.c
void snd_soc_link_compr_shutdown(struct snd_compr_stream *cstream, int rollback) { struct snd_soc_pcm_runtime *rtd = cstream->private_data; if (rollback && !soc_link_mark_match(rtd, cstream, compr_startup)) return; if (rtd->dai_link->compr_ops && rtd->dai_link->compr_ops->s...
[ 1, 0 ]
Linux Kernel
sound/soc/soc-ops.c
int snd_soc_info_volsw(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) { struct soc_mixer_control *mc = (struct soc_mixer_control *)kcontrol->private_value; const char *vol_string = NULL; int max; max = uinfo->value.integer.max = mc->max - mc->min; if (mc->platfor...
[ 1, 0 ]
Linux Kernel
sound/soc/soc-ops.c
int snd_soc_info_volsw_sx(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) { struct soc_mixer_control *mc = (struct soc_mixer_control *)kcontrol->private_value; int max; if (mc->platform_max) max = mc->platform_max; else max = mc->max; if (max == 1 && !...
[ 0, 0 ]
Linux Kernel
sound/soc/soc-ops.c
int snd_soc_get_volsw_sx(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); struct soc_mixer_control *mc = (struct soc_mixer_control *)kcontrol->private_value; unsigned int reg = mc->reg; unsigne...
[ 1, 0 ]
Linux Kernel
sound/soc/soc-ops.c
int snd_soc_put_volsw_range(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct soc_mixer_control *mc = (struct soc_mixer_control *)kcontrol->private_value; struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); unsigned int reg = mc->reg; u...
[ 1, 0 ]
Linux Kernel
sound/soc/soc-ops.c
int snd_soc_get_volsw_range(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); struct soc_mixer_control *mc = (struct soc_mixer_control *)kcontrol->private_value; unsigned int reg = mc->reg; u...
[ 1, 0 ]
Linux Kernel
sound/soc/soc-ops.c
int snd_soc_get_xr_sx(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); struct soc_mreg_control *mc = (struct soc_mreg_control *)kcontrol->private_value; unsigned int regbase = mc->regbase; unsigne...
[ 1, 0 ]
Linux Kernel
sound/soc/soc-ops.c
int snd_soc_put_xr_sx(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); struct soc_mreg_control *mc = (struct soc_mreg_control *)kcontrol->private_value; unsigned int regbase = mc->regbase; unsigne...
[ 1, 0 ]
Linux Kernel
sound/soc/soc-pcm.c
static inline void snd_soc_dpcm_stream_lock_irq(struct snd_soc_pcm_runtime *rtd, int stream) { snd_pcm_stream_lock_irq(snd_soc_dpcm_get_substream(rtd, stream)); } #define snd_soc_dpcm_stream_lock_irqsave_nested(rtd, stream, flags) \ snd_pcm_stream_lock_ir...
[ 0, 0 ]
Linux Kernel
sound/soc/soc-pcm.c
static ssize_t dpcm_state_read_file(struct file *file, char __user *user_buf, size_t count, loff_t *ppos) { struct snd_soc_pcm_runtime *fe = file->private_data; ssize_t out_count = PAGE_SIZE, offset = 0, ret = 0; int stream; char *buf; if (fe->dai_link->num_cpus > 1) { ...
[ 1, 0 ]
Linux Kernel
sound/soc/soc-pcm.c
static void dpcm_create_debugfs_state(struct snd_soc_dpcm *dpcm, int stream) { char *name; name = kasprintf(GFP_KERNEL, "%s:%s", dpcm->be->dai_link->name, stream ? "capture" : "playback"); if (name) { dpcm->debugfs_state = debugfs_create_dir(name, dpcm->fe->debugfs_dpcm_root); debugfs...
[ 1, 0 ]
Linux Kernel
sound/soc/soc-pcm.c
static void dpcm_remove_debugfs_state(struct snd_soc_dpcm *dpcm) { debugfs_remove_recursive(dpcm->debugfs_state); } #else
[ 0, 0 ]
Linux Kernel
sound/soc/soc-pcm.c
void snd_soc_runtime_action(struct snd_soc_pcm_runtime *rtd, int stream, int action) { struct snd_soc_dai *dai; int i; snd_soc_dpcm_mutex_assert_held(rtd); for_each_rtd_dais(rtd, i, dai) snd_soc_dai_action(dai, stream, action); }
[ 0, 0 ]
Linux Kernel
sound/soc/soc-pcm.c
bool snd_soc_runtime_ignore_pmdown_time(struct snd_soc_pcm_runtime *rtd) { struct snd_soc_component *component; bool ignore = true; int i; if (!rtd->pmdown_time || rtd->dai_link->ignore_pmdown_time) return true; for_each_rtd_components(rtd, i, component) ignore &= !component->driver->use_pmdown_ti...
[ 1, 0 ]
Linux Kernel
sound/soc/soc-pcm.c
int snd_soc_set_runtime_hwparams(struct snd_pcm_substream *substream, const struct snd_pcm_hardware *hw) { substream->runtime->hw = *hw; return 0; }
[ 0, 0 ]
Linux Kernel
sound/soc/soc-pcm.c
static int soc_pcm_params_symmetry(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params) { struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); struct snd_soc_dai d; struct snd_soc_dai *dai; struct snd_soc_dai *cpu_dai; unsigned int symmetry, ...
[ 1, 0 ]
Linux Kernel
sound/soc/soc-pcm.c
static void soc_pcm_hw_update_format(struct snd_pcm_hardware *hw, struct snd_soc_pcm_stream *p) { hw->formats &= p->formats; }
[ 0, 0 ]
Linux Kernel
sound/soc/soc-pcm.c
static void soc_pcm_init_runtime_hw(struct snd_pcm_substream *substream) { struct snd_pcm_hardware *hw = &substream->runtime->hw; struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); u64 formats = hw->formats; snd_soc_runtime_calc_hw(rtd, hw, substream->stream); if (formats) hw->formats &...
[ 0, 0 ]
Linux Kernel
sound/soc/soc-pcm.c
static int soc_pcm_components_close(struct snd_pcm_substream *substream, int rollback) { struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); struct snd_soc_component *component; int i, ret = 0; for_each_rtd_components(rtd, i, component) { int r = snd_soc_...
[ 0, 0 ]
Linux Kernel
sound/soc/soc-pcm.c
static int soc_pcm_close(struct snd_pcm_substream *substream) { struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); snd_soc_dpcm_mutex_lock(rtd); __soc_pcm_close(rtd, substream); snd_soc_dpcm_mutex_unlock(rtd); return 0; }
[ 0, 0 ]
Linux Kernel
sound/soc/soc-pcm.c
static int __soc_pcm_open(struct snd_soc_pcm_runtime *rtd, struct snd_pcm_substream *substream) { struct snd_soc_component *component; struct snd_soc_dai *dai; int i, ret = 0; snd_soc_dpcm_mutex_assert_held(rtd); for_each_rtd_components(rtd, i, component) pinctrl_pm_select_de...
[ 1, 0 ]
Linux Kernel
sound/soc/soc-pcm.c
static int __soc_pcm_hw_free(struct snd_soc_pcm_runtime *rtd, struct snd_pcm_substream *substream) { return soc_pcm_hw_clean(rtd, substream, 0); }
[ 0, 0 ]
Linux Kernel
sound/soc/soc-pcm.c
static int soc_pcm_trigger(struct snd_pcm_substream *substream, int cmd) { struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); int ret = -EINVAL, _ret = 0; int rollback = 0; switch (cmd) { case SNDRV_PCM_TRIGGER_START: case SNDRV_PCM_TRIGGER_RESUME: case SNDRV_PCM_TRIGGER_PAUSE_RELEASE: ...
[ 1, 0 ]
Linux Kernel
sound/soc/soc-pcm.c
static int dpcm_be_connect(struct snd_soc_pcm_runtime *fe, struct snd_soc_pcm_runtime *be, int stream) { struct snd_pcm_substream *fe_substream; struct snd_pcm_substream *be_substream; struct snd_soc_dpcm *dpcm; snd_soc_dpcm_mutex_assert_held(fe); for_each_dpcm_be(fe, stream, dpcm...
[ 1, 0 ]
Linux Kernel
sound/soc/soc-pcm.c
static void dpcm_be_reparent(struct snd_soc_pcm_runtime *fe, struct snd_soc_pcm_runtime *be, int stream) { struct snd_soc_dpcm *dpcm; struct snd_pcm_substream *fe_substream, *be_substream; if (!be->dpcm[stream].users) return; be_substream = snd_soc_dpcm_get_substream(be, strea...
[ 1, 0 ]
Linux Kernel
sound/soc/soc-pcm.c
void dpcm_be_disconnect(struct snd_soc_pcm_runtime *fe, int stream) { struct snd_soc_dpcm *dpcm, *d; LIST_HEAD(deleted_dpcms); snd_soc_dpcm_mutex_assert_held(fe); snd_soc_dpcm_stream_lock_irq(fe, stream); for_each_dpcm_be_safe(fe, stream, dpcm, d) { dev_dbg(fe->dev, "ASoC: BE %s disconnect check for %s\...
[ 1, 0 ]
Linux Kernel
sound/soc/soc-pcm.c
static struct snd_soc_pcm_runtime * dpcm_get_be(struct snd_soc_card *card, struct snd_soc_dapm_widget *widget, int stream) { struct snd_soc_pcm_runtime *be; struct snd_soc_dapm_widget *w; struct snd_soc_dai *dai; int i; dev_dbg(card->dev, "ASoC: find BE for widget %s\n", widget->name); for_eac...
[ 1, 0 ]
Linux Kernel
sound/soc/soc-pcm.c
int dpcm_process_paths(struct snd_soc_pcm_runtime *fe, int stream, struct snd_soc_dapm_widget_list **list, int new) { if (new) return dpcm_add_paths(fe, stream, list); else return dpcm_prune_paths(fe, stream, list); }
[ 0, 0 ]
Linux Kernel
sound/soc/soc-pcm.c
void dpcm_clear_pending_state(struct snd_soc_pcm_runtime *fe, int stream) { struct snd_soc_dpcm *dpcm; for_each_dpcm_be(fe, stream, dpcm) dpcm_set_be_update_state(dpcm->be, stream, SND_SOC_DPCM_UPDATE_NO); }
[ 0, 0 ]
Linux Kernel
sound/soc/soc-pcm.c
int dpcm_be_dai_prepare(struct snd_soc_pcm_runtime *fe, int stream) { struct snd_soc_dpcm *dpcm; int ret = 0; for_each_dpcm_be(fe, stream, dpcm) { struct snd_soc_pcm_runtime *be = dpcm->be; struct snd_pcm_substream *be_substream = snd_soc_dpcm_get_substream(be, stream); if (!snd_soc_dpcm_be...
[ 0, 0 ]
Linux Kernel
sound/soc/soc-pcm.c
static int dpcm_fe_dai_prepare(struct snd_pcm_substream *substream) { struct snd_soc_pcm_runtime *fe = asoc_substream_to_rtd(substream); int stream = substream->stream, ret = 0; snd_soc_dpcm_mutex_lock(fe); dev_dbg(fe->dev, "ASoC: prepare FE %s\n", fe->dai_link->name); dpcm_set_fe_update_state(fe, stream, ...
[ 1, 0 ]