Projectname large_stringclasses 15
values | Filepath large_stringlengths 4 106 ⌀ | Function large_stringlengths 11 3.45k | Label list |
|---|---|---|---|
Linux Kernel | sound/soc/sh/rcar/ssi.c | static void rsnd_ssi_connect(struct rsnd_mod *mod, struct rsnd_dai_stream *io) {
struct rsnd_dai *rdai = rsnd_io_to_rdai(io);
static const enum rsnd_mod_type types[] = {
RSND_MOD_SSI,
RSND_MOD_SSIM1,
RSND_MOD_SSIM2,
RSND_MOD_SSIM3,
};
enum rsnd_mod_type type;
int i;
for (i = 0; i < ... | [
0,
0
] |
Linux Kernel | sound/soc/sh/rcar/ssiu.c |
static u32 *rsnd_ssiu_get_status(struct rsnd_mod *mod,
struct rsnd_dai_stream *io,
enum rsnd_mod_type type) {
struct rsnd_ssiu *ssiu = rsnd_mod_to_ssiu(mod);
int busif = rsnd_mod_id_sub(mod);
return &ssiu->busif_status[busif];
} | [
0,
0
] |
Linux Kernel | sound/soc/sh/rcar/ssiu.c |
static int rsnd_ssiu_stop_gen2(struct rsnd_mod *mod, struct rsnd_dai_stream *io,
struct rsnd_priv *priv) {
struct rsnd_ssiu *ssiu = rsnd_mod_to_ssiu(mod);
int busif = rsnd_mod_id_sub(mod);
if (!rsnd_ssi_use_busif(io))
return 0;
rsnd_mod_bset(mod, SSI_CTRL, 1 << (busif * 4),... | [
1,
0
] |
Linux Kernel | sound/soc/sh/rcar/ssiu.c | static int rsnd_ssiu_id(struct rsnd_mod *mod) {
struct rsnd_ssiu *ssiu = rsnd_mod_to_ssiu(mod);
return ssiu->id;
} | [
0,
0
] |
Linux Kernel | sound/soc/sh/rcar/ssiu.c | static struct dma_chan *rsnd_ssiu_dma_req(struct rsnd_dai_stream *io,
struct rsnd_mod *mod) {
struct rsnd_priv *priv = rsnd_mod_to_priv(mod);
int is_play = rsnd_io_is_play(io);
char *name;
name = is_play ? "rx" : "tx";
return rsnd_dma_request_channel(rsnd_ssiu_of_no... | [
0,
0
] |
Linux Kernel | sound/soc/sh/rcar/ssiu.c | static void rsnd_parse_connect_ssiu_compatible(struct rsnd_priv *priv,
struct rsnd_dai_stream *io) {
struct rsnd_mod *ssi_mod = rsnd_io_to_mod_ssi(io);
struct rsnd_ssiu *ssiu;
int is_dma_mode;
int i;
if (!ssi_mod)
return;
is_dma_mode = rsnd_ssi_is_dma_mod... | [
0,
0
] |
Linux Kernel | sound/soc/sh/rz-ssi.c |
static u32 rz_ssi_reg_readl(struct rz_ssi_priv *priv, uint reg) {
return readl(priv->base + reg);
} | [
0,
0
] |
Linux Kernel | sound/soc/sh/rz-ssi.c |
static inline bool rz_ssi_stream_is_play(struct rz_ssi_priv *ssi,
struct snd_pcm_substream *substream) {
return substream->stream == SNDRV_PCM_STREAM_PLAYBACK;
} | [
0,
0
] |
Linux Kernel | sound/soc/sh/rz-ssi.c |
static inline struct rz_ssi_stream *
rz_ssi_stream_get(struct rz_ssi_priv *ssi,
struct snd_pcm_substream *substream) {
struct rz_ssi_stream *stream = &ssi->playback;
if (substream->stream != SNDRV_PCM_STREAM_PLAYBACK)
stream = &ssi->capture;
return stream;
} | [
0,
0
] |
Linux Kernel | sound/soc/sh/rz-ssi.c |
static void rz_ssi_set_substream(struct rz_ssi_stream *strm,
struct snd_pcm_substream *substream) {
struct rz_ssi_priv *ssi = strm->priv;
unsigned long flags;
spin_lock_irqsave(&ssi->lock, flags);
strm->substream = substream;
spin_unlock_irqrestore(&ssi->lock, flags);
} | [
0,
0
] |
Linux Kernel | sound/soc/sh/rz-ssi.c |
static bool rz_ssi_stream_is_valid(struct rz_ssi_priv *ssi,
struct rz_ssi_stream *strm) {
unsigned long flags;
bool ret;
spin_lock_irqsave(&ssi->lock, flags);
ret = strm->substream && strm->substream->runtime;
spin_unlock_irqrestore(&ssi->lock, flags);
return ret;
} | [
1,
0
] |
Linux Kernel | sound/soc/sh/rz-ssi.c | static void rz_ssi_stream_init(struct rz_ssi_stream *strm,
struct snd_pcm_substream *substream) {
struct snd_pcm_runtime *runtime = substream->runtime;
rz_ssi_set_substream(strm, substream);
strm->sample_width = samples_to_bytes(runtime, 1);
strm->dma_buffer_pos = 0;
strm->peri... | [
0,
0
] |
Linux Kernel | sound/soc/sh/rz-ssi.c | static void rz_ssi_pointer_update(struct rz_ssi_stream *strm, int frames) {
struct snd_pcm_substream *substream = strm->substream;
struct snd_pcm_runtime *runtime;
int current_period;
if (!strm->running || !substream || !substream->runtime)
return;
runtime = substream->runtime;
strm->buffer_pos += fra... | [
0,
0
] |
Linux Kernel | sound/soc/sh/rz-ssi.c | static void rz_ssi_dma_complete(void *data) {
struct rz_ssi_stream *strm = (struct rz_ssi_stream *)data;
if (!strm->running || !strm->substream || !strm->substream->runtime)
return;
rz_ssi_pointer_update(strm, strm->substream->runtime->period_size);
/* Queue up another DMA transaction */
rz_ssi_dma_tra... | [
1,
0
] |
Linux Kernel | sound/soc/sh/rz-ssi.c |
static int rz_ssi_dai_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params,
struct snd_soc_dai *dai) {
struct rz_ssi_priv *ssi = snd_soc_dai_get_drvdata(dai);
unsigned int sample_bits =
hw_param_interval(params, SNDRV_... | [
1,
0
] |
Linux Kernel | sound/soc/sh/sh7760-ac97.c | static int __init sh7760_ac97_init(void) {
int ret;
unsigned short ipsel;
ipsel = __raw_readw(IPSEL);
__raw_writew(ipsel | (3 << 10), IPSEL);
ret = -ENOMEM;
sh7760_ac97_snd_device = platform_device_alloc("soc-audio", -1);
if (!sh7760_ac97_snd_device)
goto out;
platform_set_drvdata(sh7760_ac97_snd... | [
0,
0
] |
Linux Kernel | sound/soc/sh/siu.h |
static inline struct siu_port *
siu_port_info(struct snd_pcm_substream *substream) {
struct platform_device *pdev = to_platform_device(substream->pcm->card->dev);
return siu_ports[pdev->id];
} | [
0,
0
] |
Linux Kernel | sound/soc/sh/siu_dai.c | int siu_init_port(int port, struct siu_port **port_info,
struct snd_card *card) {
struct device *dev = card->dev;
struct snd_kcontrol *kctrl;
int ret;
*port_info = kzalloc(sizeof(**port_info), GFP_KERNEL);
if (!*port_info)
return -ENOMEM;
dev_dbg(dev, "%s: port #%d@%p\n", __func__, p... | [
0,
0
] |
Linux Kernel | sound/soc/sh/siu_dai.c | static void siu_dai_shutdown(struct snd_pcm_substream *substream,
struct snd_soc_dai *dai) {
struct siu_info *info = snd_soc_dai_get_drvdata(dai);
struct siu_port *port_info = siu_port_info(substream);
dev_dbg(substream->pcm->card->dev, "%s: port=%d@%p\n", __func__,
info->p... | [
1,
0
] |
Linux Kernel | sound/soc/sh/siu_dai.c | static int siu_dai_prepare(struct snd_pcm_substream *substream,
struct snd_soc_dai *dai) {
struct siu_info *info = snd_soc_dai_get_drvdata(dai);
struct snd_pcm_runtime *rt = substream->runtime;
struct siu_port *port_info = siu_port_info(substream);
struct siu_stream *siu_stream;
int... | [
0,
0
] |
Linux Kernel | sound/soc/sh/siu_pcm.c | static int siu_pcm_wr_set(struct siu_port *port_info, dma_addr_t buff,
u32 size) {
struct siu_info *info = siu_i2s_data;
u32 __iomem *base = info->reg;
struct siu_stream *siu_stream = &port_info->playback;
struct snd_pcm_substream *substream = siu_stream->substream;
struct device *de... | [
1,
0
] |
Linux Kernel | sound/soc/sh/siu_pcm.c | static int siu_pcm_stmread_stop(struct siu_port *port_info) {
struct siu_info *info = siu_i2s_data;
u32 __iomem *base = info->reg;
struct siu_stream *siu_stream = &port_info->capture;
struct device *dev = siu_stream->substream->pcm->card->dev;
u32 stfifo;
if (!siu_stream->rw_flg)
return -EPERM;
stfi... | [
1,
0
] |
Linux Kernel | sound/soc/sh/siu_pcm.c | static int siu_pcm_open(struct snd_soc_component *component,
struct snd_pcm_substream *ss) {
struct siu_platform *pdata = component->dev->platform_data;
struct siu_info *info = siu_i2s_data;
struct siu_port *port_info = siu_port_info(ss);
struct siu_stream *siu_stream;
u32 port = info... | [
1,
0
] |
Linux Kernel | sound/soc/sh/siu_pcm.c |
static int siu_pcm_trigger(struct snd_soc_component *component,
struct snd_pcm_substream *ss, int cmd) {
struct siu_info *info = siu_i2s_data;
struct device *dev = ss->pcm->card->dev;
struct siu_port *port_info = siu_port_info(ss);
int ret;
dev_dbg(dev, "%s: port=%d@%p, cmd=%d\n",... | [
1,
0
] |
Linux Kernel | sound/soc/sh/ssi.c |
static int ssi_set_sysclk(struct snd_soc_dai *cpu_dai, int clk_id,
unsigned int freq, int dir) {
struct ssi_priv *ssi = &ssi_cpu_data[cpu_dai->id];
ssi->sysclk = freq;
return 0;
} | [
0,
0
] |
Linux Kernel | sound/soc/sh/ssi.c |
static int sh4_soc_dai_probe(struct platform_device *pdev) {
return devm_snd_soc_register_component(&pdev->dev, &sh4_ssi_component,
sh4_ssi_dai, ARRAY_SIZE(sh4_ssi_dai));
} | [
0,
0
] |
Linux Kernel | sound/soc/soc-ac97.c |
static void soc_ac97_device_release(struct device *dev) {
kfree(to_ac97_t(dev));
}
#ifdef CONFIG_GPIOLIB | [
0,
0
] |
Linux Kernel | sound/soc/soc-ac97.c | struct snd_ac97 *
snd_soc_alloc_ac97_component(struct snd_soc_component *component) {
struct snd_ac97 *ac97;
ac97 = kzalloc(sizeof(struct snd_ac97), GFP_KERNEL);
if (ac97 == NULL)
return ERR_PTR(-ENOMEM);
ac97->bus = &soc_ac97_bus;
ac97->num = 0;
ac97->dev.bus = &ac97_bus_type;
ac97->dev.parent = c... | [
0,
0
] |
Linux Kernel | sound/soc/soc-ac97.c | void snd_soc_free_ac97_component(struct snd_ac97 *ac97) {
snd_soc_ac97_free_gpio(ac97);
device_del(&ac97->dev);
ac97->bus = NULL;
put_device(&ac97->dev);
} | [
0,
0
] |
Linux Kernel | sound/soc/soc-acpi.c |
static bool snd_soc_acpi_id_present(struct snd_soc_acpi_mach *machine) {
const struct snd_soc_acpi_codecs *comp_ids = machine->comp_ids;
int i;
if (machine->id[0]) {
if (acpi_dev_present(machine->id, NULL, -1))
return true;
}
if (comp_ids) {
for (i = 0; i < comp_ids->num_codecs; i++) {
... | [
0,
0
] |
Linux Kernel | sound/soc/soc-acpi.c |
static acpi_status snd_soc_acpi_find_package(acpi_handle handle, u32 level,
void *context, void **ret) {
struct acpi_device *adev = acpi_fetch_acpi_dev(handle);
acpi_status status;
struct snd_soc_acpi_package_context *pkg_ctx = context;
pkg_ctx->data_valid = false;... | [
1,
0
] |
Linux Kernel | sound/soc/soc-card.c |
struct snd_kcontrol *snd_soc_card_get_kcontrol(struct snd_soc_card *soc_card,
const char *name) {
struct snd_card *card = soc_card->snd_card;
struct snd_kcontrol *kctl;
if (unlikely(!name))
return NULL;
list_for_each_entry(kctl, &card->controls,
... | [
1,
0
] |
Linux Kernel | sound/soc/soc-card.c | int snd_soc_card_jack_new_pins(struct snd_soc_card *card, const char *id,
int type, struct snd_soc_jack *jack,
struct snd_soc_jack_pin *pins,
unsigned int num_pins) {
int ret;
ret = jack_new(card, id, type, jack, false);
... | [
0,
0
] |
Linux Kernel | sound/soc/soc-card.c |
int snd_soc_card_suspend_post(struct snd_soc_card *card) {
int ret = 0;
if (card->suspend_post)
ret = card->suspend_post(card);
return soc_card_ret(card, ret);
} | [
0,
0
] |
Linux Kernel | sound/soc/soc-component.c | static inline int soc_component_field_shift(struct snd_soc_component *component,
unsigned int mask) {
if (!mask) {
dev_err(component->dev, "ASoC: error field mask is zero for %s\n",
component->name);
return 0;
}
return (ffs(mask) - 1);
}
#define so... | [
0,
0
] |
Linux Kernel | sound/soc/soc-component.c |
int snd_soc_component_init(struct snd_soc_component *component) {
int ret = 0;
if (component->init)
ret = component->init(component);
return soc_component_ret(component, ret);
} | [
0,
0
] |
Linux Kernel | sound/soc/soc-component.c | int snd_soc_component_set_sysclk(struct snd_soc_component *component,
int clk_id, int source, unsigned int freq,
int dir) {
int ret = -ENOTSUPP;
if (component->driver->set_sysclk)
ret = component->driver->set_sysclk(component, clk_id, source, fr... | [
0,
0
] |
Linux Kernel | sound/soc/soc-component.c | int snd_soc_component_set_pll(struct snd_soc_component *component, int pll_id,
int source, unsigned int freq_in,
unsigned int freq_out) {
int ret = -EINVAL;
if (component->driver->set_pll)
ret = component->driver->set_pll(component, pll_id, source, fr... | [
0,
0
] |
Linux Kernel | sound/soc/soc-component.c |
int snd_soc_component_nc_pin(struct snd_soc_component *component,
const char *pin) {
struct snd_soc_dapm_context *dapm = snd_soc_component_get_dapm(component);
return snd_soc_dapm_nc_pin(dapm, pin);
} | [
0,
0
] |
Linux Kernel | sound/soc/soc-component.c |
int snd_soc_component_nc_pin_unlocked(struct snd_soc_component *component,
const char *pin) {
struct snd_soc_dapm_context *dapm = snd_soc_component_get_dapm(component);
return snd_soc_dapm_nc_pin_unlocked(dapm, pin);
} | [
0,
0
] |
Linux Kernel | sound/soc/soc-component.c | int snd_soc_component_module_get(struct snd_soc_component *component,
void *mark, int upon_open) {
int ret = 0;
if (component->driver->module_get_upon_open == !!upon_open &&
!try_module_get(component->dev->driver->owner))
ret = -ENODEV;
if (ret == 0)
soc_component_... | [
1,
0
] |
Linux Kernel | sound/soc/soc-component.c | int snd_soc_component_open(struct snd_soc_component *component,
struct snd_pcm_substream *substream) {
int ret = 0;
if (component->driver->open)
ret = component->driver->open(component, substream);
if (ret == 0)
soc_component_mark_push(component, substream, open);
return so... | [
0,
0
] |
Linux Kernel | sound/soc/soc-component.c |
void snd_soc_component_resume(struct snd_soc_component *component) {
if (component->driver->resume)
component->driver->resume(component);
component->suspended = 0;
} | [
0,
0
] |
Linux Kernel | sound/soc/soc-component.c | int snd_soc_component_of_xlate_dai_name(struct snd_soc_component *component,
const struct of_phandle_args *args,
const char **dai_name) {
if (component->driver->of_xlate_dai_name)
return component->driver->of_xlate_dai_name(component,... | [
0,
0
] |
Linux Kernel | sound/soc/soc-component.c | void snd_soc_component_init_regmap(struct snd_soc_component *component,
struct regmap *regmap) {
component->regmap = regmap;
snd_soc_component_setup_regmap(component);
} | [
0,
0
] |
Linux Kernel | sound/soc/soc-component.c |
int snd_soc_component_compr_get_caps(struct snd_compr_stream *cstream,
struct snd_compr_caps *caps) {
struct snd_soc_pcm_runtime *rtd = cstream->private_data;
struct snd_soc_component *component;
int i, ret = 0;
mutex_lock_nested(&rtd->card->pcm_mutex, rtd->card->pcm_subcl... | [
1,
0
] |
Linux Kernel | sound/soc/soc-component.c |
int snd_soc_component_compr_set_metadata(struct snd_compr_stream *cstream,
struct snd_compr_metadata *metadata) {
struct snd_soc_pcm_runtime *rtd = cstream->private_data;
struct snd_soc_component *component;
int i, ret;
for_each_rtd_components(rtd, i, component) {
... | [
1,
0
] |
Linux Kernel | sound/soc/soc-component.c |
static unsigned int
soc_component_read_no_lock(struct snd_soc_component *component,
unsigned int reg) {
int ret;
unsigned int val = 0;
if (component->regmap)
ret = regmap_read(component->regmap, reg, &val);
else if (component->driver->read) {
ret = 0;
val = component->dr... | [
1,
0
] |
Linux Kernel | sound/soc/soc-component.c | void snd_soc_component_async_complete(struct snd_soc_component *component) {
if (component->regmap)
regmap_async_complete(component->regmap);
} | [
0,
0
] |
Linux Kernel | sound/soc/soc-component.c | int snd_soc_component_test_bits(struct snd_soc_component *component,
unsigned int reg, unsigned int mask,
unsigned int value) {
unsigned int old, new;
old = snd_soc_component_read(component, reg);
new = (old & ~mask) | value;
return old != new;
} | [
0,
0
] |
Linux Kernel | sound/soc/soc-component.c |
void snd_soc_pcm_component_free(struct snd_soc_pcm_runtime *rtd) {
struct snd_soc_component *component;
int i;
if (!rtd->pcm)
return;
for_each_rtd_components(rtd, i,
component) if (component->driver->pcm_destruct)
component->driver->pcm_destruct(component, rtd->pcm);
} | [
0,
0
] |
Linux Kernel | sound/soc/soc-component.c |
static int soc_component_trigger(struct snd_soc_component *component,
struct snd_pcm_substream *substream, int cmd) {
int ret = 0;
if (component->driver->trigger)
ret = component->driver->trigger(component, substream, cmd);
return soc_component_ret(component, ret);
} | [
0,
0
] |
Linux Kernel | sound/soc/soc-component.c | void snd_soc_pcm_component_pm_runtime_put(struct snd_soc_pcm_runtime *rtd,
void *stream, int rollback) {
struct snd_soc_component *component;
int i;
for_each_rtd_components(rtd, i, component) {
if (rollback && !soc_component_mark_match(component, stream, pm))
c... | [
0,
0
] |
Linux Kernel | sound/soc/soc-compress.c |
static int snd_soc_compr_components_open(struct snd_compr_stream *cstream) {
struct snd_soc_pcm_runtime *rtd = cstream->private_data;
struct snd_soc_component *component;
int ret = 0;
int i;
for_each_rtd_components(rtd, i, component) {
ret = snd_soc_component_module_get_when_open(component, cstream);
... | [
0,
0
] |
Linux Kernel | sound/soc/soc-compress.c | static int soc_compr_trigger(struct snd_compr_stream *cstream, int cmd) {
struct snd_soc_pcm_runtime *rtd = cstream->private_data;
struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0);
struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0);
int stream = cstream->direction;
int ret;
mutex_lock_nested(&r... | [
1,
0
] |
Linux Kernel | sound/soc/soc-compress.c | static int soc_compr_set_params_fe(struct snd_compr_stream *cstream,
struct snd_compr_params *params) {
struct snd_soc_pcm_runtime *fe = cstream->private_data;
struct snd_pcm_substream *fe_substream =
fe->pcm->streams[cstream->direction].substream;
struct snd_soc_dai *cpu_... | [
1,
0
] |
Linux Kernel | sound/soc/soc-compress.c |
static int soc_compr_ack(struct snd_compr_stream *cstream, size_t bytes) {
struct snd_soc_pcm_runtime *rtd = cstream->private_data;
struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0);
int ret;
mutex_lock_nested(&rtd->card->pcm_mutex, rtd->card->pcm_subclass);
ret = snd_soc_dai_compr_ack(cpu_dai, cstream... | [
0,
0
] |
Linux Kernel | sound/soc/soc-compress.c |
static int soc_compr_pointer(struct snd_compr_stream *cstream,
struct snd_compr_tstamp *tstamp) {
struct snd_soc_pcm_runtime *rtd = cstream->private_data;
int ret;
struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0);
mutex_lock_nested(&rtd->card->pcm_mutex, rtd->card->pcm_subcla... | [
0,
0
] |
Linux Kernel | sound/soc/soc-compress.c |
static int soc_compr_set_metadata(struct snd_compr_stream *cstream,
struct snd_compr_metadata *metadata) {
struct snd_soc_pcm_runtime *rtd = cstream->private_data;
struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0);
int ret;
ret = snd_soc_dai_compr_set_metadata(cpu_dai, cs... | [
0,
0
] |
Linux Kernel | sound/soc/soc-core.c |
static ssize_t pmdown_time_store(struct device *dev,
struct device_attribute *attr, const char *buf,
size_t count) {
struct snd_soc_pcm_runtime *rtd = dev_get_drvdata(dev);
int ret;
ret = kstrtol(buf, 10, &rtd->pmdown_time);
if (ret)
return... | [
0,
0
] |
Linux Kernel | sound/soc/soc-core.c |
static int dai_list_show(struct seq_file *m, void *v) {
struct snd_soc_component *component;
struct snd_soc_dai *dai;
mutex_lock(&client_mutex);
for_each_component(component) for_each_component_dais(component, dai)
seq_printf(m, "%s\n", dai->name);
mutex_unlock(&client_mutex);
return 0;
} | [
0,
0
] |
Linux Kernel | sound/soc/soc-core.c |
static void soc_init_card_debugfs(struct snd_soc_card *card) {
card->debugfs_card_root =
debugfs_create_dir(card->name, snd_soc_debugfs_root);
debugfs_create_u32("dapm_pop_time", 0644, card->debugfs_card_root,
&card->pop_time);
snd_soc_dapm_debugfs_init(&card->dapm, card->debugfs_car... | [
0,
0
] |
Linux Kernel | sound/soc/soc-core.c |
static void snd_soc_debugfs_exit(void) {
debugfs_remove_recursive(snd_soc_debugfs_root);
}
#else | [
0,
0
] |
Linux Kernel | sound/soc/soc-core.c | static inline void
soc_cleanup_component_debugfs(struct snd_soc_component *component) {} | [
0,
0
] |
Linux Kernel | sound/soc/soc-core.c | static inline void snd_soc_debugfs_exit(void) {}
#endif | [
0,
0
] |
Linux Kernel | sound/soc/soc-core.c | struct snd_soc_component *snd_soc_rtdcom_lookup(struct snd_soc_pcm_runtime *rtd,
const char *driver_name) {
struct snd_soc_component *component;
int i;
if (!driver_name)
return NULL;
for_each_rtd_components(rtd, i, component) {
const char *component_name... | [
0,
0
] |
Linux Kernel | sound/soc/soc-core.c |
struct snd_soc_component *snd_soc_lookup_component(struct device *dev,
const char *driver_name) {
struct snd_soc_component *component;
mutex_lock(&client_mutex);
component = snd_soc_lookup_component_nolocked(dev, driver_name);
mutex_unlock(&client_mutex);
... | [
0,
0
] |
Linux Kernel | sound/soc/soc-core.c |
struct snd_soc_pcm_runtime *
snd_soc_get_pcm_runtime(struct snd_soc_card *card,
struct snd_soc_dai_link *dai_link) {
struct snd_soc_pcm_runtime *rtd;
for_each_card_rtds(card, rtd) {
if (rtd->dai_link == dai_link)
return rtd;
}
dev_dbg(card->dev, "ASoC: failed to find rtd %s\n... | [
0,
0
] |
Linux Kernel | sound/soc/soc-core.c |
static void soc_dapm_suspend_resume(struct snd_soc_card *card, int event) {
struct snd_soc_pcm_runtime *rtd;
int stream;
for_each_card_rtds(card, rtd) {
if (rtd->dai_link->ignore_suspend)
continue;
for_each_pcm_streams(stream) snd_soc_dapm_stream_event(rtd, stream, event);
}
} | [
0,
0
] |
Linux Kernel | sound/soc/soc-core.c | static void soc_resume_init(struct snd_soc_card *card) {
INIT_WORK(&card->deferred_resume_work, soc_resume_deferred);
}
#else
#define snd_soc_suspend NULL
#define snd_soc_resume NULL | [
0,
0
] |
Linux Kernel | sound/soc/soc-core.c |
static struct device_node *
soc_component_to_node(struct snd_soc_component *component) {
struct device_node *of_node;
of_node = component->dev->of_node;
if (!of_node && component->dev->parent)
of_node = component->dev->parent->of_node;
return of_node;
} | [
1,
0
] |
Linux Kernel | sound/soc/soc-core.c | int snd_soc_runtime_set_dai_fmt(struct snd_soc_pcm_runtime *rtd,
unsigned int dai_fmt) {
struct snd_soc_dai *cpu_dai;
struct snd_soc_dai *codec_dai;
unsigned int i;
int ret;
if (!dai_fmt)
return 0;
for_each_rtd_codec_dais(rtd, i, codec_dai) {
ret = snd_soc_dai_set_f... | [
1,
0
] |
Linux Kernel | sound/soc/soc-core.c | static int soc_init_pcm_runtime(struct snd_soc_card *card,
struct snd_soc_pcm_runtime *rtd) {
struct snd_soc_dai_link *dai_link = rtd->dai_link;
struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0);
struct snd_soc_component *component;
int ret, num, i;
ret = snd_soc_link_init... | [
1,
0
] |
Linux Kernel | sound/soc/soc-core.c |
static void soc_remove_component(struct snd_soc_component *component,
int probed) {
if (!component->card)
return;
if (probed)
snd_soc_component_remove(component);
list_del_init(&component->card_list);
snd_soc_dapm_free(snd_soc_component_get_dapm(component));
soc_cl... | [
0,
0
] |
Linux Kernel | sound/soc/soc-core.c |
static void soc_remove_link_components(struct snd_soc_card *card) {
struct snd_soc_component *component;
struct snd_soc_pcm_runtime *rtd;
int i, order;
for_each_comp_order(order) {
for_each_card_rtds(card, rtd) {
for_each_rtd_components(rtd, i, component) {
if (component->driver->remove_orde... | [
1,
0
] |
Linux Kernel | sound/soc/soc-core.c | static void append_dmi_string(struct snd_soc_card *card, const char *str) {
char *dst = card->dmi_longname;
size_t dst_len = sizeof(card->dmi_longname);
size_t len;
len = strlen(dst);
snprintf(dst + len, dst_len - len, "-%s", str);
len++;
if (len < dst_len)
cleanup_dmi_name(dst + len);
} | [
1,
0
] |
Linux Kernel | sound/soc/soc-core.c | static void soc_cleanup_card_resources(struct snd_soc_card *card) {
struct snd_soc_pcm_runtime *rtd, *n;
if (card->snd_card)
snd_card_disconnect_sync(card->snd_card);
snd_soc_dapm_shutdown(card);
for_each_card_rtds(card, rtd) snd_soc_link_exit(rtd);
/* remove and free each DAI */
soc_remove_link_dais... | [
0,
0
] |
Linux Kernel | sound/soc/soc-core.c |
static void snd_soc_unbind_card(struct snd_soc_card *card, bool unregister) {
if (card->instantiated) {
card->instantiated = false;
snd_soc_flush_all_delayed_work(card);
soc_cleanup_card_resources(card);
if (!unregister)
list_add(&card->list, &unbind_card_list);
} else {
if (unregister)
... | [
0,
0
] |
Linux Kernel | sound/soc/soc-core.c | int snd_soc_add_component_controls(struct snd_soc_component *component,
const struct snd_kcontrol_new *controls,
unsigned int num_controls) {
struct snd_card *card = component->card->snd_card;
return snd_soc_add_controls(card, component->dev, co... | [
1,
0
] |
Linux Kernel | sound/soc/soc-core.c | int snd_soc_add_card_controls(struct snd_soc_card *soc_card,
const struct snd_kcontrol_new *controls,
int num_controls) {
struct snd_card *card = soc_card->snd_card;
return snd_soc_add_controls(card, soc_card->dev, controls, num_controls, NULL,
... | [
0,
0
] |
Linux Kernel | sound/soc/soc-core.c | static char *fmt_single_name(struct device *dev, int *id) {
const char *devname = dev_name(dev);
char *found, *name;
unsigned int id1, id2;
if (devname == NULL)
return NULL;
name = devm_kstrdup(dev, devname, GFP_KERNEL);
if (!name)
return NULL;
found = strstr(name, dev->driver->name);
if (fou... | [
1,
0
] |
Linux Kernel | sound/soc/soc-core.c |
void snd_soc_unregister_dai(struct snd_soc_dai *dai) {
dev_dbg(dai->dev, "ASoC: Unregistered DAI '%s'\n", dai->name);
list_del(&dai->list);
} | [
0,
0
] |
Linux Kernel | sound/soc/soc-core.c | static void snd_soc_unregister_dais(struct snd_soc_component *component) {
struct snd_soc_dai *dai, *_dai;
for_each_component_dais_safe(component, dai, _dai)
snd_soc_unregister_dai(dai);
} | [
0,
0
] |
Linux Kernel | sound/soc/soc-core.c | static void convert_endianness_formats(struct snd_soc_pcm_stream *stream) {
int i;
for (i = 0; i < ARRAY_SIZE(endianness_format_map); i++)
if (stream->formats & endianness_format_map[i])
stream->formats |= endianness_format_map[i];
} | [
0,
0
] |
Linux Kernel | sound/soc/soc-core.c |
int snd_soc_component_initialize(struct snd_soc_component *component,
const struct snd_soc_component_driver *driver,
struct device *dev) {
INIT_LIST_HEAD(&component->dai_list);
INIT_LIST_HEAD(&component->dobj_list);
INIT_LIST_HEAD(&component->card... | [
0,
0
] |
Linux Kernel | sound/soc/soc-core.c | int snd_soc_add_component(struct snd_soc_component *component,
struct snd_soc_dai_driver *dai_drv, int num_dai) {
int ret;
int i;
mutex_lock(&client_mutex);
if (component->driver->endianness) {
for (i = 0; i < num_dai; i++) {
convert_endianness_formats(&dai_drv[i].playback)... | [
1,
0
] |
Linux Kernel | sound/soc/soc-core.c |
int snd_soc_register_component(
struct device *dev, const struct snd_soc_component_driver *component_driver,
struct snd_soc_dai_driver *dai_drv, int num_dai) {
struct snd_soc_component *component;
int ret;
component = devm_kzalloc(dev, sizeof(*component), GFP_KERNEL);
if (!component)
return -ENOME... | [
1,
0
] |
Linux Kernel | sound/soc/soc-core.c | int snd_soc_of_parse_card_name(struct snd_soc_card *card,
const char *propname) {
struct device_node *np;
int ret;
if (!card->dev) {
pr_err("card->dev is not set before calling %s\n", __func__);
return -EINVAL;
}
np = card->dev->of_node;
ret = of_property_read_strin... | [
1,
0
] |
Linux Kernel | sound/soc/soc-core.c | void snd_soc_of_parse_node_prefix(struct device_node *np,
struct snd_soc_codec_conf *codec_conf,
struct device_node *of_node,
const char *propname) {
const char *str;
int ret;
ret = of_property_read_string(np, p... | [
0,
0
] |
Linux Kernel | sound/soc/soc-core.c |
int snd_soc_of_parse_audio_routing(struct snd_soc_card *card,
const char *propname) {
struct device_node *np = card->dev->of_node;
int num_routes;
struct snd_soc_dapm_route *routes;
int i;
num_routes = of_property_count_strings(np, propname);
if (num_routes < 0 || num_ro... | [
1,
0
] |
Linux Kernel | sound/soc/soc-core.c |
int snd_soc_of_parse_aux_devs(struct snd_soc_card *card, const char *propname) {
struct device_node *node = card->dev->of_node;
struct snd_soc_aux_dev *aux;
int num, i;
num = of_count_phandle_with_args(node, propname, NULL);
if (num == -ENOENT) {
return 0;
} else if (num < 0) {
dev_err(card->dev, ... | [
1,
0
] |
Linux Kernel | sound/soc/soc-core.c | unsigned int snd_soc_daifmt_parse_clock_provider_raw(
struct device_node *np, const char *prefix,
struct device_node **bitclkmaster, struct device_node **framemaster) {
char prop[128];
unsigned int bit, frame;
if (!prefix)
prefix = "";
snprintf(prop, sizeof(prop), "%sbitclock-master", prefix);
b... | [
1,
0
] |
Linux Kernel | sound/soc/soc-core.c | int snd_soc_get_dai_id(struct device_node *ep) {
struct snd_soc_component *component;
struct snd_soc_dai_link_component dlc;
int ret;
dlc.of_node = of_graph_get_port_parent(ep);
dlc.name = NULL;
ret = -ENOTSUPP;
mutex_lock(&client_mutex);
component = soc_find_component(&dlc);
if (component)
ret ... | [
0,
0
] |
Linux Kernel | sound/soc/soc-core.c | int snd_soc_get_dai_name(const struct of_phandle_args *args,
const char **dai_name) {
struct snd_soc_component *pos;
int ret = -EPROBE_DEFER;
mutex_lock(&client_mutex);
for_each_component(pos) {
struct device_node *component_of_node = soc_component_to_node(pos);
if (component_... | [
1,
0
] |
Linux Kernel | sound/soc/soc-core.c |
static void
__snd_soc_of_put_component(struct snd_soc_dai_link_component *component) {
if (component->of_node) {
of_node_put(component->of_node);
component->of_node = NULL;
}
} | [
0,
0
] |
Linux Kernel | sound/soc/soc-core.c |
static void __exit snd_soc_exit(void) {
snd_soc_util_exit();
snd_soc_debugfs_exit();
platform_driver_unregister(&soc_driver);
} | [
0,
0
] |
Linux Kernel | sound/soc/soc-dai.c | int snd_soc_dai_set_sysclk(struct snd_soc_dai *dai, int clk_id,
unsigned int freq, int dir) {
int ret;
if (dai->driver->ops && dai->driver->ops->set_sysclk)
ret = dai->driver->ops->set_sysclk(dai, clk_id, freq, dir);
else
ret = snd_soc_component_set_sysclk(dai->component, clk_i... | [
1,
0
] |
Linux Kernel | sound/soc/soc-dai.c | int snd_soc_dai_set_bclk_ratio(struct snd_soc_dai *dai, unsigned int ratio) {
int ret = -ENOTSUPP;
if (dai->driver->ops && dai->driver->ops->set_bclk_ratio)
ret = dai->driver->ops->set_bclk_ratio(dai, ratio);
return soc_dai_ret(dai, ret);
} | [
1,
0
] |
Linux Kernel | sound/soc/soc-dai.c | int snd_soc_dai_get_fmt_max_priority(struct snd_soc_pcm_runtime *rtd) {
struct snd_soc_dai *dai;
int i, max = 0;
for_each_rtd_dais(rtd, i, dai) {
if (dai->driver->ops && dai->driver->ops->num_auto_selectable_formats)
max = max(max, dai->driver->ops->num_auto_selectable_formats);
else
return 0... | [
1,
0
] |
Linux Kernel | sound/soc/soc-dai.c | int snd_soc_dai_set_tdm_slot(struct snd_soc_dai *dai, unsigned int tx_mask,
unsigned int rx_mask, int slots, int slot_width) {
int ret = -ENOTSUPP;
if (dai->driver->ops && dai->driver->ops->xlate_tdm_slot_mask)
dai->driver->ops->xlate_tdm_slot_mask(slots, &tx_mask, &rx_mask);
els... | [
1,
0
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.