Projectname large_stringclasses 15
values | Filepath large_stringlengths 4 106 ⌀ | Function large_stringlengths 11 3.45k | Label list |
|---|---|---|---|
Linux Kernel | sound/soc/mediatek/mt8195/mt8195-mt6359.c | static int mt8195_dptx_hw_params_fixup(struct snd_soc_pcm_runtime *rtd,
struct snd_pcm_hw_params *params) {
snd_mask_reset_range(hw_param_mask(params, SNDRV_PCM_HW_PARAM_FORMAT), 0,
(__force unsigned int)SNDRV_PCM_FORMAT_LAST);
params_set_format(params... | [
0,
0
] |
Linux Kernel | sound/soc/meson/aiu-acodec-ctrl.c | static int aiu_acodec_ctrl_input_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params,
struct snd_soc_dai *dai) {
struct meson_codec_glue_input *data;
int ret;
ret = meson_codec_glue_input_hw_params(s... | [
0,
0
] |
Linux Kernel | sound/soc/meson/aiu-acodec-ctrl.c | static int
aiu_acodec_ctrl_component_probe(struct snd_soc_component *component) {
snd_soc_component_update_bits(component, AIU_ACODEC_CTRL, CTRL_DIN_SKEW,
FIELD_PREP(CTRL_DIN_SKEW, 2));
return 0;
} | [
0,
0
] |
Linux Kernel | sound/soc/meson/aiu-codec-ctrl.c |
static int aiu_hdmi_of_xlate_dai_name(struct snd_soc_component *component,
const struct of_phandle_args *args,
const char **dai_name) {
return aiu_of_xlate_dai_name(component, args, dai_name, AIU_HDMI);
} | [
0,
0
] |
Linux Kernel | sound/soc/meson/aiu-encoder-i2s.c |
static void aiu_encoder_i2s_divider_enable(struct snd_soc_component *component,
bool enable) {
snd_soc_component_update_bits(component, AIU_CLK_CTRL,
AIU_CLK_CTRL_I2S_DIV_EN,
enable ? AIU_CLK_CTRL_I2S_DIV_EN : ... | [
0,
0
] |
Linux Kernel | sound/soc/meson/aiu-encoder-i2s.c | static int aiu_encoder_i2s_set_more_div(struct snd_soc_component *component,
struct snd_pcm_hw_params *params,
unsigned int bs) {
if (params_width(params) == 16 && params_channels(params) == 8) {
if (bs % 2) {
dev_err(component... | [
0,
0
] |
Linux Kernel | sound/soc/meson/aiu-encoder-i2s.c |
static int aiu_encoder_i2s_hw_free(struct snd_pcm_substream *substream,
struct snd_soc_dai *dai) {
struct snd_soc_component *component = dai->component;
aiu_encoder_i2s_divider_enable(component, false);
return 0;
} | [
0,
0
] |
Linux Kernel | sound/soc/meson/aiu-encoder-i2s.c | static int aiu_encoder_i2s_startup(struct snd_pcm_substream *substream,
struct snd_soc_dai *dai) {
struct aiu *aiu = snd_soc_component_get_drvdata(dai->component);
int ret;
ret = snd_pcm_hw_constraint_list(substream->runtime, 0,
SNDRV_PCM_HW_P... | [
0,
0
] |
Linux Kernel | sound/soc/meson/aiu-encoder-spdif.c |
static void aiu_encoder_spdif_hold(struct snd_soc_component *component,
bool enable) {
snd_soc_component_update_bits(component, AIU_958_CTRL, AIU_958_CTRL_HOLD_EN,
enable ? AIU_958_CTRL_HOLD_EN : 0);
} | [
0,
0
] |
Linux Kernel | sound/soc/meson/aiu-encoder-spdif.c |
static int aiu_encoder_spdif_hw_free(struct snd_pcm_substream *substream,
struct snd_soc_dai *dai) {
struct snd_soc_component *component = dai->component;
aiu_encoder_spdif_divider_enable(component, false);
return 0;
} | [
0,
0
] |
Linux Kernel | sound/soc/meson/aiu-fifo-i2s.c |
static int aiu_fifo_i2s_prepare(struct snd_pcm_substream *substream,
struct snd_soc_dai *dai) {
struct snd_soc_component *component = dai->component;
int ret;
ret = aiu_fifo_prepare(substream, dai);
if (ret)
return ret;
snd_soc_component_update_bits(component, AIU_MEM_I2... | [
0,
0
] |
Linux Kernel | sound/soc/meson/aiu-fifo.c |
snd_pcm_uframes_t aiu_fifo_pointer(struct snd_soc_component *component,
struct snd_pcm_substream *substream) {
struct snd_soc_dai *dai = aiu_fifo_dai(substream);
struct aiu_fifo *fifo = dai->playback_dma_data;
struct snd_pcm_runtime *runtime = substream->runtime;
unsigned int... | [
0,
0
] |
Linux Kernel | sound/soc/meson/aiu-fifo.c | int aiu_fifo_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params,
struct snd_soc_dai *dai) {
struct snd_pcm_runtime *runtime = substream->runtime;
struct snd_soc_component *component = dai->component;
struct aiu_fifo *fifo = dai->playback_d... | [
0,
0
] |
Linux Kernel | sound/soc/meson/aiu-fifo.c |
static irqreturn_t aiu_fifo_isr(int irq, void *dev_id) {
struct snd_pcm_substream *playback = dev_id;
snd_pcm_period_elapsed(playback);
return IRQ_HANDLED;
} | [
0,
0
] |
Linux Kernel | sound/soc/meson/aiu-fifo.c |
int aiu_fifo_dai_remove(struct snd_soc_dai *dai) {
kfree(dai->playback_dma_data);
return 0;
} | [
0,
0
] |
Linux Kernel | sound/soc/meson/aiu.c |
int aiu_of_xlate_dai_name(struct snd_soc_component *component,
const struct of_phandle_args *args,
const char **dai_name, unsigned int component_id) {
struct snd_soc_dai *dai;
int id;
if (args->args_count != 2)
return -EINVAL;
if (args->args[0] != compo... | [
1,
0
] |
Linux Kernel | sound/soc/meson/aiu.c |
static int aiu_cpu_of_xlate_dai_name(struct snd_soc_component *component,
const struct of_phandle_args *args,
const char **dai_name) {
return aiu_of_xlate_dai_name(component, args, dai_name, AIU_CPU);
} | [
0,
0
] |
Linux Kernel | sound/soc/meson/aiu.c | static int aiu_cpu_component_probe(struct snd_soc_component *component) {
struct aiu *aiu = snd_soc_component_get_drvdata(component);
return clk_prepare_enable(aiu->i2s.clks[PCLK].clk);
} | [
0,
0
] |
Linux Kernel | sound/soc/meson/aiu.c |
static int aiu_clk_bulk_get(struct device *dev, const char *const *ids,
unsigned int num, struct aiu_interface *interface) {
struct clk_bulk_data *clks;
int i, ret;
clks = devm_kcalloc(dev, num, sizeof(*clks), GFP_KERNEL);
if (!clks)
return -ENOMEM;
for (i = 0; i < num; i++)... | [
1,
0
] |
Linux Kernel | sound/soc/meson/axg-card.c | static int axg_card_tdm_dai_lb_init(struct snd_soc_pcm_runtime *rtd) {
struct meson_card *priv = snd_soc_card_get_drvdata(rtd->card);
struct axg_dai_link_tdm_data *be =
(struct axg_dai_link_tdm_data *)priv->link_data[rtd->num];
int ret;
ret = axg_tdm_set_tdm_slots(asoc_rtd_to_cpu(rtd, 0), NULL, be->tx_ma... | [
0,
0
] |
Linux Kernel | sound/soc/meson/axg-card.c | static int axg_card_add_tdm_loopback(struct snd_soc_card *card, int *index) {
struct meson_card *priv = snd_soc_card_get_drvdata(card);
struct snd_soc_dai_link *pad = &card->dai_link[*index];
struct snd_soc_dai_link *lb;
struct snd_soc_dai_link_component *dlc;
int ret;
ret = meson_card_reallocate_links(car... | [
1,
0
] |
Linux Kernel | sound/soc/meson/axg-card.c |
static int axg_card_cpu_is_tdm_iface(struct device_node *np) {
return of_device_is_compatible(np, DT_PREFIX "axg-tdm-iface");
} | [
0,
0
] |
Linux Kernel | sound/soc/meson/axg-fifo.c |
static struct axg_fifo *axg_fifo_data(struct snd_pcm_substream *ss) {
struct snd_soc_dai *dai = axg_fifo_dai(ss);
return snd_soc_dai_get_drvdata(dai);
} | [
0,
0
] |
Linux Kernel | sound/soc/meson/axg-fifo.c |
static struct device *axg_fifo_dev(struct snd_pcm_substream *ss) {
struct snd_soc_dai *dai = axg_fifo_dai(ss);
return dai->dev;
} | [
0,
0
] |
Linux Kernel | sound/soc/meson/axg-fifo.c |
int axg_fifo_pcm_trigger(struct snd_soc_component *component,
struct snd_pcm_substream *ss, int cmd) {
struct axg_fifo *fifo = axg_fifo_data(ss);
switch (cmd) {
case SNDRV_PCM_TRIGGER_START:
case SNDRV_PCM_TRIGGER_RESUME:
case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
__dma_enable(fifo, ... | [
0,
0
] |
Linux Kernel | sound/soc/meson/axg-fifo.c | int axg_fifo_pcm_hw_params(struct snd_soc_component *component,
struct snd_pcm_substream *ss,
struct snd_pcm_hw_params *params) {
struct snd_pcm_runtime *runtime = ss->runtime;
struct axg_fifo *fifo = axg_fifo_data(ss);
unsigned int burst_num, period, threshol... | [
0,
0
] |
Linux Kernel | sound/soc/meson/axg-fifo.c | int axg_fifo_pcm_close(struct snd_soc_component *component,
struct snd_pcm_substream *ss) {
struct axg_fifo *fifo = axg_fifo_data(ss);
int ret;
ret = reset_control_assert(fifo->arb);
/* Disable fifo ip and register access */
clk_disable_unprepare(fifo->pclk);
/* remove IRQ */
fre... | [
0,
0
] |
Linux Kernel | sound/soc/meson/axg-frddr.c | static int g12a_frddr_dai_prepare(struct snd_pcm_substream *substream,
struct snd_soc_dai *dai) {
struct axg_fifo *fifo = snd_soc_dai_get_drvdata(dai);
regmap_update_bits(fifo->map, FIFO_CTRL1, CTRL1_FRDDR_FORCE_FINISH, 0);
regmap_update_bits(fifo->map, FIFO_CTRL1, CTRL1_FRDDR_F... | [
0,
0
] |
Linux Kernel | sound/soc/meson/axg-frddr.c | static int axg_frddr_dai_startup(struct snd_pcm_substream *substream,
struct snd_soc_dai *dai) {
struct axg_fifo *fifo = snd_soc_dai_get_drvdata(dai);
int ret;
ret = clk_prepare_enable(fifo->pclk);
if (ret)
return ret;
/* Apply single buffer mode to the interface */
re... | [
0,
0
] |
Linux Kernel | sound/soc/meson/axg-pdm.c | static unsigned int axg_pdm_get_os(struct axg_pdm *priv) {
const struct axg_pdm_filters *filters = priv->cfg->filters;
unsigned int os = filters->hcic.ds;
int i;
for (i = 0; i < PDM_LPF_NUM; i++)
os *= filters->lpf[i].ds;
return os;
} | [
1,
0
] |
Linux Kernel | sound/soc/meson/axg-pdm.c | static int axg_pdm_set_sample_pointer(struct axg_pdm *priv) {
unsigned int spmax, sp, val;
int i;
spmax = DIV_ROUND_UP_ULL((u64)clk_get_rate(priv->sysclk),
clk_get_rate(priv->dclk) * 2);
/* Check if sysclk is not too fast - should not happen */
if (WARN_ON(spmax > PDM_CHAN_CTRL_PO... | [
0,
0
] |
Linux Kernel | sound/soc/meson/axg-pdm.c | static int axg_pdm_set_lpf_filters(struct axg_pdm *priv) {
const struct axg_pdm_lpf *lpf = priv->cfg->filters->lpf;
unsigned int count = 0;
int i, j;
for (i = 0; i < PDM_LPF_NUM; i++)
count += lpf[i].tap_num;
if (count >= PDM_LPF_MAX_STAGE)
return -EINVAL;
/* Set the initial APB bus register addr... | [
1,
0
] |
Linux Kernel | sound/soc/meson/axg-spdifin.c | static int axg_spdifin_prepare(struct snd_pcm_substream *substream,
struct snd_soc_dai *dai) {
struct axg_spdifin *priv = snd_soc_dai_get_drvdata(dai);
regmap_update_bits(priv->map, SPDIFIN_CTRL0,
SPDIFIN_CTRL0_RST_OUT | SPDIFIN_CTRL0_RST_IN, 0);
/* Clear out ... | [
0,
0
] |
Linux Kernel | sound/soc/meson/axg-spdifin.c |
static void axg_spdifin_write_mode_param(struct regmap *map, int mode,
unsigned int val,
unsigned int num_per_reg,
unsigned int base_reg,
unsigned int widt... | [
0,
0
] |
Linux Kernel | sound/soc/meson/axg-spdifin.c | static int axg_spdifin_sample_mode_config(struct snd_soc_dai *dai,
struct axg_spdifin *priv) {
unsigned int rate, t_next;
int ret, i = SPDIFIN_MODE_NUM - 1;
ret = clk_set_rate(priv->refclk, priv->conf->ref_rate);
if (ret) {
dev_err(dai->dev, "reference clock rate s... | [
0,
0
] |
Linux Kernel | sound/soc/meson/axg-spdifin.c |
static int axg_spdifin_dai_probe(struct snd_soc_dai *dai) {
struct axg_spdifin *priv = snd_soc_dai_get_drvdata(dai);
int ret;
ret = clk_prepare_enable(priv->pclk);
if (ret) {
dev_err(dai->dev, "failed to enable pclk\n");
return ret;
}
ret = axg_spdifin_sample_mode_config(dai, priv);
if (ret) {
... | [
0,
0
] |
Linux Kernel | sound/soc/meson/axg-spdifin.c |
static int axg_spdifin_get_status(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol) {
struct snd_soc_component *c = snd_kcontrol_chip(kcontrol);
struct axg_spdifin *priv = snd_soc_component_get_drvdata(c);
int i, j;
for (i = 0; i < 6; i++) {
unsigned int... | [
1,
0
] |
Linux Kernel | sound/soc/meson/axg-spdifin.c |
static int axg_spdifin_probe(struct platform_device *pdev) {
struct device *dev = &pdev->dev;
struct axg_spdifin *priv;
struct snd_soc_dai_driver *dai_drv;
void __iomem *regs;
priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
if (!priv)
return -ENOMEM;
platform_set_drvdata(pdev, priv);
priv->c... | [
1,
0
] |
Linux Kernel | sound/soc/meson/axg-spdifout.c | static int axg_spdifout_mute(struct snd_soc_dai *dai, int mute, int direction) {
struct axg_spdifout *priv = snd_soc_dai_get_drvdata(dai);
regmap_update_bits(priv->map, SPDIFOUT_CTRL0, SPDIFOUT_CTRL0_VSET,
mute ? SPDIFOUT_CTRL0_VSET : 0);
return 0;
} | [
0,
0
] |
Linux Kernel | sound/soc/meson/axg-spdifout.c |
static void axg_spdifout_shutdown(struct snd_pcm_substream *substream,
struct snd_soc_dai *dai) {
struct axg_spdifout *priv = snd_soc_dai_get_drvdata(dai);
clk_disable_unprepare(priv->pclk);
} | [
0,
0
] |
Linux Kernel | sound/soc/meson/axg-spdifout.c |
static int axg_spdifout_probe(struct platform_device *pdev) {
struct device *dev = &pdev->dev;
struct axg_spdifout *priv;
void __iomem *regs;
priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
if (!priv)
return -ENOMEM;
platform_set_drvdata(pdev, priv);
regs = devm_platform_ioremap_resource(pdev,... | [
1,
0
] |
Linux Kernel | sound/soc/meson/axg-tdm-formatter.c |
static void axg_tdm_formatter_power_down(struct axg_tdm_formatter *formatter) {
axg_tdm_formatter_dettach(formatter);
clk_disable_unprepare(formatter->pclk);
formatter->stream = NULL;
} | [
0,
0
] |
Linux Kernel | sound/soc/meson/axg-tdm-formatter.c | int axg_tdm_stream_start(struct axg_tdm_stream *ts) {
struct axg_tdm_formatter *formatter;
int ret = 0;
mutex_lock(&ts->lock);
ts->ready = true;
list_for_each_entry(formatter, &ts->formatter_list, list) {
ret = axg_tdm_formatter_enable(formatter);
if (ret) {
pr_err("failed to start tdm stream\... | [
0,
0
] |
Linux Kernel | sound/soc/meson/axg-tdm-interface.c | static unsigned int axg_tdm_slots_total(u32 *mask) {
unsigned int slots = 0;
int i;
if (!mask)
return 0;
for (i = 0; i < AXG_TDM_NUM_LANES; i++)
slots += hweight32(mask[i]);
return slots;
} | [
1,
0
] |
Linux Kernel | sound/soc/meson/axg-tdm-interface.c | int axg_tdm_set_tdm_slots(struct snd_soc_dai *dai, u32 *tx_mask, u32 *rx_mask,
unsigned int slots, unsigned int slot_width) {
struct axg_tdm_iface *iface = snd_soc_dai_get_drvdata(dai);
struct axg_tdm_stream *tx = (struct axg_tdm_stream *)dai->playback_dma_data;
struct axg_tdm_stream *rx... | [
1,
0
] |
Linux Kernel | sound/soc/meson/axg-tdm-interface.c |
static int axg_tdm_iface_set_fmt(struct snd_soc_dai *dai, unsigned int fmt) {
struct axg_tdm_iface *iface = snd_soc_dai_get_drvdata(dai);
switch (fmt & SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK) {
case SND_SOC_DAIFMT_BP_FP:
if (!iface->mclk) {
dev_err(dai->dev, "cpu clock master: mclk missing\n");
retu... | [
0,
0
] |
Linux Kernel | sound/soc/meson/axg-tdm-interface.c | static int axg_tdm_iface_hw_free(struct snd_pcm_substream *substream,
struct snd_soc_dai *dai) {
struct axg_tdm_stream *ts = snd_soc_dai_get_dma_data(dai, substream);
axg_tdm_stream_stop(ts);
return 0;
} | [
0,
0
] |
Linux Kernel | sound/soc/meson/axg-tdm-interface.c | static int axg_tdm_iface_prepare(struct snd_pcm_substream *substream,
struct snd_soc_dai *dai) {
struct axg_tdm_stream *ts = snd_soc_dai_get_dma_data(dai, substream);
return axg_tdm_stream_reset(ts);
} | [
0,
0
] |
Linux Kernel | sound/soc/meson/axg-tdm-interface.c | static int axg_tdm_iface_probe(struct platform_device *pdev) {
struct device *dev = &pdev->dev;
struct snd_soc_dai_driver *dai_drv;
struct axg_tdm_iface *iface;
int ret, i;
iface = devm_kzalloc(dev, sizeof(*iface), GFP_KERNEL);
if (!iface)
return -ENOMEM;
platform_set_drvdata(pdev, iface);
dai_drv... | [
1,
0
] |
Linux Kernel | sound/soc/meson/axg-tdm.h |
static inline bool axg_tdm_sclk_invert(unsigned int fmt) {
return fmt & (SND_SOC_DAIFMT_IB_IF | SND_SOC_DAIFMT_IB_NF);
} | [
0,
0
] |
Linux Kernel | sound/soc/meson/axg-tdmin.c | static void axg_tdmin_enable(struct regmap *map) {
regmap_update_bits(map, TDMIN_CTRL, TDMIN_CTRL_RST_OUT | TDMIN_CTRL_RST_IN,
0);
/* Clear out reset before in reset */
regmap_update_bits(map, TDMIN_CTRL, TDMIN_CTRL_RST_OUT, TDMIN_CTRL_RST_OUT);
regmap_update_bits(map, TDMIN_CTRL, TDMIN_C... | [
0,
0
] |
Linux Kernel | sound/soc/meson/axg-tdmin.c | static int axg_tdmin_prepare(struct regmap *map,
const struct axg_tdm_formatter_hw *quirks,
struct axg_tdm_stream *ts) {
unsigned int val, skew = quirks->skew_offset;
switch (ts->iface->fmt & SND_SOC_DAIFMT_FORMAT_MASK) {
case SND_SOC_DAIFMT_I2S:
case S... | [
1,
0
] |
Linux Kernel | sound/soc/meson/axg-tdmout.c |
static struct snd_soc_dai *axg_tdmout_get_be(struct snd_soc_dapm_widget *w) {
struct snd_soc_dapm_path *p;
struct snd_soc_dai *be;
snd_soc_dapm_widget_for_each_sink_path(w, p) {
if (!p->connect)
continue;
if (p->sink->id == snd_soc_dapm_dai_in)
return (struct snd_soc_dai *)p->sink->priv;
... | [
1,
0
] |
Linux Kernel | sound/soc/meson/axg-tdmout.c |
static struct axg_tdm_stream *
axg_tdmout_get_tdm_stream(struct snd_soc_dapm_widget *w) {
struct snd_soc_dai *be = axg_tdmout_get_be(w);
if (!be)
return NULL;
return be->playback_dma_data;
} | [
0,
0
] |
Linux Kernel | sound/soc/meson/axg-tdmout.c | static void axg_tdmout_enable(struct regmap *map) {
regmap_update_bits(map, TDMOUT_CTRL0,
TDMOUT_CTRL0_RST_OUT | TDMOUT_CTRL0_RST_IN, 0);
/* Clear out reset before in reset */
regmap_update_bits(map, TDMOUT_CTRL0, TDMOUT_CTRL0_RST_OUT,
TDMOUT_CTRL0_RST_OUT);
regmap_up... | [
0,
0
] |
Linux Kernel | sound/soc/meson/g12a-toacodec.c | static int g12a_toacodec_mux_put_enum(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol) {
struct snd_soc_component *component =
snd_soc_dapm_kcontrol_component(kcontrol);
struct g12a_toacodec *priv = snd_soc_component_get_drvdata(component);
struct snd... | [
0,
1
] |
Linux Kernel | sound/soc/meson/g12a-toacodec.c | static int sm1_toacodec_component_probe(struct snd_soc_component *c) {
return snd_soc_component_write(c, TOACODEC_CTRL0, CTRL0_BLK_CAP_INV_SM1);
} | [
0,
0
] |
Linux Kernel | sound/soc/meson/g12a-tohdmitx.c | static int g12a_tohdmitx_i2s_mux_put_enum(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol) {
struct snd_soc_component *component =
snd_soc_dapm_kcontrol_component(kcontrol);
struct snd_soc_dapm_context *dapm = snd_soc_dapm_kcontrol_dapm(kcontrol);
... | [
0,
0
] |
Linux Kernel | sound/soc/meson/g12a-tohdmitx.c | static int g12a_tohdmi_component_probe(struct snd_soc_component *c) {
return snd_soc_component_write(
c, TOHDMITX_CTRL0, CTRL0_I2S_BLK_CAP_INV | CTRL0_SPDIF_CLK_CAP_INV);
} | [
0,
0
] |
Linux Kernel | sound/soc/meson/gx-card.c |
static int gx_card_i2s_be_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params) {
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
struct meson_card *priv = snd_soc_card_get_drvdata(rtd->card);
struct gx_dai_link_i2s_data *be =
... | [
0,
0
] |
Linux Kernel | sound/soc/meson/gx-card.c | static int gx_card_add_link(struct snd_soc_card *card, struct device_node *np,
int *index) {
struct snd_soc_dai_link *dai_link = &card->dai_link[*index];
struct snd_soc_dai_link_component *cpu;
int ret;
cpu = devm_kzalloc(card->dev, sizeof(*cpu), GFP_KERNEL);
if (!cpu)
return ... | [
1,
0
] |
Linux Kernel | sound/soc/meson/meson-card-utils.c |
int meson_card_i2s_set_sysclk(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params,
unsigned int mclk_fs) {
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
struct snd_soc_dai *codec_dai;
unsigned int mclk;
int ret,... | [
1,
0
] |
Linux Kernel | sound/soc/meson/meson-card-utils.c |
int meson_card_reallocate_links(struct snd_soc_card *card,
unsigned int num_links) {
struct meson_card *priv = snd_soc_card_get_drvdata(card);
struct snd_soc_dai_link *links;
void **ldata;
links =
krealloc(priv->card.dai_link, num_links * sizeof(*priv->card.dai_link),
... | [
1,
0
] |
Linux Kernel | sound/soc/meson/meson-card-utils.c | unsigned int meson_card_parse_daifmt(struct device_node *node,
struct device_node *cpu_node) {
struct device_node *bitclkmaster = NULL;
struct device_node *framemaster = NULL;
unsigned int daifmt;
daifmt = snd_soc_daifmt_parse_format(node, NULL);
snd_soc_daifmt_parse_clo... | [
1,
0
] |
Linux Kernel | sound/soc/meson/meson-card-utils.c |
static void meson_card_clean_references(struct meson_card *priv) {
struct snd_soc_card *card = &priv->card;
struct snd_soc_dai_link *link;
struct snd_soc_dai_link_component *codec;
struct snd_soc_aux_dev *aux;
int i, j;
if (card->dai_link) {
for_each_card_prelinks(card, i, link) {
if (link->cpus... | [
0,
0
] |
Linux Kernel | sound/soc/meson/meson-codec-glue.c |
static void
meson_codec_glue_input_set_data(struct snd_soc_dai *dai,
struct meson_codec_glue_input *data) {
dai->playback_dma_data = data;
} | [
0,
0
] |
Linux Kernel | sound/soc/meson/meson-codec-glue.c |
int meson_codec_glue_input_dai_remove(struct snd_soc_dai *dai) {
struct meson_codec_glue_input *data = meson_codec_glue_input_get_data(dai);
kfree(data);
return 0;
} | [
0,
0
] |
Linux Kernel | sound/soc/meson/t9015.c | static int t9015_probe(struct platform_device *pdev) {
struct device *dev = &pdev->dev;
struct t9015 *priv;
void __iomem *regs;
struct regmap *regmap;
int ret;
priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
if (!priv)
return -ENOMEM;
platform_set_drvdata(pdev, priv);
priv->pclk = devm_clk_... | [
1,
0
] |
Linux Kernel | sound/soc/mxs/mxs-pcm.c |
int mxs_pcm_platform_register(struct device *dev) {
return devm_snd_dmaengine_pcm_register(dev, &mxs_dmaengine_pcm_config,
SND_DMAENGINE_PCM_FLAG_HALF_DUPLEX);
} | [
0,
0
] |
Linux Kernel | sound/soc/mxs/mxs-saif.c | int mxs_saif_get_mclk(unsigned int saif_id, unsigned int mclk,
unsigned int rate) {
struct mxs_saif *saif = mxs_saif[saif_id];
u32 stat;
int ret;
struct mxs_saif *master_saif;
if (!saif)
return -EINVAL;
__raw_writel(BM_SAIF_CTRL_SFTRST, saif->base + SAIF_CTRL + MXS_CLR_ADDR);
... | [
0,
1
] |
Linux Kernel | sound/soc/mxs/mxs-saif.c | static int mxs_saif_prepare(struct snd_pcm_substream *substream,
struct snd_soc_dai *cpu_dai) {
struct mxs_saif *saif = snd_soc_dai_get_drvdata(cpu_dai);
__raw_writel(BM_SAIF_CTRL_FIFO_ERROR_IRQ_EN,
saif->base + SAIF_CTRL + MXS_SET_ADDR);
return 0;
} | [
0,
0
] |
Linux Kernel | sound/soc/mxs/mxs-saif.c |
static int mxs_saif_mclk_init(struct platform_device *pdev) {
struct mxs_saif *saif = platform_get_drvdata(pdev);
struct device_node *np = pdev->dev.of_node;
struct clk *clk;
int ret;
clk = clk_register_divider(
&pdev->dev, "mxs_saif_mclk", __clk_get_name(saif->clk), 0,
saif->base + SAIF_CTRL, B... | [
0,
0
] |
Linux Kernel | sound/soc/pxa/corgi.c | static int corgi_hw_params(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 *codec_dai = asoc_rtd_to_codec(rtd, 0);
struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0);
uns... | [
1,
0
] |
Linux Kernel | sound/soc/pxa/corgi.c |
static int corgi_mic_event(struct snd_soc_dapm_widget *w,
struct snd_kcontrol *k, int event) {
gpiod_set_value(gpiod_mic_bias, SND_SOC_DAPM_EVENT_ON(event));
return 0;
} | [
0,
0
] |
Linux Kernel | sound/soc/pxa/corgi.c |
static int corgi_probe(struct platform_device *pdev) {
struct snd_soc_card *card = &corgi;
int ret;
card->dev = &pdev->dev;
gpiod_mute_l = devm_gpiod_get(&pdev->dev, "mute-l", GPIOD_OUT_HIGH);
if (IS_ERR(gpiod_mute_l))
return PTR_ERR(gpiod_mute_l);
gpiod_mute_r = devm_gpiod_get(&pdev->dev, "mute-r", ... | [
0,
0
] |
Linux Kernel | sound/soc/pxa/e740_wm9705.c |
static int e740_mic_amp_event(struct snd_soc_dapm_widget *w,
struct snd_kcontrol *kcontrol, int event) {
if (event & SND_SOC_DAPM_PRE_PMU)
e740_audio_power |= E740_AUDIO_IN;
else if (event & SND_SOC_DAPM_POST_PMD)
e740_audio_power &= ~E740_AUDIO_IN;
e740_sync_audio_power(e7... | [
0,
0
] |
Linux Kernel | sound/soc/pxa/e740_wm9705.c |
static int e740_probe(struct platform_device *pdev) {
struct snd_soc_card *card = &e740;
int ret;
gpiod_input_amp = devm_gpiod_get(&pdev->dev, "Mic amp", GPIOD_OUT_LOW);
ret = PTR_ERR_OR_ZERO(gpiod_input_amp);
if (ret)
return ret;
gpiod_output_amp = devm_gpiod_get(&pdev->dev, "Output amp", GPIOD_OUT_L... | [
0,
0
] |
Linux Kernel | sound/soc/pxa/hx4700.c | static int hx4700_ak4641_init(struct snd_soc_pcm_runtime *rtd) {
int err;
err = snd_soc_card_jack_new_pins(rtd->card, "Headphone Jack",
SND_JACK_HEADPHONE, &hs_jack, hs_jack_pin,
ARRAY_SIZE(hs_jack_pin));
if (err)
return err;
err = snd_... | [
0,
0
] |
Linux Kernel | sound/soc/pxa/magician.c |
static int magician_get_hp(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol) {
ucontrol->value.integer.value[0] = magician_hp_switch;
return 0;
} | [
0,
0
] |
Linux Kernel | sound/soc/pxa/magician.c |
static int magician_set_hp(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol) {
struct snd_soc_card *card = snd_kcontrol_chip(kcontrol);
if (magician_hp_switch == ucontrol->value.integer.value[0])
return 0;
magician_hp_switch = ucontrol->value.integer.value[0];
... | [
0,
0
] |
Linux Kernel | sound/soc/pxa/magician.c |
static int magician_set_input(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol) {
if (magician_in_sel == ucontrol->value.enumerated.item[0])
return 0;
magician_in_sel = ucontrol->value.enumerated.item[0];
switch (magician_in_sel) {
case MAGICIAN_MIC:
gp... | [
1,
0
] |
Linux Kernel | sound/soc/pxa/mmp-pcm.c |
static int mmp_pcm_trigger(struct snd_soc_component *component,
struct snd_pcm_substream *substream, int cmd) {
return snd_dmaengine_pcm_trigger(substream, cmd);
} | [
0,
0
] |
Linux Kernel | sound/soc/pxa/mmp-pcm.c |
static int mmp_pcm_open(struct snd_soc_component *component,
struct snd_pcm_substream *substream) {
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
struct platform_device *pdev = to_platform_device(component->dev);
struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0);... | [
0,
0
] |
Linux Kernel | sound/soc/pxa/mmp-pcm.c |
static int mmp_pcm_new(struct snd_soc_component *component,
struct snd_soc_pcm_runtime *rtd) {
struct snd_pcm_substream *substream;
struct snd_pcm *pcm = rtd->pcm;
int ret, stream;
for (stream = 0; stream < 2; stream++) {
substream = pcm->streams[stream].substream;
ret = mmp_pc... | [
0,
0
] |
Linux Kernel | sound/soc/pxa/mmp-sspa.c |
static void mmp_sspa_rx_enable(struct sspa_priv *sspa) {
unsigned int sspa_sp = sspa->sp;
sspa_sp |= SSPA_SP_S_EN;
sspa_sp |= SSPA_SP_WEN;
__raw_writel(sspa_sp, sspa->rx_base + SSPA_SP);
} | [
1,
0
] |
Linux Kernel | sound/soc/pxa/mmp-sspa.c |
static void mmp_sspa_rx_disable(struct sspa_priv *sspa) {
unsigned int sspa_sp = sspa->sp;
sspa_sp &= ~SSPA_SP_S_EN;
sspa_sp |= SSPA_SP_WEN;
__raw_writel(sspa_sp, sspa->rx_base + SSPA_SP);
} | [
1,
0
] |
Linux Kernel | sound/soc/pxa/mmp-sspa.c |
static int mmp_sspa_probe(struct snd_soc_dai *dai) {
struct sspa_priv *sspa = dev_get_drvdata(dai->dev);
snd_soc_dai_init_dma_data(dai, &sspa->playback_dma_data,
&sspa->capture_dma_data);
return 0;
}
#define MMP_SSPA_RATES SNDRV_PCM_RATE_8000_192000
#define MMP_SSPA_FORMATS ... | [
0,
0
] |
Linux Kernel | sound/soc/pxa/mmp-sspa.c |
static int mmp_pcm_mmap(struct snd_soc_component *component,
struct snd_pcm_substream *substream,
struct vm_area_struct *vma) {
vma->vm_flags |= VM_DONTEXPAND | VM_DONTDUMP;
vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
return remap_pfn_range(vma, vma->v... | [
1,
0
] |
Linux Kernel | sound/soc/pxa/mmp-sspa.c | static int mmp_sspa_open(struct snd_soc_component *component,
struct snd_pcm_substream *substream) {
struct sspa_priv *sspa = snd_soc_component_get_drvdata(component);
pm_runtime_get_sync(component->dev);
if ((__raw_readl(sspa->tx_base + SSPA_SP) & SSPA_SP_S_EN) ||
(__raw_readl(ss... | [
1,
1
] |
Linux Kernel | sound/soc/pxa/palm27x.c | static int palm27x_ac97_init(struct snd_soc_pcm_runtime *rtd) {
int err;
err = snd_soc_card_jack_new_pins(rtd->card, "Headphone Jack",
SND_JACK_HEADPHONE, &hs_jack, hs_jack_pins,
ARRAY_SIZE(hs_jack_pins));
if (err)
return err;
err = snd... | [
0,
0
] |
Linux Kernel | sound/soc/pxa/palm27x.c |
static int palm27x_asoc_probe(struct platform_device *pdev) {
int ret;
if (!(machine_is_palmtx() || machine_is_palmt5() || machine_is_palmld() ||
machine_is_palmte2()))
return -ENODEV;
if (!pdev->dev.platform_data) {
dev_err(&pdev->dev, "please supply platform_data\n");
return -ENODEV;
}
... | [
0,
0
] |
Linux Kernel | sound/soc/pxa/poodle.c | static int poodle_startup(struct snd_pcm_substream *substream) {
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
poodle_ext_control(&rtd->card->dapm);
return 0;
} | [
0,
0
] |
Linux Kernel | sound/soc/pxa/poodle.c | static void poodle_shutdown(struct snd_pcm_substream *substream) {
locomo_gpio_write(poodle_pdata->locomo_dev, poodle_pdata->gpio_mute_l, 1);
locomo_gpio_write(poodle_pdata->locomo_dev, poodle_pdata->gpio_mute_r, 1);
} | [
0,
0
] |
Linux Kernel | sound/soc/pxa/poodle.c |
static int poodle_set_jack(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol) {
struct snd_soc_card *card = snd_kcontrol_chip(kcontrol);
if (poodle_jack_func == ucontrol->value.enumerated.item[0])
return 0;
poodle_jack_func = ucontrol->value.enumerated.item[0];
... | [
0,
0
] |
Linux Kernel | sound/soc/pxa/poodle.c |
static int poodle_amp_event(struct snd_soc_dapm_widget *w,
struct snd_kcontrol *k, int event) {
if (SND_SOC_DAPM_EVENT_ON(event))
locomo_gpio_write(poodle_pdata->locomo_dev, poodle_pdata->gpio_amp_on, 0);
else
locomo_gpio_write(poodle_pdata->locomo_dev, poodle_pdata->gpio_amp_on... | [
0,
0
] |
Linux Kernel | sound/soc/pxa/pxa-ssp.c |
static void pxa_ssp_set_dma_params(struct ssp_device *ssp, int width4, int out,
struct snd_dmaengine_dai_dma_data *dma) {
dma->addr_width =
width4 ? DMA_SLAVE_BUSWIDTH_4_BYTES : DMA_SLAVE_BUSWIDTH_2_BYTES;
dma->maxburst = 16;
dma->addr = ssp->phys_base + SSDR;
} | [
1,
0
] |
Linux Kernel | sound/soc/pxa/pxa-ssp.c |
static int pxa_ssp_startup(struct snd_pcm_substream *substream,
struct snd_soc_dai *cpu_dai) {
struct ssp_priv *priv = snd_soc_dai_get_drvdata(cpu_dai);
struct ssp_device *ssp = priv->ssp;
struct snd_dmaengine_dai_dma_data *dma;
int ret = 0;
if (!snd_soc_dai_active(cpu_dai)) {
... | [
1,
0
] |
Linux Kernel | sound/soc/pxa/pxa-ssp.c |
static int pxa_ssp_resume(struct snd_soc_component *component) {
struct ssp_priv *priv = snd_soc_component_get_drvdata(component);
struct ssp_device *ssp = priv->ssp;
uint32_t sssr = SSSR_ROR | SSSR_TUR | SSSR_BCE;
clk_prepare_enable(ssp->clk);
__raw_writel(sssr, ssp->mmio_base + SSSR);
__raw_writel(priv... | [
1,
0
] |
Linux Kernel | sound/soc/pxa/pxa-ssp.c | static int pxa_ssp_set_dai_fmt(struct snd_soc_dai *cpu_dai, unsigned int fmt) {
struct ssp_priv *priv = snd_soc_dai_get_drvdata(cpu_dai);
switch (fmt & SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK) {
case SND_SOC_DAIFMT_BC_FC:
case SND_SOC_DAIFMT_BC_FP:
case SND_SOC_DAIFMT_BP_FP:
break;
default:
return -EINV... | [
0,
0
] |
Linux Kernel | sound/soc/pxa/pxa-ssp.c |
static int pxa_ssp_probe(struct snd_soc_dai *dai) {
struct device *dev = dai->dev;
struct ssp_priv *priv;
int ret;
priv = kzalloc(sizeof(struct ssp_priv), GFP_KERNEL);
if (!priv)
return -ENOMEM;
if (dev->of_node) {
struct device_node *ssp_handle;
ssp_handle = of_parse_phandle(dev->of_node, "... | [
1,
0
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.