Projectname
large_stringclasses
15 values
Filepath
large_stringlengths
4
106
⌀
Function
large_stringlengths
11
3.45k
Label
list
Linux Kernel
sound/soc/samsung/tm2_wm5110.c
static int tm2_late_probe(struct snd_soc_card *card) { struct tm2_machine_priv *priv = snd_soc_card_get_drvdata(card); unsigned int ch_map[] = {0, 1}; struct snd_soc_dai *amp_pdm_dai; struct snd_soc_pcm_runtime *rtd; struct snd_soc_dai *aif1_dai; struct snd_soc_dai *aif2_dai; int ret; rtd = snd_soc_get...
[ 1, 0 ]
Linux Kernel
sound/soc/samsung/tobermory.c
static int tobermory_probe(struct platform_device *pdev) { struct snd_soc_card *card = &tobermory; int ret; card->dev = &pdev->dev; ret = devm_snd_soc_register_card(&pdev->dev, card); if (ret) dev_err_probe(&pdev->dev, ret, "snd_soc_register_card() failed\n"); return ret; }
[ 0, 0 ]
Linux Kernel
sound/soc/sh/dma-sh7760.c
static void camelot_rxdma(void *data) { struct camelot_pcm *cam = data; cam->rx_period ^= 1; snd_pcm_period_elapsed(cam->rx_ss); }
[ 0, 0 ]
Linux Kernel
sound/soc/sh/dma-sh7760.c
static int camelot_prepare(struct snd_soc_component *component, struct snd_pcm_substream *substream) { struct snd_pcm_runtime *runtime = substream->runtime; struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); struct camelot_pcm *cam = &cam_pcm_data[asoc_rtd_to_cpu(rtd, ...
[ 0, 0 ]
Linux Kernel
sound/soc/sh/dma-sh7760.c
static inline void dmabrg_play_dma_stop(struct camelot_pcm *cam) { unsigned long acr = BRGREG(BRGACR) & ~(ACR_TDS | ACR_RDS); BRGREG(BRGACR) = acr | ACR_TDS; }
[ 1, 0 ]
Linux Kernel
sound/soc/sh/dma-sh7760.c
static inline void dmabrg_rec_dma_start(struct camelot_pcm *cam) { unsigned long acr = BRGREG(BRGACR) & ~(ACR_TDS | ACR_RDS); BRGREG(BRGACR) = acr | ACR_RDE | ACR_RAR | ACR_RAM_2WORD; }
[ 1, 0 ]
Linux Kernel
sound/soc/sh/dma-sh7760.c
static inline void dmabrg_rec_dma_stop(struct camelot_pcm *cam) { unsigned long acr = BRGREG(BRGACR) & ~(ACR_TDS | ACR_RDS); BRGREG(BRGACR) = acr | ACR_RDS; }
[ 1, 0 ]
Linux Kernel
sound/soc/sh/dma-sh7760.c
static int camelot_trigger(struct snd_soc_component *component, struct snd_pcm_substream *substream, int cmd) { struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); struct camelot_pcm *cam = &cam_pcm_data[asoc_rtd_to_cpu(rtd, 0)->id]; int recv = substream->stream == SNDR...
[ 0, 0 ]
Linux Kernel
sound/soc/sh/dma-sh7760.c
static int camelot_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, DMABRG_PREALLOC_BUFFER, ...
[ 0, 0 ]
Linux Kernel
sound/soc/sh/dma-sh7760.c
static int sh7760_soc_platform_probe(struct platform_device *pdev) { return devm_snd_soc_register_component(&pdev->dev, &sh7760_soc_component, NULL, 0); }
[ 0, 0 ]
Linux Kernel
sound/soc/sh/fsi.c
static struct snd_soc_dai *fsi_get_dai(struct snd_pcm_substream *substream) { struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); return asoc_rtd_to_cpu(rtd, 0); }
[ 0, 0 ]
Linux Kernel
sound/soc/sh/fsi.c
static struct fsi_priv *fsi_get_priv(struct snd_pcm_substream *substream) { return fsi_get_priv_frm_dai(fsi_get_dai(substream)); }
[ 0, 0 ]
Linux Kernel
sound/soc/sh/fsi.c
static int fsi_sample2frame(struct fsi_priv *fsi, int samples) { return samples / fsi->chan_num; }
[ 0, 0 ]
Linux Kernel
sound/soc/sh/fsi.c
static int fsi_stream_is_working(struct fsi_priv *fsi, struct fsi_stream *io) { struct fsi_master *master = fsi_get_master(fsi); unsigned long flags; int ret; spin_lock_irqsave(&master->lock, flags); ret = !!(io->substream && io->substream->runtime); spin_unlock_irqrestore(&master->lock, flags); return...
[ 1, 0 ]
Linux Kernel
sound/soc/sh/fsi.c
static void fsi_stream_init(struct fsi_priv *fsi, struct fsi_stream *io, struct snd_pcm_substream *substream) { struct snd_pcm_runtime *runtime = substream->runtime; struct fsi_master *master = fsi_get_master(fsi); unsigned long flags; spin_lock_irqsave(&master->lock, flags); io->...
[ 0, 0 ]
Linux Kernel
sound/soc/sh/fsi.c
static void fsi_irq_clear_status(struct fsi_priv *fsi) { u32 data = 0; struct fsi_master *master = fsi_get_master(fsi); data |= AB_IO(1, fsi_get_port_shift(fsi, &fsi->playback)); data |= AB_IO(1, fsi_get_port_shift(fsi, &fsi->capture)); fsi_core_mask_set(master, int_st, data, 0); }
[ 0, 0 ]
Linux Kernel
sound/soc/sh/fsi.c
static int fsi_clk_is_valid(struct fsi_priv *fsi) { return fsi->clock.set_rate && fsi->clock.rate; }
[ 0, 0 ]
Linux Kernel
sound/soc/sh/fsi.c
static int fsi_clk_enable(struct device *dev, struct fsi_priv *fsi) { struct fsi_clk *clock = &fsi->clock; int ret = -EINVAL; if (!fsi_clk_is_valid(fsi)) return ret; if (0 == clock->count) { ret = clock->set_rate(dev, fsi); if (ret < 0) { fsi_clk_invalid(fsi); return ret; } r...
[ 0, 0 ]
Linux Kernel
sound/soc/sh/fsi.c
static int fsi_clk_disable(struct device *dev, struct fsi_priv *fsi) { struct fsi_clk *clock = &fsi->clock; if (!fsi_clk_is_valid(fsi)) return -EINVAL; if (1 == clock->count--) { clk_disable(clock->xck); clk_disable(clock->ick); clk_disable(clock->div); } return 0; }
[ 0, 0 ]
Linux Kernel
sound/soc/sh/fsi.c
static void fsi_pio_pop16(struct fsi_priv *fsi, u8 *_buf, int samples) { u16 *buf = (u16 *)_buf; int i; for (i = 0; i < samples; i++) *(buf + i) = (u16)(fsi_reg_read(fsi, DIDT) >> 8); }
[ 0, 0 ]
Linux Kernel
sound/soc/sh/fsi.c
static void fsi_pio_pop32(struct fsi_priv *fsi, u8 *_buf, int samples) { u32 *buf = (u32 *)_buf; int i; for (i = 0; i < samples; i++) *(buf + i) = fsi_reg_read(fsi, DIDT); }
[ 0, 0 ]
Linux Kernel
sound/soc/sh/fsi.c
static int fsi_pio_start_stop(struct fsi_priv *fsi, struct fsi_stream *io, int enable) { struct fsi_master *master = fsi_get_master(fsi); u32 clk = fsi_is_port_a(fsi) ? CRA : CRB; if (enable) fsi_irq_enable(fsi, io); else fsi_irq_disable(fsi, io); if (fsi_is_clk_master...
[ 0, 0 ]
Linux Kernel
sound/soc/sh/fsi.c
static int fsi_pio_push_init(struct fsi_priv *fsi, struct fsi_stream *io) { if (fsi_is_enable_stream(fsi)) io->bus_option = BUSOP_SET(24, PACKAGE_24BITBUS_BACK) | BUSOP_SET(16, PACKAGE_16BITBUS_STREAM); else io->bus_option = BUSOP_SET(24, PACKAGE_24BITBUS_BACK) | B...
[ 0, 0 ]
Linux Kernel
sound/soc/sh/fsi.c
static int fsi_dma_init(struct fsi_priv *fsi, struct fsi_stream *io) { io->bus_option = BUSOP_SET(24, PACKAGE_24BITBUS_BACK) | BUSOP_SET(16, PACKAGE_16BITBUS_STREAM); return 0; }
[ 0, 0 ]
Linux Kernel
sound/soc/sh/fsi.c
static int fsi_dma_push_start_stop(struct fsi_priv *fsi, struct fsi_stream *io, int start) { struct fsi_master *master = fsi_get_master(fsi); u32 clk = fsi_is_port_a(fsi) ? CRA : CRB; u32 enable = start ? DMA_ON : 0; fsi_reg_mask_set(fsi, OUT_DMAC, DMA_ON, enable); dmaeng...
[ 0, 0 ]
Linux Kernel
sound/soc/sh/fsi.c
static int fsi_dma_remove(struct fsi_priv *fsi, struct fsi_stream *io) { fsi_stream_stop(fsi, io); if (io->chan) dma_release_channel(io->chan); io->chan = NULL; return 0; }
[ 0, 0 ]
Linux Kernel
sound/soc/sh/fsi.c
static int fsi_hw_shutdown(struct fsi_priv *fsi, struct device *dev) { if (fsi_is_clk_master(fsi)) return fsi_clk_disable(dev, fsi); return 0; }
[ 0, 0 ]
Linux Kernel
sound/soc/sh/fsi.c
static int fsi_dai_set_fmt(struct snd_soc_dai *dai, unsigned int fmt) { struct fsi_priv *fsi = fsi_get_priv_frm_dai(dai); int ret; switch (fmt & SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK) { case SND_SOC_DAIFMT_BC_FC: break; case SND_SOC_DAIFMT_BP_FP: fsi->clk_master = 1; /* cpu is master */ break; def...
[ 0, 0 ]
Linux Kernel
sound/soc/sh/fsi.c
static int fsi_pcm_open(struct snd_soc_component *component, struct snd_pcm_substream *substream) { struct snd_pcm_runtime *runtime = substream->runtime; int ret = 0; snd_soc_set_runtime_hwparams(substream, &fsi_pcm_hardware); ret = snd_pcm_hw_constraint_integer(runtime, SNDRV_PCM_HW_...
[ 0, 0 ]
Linux Kernel
sound/soc/sh/fsi.c
static void __fsi_resume(struct fsi_priv *fsi, struct fsi_stream *io, struct device *dev) { if (!fsi_stream_is_working(fsi, io)) return; fsi_hw_startup(fsi, io, dev); fsi_stream_start(fsi, io); }
[ 0, 0 ]
Linux Kernel
sound/soc/sh/hac.c
static void hac_ac97_coldrst(struct snd_ac97 *ac97) { int unit_id = 0; struct hac_priv *hac; hac = &hac_cpu_data[unit_id]; HACREG(HACCR) = 0; HACREG(HACCR) = CR_CDRT | CR_ST | CR_B9; msleep(10); hac_ac97_warmrst(ac97); }
[ 0, 0 ]
Linux Kernel
sound/soc/sh/hac.c
static int hac_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params, struct snd_soc_dai *dai) { struct hac_priv *hac = &hac_cpu_data[dai->id]; int d = substream->stream == SNDRV_PCM_STREAM_PLAYBACK ? 0 : 1; switch (params->msbits) { ...
[ 0, 0 ]
Linux Kernel
sound/soc/sh/hac.c
static int hac_soc_platform_probe(struct platform_device *pdev) { int ret; ret = snd_soc_set_ac97_ops(&hac_ac97_ops); if (ret != 0) return ret; return devm_snd_soc_register_component(&pdev->dev, &sh4_hac_component, sh4_hac_dai, ARRAY_SIZE(sh4_hac_dai)); }
[ 0, 0 ]
Linux Kernel
sound/soc/sh/migor.c
static unsigned long siumckb_recalc(struct clk *clk) { return codec_freq; }
[ 0, 0 ]
Linux Kernel
sound/soc/sh/migor.c
static int migor_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); int ret; unsigned int rate = params_rate(params); ret =...
[ 1, 0 ]
Linux Kernel
sound/soc/sh/rcar/adg.c
static u32 rsnd_adg_ssi_ws_timing_gen2(struct rsnd_dai_stream *io) { struct rsnd_mod *ssi_mod = rsnd_io_to_mod_ssi(io); int id = rsnd_mod_id(ssi_mod); int ws = id; if (rsnd_ssi_is_pin_sharing(io)) { switch (id) { case 1: case 2: case 9: ws = 0; break; case 4: ws = 3; ...
[ 1, 0 ]
Linux Kernel
sound/soc/sh/rcar/adg.c
static void __rsnd_adg_get_timesel_ratio(struct rsnd_priv *priv, struct rsnd_dai_stream *io, unsigned int target_rate, unsigned int *target_val, unsigned in...
[ 1, 1 ]
Linux Kernel
sound/soc/sh/rcar/adg.c
int rsnd_adg_ssi_clk_try_start(struct rsnd_mod *ssi_mod, unsigned int rate) { struct rsnd_priv *priv = rsnd_mod_to_priv(ssi_mod); struct rsnd_adg *adg = rsnd_priv_to_adg(priv); struct device *dev = rsnd_priv_to_dev(priv); struct rsnd_mod *adg_mod = rsnd_mod_get(adg); int data; u32 ckr = 0; data = rsnd_a...
[ 1, 0 ]
Linux Kernel
sound/soc/sh/rcar/adg.c
static void rsnd_adg_null_clk_clean(struct rsnd_priv *priv) { struct rsnd_adg *adg = priv->adg; if (adg->null_clk) clk_unregister_fixed_rate(adg->null_clk); }
[ 0, 0 ]
Linux Kernel
sound/soc/sh/rcar/adg.c
void rsnd_adg_remove(struct rsnd_priv *priv) { struct device *dev = rsnd_priv_to_dev(priv); struct device_node *np = dev->of_node; rsnd_adg_unregister_clkout(priv); of_clk_del_provider(np); rsnd_adg_clk_disable(priv); rsnd_adg_null_clk_clean(priv); }
[ 0, 0 ]
Linux Kernel
sound/soc/sh/rcar/cmd.c
int rsnd_cmd_probe(struct rsnd_priv *priv) { struct device *dev = rsnd_priv_to_dev(priv); struct rsnd_cmd *cmd; int i, nr; if (rsnd_is_gen1(priv)) return 0; /* same number as DVC */ nr = priv->dvc_nr; if (!nr) return 0; cmd = devm_kcalloc(dev, nr, sizeof(*cmd), GFP_KERNEL); if (!cmd) re...
[ 1, 0 ]
Linux Kernel
sound/soc/sh/rcar/cmd.c
void rsnd_cmd_remove(struct rsnd_priv *priv) { struct rsnd_cmd *cmd; int i; for_each_rsnd_cmd(cmd, priv, i) { rsnd_mod_quit(rsnd_mod_get(cmd)); } }
[ 0, 0 ]
Linux Kernel
sound/soc/sh/rcar/core.c
struct dma_chan *rsnd_mod_dma_req(struct rsnd_dai_stream *io, struct rsnd_mod *mod) { if (!mod || !mod->ops || !mod->ops->dma_req) return NULL; return mod->ops->dma_req(io, mod); } #define MOD_NAME_NUM 5 #define MOD_NAME_SIZE 16
[ 1, 0 ]
Linux Kernel
sound/soc/sh/rcar/core.c
char *rsnd_mod_name(struct rsnd_mod *mod) { static char names[MOD_NAME_NUM][MOD_NAME_SIZE]; static int num; char *name = names[num]; num++; if (num >= MOD_NAME_NUM) num = 0; if ((mod)->ops->id_sub) { snprintf(name, MOD_NAME_SIZE, "%s[%d%d]", mod->ops->name, rsnd_mod_id(mod), rsnd_mod_...
[ 0, 0 ]
Linux Kernel
sound/soc/sh/rcar/core.c
u32 *rsnd_mod_get_status(struct rsnd_mod *mod, struct rsnd_dai_stream *io, enum rsnd_mod_type type) { return &mod->status; }
[ 0, 0 ]
Linux Kernel
sound/soc/sh/rcar/core.c
int rsnd_mod_id_sub(struct rsnd_mod *mod) { if ((mod)->ops->id_sub) return (mod)->ops->id_sub(mod); return 0; }
[ 0, 0 ]
Linux Kernel
sound/soc/sh/rcar/core.c
int rsnd_mod_init(struct rsnd_priv *priv, struct rsnd_mod *mod, struct rsnd_mod_ops *ops, struct clk *clk, enum rsnd_mod_type type, int id) { int ret = clk_prepare(clk); if (ret) return ret; mod->id = id; mod->ops = ops; mod->type = type; mod->clk = clk; mod->pri...
[ 0, 0 ]
Linux Kernel
sound/soc/sh/rcar/core.c
int rsnd_runtime_channel_after_ctu_with_params( struct rsnd_dai_stream *io, struct snd_pcm_hw_params *params) { int chan = rsnd_runtime_channel_original_with_params(io, params); struct rsnd_mod *ctu_mod = rsnd_io_to_mod_ctu(io); if (ctu_mod) { u32 converted_chan = rsnd_io_converted_chan(io); if (rsn...
[ 0, 0 ]
Linux Kernel
sound/soc/sh/rcar/core.c
int rsnd_channel_normalization(int chan) { if (WARN_ON((chan > 8) || (chan < 0))) return 0; if (chan == 6) chan = 8; return chan; }
[ 0, 0 ]
Linux Kernel
sound/soc/sh/rcar/core.c
int rsnd_runtime_channel_for_ssi_with_params(struct rsnd_dai_stream *io, struct snd_pcm_hw_params *params) { struct rsnd_dai *rdai = rsnd_io_to_rdai(io); int chan = rsnd_io_is_play(io) ? rsnd_runtime_channel_after_ctu_with_params(io, params) ...
[ 0, 0 ]
Linux Kernel
sound/soc/sh/rcar/core.c
int rsnd_runtime_is_tdm_split(struct rsnd_dai_stream *io) { return !!rsnd_flags_has(io, RSND_STREAM_TDM_SPLIT); }
[ 0, 0 ]
Linux Kernel
sound/soc/sh/rcar/core.c
struct rsnd_mod *rsnd_mod_next(int *iterator, struct rsnd_dai_stream *io, enum rsnd_mod_type *array, int array_size) { int max = array ? array_size : RSND_MOD_MAX; for (; *iterator < max; (*iterator)++) { enum rsnd_mod_type type = (array) ? array[*iterator] : *iterator; struc...
[ 0, 0 ]
Linux Kernel
sound/soc/sh/rcar/core.c
static void rsnd_dai_disconnect(struct rsnd_mod *mod, struct rsnd_dai_stream *io, enum rsnd_mod_type type) { io->mod[type] = NULL; }
[ 0, 0 ]
Linux Kernel
sound/soc/sh/rcar/core.c
int rsnd_rdai_ssi_lane_ctrl(struct rsnd_dai *rdai, int ssi_lane) { if (ssi_lane > 0) rdai->ssi_lane = ssi_lane; return rdai->ssi_lane; }
[ 0, 0 ]
Linux Kernel
sound/soc/sh/rcar/core.c
static void rsnd_dai_stream_init(struct rsnd_dai_stream *io, struct snd_pcm_substream *substream) { io->substream = substream; }
[ 0, 0 ]
Linux Kernel
sound/soc/sh/rcar/core.c
static void rsnd_dai_stream_quit(struct rsnd_dai_stream *io) { io->substream = NULL; }
[ 0, 0 ]
Linux Kernel
sound/soc/sh/rcar/core.c
static int rsnd_soc_set_dai_tdm_slot(struct snd_soc_dai *dai, u32 tx_mask, u32 rx_mask, int slots, int slot_width) { struct rsnd_priv *priv = rsnd_dai_to_priv(dai); struct rsnd_dai *rdai = rsnd_dai_to_rdai(dai); struct device *dev = rsnd_priv_to_dev(priv); switch (slot_widt...
[ 0, 0 ]
Linux Kernel
sound/soc/sh/rcar/core.c
static void rsnd_parse_tdm_split_mode(struct rsnd_priv *priv, struct rsnd_dai_stream *io, struct device_node *dai_np) { struct device *dev = rsnd_priv_to_dev(priv); struct device_node *ssiu_np = rsnd_ssiu_of_node(priv); struct device_node...
[ 0, 0 ]
Linux Kernel
sound/soc/sh/rcar/core.c
static struct device_node *rsnd_dai_of_node(struct rsnd_priv *priv, int *is_graph) { struct device *dev = rsnd_priv_to_dev(priv); struct device_node *np = dev->of_node; struct device_node *dai_node; struct device_node *ret; *is_graph = 0; dai_node = of_get_child...
[ 0, 0 ]
Linux Kernel
sound/soc/sh/rcar/core.c
static int rsnd_preallocate_pages(struct snd_soc_pcm_runtime *rtd, struct rsnd_dai_stream *io, int stream) { struct rsnd_priv *priv = rsnd_io_to_priv(io); struct device *dev = rsnd_priv_to_dev(priv); struct snd_pcm_substream *substream; if (io->dmac_dev) dev = io->dmac_dev...
[ 0, 0 ]
Linux Kernel
sound/soc/sh/rcar/core.c
static int rsnd_dai_probe(struct rsnd_priv *priv) { struct device_node *dai_node; struct device_node *dai_np; struct snd_soc_dai_driver *rdrv; struct device *dev = rsnd_priv_to_dev(priv); struct rsnd_dai *rdai; int nr; int is_graph; int dai_i; dai_node = rsnd_dai_of_node(priv, &is_graph); if (is_gr...
[ 1, 0 ]
Linux Kernel
sound/soc/sh/rcar/core.c
static int rsnd_kctrl_info(struct snd_kcontrol *kctrl, struct snd_ctl_elem_info *uinfo) { struct rsnd_kctrl_cfg *cfg = snd_kcontrol_chip(kctrl); if (cfg->texts) { uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED; uinfo->count = cfg->size; uinfo->value.enumerated.items = cfg->max;...
[ 1, 0 ]
Linux Kernel
sound/soc/sh/rcar/core.c
static int rsnd_kctrl_put(struct snd_kcontrol *kctrl, struct snd_ctl_elem_value *uc) { struct rsnd_kctrl_cfg *cfg = snd_kcontrol_chip(kctrl); int i, change = 0; if (!cfg->accept(cfg->io)) return 0; for (i = 0; i < cfg->size; i++) { if (cfg->texts) { change |= (uc->valu...
[ 1, 0 ]
Linux Kernel
sound/soc/sh/rcar/core.c
struct rsnd_kctrl_cfg *rsnd_kctrl_init_s(struct rsnd_kctrl_cfg_s *cfg) { cfg->cfg.val = &cfg->val; return &cfg->cfg; }
[ 0, 0 ]
Linux Kernel
sound/soc/sh/rcar/core.c
static int __maybe_unused rsnd_resume(struct device *dev) { struct rsnd_priv *priv = dev_get_drvdata(dev); rsnd_adg_clk_enable(priv); return 0; }
[ 0, 0 ]
Linux Kernel
sound/soc/sh/rcar/ctu.c
static void rsnd_ctu_activation(struct rsnd_mod *mod) { rsnd_mod_write(mod, CTU_SWRSR, 0); rsnd_mod_write(mod, CTU_SWRSR, 1); }
[ 0, 0 ]
Linux Kernel
sound/soc/sh/rcar/ctu.c
static int rsnd_ctu_init(struct rsnd_mod *mod, struct rsnd_dai_stream *io, struct rsnd_priv *priv) { int ret; ret = rsnd_mod_power_on(mod); if (ret < 0) return ret; rsnd_ctu_activation(mod); rsnd_ctu_value_init(io, mod); return 0; }
[ 0, 0 ]
Linux Kernel
sound/soc/sh/rcar/ctu.c
static int rsnd_ctu_quit(struct rsnd_mod *mod, struct rsnd_dai_stream *io, struct rsnd_priv *priv) { rsnd_ctu_halt(mod); rsnd_mod_power_off(mod); return 0; }
[ 0, 0 ]
Linux Kernel
sound/soc/sh/rcar/ctu.c
void rsnd_ctu_remove(struct rsnd_priv *priv) { struct rsnd_ctu *ctu; int i; for_each_rsnd_ctu(ctu, priv, i) { rsnd_mod_quit(rsnd_mod_get(ctu)); } }
[ 0, 0 ]
Linux Kernel
sound/soc/sh/rcar/debugfs.c
static int rsnd_debugfs_show(struct seq_file *m, void *v) { struct rsnd_dai_stream *io = m->private; struct rsnd_mod *mod = rsnd_io_to_mod_ssi(io); struct rsnd_priv *priv = rsnd_mod_to_priv(mod); int i; rsnd_adg_clk_dbg_info(priv, m); for_each_rsnd_mod(i, mod, io) { u32 *status = mod->ops->get_status(...
[ 1, 0 ]
Linux Kernel
sound/soc/sh/rcar/debugfs.c
int rsnd_debugfs_probe(struct snd_soc_component *component) { struct rsnd_priv *priv = dev_get_drvdata(component->dev); struct rsnd_dai *rdai; struct dentry *dir; char name[64]; int i; if (rsnd_is_gen1(priv)) return 0; for_each_rsnd_dai(rdai, priv, i) { /* * created debugfs will be automati...
[ 1, 0 ]
Linux Kernel
sound/soc/sh/rcar/dma.c
static void rsnd_dmaen_complete(void *data) { struct rsnd_mod *mod = data; rsnd_mod_interrupt(mod, __rsnd_dmaen_complete); }
[ 0, 0 ]
Linux Kernel
sound/soc/sh/rcar/dma.c
static int rsnd_dmaen_prepare(struct rsnd_mod *mod, struct rsnd_dai_stream *io, struct rsnd_priv *priv) { struct rsnd_dma *dma = rsnd_mod_to_dma(mod); struct rsnd_dmaen *dmaen = rsnd_dma_to_dmaen(dma); struct device *dev = rsnd_priv_to_dev(priv); if (dmaen->chan) return 0; ...
[ 0, 0 ]
Linux Kernel
sound/soc/sh/rcar/dma.c
static int rsnd_dmaen_attach(struct rsnd_dai_stream *io, struct rsnd_dma *dma, struct rsnd_mod *mod_from, struct rsnd_mod *mod_to) { struct rsnd_priv *priv = rsnd_io_to_priv(io); struct rsnd_dma_ctrl *dmac = rsnd_priv_to_dmac(priv); struct dma_chan *chan; ...
[ 0, 0 ]
Linux Kernel
sound/soc/sh/rcar/dma.c
static u32 rsnd_dmapp_get_chcr(struct rsnd_dai_stream *io, struct rsnd_mod *mod_from, struct rsnd_mod *mod_to) { return (rsnd_dmapp_get_id(io, mod_from) << 24) + (rsnd_dmapp_get_id(io, mod_to) << 16); } #define rsnd_dmapp_addr(dmac, dma, reg) ...
[ 0, 0 ]
Linux Kernel
sound/soc/sh/rcar/dma.c
static void rsnd_dmapp_bset(struct rsnd_dma *dma, u32 data, u32 mask, u32 reg) { struct rsnd_mod *mod = rsnd_mod_get(dma); struct rsnd_priv *priv = rsnd_mod_to_priv(mod); struct rsnd_dma_ctrl *dmac = rsnd_priv_to_dmac(priv); void __iomem *addr = rsnd_dmapp_addr(dmac, dma, reg); u32 val = ioread32(addr); v...
[ 0, 0 ]
Linux Kernel
sound/soc/sh/rcar/dma.c
static int rsnd_dmapp_stop(struct rsnd_mod *mod, struct rsnd_dai_stream *io, struct rsnd_priv *priv) { struct rsnd_dma *dma = rsnd_mod_to_dma(mod); int i; rsnd_dmapp_bset(dma, 0, PDMACHCR_DE, PDMACHCR); for (i = 0; i < 1024; i++) { if (0 == (rsnd_dmapp_read(dma, PDMACHCR) & PDM...
[ 0, 0 ]
Linux Kernel
sound/soc/sh/rcar/dma.c
static int rsnd_dmapp_start(struct rsnd_mod *mod, struct rsnd_dai_stream *io, struct rsnd_priv *priv) { struct rsnd_dma *dma = rsnd_mod_to_dma(mod); struct rsnd_dmapp *dmapp = rsnd_dma_to_dmapp(dma); rsnd_dmapp_write(dma, dma->src_addr, PDMASAR); rsnd_dmapp_write(dma, dma->dst_addr...
[ 0, 0 ]
Linux Kernel
sound/soc/sh/rcar/dma.c
int rsnd_dma_attach(struct rsnd_dai_stream *io, struct rsnd_mod *mod, struct rsnd_mod **dma_mod) { if (!(*dma_mod)) { int ret = rsnd_dma_alloc(io, mod, dma_mod); if (ret < 0) return ret; } return rsnd_dai_connect(*dma_mod, io, (*dma_mod)->type); }
[ 0, 0 ]
Linux Kernel
sound/soc/sh/rcar/dvc.c
static void rsnd_dvc_halt(struct rsnd_mod *mod) { rsnd_mod_write(mod, DVC_DVUIR, 1); rsnd_mod_write(mod, DVC_SWRSR, 0); } #define rsnd_dvc_get_vrpdr(dvc) \ (rsnd_kctrl_vals(dvc->rup) << 8 | rsnd_kctrl_vals(dvc->rdown)) #define rsnd_dvc_get_vrdbr(dvc) ...
[ 0, 0 ]
Linux Kernel
sound/soc/sh/rcar/dvc.c
static void rsnd_dvc_volume_parameter(struct rsnd_dai_stream *io, struct rsnd_mod *mod) { struct rsnd_dvc *dvc = rsnd_mod_to_dvc(mod); u32 val[RSND_MAX_CHANNELS]; int i; if (rsnd_kctrl_vals(dvc->ren)) for (i = 0; i < RSND_MAX_CHANNELS; i++) val[i] = rsnd_kctrl_ma...
[ 0, 0 ]
Linux Kernel
sound/soc/sh/rcar/gen.c
static int rsnd_is_accessible_reg(struct rsnd_priv *priv, struct rsnd_gen *gen, enum rsnd_reg reg) { if (!gen->regs[reg]) { struct device *dev = rsnd_priv_to_dev(priv); dev_err(dev, "unsupported register access %x\n", reg); return 0; } return 1; }
[ 0, 0 ]
Linux Kernel
sound/soc/sh/rcar/mix.c
static int rsnd_mix_probe_(struct rsnd_mod *mod, struct rsnd_dai_stream *io, struct rsnd_priv *priv) { return rsnd_cmd_attach(io, rsnd_mod_id(mod)); }
[ 0, 0 ]
Linux Kernel
sound/soc/sh/rcar/mix.c
struct rsnd_mod *rsnd_mix_mod_get(struct rsnd_priv *priv, int id) { if (WARN_ON(id < 0 || id >= rsnd_mix_nr(priv))) id = 0; return rsnd_mod_get(rsnd_mix_get(priv, id)); }
[ 1, 0 ]
Linux Kernel
sound/soc/sh/rcar/src.c
static int rsnd_src_start(struct rsnd_mod *mod, struct rsnd_dai_stream *io, struct rsnd_priv *priv) { u32 val; val = (rsnd_io_to_mod_dvc(io) && !rsnd_src_sync_is_enabled(mod)) ? 0x01 : 0x11; rsnd_mod_write(mod, SRC_CTRL, val); return 0; }
[ 0, 0 ]
Linux Kernel
sound/soc/sh/rcar/src.c
static void __rsnd_src_interrupt(struct rsnd_mod *mod, struct rsnd_dai_stream *io) { struct rsnd_priv *priv = rsnd_mod_to_priv(mod); bool stop = false; spin_lock(&priv->lock); if (!rsnd_io_is_working(io)) goto rsnd_src_interrupt_out; if (rsnd_src_error_occurred(mod)) ...
[ 0, 0 ]
Linux Kernel
sound/soc/sh/rcar/src.c
static int rsnd_src_probe_(struct rsnd_mod *mod, struct rsnd_dai_stream *io, struct rsnd_priv *priv) { struct rsnd_src *src = rsnd_mod_to_src(mod); struct device *dev = rsnd_priv_to_dev(priv); int irq = src->irq; int ret; if (irq > 0) { ret = devm_request_irq(dev, irq, rsnd_sr...
[ 0, 0 ]
Linux Kernel
sound/soc/sh/rcar/src.c
static int rsnd_src_pcm_new(struct rsnd_mod *mod, struct rsnd_dai_stream *io, struct snd_soc_pcm_runtime *rtd) { struct rsnd_src *src = rsnd_mod_to_src(mod); int ret; /* * It can't use SRC Synchronous convert * when Capture if it uses CMD */ if (rsnd_io_to_mod_cmd(io) && !r...
[ 0, 0 ]
Linux Kernel
sound/soc/sh/rcar/src.c
static void rsnd_src_debug_info(struct seq_file *m, struct rsnd_dai_stream *io, struct rsnd_mod *mod) { rsnd_debugfs_mod_reg_show(m, mod, RSND_GEN2_SCU, rsnd_mod_id(mod) * 0x20, 0x20); seq_puts(m, "\n"); rsnd_debugfs_mod_reg_show(m, mod, RSND_GEN2_SCU, 0...
[ 0, 0 ]
Linux Kernel
sound/soc/sh/rcar/src.c
int rsnd_src_probe(struct rsnd_priv *priv) { struct device_node *node; struct device_node *np; struct device *dev = rsnd_priv_to_dev(priv); struct rsnd_src *src; struct clk *clk; char name[RSND_SRC_NAME_SIZE]; int i, nr, ret; if (rsnd_is_gen1(priv)) return 0; node = rsnd_src_of_node(priv); if ...
[ 1, 0 ]
Linux Kernel
sound/soc/sh/rcar/ssi.c
static u32 rsnd_ssi_multi_secondaries(struct rsnd_dai_stream *io) { static const enum rsnd_mod_type types[] = { RSND_MOD_SSIM1, RSND_MOD_SSIM2, RSND_MOD_SSIM3, }; int i, mask; mask = 0; for (i = 0; i < ARRAY_SIZE(types); i++) { struct rsnd_mod *mod = rsnd_io_to_mod(io, types[i]); ...
[ 0, 0 ]
Linux Kernel
sound/soc/sh/rcar/ssi.c
static u32 rsnd_ssi_run_mods(struct rsnd_dai_stream *io) { struct rsnd_mod *ssi_mod = rsnd_io_to_mod_ssi(io); struct rsnd_mod *ssi_parent_mod = rsnd_io_to_mod_ssip(io); u32 mods; mods = rsnd_ssi_multi_secondaries_runtime(io) | 1 << rsnd_mod_id(ssi_mod); if (ssi_parent_mod) mods |= 1 << rsnd_mod_id(ssi_...
[ 0, 0 ]
Linux Kernel
sound/soc/sh/rcar/ssi.c
u32 rsnd_ssi_multi_secondaries_runtime(struct rsnd_dai_stream *io) { if (rsnd_runtime_is_multi_ssi(io)) return rsnd_ssi_multi_secondaries(io); return 0; }
[ 0, 0 ]
Linux Kernel
sound/soc/sh/rcar/ssi.c
static u32 rsnd_rdai_width_to_swl(struct rsnd_dai *rdai) { struct rsnd_priv *priv = rsnd_rdai_to_priv(rdai); struct device *dev = rsnd_priv_to_dev(priv); int width = rsnd_rdai_width_get(rdai); switch (width) { case 32: return SWL_32; case 24: return SWL_24; case 16: return SWL_16; } dev...
[ 1, 0 ]
Linux Kernel
sound/soc/sh/rcar/ssi.c
unsigned int rsnd_ssi_clk_query(struct rsnd_dai *rdai, int param1, int param2, int *idx) { struct rsnd_priv *priv = rsnd_rdai_to_priv(rdai); static const int ssi_clk_mul_table[] = { 1, 2, 4, 8, 16, 6, 12, }; int j, ret; unsigned int main_rate; int width = rsnd_rdai_widt...
[ 0, 0 ]
Linux Kernel
sound/soc/sh/rcar/ssi.c
static int rsnd_ssi_master_clk_start(struct rsnd_mod *mod, struct rsnd_dai_stream *io) { struct rsnd_priv *priv = rsnd_io_to_priv(io); struct device *dev = rsnd_priv_to_dev(priv); struct rsnd_dai *rdai = rsnd_io_to_rdai(io); struct rsnd_ssi *ssi = rsnd_mod_to_ssi(mod); int...
[ 1, 0 ]
Linux Kernel
sound/soc/sh/rcar/ssi.c
static void rsnd_ssi_register_setup(struct rsnd_mod *mod) { struct rsnd_ssi *ssi = rsnd_mod_to_ssi(mod); rsnd_mod_write(mod, SSIWSR, ssi->wsr); rsnd_mod_write(mod, SSICR, ssi->cr_own | ssi->cr_clk | ssi->cr_mode | ssi->cr_en); }
[ 0, 0 ]
Linux Kernel
sound/soc/sh/rcar/ssi.c
static int rsnd_ssi_irq(struct rsnd_mod *mod, struct rsnd_dai_stream *io, struct rsnd_priv *priv, int enable) { u32 val = 0; int is_tdm, is_tdm_split; int id = rsnd_mod_id(mod); is_tdm = rsnd_runtime_is_tdm(io); is_tdm_split = rsnd_runtime_is_tdm_split(io); if (rsnd_is_gen1(priv))...
[ 1, 0 ]
Linux Kernel
sound/soc/sh/rcar/ssi.c
static u32 *rsnd_ssi_get_status(struct rsnd_mod *mod, struct rsnd_dai_stream *io, enum rsnd_mod_type type) { if (type == RSND_MOD_SSIP) return &io->parent_ssi_status; return rsnd_mod_get_status(mod, io, type); }
[ 0, 0 ]
Linux Kernel
sound/soc/sh/rcar/ssi.c
static struct dma_chan *rsnd_ssi_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; if (rsnd_ssi_use_busif(io)) name = is_play ? "rxu" : "txu"; else name = ...
[ 0, 0 ]