Projectname
large_stringclasses
15 values
Filepath
large_stringlengths
4
106
⌀
Function
large_stringlengths
11
3.45k
Label
list
Linux Kernel
sound/soc/amd/yc/acp6x-pdm-dma.c
static int acp6x_pdm_audio_probe(struct platform_device *pdev) { struct resource *res; struct pdm_dev_data *adata; int status; res = platform_get_resource(pdev, IORESOURCE_MEM, 0); if (!res) { dev_err(&pdev->dev, "IORESOURCE_MEM FAILED\n"); return -ENODEV; } adata = devm_kzalloc(&pdev->dev, siz...
[ 1, 0 ]
Linux Kernel
sound/soc/amd/yc/acp6x-pdm-dma.c
static int acp6x_pdm_audio_remove(struct platform_device *pdev) { pm_runtime_disable(&pdev->dev); return 0; }
[ 0, 0 ]
Linux Kernel
sound/soc/amd/yc/acp6x-pdm-dma.c
static int __maybe_unused acp6x_pdm_runtime_resume(struct device *dev) { struct pdm_dev_data *adata; adata = dev_get_drvdata(dev); acp6x_enable_pdm_interrupts(adata->acp6x_base); return 0; }
[ 0, 0 ]
Linux Kernel
sound/soc/amd/yc/acp6x.h
static inline u32 acp6x_readl(void __iomem *base_addr) { return readl(base_addr - ACP6x_PHY_BASE_ADDRESS); }
[ 0, 0 ]
Linux Kernel
sound/soc/amd/yc/pci-acp6x.c
static int acp6x_init(void __iomem *acp_base) { int ret; ret = acp6x_power_on(acp_base); if (ret) { pr_err("ACP power on failed\n"); return ret; } acp6x_writel(0x01, acp_base + ACP_CONTROL); /* Reset */ ret = acp6x_reset(acp_base); if (ret) { pr_err("ACP reset failed\n"); return ret; ...
[ 0, 0 ]
Linux Kernel
sound/soc/apple/mca.c
static bool mca_fe_clocks_in_use(struct mca_cluster *cl) { struct mca_data *mca = cl->host; struct mca_cluster *be_cl; int stream, i; mutex_lock(&mca->port_mutex); for (i = 0; i < mca->nclusters; i++) { be_cl = &mca->clusters[i]; if (be_cl->port_driver != cl->no) continue; for_each_pcm_s...
[ 0, 0 ]
Linux Kernel
sound/soc/apple/mca.c
static int mca_fe_set_fmt(struct snd_soc_dai *dai, unsigned int fmt) { struct mca_cluster *cl = mca_dai_to_cluster(dai); struct mca_data *mca = cl->host; bool fpol_inv = false; u32 serdes_conf = 0; u32 bitstart; if ((fmt & SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK) != SND_SOC_DAIFMT_BP_FP) goto err; switc...
[ 1, 0 ]
Linux Kernel
sound/soc/apple/mca.c
static int mca_be_startup(struct snd_pcm_substream *substream, struct snd_soc_dai *dai) { struct snd_soc_pcm_runtime *be = asoc_substream_to_rtd(substream); struct snd_soc_pcm_runtime *fe; struct mca_cluster *cl = mca_dai_to_cluster(dai); struct mca_cluster *fe_cl; struct mca_data *m...
[ 1, 0 ]
Linux Kernel
sound/soc/apple/mca.c
static int mca_pcm_open(struct snd_soc_component *component, struct snd_pcm_substream *substream) { struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); struct mca_cluster *cl = mca_dai_to_cluster(asoc_rtd_to_cpu(rtd, 0)); struct dma_chan *chan = cl->dma_chans[substream->st...
[ 1, 0 ]
Linux Kernel
sound/soc/apple/mca.c
static snd_pcm_uframes_t mca_pointer(struct snd_soc_component *component, struct snd_pcm_substream *substream) { struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); if (rtd->dai_link->no_pcm) return -ENOTSUPP; return snd_dmaengine_pcm_pointer(substream);...
[ 0, 0 ]
Linux Kernel
sound/soc/apple/mca.c
static struct dma_chan *mca_request_dma_channel(struct mca_cluster *cl, unsigned int stream) { bool is_tx = (stream == SNDRV_PCM_STREAM_PLAYBACK); #ifndef USE_RXB_FOR_CAPTURE char *name = devm_kasprintf(cl->host->dev, GFP_KERNEL, is_tx ?...
[ 0, 0 ]
Linux Kernel
sound/soc/apple/mca.c
static void mca_pcm_free(struct snd_soc_component *component, struct snd_pcm *pcm) { struct snd_soc_pcm_runtime *rtd = snd_pcm_chip(pcm); struct mca_cluster *cl = mca_dai_to_cluster(asoc_rtd_to_cpu(rtd, 0)); unsigned int i; if (rtd->dai_link->no_pcm) return; for_each_pcm_stream...
[ 0, 0 ]
Linux Kernel
sound/soc/atmel/atmel-classd.c
static int atmel_classd_component_probe(struct snd_soc_component *component) { struct snd_soc_card *card = snd_soc_component_get_drvdata(component); struct atmel_classd *dd = snd_soc_card_get_drvdata(card); const struct atmel_classd_pdata *pdata = dd->pdata; u32 mask, val; mask = CLASSD_MR_PWMTYP_MASK; va...
[ 1, 0 ]
Linux Kernel
sound/soc/atmel/atmel-classd.c
static void atmel_classd_cpu_dai_shutdown(struct snd_pcm_substream *substream, struct snd_soc_dai *cpu_dai) { struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); struct atmel_classd *dd = snd_soc_card_get_drvdata(rtd->card); clk_disable_unprepare(dd->gcl...
[ 0, 0 ]
Linux Kernel
sound/soc/atmel/atmel-i2s.c
static int atmel_i2s_set_dai_fmt(struct snd_soc_dai *dai, unsigned int fmt) { struct atmel_i2s_dev *dev = snd_soc_dai_get_drvdata(dai); dev->fmt = fmt; return 0; }
[ 0, 0 ]
Linux Kernel
sound/soc/atmel/atmel-i2s.c
static int atmel_i2s_prepare(struct snd_pcm_substream *substream, struct snd_soc_dai *dai) { struct atmel_i2s_dev *dev = snd_soc_dai_get_drvdata(dai); bool is_playback = (substream->stream == SNDRV_PCM_STREAM_PLAYBACK); unsigned int rhr, sr = 0; if (is_playback) { regmap_read(d...
[ 1, 0 ]
Linux Kernel
sound/soc/atmel/atmel-pcm-dma.c
int atmel_pcm_dma_platform_register(struct device *dev) { return devm_snd_dmaengine_pcm_register(dev, &atmel_dmaengine_pcm_config, 0); }
[ 0, 0 ]
Linux Kernel
sound/soc/atmel/atmel-pcm-pdc.c
static int atmel_pcm_hw_free(struct snd_soc_component *component, struct snd_pcm_substream *substream) { struct atmel_runtime_data *prtd = substream->runtime->private_data; struct atmel_pcm_dma_params *params = prtd->params; if (params != NULL) { ssc_writex(params->ssc->regs, SS...
[ 1, 0 ]
Linux Kernel
sound/soc/atmel/atmel-pcm-pdc.c
static snd_pcm_uframes_t atmel_pcm_pointer(struct snd_soc_component *component, struct snd_pcm_substream *substream) { struct snd_pcm_runtime *runtime = substream->runtime; struct atmel_runtime_data *prtd = runtime->private_data; struct atmel_pcm_dma_params *params = prtd->params; dma_addr_t ...
[ 1, 0 ]
Linux Kernel
sound/soc/atmel/atmel-pcm-pdc.c
int atmel_pcm_pdc_platform_register(struct device *dev) { return devm_snd_soc_register_component(dev, &atmel_soc_platform, NULL, 0); }
[ 0, 0 ]
Linux Kernel
sound/soc/atmel/atmel-pcm.h
static inline int atmel_pcm_dma_platform_register(struct device *dev) { return 0; } #endif #endif
[ 0, 0 ]
Linux Kernel
sound/soc/atmel/atmel-pdmic.c
static int atmel_pdmic_platform_configure_dma(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 atmel_pdmic ...
[ 1, 0 ]
Linux Kernel
sound/soc/atmel/atmel-pdmic.c
static void atmel_pdmic_get_sample_rate(struct atmel_pdmic *dd, unsigned int *rate_min, unsigned int *rate_max) { u32 mic_min_freq = dd->pdata->mic_min_freq; u32 mic_max_freq = dd->pdata->mic_max_freq; u32 clk_max_rate = (u32)(clk_ge...
[ 0, 0 ]
Linux Kernel
sound/soc/atmel/atmel_ssc_dai.c
static irqreturn_t atmel_ssc_interrupt(int irq, void *dev_id) { struct atmel_ssc_info *ssc_p = dev_id; struct atmel_pcm_dma_params *dma_params; u32 ssc_sr; u32 ssc_substream_mask; int i; ssc_sr = (unsigned long)ssc_readl(ssc_p->ssc->regs, SR) & (unsigned long)ssc_readl(ssc_p->ssc->regs, IMR); ...
[ 1, 0 ]
Linux Kernel
sound/soc/atmel/atmel_ssc_dai.c
static int atmel_ssc_set_dai_clkdiv(struct snd_soc_dai *cpu_dai, int div_id, int div) { struct platform_device *pdev = to_platform_device(cpu_dai->dev); struct atmel_ssc_info *ssc_p = &ssc_info[pdev->id]; switch (div_id) { case ATMEL_SSC_CMR_DIV: if (ssc_p->dir_mask != ...
[ 0, 0 ]
Linux Kernel
sound/soc/atmel/atmel_ssc_dai.c
static int atmel_ssc_trigger(struct snd_pcm_substream *substream, int cmd, struct snd_soc_dai *dai) { struct platform_device *pdev = to_platform_device(dai->dev); struct atmel_ssc_info *ssc_p = &ssc_info[pdev->id]; struct atmel_pcm_dma_params *dma_params; int dir; if (substream-...
[ 1, 0 ]
Linux Kernel
sound/soc/atmel/atmel_ssc_dai.c
static int atmel_ssc_suspend(struct snd_soc_component *component) { struct atmel_ssc_info *ssc_p; struct platform_device *pdev = to_platform_device(component->dev); if (!snd_soc_component_active(component)) return 0; ssc_p = &ssc_info[pdev->id]; ssc_p->ssc_state.ssc_sr = ssc_readl(ssc_p->ssc->regs, SR)...
[ 0, 0 ]
Linux Kernel
sound/soc/atmel/atmel_wm8904.c
static int atmel_asoc_wm8904_dt_init(struct platform_device *pdev) { struct device_node *np = pdev->dev.of_node; struct device_node *codec_np, *cpu_np; struct snd_soc_card *card = &atmel_asoc_wm8904_card; struct snd_soc_dai_link *dailink = &atmel_asoc_wm8904_dailink; int ret; if (!np) { dev_err(&pdev-...
[ 0, 0 ]
Linux Kernel
sound/soc/atmel/atmel_wm8904.c
static int atmel_asoc_wm8904_remove(struct platform_device *pdev) { struct snd_soc_card *card = platform_get_drvdata(pdev); struct snd_soc_dai_link *dailink = &atmel_asoc_wm8904_dailink; int id; id = of_alias_get_id((struct device_node *)dailink->cpus->of_node, "ssc"); snd_soc_unregister_card(card); atme...
[ 0, 0 ]
Linux Kernel
sound/soc/atmel/mchp-i2s-mcc.c
static int mchp_i2s_mcc_startup(struct snd_pcm_substream *substream, struct snd_soc_dai *dai) { struct mchp_i2s_mcc_dev *dev = snd_soc_dai_get_drvdata(dai); if (!mchp_i2s_mcc_is_running(dev)) { return regmap_write(dev->regmap, MCHP_I2SMCC_CR, MCHP_I2SMCC_CR_SWRST); } return...
[ 0, 0 ]
Linux Kernel
sound/soc/atmel/mchp-i2s-mcc.c
static int mchp_i2s_mcc_soc_data_parse(struct platform_device *pdev, struct mchp_i2s_mcc_dev *dev) { int err; if (!dev->soc) { dev_err(&pdev->dev, "failed to get soc data\n"); return -ENODEV; } if (dev->soc->data_pin_pair_num == 1) return 0; err = of_prop...
[ 1, 0 ]
Linux Kernel
sound/soc/atmel/mchp-pdmc.c
static int mchp_pdmc_af_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *uvalue) { struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); struct mchp_pdmc *dd = snd_soc_component_get_drvdata(component); uvalue->value.integer.value[0] = !!dd->audio_filter_en; ...
[ 0, 0 ]
Linux Kernel
sound/soc/atmel/mchp-pdmc.c
static inline struct snd_pcm_substream * mchp_pdmc_chmap_substream(struct mchp_pdmc_chmap *info, unsigned int idx) { struct snd_pcm_substream *s; for (s = info->pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream; s; s = s->next) if (s->number == idx) return s; return NULL; }
[ 0, 0 ]
Linux Kernel
sound/soc/atmel/mchp-pdmc.c
static int mchp_pdmc_chmap_ctl_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct mchp_pdmc_chmap *info = snd_kcontrol_chip(kcontrol); struct mchp_pdmc *dd = info->dd; unsigned int idx = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id); struct snd_pcm...
[ 1, 0 ]
Linux Kernel
sound/soc/atmel/mchp-pdmc.c
static int mchp_pdmc_open(struct snd_soc_component *component, struct snd_pcm_substream *substream) { int i; for (i = 0; i < ARRAY_SIZE(mchp_pdmc_snd_controls); i++) { const struct snd_kcontrol_new *control = &mchp_pdmc_snd_controls[i]; struct snd_ctl_elem_id id; struct snd_kc...
[ 1, 0 ]
Linux Kernel
sound/soc/atmel/mchp-pdmc.c
static inline int mchp_pdmc_period_to_maxburst(int period_size) { if (!(period_size % 8)) return 8; if (!(period_size % 4)) return 4; if (!(period_size % 2)) return 2; return 1; }
[ 0, 0 ]
Linux Kernel
sound/soc/atmel/mchp-pdmc.c
static int mchp_pdmc_hw_free(struct snd_pcm_substream *substream, struct snd_soc_dai *dai) { struct mchp_pdmc *dd = snd_soc_dai_get_drvdata(dai); if (dd->gclk_enabled) { clk_disable_unprepare(dd->gclk); dd->gclk_enabled = 0; } return 0; }
[ 0, 0 ]
Linux Kernel
sound/soc/atmel/mchp-spdifrx.c
static bool mchp_spdifrx_readable_reg(struct device *dev, unsigned int reg) { switch (reg) { case SPDIFRX_MR: case SPDIFRX_IMR: case SPDIFRX_ISR: case SPDIFRX_RSR: case SPDIFRX_CHSR(0, 0): case SPDIFRX_CHSR(0, 1): case SPDIFRX_CHSR(0, 2): case SPDIFRX_CHSR(0, 3): case SPDIFRX_CHSR(0, 4): case SPD...
[ 0, 0 ]
Linux Kernel
sound/soc/atmel/mchp-spdifrx.c
static bool mchp_spdifrx_writeable_reg(struct device *dev, unsigned int reg) { switch (reg) { case SPDIFRX_CR: case SPDIFRX_MR: case SPDIFRX_IER: case SPDIFRX_IDR: case SPDIFRX_WPMR: return true; default: return false; } }
[ 0, 0 ]
Linux Kernel
sound/soc/atmel/mchp-spdifrx.c
static bool mchp_spdifrx_precious_reg(struct device *dev, unsigned int reg) { switch (reg) { case SPDIFRX_ISR: case SPDIFRX_RHR: return true; default: return false; } }
[ 0, 0 ]
Linux Kernel
sound/soc/atmel/mchp-spdifrx.c
static void mchp_spdifrx_channel_status_read(struct mchp_spdifrx_dev *dev, int channel) { struct mchp_spdifrx_mixer_control *ctrl = &dev->control; u8 *ch_stat = &ctrl->ch_stat[channel].data[0]; u32 val; int i; for (i = 0; i < ARRAY_SIZE(ctrl->ch_stat[channel].dat...
[ 1, 0 ]
Linux Kernel
sound/soc/atmel/mchp-spdifrx.c
static void mchp_spdifrx_channel_user_data_read(struct mchp_spdifrx_dev *dev, int channel) { struct mchp_spdifrx_mixer_control *ctrl = &dev->control; u8 *user_data = &ctrl->user_data[channel].data[0]; u32 val; int i; for (i = 0; i < ARRAY_SIZE(ctrl->user_data[...
[ 1, 0 ]
Linux Kernel
sound/soc/atmel/mchp-spdifrx.c
static int mchp_spdifrx_cs2_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *uvalue) { struct snd_soc_dai *dai = snd_kcontrol_chip(kcontrol); struct mchp_spdifrx_dev *dev = snd_soc_dai_get_drvdata(dai); return mchp_spdifrx_cs_get(dev, 1, uvalue); }
[ 0, 0 ]
Linux Kernel
sound/soc/atmel/mchp-spdifrx.c
static int mchp_spdifrx_signal_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *uvalue) { struct snd_soc_dai *dai = snd_kcontrol_chip(kcontrol); struct mchp_spdifrx_dev *dev = snd_soc_dai_get_drvdata(dai); struct mchp_spdifrx_mixer_control *ctrl = &dev->control; ...
[ 0, 0 ]
Linux Kernel
sound/soc/atmel/mchp-spdiftx.c
static bool mchp_spdiftx_precious_reg(struct device *dev, unsigned int reg) { switch (reg) { case SPDIFTX_CDR: case SPDIFTX_ISR: return true; default: return false; } }
[ 0, 0 ]
Linux Kernel
sound/soc/atmel/mchp-spdiftx.c
static int mchp_spdiftx_dai_startup(struct snd_pcm_substream *substream, struct snd_soc_dai *dai) { struct mchp_spdiftx_dev *dev = snd_soc_dai_get_drvdata(dai); regmap_write(dev->regmap, SPDIFTX_CR, SPDIFTX_CR_SWRST | SPDIFTX_CR_FCLR); return 0; }
[ 0, 0 ]
Linux Kernel
sound/soc/atmel/mchp-spdiftx.c
static int mchp_spdiftx_hw_free(struct snd_pcm_substream *substream, struct snd_soc_dai *dai) { struct mchp_spdiftx_dev *dev = snd_soc_dai_get_drvdata(dai); return regmap_write(dev->regmap, SPDIFTX_CR, SPDIFTX_CR_SWRST | SPDIFTX_CR_FCLR); }
[ 0, 0 ]
Linux Kernel
sound/soc/atmel/mchp-spdiftx.c
static int mchp_spdiftx_cs_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *uvalue) { unsigned long flags; struct snd_soc_dai *dai = snd_kcontrol_chip(kcontrol); struct mchp_spdiftx_dev *dev = snd_soc_dai_get_drvdata(dai); struct mchp_spdiftx_mixer_control *ctrl = &d...
[ 1, 0 ]
Linux Kernel
sound/soc/atmel/mchp-spdiftx.c
static int mchp_spdiftx_runtime_suspend(struct device *dev) { struct mchp_spdiftx_dev *spdiftx = dev_get_drvdata(dev); regcache_cache_only(spdiftx->regmap, true); clk_disable_unprepare(spdiftx->gclk); clk_disable_unprepare(spdiftx->pclk); return 0; }
[ 0, 0 ]
Linux Kernel
sound/soc/atmel/mchp-spdiftx.c
static int mchp_spdiftx_runtime_resume(struct device *dev) { struct mchp_spdiftx_dev *spdiftx = dev_get_drvdata(dev); int ret; ret = clk_prepare_enable(spdiftx->pclk); if (ret) { dev_err(spdiftx->dev, "failed to enable the peripheral clock: %d\n", ret); return ret; } ret = clk_prepare_enable(spdif...
[ 0, 0 ]
Linux Kernel
sound/soc/atmel/mchp-spdiftx.c
static int mchp_spdiftx_remove(struct platform_device *pdev) { struct mchp_spdiftx_dev *dev = platform_get_drvdata(pdev); if (!pm_runtime_status_suspended(dev->dev)) mchp_spdiftx_runtime_suspend(dev->dev); pm_runtime_disable(dev->dev); return 0; }
[ 0, 0 ]
Linux Kernel
sound/soc/atmel/mikroe-proto.c
static int snd_proto_init(struct snd_soc_pcm_runtime *rtd) { struct snd_soc_card *card = rtd->card; struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); int ret = snd_soc_dai_set_sysclk(codec_dai, WM8731_SYSCLK_XTAL, XTAL_RATE, SND_SOC_CLOCK_IN); if (ret < 0) { dev_...
[ 0, 0 ]
Linux Kernel
sound/soc/atmel/sam9g20_wm8731.c
static int at91sam9g20ek_audio_remove(struct platform_device *pdev) { struct snd_soc_card *card = platform_get_drvdata(pdev); snd_soc_unregister_card(card); atmel_ssc_put_audio(0); return 0; } #ifdef CONFIG_OF
[ 0, 0 ]
Linux Kernel
sound/soc/atmel/sam9x5_wm8731.c
static int sam9x5_wm8731_driver_remove(struct platform_device *pdev) { struct snd_soc_card *card = platform_get_drvdata(pdev); struct sam9x5_drvdata *priv = card->drvdata; atmel_ssc_put_audio(priv->ssc_id); return 0; }
[ 0, 0 ]
Linux Kernel
sound/soc/atmel/tse850-pcm5142.c
static int tse850_get_mux1(struct snd_kcontrol *kctrl, struct snd_ctl_elem_value *ucontrol) { struct snd_soc_dapm_context *dapm = snd_soc_dapm_kcontrol_dapm(kctrl); struct snd_soc_card *card = dapm->card; struct tse850_priv *tse850 = snd_soc_card_get_drvdata(card); ucontrol->value.e...
[ 0, 0 ]
Linux Kernel
sound/soc/atmel/tse850-pcm5142.c
static int tse850_get_ana(struct snd_kcontrol *kctrl, struct snd_ctl_elem_value *ucontrol) { struct snd_soc_dapm_context *dapm = snd_soc_dapm_kcontrol_dapm(kctrl); struct snd_soc_card *card = dapm->card; struct tse850_priv *tse850 = snd_soc_card_get_drvdata(card); int ret; ret = reg...
[ 0, 0 ]
Linux Kernel
sound/soc/atmel/tse850-pcm5142.c
static int tse850_put_ana(struct snd_kcontrol *kctrl, struct snd_ctl_elem_value *ucontrol) { struct snd_soc_dapm_context *dapm = snd_soc_dapm_kcontrol_dapm(kctrl); struct snd_soc_card *card = dapm->card; struct tse850_priv *tse850 = snd_soc_card_get_drvdata(card); struct soc_enum *e = ...
[ 1, 0 ]
Linux Kernel
sound/soc/au1x/ac97c.c
static unsigned short au1xac97c_ac97_read(struct snd_ac97 *ac97, unsigned short r) { struct au1xpsc_audio_data *ctx = ac97_to_ctx(ac97); unsigned int tmo, retry; unsigned long data; data = ~0; retry = AC97_RW_RETRIES; do { mutex_lock(&ctx->lock); tmo = 6; ...
[ 1, 0 ]
Linux Kernel
sound/soc/au1x/ac97c.c
static int au1xac97c_drvsuspend(struct device *dev) { struct au1xpsc_audio_data *ctx = dev_get_drvdata(dev); WR(ctx, AC97_ENABLE, EN_D); return 0; }
[ 0, 0 ]
Linux Kernel
sound/soc/au1x/dbdma2.c
static void au1x_pcm_dmarx_cb(int irq, void *dev_id) { struct au1xpsc_audio_dmadata *cd = dev_id; cd->pos += cd->period_bytes; if (++cd->curr_period >= cd->periods) { cd->pos = 0; cd->curr_period = 0; } snd_pcm_period_elapsed(cd->substream); au1x_pcm_queue_rx(cd); }
[ 1, 0 ]
Linux Kernel
sound/soc/au1x/dbdma2.c
static void au1x_pcm_dbdma_free(struct au1xpsc_audio_dmadata *pcd) { if (pcd->ddma_chan) { au1xxx_dbdma_stop(pcd->ddma_chan); au1xxx_dbdma_reset(pcd->ddma_chan); au1xxx_dbdma_chan_free(pcd->ddma_chan); pcd->ddma_chan = 0; pcd->msbits = 0; } }
[ 0, 0 ]
Linux Kernel
sound/soc/au1x/dbdma2.c
static int au1xpsc_pcm_trigger(struct snd_soc_component *component, struct snd_pcm_substream *substream, int cmd) { u32 c = to_dmadata(substream, component)->ddma_chan; switch (cmd) { case SNDRV_PCM_TRIGGER_START: case SNDRV_PCM_TRIGGER_RESUME: au1xxx_dbdma_start(c); bre...
[ 0, 0 ]
Linux Kernel
sound/soc/au1x/dbdma2.c
static int au1xpsc_pcm_open(struct snd_soc_component *component, struct snd_pcm_substream *substream) { struct au1xpsc_audio_dmadata *pcd = to_dmadata(substream, component); struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); int stype = substream->stream, *dmaids; d...
[ 0, 0 ]
Linux Kernel
sound/soc/au1x/dbdma2.c
static int au1xpsc_pcm_new(struct snd_soc_component *component, struct snd_soc_pcm_runtime *rtd) { struct snd_card *card = rtd->card->snd_card; struct snd_pcm *pcm = rtd->pcm; snd_pcm_set_managed_buffer_all(pcm, SNDRV_DMA_TYPE_DEV, card->dev, AU1XPSC_B...
[ 1, 0 ]
Linux Kernel
sound/soc/au1x/dbdma2.c
static int au1xpsc_pcm_drvprobe(struct platform_device *pdev) { struct au1xpsc_audio_dmadata *dmadata; dmadata = devm_kcalloc(&pdev->dev, 2, sizeof(struct au1xpsc_audio_dmadata), GFP_KERNEL); if (!dmadata) return -ENOMEM; platform_set_drvdata(pdev, dmadata); return devm_snd_so...
[ 1, 0 ]
Linux Kernel
sound/soc/au1x/dma.c
static void au1000_release_dma_link(struct audio_stream *stream) { struct pcm_period *pointer; struct pcm_period *pointer_next; stream->period_size = 0; stream->periods = 0; pointer = stream->buffer; if (!pointer) return; do { pointer_next = pointer->next; kfree(pointer); pointer = point...
[ 0, 0 ]
Linux Kernel
sound/soc/au1x/dma.c
static void au1000_dma_stop(struct audio_stream *stream) { if (stream->buffer) disable_dma(stream->dma); }
[ 0, 0 ]
Linux Kernel
sound/soc/au1x/dma.c
static void au1000_dma_start(struct audio_stream *stream) { if (!stream->buffer) return; init_dma(stream->dma); if (get_dma_active_buffer(stream->dma) == 0) { clear_dma_done0(stream->dma); set_dma_addr0(stream->dma, stream->buffer->start); set_dma_count0(stream->dma, stream->period_size >> 1); ...
[ 1, 0 ]
Linux Kernel
sound/soc/au1x/dma.c
static irqreturn_t au1000_dma_interrupt(int irq, void *ptr) { struct audio_stream *stream = (struct audio_stream *)ptr; struct snd_pcm_substream *substream = stream->substream; switch (get_dma_buffer_done(stream->dma)) { case DMA_D0: stream->buffer = stream->buffer->next; clear_dma_done0(stream->dma);...
[ 1, 0 ]
Linux Kernel
sound/soc/au1x/dma.c
static inline struct audio_stream * ss_to_as(struct snd_pcm_substream *ss, struct snd_soc_component *component) { struct alchemy_pcm_ctx *ctx = ss_to_ctx(ss, component); return &(ctx->stream[ss->stream]); }
[ 0, 0 ]
Linux Kernel
sound/soc/au1x/dma.c
static int alchemy_pcm_trigger(struct snd_soc_component *component, struct snd_pcm_substream *substream, int cmd) { struct audio_stream *stream = ss_to_as(substream, component); int err = 0; switch (cmd) { case SNDRV_PCM_TRIGGER_START: au1000_dma_start(stream); break; ...
[ 0, 0 ]
Linux Kernel
sound/soc/au1x/dma.c
static int alchemy_pcm_new(struct snd_soc_component *component, struct snd_soc_pcm_runtime *rtd) { struct snd_pcm *pcm = rtd->pcm; snd_pcm_set_managed_buffer_all(pcm, SNDRV_DMA_TYPE_CONTINUOUS, NULL, 65536, (4096 * 1024) - 1); return 0; }
[ 0, 0 ]
Linux Kernel
sound/soc/au1x/i2sc.c
static int au1xi2s_trigger(struct snd_pcm_substream *substream, int cmd, struct snd_soc_dai *dai) { struct au1xpsc_audio_data *ctx = snd_soc_dai_get_drvdata(dai); int stype = SUBSTREAM_TYPE(substream); switch (cmd) { case SNDRV_PCM_TRIGGER_START: case SNDRV_PCM_TRIGGER_RESUME: ...
[ 0, 0 ]
Linux Kernel
sound/soc/au1x/i2sc.c
static int au1xi2s_drvsuspend(struct device *dev) { struct au1xpsc_audio_data *ctx = dev_get_drvdata(dev); WR(ctx, I2S_ENABLE, EN_D); return 0; }
[ 0, 0 ]
Linux Kernel
sound/soc/au1x/i2sc.c
static int au1xi2s_drvresume(struct device *dev) { return 0; }
[ 0, 0 ]
Linux Kernel
sound/soc/au1x/psc-ac97.c
static unsigned short au1xpsc_ac97_read(struct snd_ac97 *ac97, unsigned short reg) { struct au1xpsc_audio_data *pscdata = ac97_to_pscdata(ac97); unsigned short retry, tmo; unsigned long data; __raw_writel(PSC_AC97EVNT_CD, AC97_EVNT(pscdata)); wmb(); retry = AC97_RW_...
[ 0, 0 ]
Linux Kernel
sound/soc/au1x/psc-ac97.c
static void au1xpsc_ac97_warm_reset(struct snd_ac97 *ac97) { struct au1xpsc_audio_data *pscdata = ac97_to_pscdata(ac97); __raw_writel(PSC_AC97RST_SNC, AC97_RST(pscdata)); wmb(); msleep(10); __raw_writel(0, AC97_RST(pscdata)); wmb(); }
[ 0, 0 ]
Linux Kernel
sound/soc/au1x/psc-ac97.c
static void au1xpsc_ac97_cold_reset(struct snd_ac97 *ac97) { struct au1xpsc_audio_data *pscdata = ac97_to_pscdata(ac97); int i; __raw_writel(0, AC97_CFG(au1xpsc_ac97_workdata)); wmb(); /* drain writebuffer */ __raw_writel(PSC_CTRL_DISABLE, PSC_CTRL(pscdata)); wmb(); /* drain writebuffer */ /* issue cold...
[ 0, 0 ]
Linux Kernel
sound/soc/au1x/psc-ac97.c
static int au1xpsc_ac97_trigger(struct snd_pcm_substream *substream, int cmd, struct snd_soc_dai *dai) { struct au1xpsc_audio_data *pscdata = snd_soc_dai_get_drvdata(dai); int ret, stype = substream->stream; ret = 0; switch (cmd) { case SNDRV_PCM_TRIGGER_START: case SNDRV_P...
[ 0, 0 ]
Linux Kernel
sound/soc/au1x/psc-ac97.c
static int au1xpsc_ac97_drvresume(struct device *dev) { struct au1xpsc_audio_data *wd = dev_get_drvdata(dev); __raw_writel(wd->pm[0] | PSC_SEL_PS_AC97MODE, PSC_SEL(wd)); wmb(); /* drain writebuffer */ /* after this point the ac97 core will cold-reset the codec. * During cold-reset the PSC is reinitialized ...
[ 0, 0 ]
Linux Kernel
sound/soc/au1x/psc-i2s.c
static int au1xpsc_i2s_set_fmt(struct snd_soc_dai *cpu_dai, unsigned int fmt) { struct au1xpsc_audio_data *pscdata = snd_soc_dai_get_drvdata(cpu_dai); unsigned long ct; int ret; ret = -EINVAL; ct = pscdata->cfg; ct &= ~(PSC_I2SCFG_XM | PSC_I2SCFG_MLJ); switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) { case...
[ 0, 0 ]
Linux Kernel
sound/soc/au1x/psc-i2s.c
static int au1xpsc_i2s_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params, struct snd_soc_dai *dai) { struct au1xpsc_audio_data *pscdata = snd_soc_dai_get_drvdata(dai); int cfgbits; unsigned long stat; stat = __raw_...
[ 1, 0 ]
Linux Kernel
sound/soc/au1x/psc-i2s.c
static int au1xpsc_i2s_drvprobe(struct platform_device *pdev) { struct resource *dmares; unsigned long sel; struct au1xpsc_audio_data *wd; wd = devm_kzalloc(&pdev->dev, sizeof(struct au1xpsc_audio_data), GFP_KERNEL); if (!wd) return -ENOMEM; wd->mmio = devm_platform_ioremap_resource(pdev, 0); if (IS...
[ 1, 0 ]
Linux Kernel
sound/soc/au1x/psc-i2s.c
static int au1xpsc_i2s_drvremove(struct platform_device *pdev) { struct au1xpsc_audio_data *wd = platform_get_drvdata(pdev); __raw_writel(0, I2S_CFG(wd)); wmb(); __raw_writel(PSC_CTRL_DISABLE, PSC_CTRL(wd)); wmb(); return 0; }
[ 0, 0 ]
Linux Kernel
sound/soc/bcm/bcm2835-i2s.c
static void bcm2835_i2s_start_clock(struct bcm2835_i2s_dev *dev) { unsigned int provider = dev->fmt & SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK; if (dev->clk_prepared) return; switch (provider) { case SND_SOC_DAIFMT_BP_FP: case SND_SOC_DAIFMT_BP_FC: clk_prepare_enable(dev->clk); dev->clk_prepared = tr...
[ 1, 0 ]
Linux Kernel
sound/soc/bcm/bcm63xx-pcm-whistler.c
static int bcm63xx_pcm_hw_free(struct snd_soc_component *component, struct snd_pcm_substream *substream) { struct i2s_dma_desc *dma_desc; struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); dma_desc = snd_soc_dai_get_dma_data(asoc_rtd_to_cpu(rtd, 0), substream); ...
[ 0, 0 ]
Linux Kernel
sound/soc/bcm/bcm63xx-pcm-whistler.c
static int bcm63xx_pcm_prepare(struct snd_soc_component *component, struct snd_pcm_substream *substream) { struct i2s_dma_desc *dma_desc; struct regmap *regmap_i2s; struct bcm_i2s_priv *i2s_priv; struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); struct snd_pcm...
[ 0, 0 ]
Linux Kernel
sound/soc/bcm/bcm63xx-pcm-whistler.c
int bcm63xx_soc_platform_remove(struct platform_device *pdev) { return 0; }
[ 0, 0 ]
Linux Kernel
sound/soc/bcm/cygnus-pcm.c
static struct cygnus_aio_port * cygnus_dai_get_dma_data(struct snd_pcm_substream *substream) { struct snd_soc_pcm_runtime *soc_runtime = asoc_substream_to_rtd(substream); return snd_soc_dai_get_dma_data(asoc_rtd_to_cpu(soc_runtime, 0), substream); }
[ 0, 0 ]
Linux Kernel
sound/soc/bcm/cygnus-pcm.c
static void handle_capture_irq(struct cygnus_audio *cygaud) { void __iomem *audio_io; u32 port; u32 esr_status2, esr_status4; audio_io = cygaud->audio; esr_status2 = readl(audio_io + ESR2_STATUS_OFFSET); esr_status2 &= ~readl(audio_io + ESR2_MASK_STATUS_OFFSET); esr_status4 = readl(audio_io + ESR4_STATU...
[ 0, 0 ]
Linux Kernel
sound/soc/bcm/cygnus-pcm.c
static irqreturn_t cygnus_dma_irq(int irq, void *data) { u32 r5_status; struct cygnus_audio *cygaud = data; r5_status = readl(cygaud->audio + INTH_R5F_STATUS_OFFSET); if (!(r5_status & (ANY_PLAYBACK_IRQ | ANY_CAPTURE_IRQ))) return IRQ_NONE; /* If playback interrupt happened */ if (ANY_PLAYBACK_IRQ & ...
[ 0, 0 ]
Linux Kernel
sound/soc/bcm/cygnus-pcm.c
static int cygnus_pcm_prepare(struct snd_soc_component *component, struct snd_pcm_substream *substream) { struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); struct snd_pcm_runtime *runtime = substream->runtime; struct cygnus_aio_port *aio; unsigned long bufsize, p...
[ 0, 0 ]
Linux Kernel
sound/soc/bcm/cygnus-pcm.c
static snd_pcm_uframes_t cygnus_pcm_pointer(struct snd_soc_component *component, struct snd_pcm_substream *substream) { struct cygnus_aio_port *aio; unsigned int res = 0, cur = 0, base = 0; struct ringbuf_regs *p_rbuf = NULL; aio = cygnus_dai_get_dma_data(substream); p_rbuf = get_ringbuf(...
[ 1, 0 ]
Linux Kernel
sound/soc/bcm/cygnus-pcm.c
static int cygnus_dma_new(struct snd_soc_component *component, struct snd_soc_pcm_runtime *rtd) { size_t size = cygnus_pcm_hw.buffer_bytes_max; struct snd_card *card = rtd->card->snd_card; if (!card->dev->dma_mask) card->dev->dma_mask = &cygnus_dma_dmamask; if (!card->dev->cohere...
[ 1, 0 ]
Linux Kernel
sound/soc/bcm/cygnus-pcm.c
int cygnus_soc_platform_unregister(struct device *dev) { return 0; }
[ 0, 0 ]
Linux Kernel
sound/soc/bcm/cygnus-ssp.c
static void audio_ssp_in_enable(struct cygnus_aio_port *aio) { u32 value; value = readl(aio->cygaud->audio + aio->regs.bf_destch_cfg); value |= BIT(BF_DST_CFGX_CAP_ENA); writel(value, aio->cygaud->audio + aio->regs.bf_destch_cfg); writel(0x1, aio->cygaud->audio + aio->regs.bf_destch_ctrl); value = readl...
[ 1, 0 ]
Linux Kernel
sound/soc/bcm/cygnus-ssp.c
static int audio_ssp_out_enable(struct cygnus_aio_port *aio) { u32 value; int status = 0; switch (aio->port_type) { case PORT_TDM: value = readl(aio->cygaud->audio + aio->regs.i2s_stream_cfg); value |= BIT(I2S_OUT_STREAM_ENA); writel(value, aio->cygaud->audio + aio->regs.i2s_stream_cfg); writ...
[ 1, 0 ]
Linux Kernel
sound/soc/bcm/cygnus-ssp.c
static int pll_configure_mclk(struct cygnus_audio *cygaud, u32 mclk, struct cygnus_aio_port *aio) { int i = 0, error; bool found = false; const struct pll_macro_entry *p_entry; struct clk *ch_clk; for (i = 0; i < ARRAY_SIZE(pll_predef_mclk); i++) { p_entry = &pll_predef_mcl...
[ 0, 0 ]
Linux Kernel
sound/soc/bcm/cygnus-ssp.c
static int audio_clk_init(struct platform_device *pdev, struct cygnus_audio *cygaud) { int i; char clk_name[PROP_LEN_MAX]; for (i = 0; i < ARRAY_SIZE(cygaud->audio_clk); i++) { snprintf(clk_name, PROP_LEN_MAX, "ch%d_audio", i); cygaud->audio_clk[i] = devm_clk_get(&pdev->dev, c...
[ 0, 0 ]
Linux Kernel
sound/soc/cirrus/edb93xx.c
static int edb93xx_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); ...
[ 1, 0 ]