Projectname
large_stringclasses
15 values
Filepath
large_stringlengths
4
106
⌀
Function
large_stringlengths
11
3.45k
Label
list
Linux Kernel
sound/soc/fsl/fsl_sai.c
static int fsl_sai_set_dai_sysclk(struct snd_soc_dai *cpu_dai, int clk_id, unsigned int freq, int dir) { struct fsl_sai *sai = snd_soc_dai_get_drvdata(cpu_dai); int ret; if (dir == SND_SOC_CLOCK_IN) return 0; if (freq > 0 && clk_id != FSL_SAI_CLK_BUS) { if (clk_id < ...
[ 1, 0 ]
Linux Kernel
sound/soc/fsl/fsl_sai.c
static int fsl_sai_dai_probe(struct snd_soc_dai *cpu_dai) { struct fsl_sai *sai = dev_get_drvdata(cpu_dai->dev); unsigned int ofs = sai->soc_data->reg_offset; regmap_write(sai->regmap, FSL_SAI_TCSR(ofs), FSL_SAI_CSR_SR); regmap_write(sai->regmap, FSL_SAI_RCSR(ofs), FSL_SAI_CSR_SR); /* Clear SR bit to finish ...
[ 1, 0 ]
Linux Kernel
sound/soc/fsl/fsl_sai.c
static int fsl_sai_dai_resume(struct snd_soc_component *component) { struct fsl_sai *sai = snd_soc_component_get_drvdata(component); struct device *dev = &sai->pdev->dev; int ret; if (!IS_ERR_OR_NULL(sai->pinctrl) && !IS_ERR_OR_NULL(sai->pins_state)) { ret = pinctrl_select_state(sai->pinctrl, sai->pins_st...
[ 0, 0 ]
Linux Kernel
sound/soc/fsl/fsl_sai.c
static bool fsl_sai_writeable_reg(struct device *dev, unsigned int reg) { struct fsl_sai *sai = dev_get_drvdata(dev); unsigned int ofs = sai->soc_data->reg_offset; if (reg >= FSL_SAI_TCSR(ofs) && reg <= FSL_SAI_TCR5(ofs)) return true; if (reg >= FSL_SAI_RCSR(ofs) && reg <= FSL_SAI_RCR5(ofs)) return t...
[ 1, 0 ]
Linux Kernel
sound/soc/fsl/fsl_sai.c
static int fsl_sai_runtime_resume(struct device *dev) { struct fsl_sai *sai = dev_get_drvdata(dev); unsigned int ofs = sai->soc_data->reg_offset; int ret; ret = clk_prepare_enable(sai->bus_clk); if (ret) { dev_err(dev, "failed to enable bus clock: %d\n", ret); return ret; } if (sai->mclk_stream...
[ 1, 0 ]
Linux Kernel
sound/soc/fsl/fsl_spdif.c
static void spdif_irq_sym_error(struct fsl_spdif_priv *spdif_priv) { struct regmap *regmap = spdif_priv->regmap; struct platform_device *pdev = spdif_priv->pdev; dev_dbg(&pdev->dev, "isr: receiver found illegal symbol\n"); if (!spdif_priv->dpll_locked) regmap_update_bits(regmap, REG_SPDIF_SIE, INT_SYM_ERR...
[ 0, 0 ]
Linux Kernel
sound/soc/fsl/fsl_spdif.c
static int spdif_reparent_rootclk(struct fsl_spdif_priv *spdif_priv, unsigned int sample_rate) { struct platform_device *pdev = spdif_priv->pdev; struct clk *clk; int ret; if (!fsl_spdif_can_set_clk_rate(spdif_priv, STC_TXCLK_SPDIF_ROOT)) return 0; /* Get root clock */ ...
[ 0, 0 ]
Linux Kernel
sound/soc/fsl/fsl_spdif.c
static int fsl_spdif_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params, struct snd_soc_dai *dai) { struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); struct fsl_spdif_priv *spdif_priv = snd_soc_dai_get...
[ 0, 0 ]
Linux Kernel
sound/soc/fsl/fsl_spdif.c
static int fsl_spdif_pb_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *uvalue) { struct snd_soc_dai *cpu_dai = snd_kcontrol_chip(kcontrol); struct fsl_spdif_priv *spdif_priv = snd_soc_dai_get_drvdata(cpu_dai); struct spdif_mixer_control *ctrl = &spdif_priv->fsl_spdif_co...
[ 0, 0 ]
Linux Kernel
sound/soc/fsl/fsl_spdif.c
static int fsl_spdif_capture_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_soc_dai *cpu_dai = snd_kcontrol_chip(kcontrol); struct fsl_spdif_priv *spdif_priv = snd_soc_dai_get_drvdata(cpu_dai); struct regmap *regmap = spdif_priv->regmap; u32...
[ 1, 0 ]
Linux Kernel
sound/soc/fsl/fsl_spdif.c
static int fsl_spdif_subcode_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_soc_dai *cpu_dai = snd_kcontrol_chip(kcontrol); struct fsl_spdif_priv *spdif_priv = snd_soc_dai_get_drvdata(cpu_dai); struct spdif_mixer_control *ctrl = &spdif_priv->f...
[ 1, 0 ]
Linux Kernel
sound/soc/fsl/fsl_spdif.c
static int fsl_spdif_qget(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_soc_dai *cpu_dai = snd_kcontrol_chip(kcontrol); struct fsl_spdif_priv *spdif_priv = snd_soc_dai_get_drvdata(cpu_dai); struct spdif_mixer_control *ctrl = &spdif_priv->fsl_spdif_contr...
[ 1, 0 ]
Linux Kernel
sound/soc/fsl/fsl_spdif.c
static int fsl_spdif_rx_vbit_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_soc_dai *cpu_dai = snd_kcontrol_chip(kcontrol); struct fsl_spdif_priv *spdif_priv = snd_soc_dai_get_drvdata(cpu_dai); struct regmap *regmap = spdif_priv->regmap; u32...
[ 1, 0 ]
Linux Kernel
sound/soc/fsl/fsl_spdif.c
static int fsl_spdif_rx_rcm_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_soc_dai *cpu_dai = snd_kcontrol_chip(kcontrol); struct fsl_spdif_priv *spdif_priv = snd_soc_dai_get_drvdata(cpu_dai); struct regmap *regmap = spdif_priv->regmap; u32 ...
[ 0, 0 ]
Linux Kernel
sound/soc/fsl/fsl_spdif.c
static int spdif_get_rxclk_rate(struct fsl_spdif_priv *spdif_priv, enum spdif_gainsel gainsel) { struct regmap *regmap = spdif_priv->regmap; struct platform_device *pdev = spdif_priv->pdev; u64 tmpval64, busclk_freq = 0; u32 freqmeas, phaseconf; u8 clksrc; regmap_read(regmap...
[ 1, 0 ]
Linux Kernel
sound/soc/fsl/fsl_spdif.c
static int fsl_spdif_usync_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_soc_dai *cpu_dai = snd_kcontrol_chip(kcontrol); struct fsl_spdif_priv *spdif_priv = snd_soc_dai_get_drvdata(cpu_dai); struct regmap *regmap = spdif_priv->regmap; u32 val...
[ 0, 0 ]
Linux Kernel
sound/soc/fsl/fsl_spdif.c
static bool fsl_spdif_volatile_reg(struct device *dev, unsigned int reg) { switch (reg) { case REG_SPDIF_SRPC: case REG_SPDIF_SIS: case REG_SPDIF_SRL: case REG_SPDIF_SRR: case REG_SPDIF_SRCSH: case REG_SPDIF_SRCSL: case REG_SPDIF_SRU: case REG_SPDIF_SRQ: case REG_SPDIF_SRFM: case REG_SPDIF_SRCCA_...
[ 0, 0 ]
Linux Kernel
sound/soc/fsl/fsl_spdif.c
static bool fsl_spdif_writeable_reg(struct device *dev, unsigned int reg) { switch (reg) { case REG_SPDIF_SCR: case REG_SPDIF_SRCD: case REG_SPDIF_SRPC: case REG_SPDIF_SIE: case REG_SPDIF_SIC: case REG_SPDIF_STL: case REG_SPDIF_STR: case REG_SPDIF_STCSCH: case REG_SPDIF_STCSCL: case REG_SPDIF_STC...
[ 0, 0 ]
Linux Kernel
sound/soc/fsl/fsl_spdif.c
static int fsl_spdif_probe_txclk(struct fsl_spdif_priv *spdif_priv, enum spdif_txrate index) { static const u32 rate[] = { 32000, 44100, 48000, 88200, 96000, 176400, 192000, }; struct platform_device *pdev = spdif_priv->pdev; struct device *dev = &pdev->dev; u64 savesub ...
[ 0, 0 ]
Linux Kernel
sound/soc/fsl/fsl_ssi.c
static bool fsl_ssi_is_ac97(struct fsl_ssi *ssi) { return (ssi->dai_fmt & SND_SOC_DAIFMT_FORMAT_MASK) == SND_SOC_DAIFMT_AC97; }
[ 0, 0 ]
Linux Kernel
sound/soc/fsl/fsl_ssi.c
static bool fsl_ssi_is_i2s_clock_provider(struct fsl_ssi *ssi) { return (ssi->dai_fmt & SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK) == SND_SOC_DAIFMT_BP_FP; }
[ 0, 0 ]
Linux Kernel
sound/soc/fsl/fsl_ssi.c
static int fsl_ssi_hw_free(struct snd_pcm_substream *substream, struct snd_soc_dai *dai) { struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); struct fsl_ssi *ssi = snd_soc_dai_get_drvdata(asoc_rtd_to_cpu(rtd, 0)); if (fsl_ssi_is_i2s_clock_provider(ssi) && ssi->b...
[ 0, 0 ]
Linux Kernel
sound/soc/fsl/fsl_ssi.c
static int fsl_ssi_set_dai_tdm_slot(struct snd_soc_dai *dai, u32 tx_mask, u32 rx_mask, int slots, int slot_width) { struct fsl_ssi *ssi = snd_soc_dai_get_drvdata(dai); struct regmap *regs = ssi->regs; u32 val; if (slot_width & 1 || slot_width < 8 || slot_width > 24) { de...
[ 1, 0 ]
Linux Kernel
sound/soc/fsl/fsl_ssi.c
static int fsl_ssi_dai_probe(struct snd_soc_dai *dai) { struct fsl_ssi *ssi = snd_soc_dai_get_drvdata(dai); if (ssi->soc->imx && ssi->use_dma) snd_soc_dai_init_dma_data(dai, &ssi->dma_params_tx, &ssi->dma_params_rx); return 0; }
[ 1, 0 ]
Linux Kernel
sound/soc/fsl/fsl_ssi.c
static void fsl_ssi_ac97_write(struct snd_ac97 *ac97, unsigned short reg, unsigned short val) { struct regmap *regs = fsl_ac97_data->regs; unsigned int lreg; unsigned int lval; int ret; if (reg > 0x7f) return; mutex_lock(&fsl_ac97_data->ac97_reg_lock); ret = clk_prep...
[ 0, 0 ]
Linux Kernel
sound/soc/fsl/fsl_ssi.c
static void make_lowercase(char *s) { if (!s) return; for (; *s; s++) *s = tolower(*s); }
[ 0, 0 ]
Linux Kernel
sound/soc/fsl/fsl_ssi.c
static void fsl_ssi_imx_clean(struct platform_device *pdev, struct fsl_ssi *ssi) { if (!ssi->use_dma) imx_pcm_fiq_exit(pdev); if (!ssi->has_ipg_clk_name) clk_disable_unprepare(ssi->clk); }
[ 0, 0 ]
Linux Kernel
sound/soc/fsl/fsl_ssi.c
static int fsl_ssi_remove(struct platform_device *pdev) { struct fsl_ssi *ssi = dev_get_drvdata(&pdev->dev); fsl_ssi_debugfs_remove(&ssi->dbg_stats); if (ssi->card_pdev) platform_device_unregister(ssi->card_pdev); fsl_ssi_hw_clean(ssi); if (ssi->soc->imx) fsl_ssi_imx_clean(pdev, ssi); if (fsl_s...
[ 0, 0 ]
Linux Kernel
sound/soc/fsl/fsl_ssi.c
static int fsl_ssi_resume(struct device *dev) { struct fsl_ssi *ssi = dev_get_drvdata(dev); struct regmap *regs = ssi->regs; regcache_cache_only(regs, false); regmap_update_bits(regs, REG_SSI_SFCSR, SSI_SFCSR_RFWM1_MASK | SSI_SFCSR_TFWM1_MASK | SSI_SFCSR_RFWM0_MAS...
[ 0, 0 ]
Linux Kernel
sound/soc/fsl/fsl_ssi_dbg.c
static int fsl_ssi_stats_show(struct seq_file *s, void *unused) { struct fsl_ssi_dbg *ssi_dbg = s->private; SIER_SHOW(RFRC_EN, rfrc); SIER_SHOW(TFRC_EN, tfrc); SIER_SHOW(CMDAU_EN, cmdau); SIER_SHOW(CMDDU_EN, cmddu); SIER_SHOW(RXT_EN, rxt); SIER_SHOW(RDR1_EN, rdr1); SIER_SHOW(RDR0_EN, rdr0); SIER_SHOW...
[ 0, 0 ]
Linux Kernel
sound/soc/fsl/fsl_utils.c
int fsl_asoc_get_dma_channel(struct device_node *ssi_np, const char *name, struct snd_soc_dai_link *dai, unsigned int *dma_channel_id, unsigned int *dma_id) { struct resource res; struct device_node *dma_channel_np, *dma_np; co...
[ 0, 1 ]
Linux Kernel
sound/soc/fsl/fsl_xcvr.c
static int fsl_xcvr_arc_mode_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_soc_dai *dai = snd_kcontrol_chip(kcontrol); struct fsl_xcvr *xcvr = snd_soc_dai_get_drvdata(dai); ucontrol->value.enumerated.item[0] = xcvr->arc_mode; return 0; }
[ 0, 0 ]
Linux Kernel
sound/soc/fsl/fsl_xcvr.c
static int fsl_xcvr_capds_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_soc_dai *dai = snd_kcontrol_chip(kcontrol); struct fsl_xcvr *xcvr = snd_soc_dai_get_drvdata(dai); memcpy(xcvr->cap_ds, ucontrol->value.bytes.data, FSL_XCVR_CAPDS_SIZE); ...
[ 1, 0 ]
Linux Kernel
sound/soc/fsl/fsl_xcvr.c
static int fsl_xcvr_en_aud_pll(struct fsl_xcvr *xcvr, u32 freq) { struct device *dev = &xcvr->pdev->dev; int ret; clk_disable_unprepare(xcvr->phy_clk); ret = clk_set_rate(xcvr->phy_clk, freq); if (ret < 0) { dev_err(dev, "Error while setting AUD PLL rate: %d\n", ret); return ret; } ret = clk_prep...
[ 0, 0 ]
Linux Kernel
sound/soc/fsl/fsl_xcvr.c
static void fsl_xcvr_shutdown(struct snd_pcm_substream *substream, struct snd_soc_dai *dai) { struct fsl_xcvr *xcvr = snd_soc_dai_get_drvdata(dai); bool tx = substream->stream == SNDRV_PCM_STREAM_PLAYBACK; u32 mask = 0, val = 0; int ret; xcvr->streams &= ~BIT(substream->stream);...
[ 0, 0 ]
Linux Kernel
sound/soc/fsl/fsl_xcvr.c
static int fsl_xcvr_rx_cs_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_soc_dai *dai = snd_kcontrol_chip(kcontrol); struct fsl_xcvr *xcvr = snd_soc_dai_get_drvdata(dai); memcpy(ucontrol->value.iec958.status, xcvr->rx_iec958.status, 24); ret...
[ 1, 0 ]
Linux Kernel
sound/soc/fsl/fsl_xcvr.c
static int fsl_xcvr_dai_probe(struct snd_soc_dai *dai) { struct fsl_xcvr *xcvr = snd_soc_dai_get_drvdata(dai); snd_soc_dai_init_dma_data(dai, &xcvr->dma_prms_tx, &xcvr->dma_prms_rx); snd_soc_add_dai_controls(dai, &fsl_xcvr_mode_kctl, 1); snd_soc_add_dai_controls(dai, &fsl_xcvr_arc_mode_kctl, 1); snd_soc_ad...
[ 0, 0 ]
Linux Kernel
sound/soc/fsl/imx-audmix.c
static int imx_audmix_fe_startup(struct snd_pcm_substream *substream) { struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); struct imx_audmix *priv = snd_soc_card_get_drvdata(rtd->card); struct snd_pcm_runtime *runtime = substream->runtime; struct device *dev = rtd->card->dev; unsigned long c...
[ 1, 0 ]
Linux Kernel
sound/soc/fsl/imx-audmux.c
static const char *audmux_port_string(int port) { switch (port) { case MX31_AUDMUX_PORT1_SSI0: return "imx-ssi.0"; case MX31_AUDMUX_PORT2_SSI1: return "imx-ssi.1"; case MX31_AUDMUX_PORT3_SSI_PINS_3: return "SSI3"; case MX31_AUDMUX_PORT4_SSI_PINS_4: return "SSI4"; case MX31_AUDMUX_PORT5_SSI_P...
[ 0, 0 ]
Linux Kernel
sound/soc/fsl/imx-audmux.c
static void audmux_debugfs_init(void) { uintptr_t i; char buf[20]; audmux_debugfs_root = debugfs_create_dir("audmux", NULL); for (i = 0; i < MX31_AUDMUX_PORT7_SSI_PINS_7 + 1; i++) { snprintf(buf, sizeof(buf), "ssi%lu", i); debugfs_create_file(buf, 0444, audmux_debugfs_root, (void *)i, ...
[ 1, 0 ]
Linux Kernel
sound/soc/fsl/imx-audmux.c
static inline void audmux_debugfs_remove(void) {} #endif
[ 0, 0 ]
Linux Kernel
sound/soc/fsl/imx-audmux.c
int imx_audmux_v1_configure_port(unsigned int port, unsigned int pcr) { if (audmux_type != IMX21_AUDMUX) return -EINVAL; if (!audmux_base) return -ENOSYS; if (port >= ARRAY_SIZE(port_mapping)) return -EINVAL; writel(pcr, audmux_base + port_mapping[port]); return 0; }
[ 0, 0 ]
Linux Kernel
sound/soc/fsl/imx-audmux.c
int imx_audmux_v2_configure_port(unsigned int port, unsigned int ptcr, unsigned int pdcr) { int ret; if (audmux_type != IMX31_AUDMUX) return -EINVAL; if (!audmux_base) return -ENOSYS; ret = clk_prepare_enable(audmux_clk); if (ret) return ret; writel(ptcr, au...
[ 0, 0 ]
Linux Kernel
sound/soc/fsl/imx-audmux.c
static int imx_audmux_parse_dt_defaults(struct platform_device *pdev, struct device_node *of_node) { struct device_node *child; for_each_available_child_of_node(of_node, child) { unsigned int port; unsigned int ptcr = 0; unsigned int pdcr = 0; unsigned int p...
[ 1, 0 ]
Linux Kernel
sound/soc/fsl/imx-audmux.c
static int __init imx_audmux_init(void) { return platform_driver_register(&imx_audmux_driver); }
[ 0, 0 ]
Linux Kernel
sound/soc/fsl/imx-audmux.c
static void __exit imx_audmux_exit(void) { platform_driver_unregister(&imx_audmux_driver); }
[ 0, 0 ]
Linux Kernel
sound/soc/fsl/imx-card.c
static bool format_is_tdm(struct dai_link_data *link_data) { if (link_data->slots > 2) return true; else return false; }
[ 0, 0 ]
Linux Kernel
sound/soc/fsl/imx-card.c
static unsigned long akcodec_get_mclk_rate(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params, int slots, int slot_width) { struct snd_soc_pcm_runtime *rtd = substream->private_data; struct imx_card_data *data =...
[ 1, 0 ]
Linux Kernel
sound/soc/fsl/imx-card.c
static int imx_aif_startup(struct snd_pcm_substream *substream) { struct snd_pcm_runtime *runtime = substream->runtime; struct snd_soc_pcm_runtime *rtd = substream->private_data; struct snd_soc_card *card = rtd->card; struct imx_card_data *data = snd_soc_card_get_drvdata(card); struct dai_link_data *link_dat...
[ 1, 0 ]
Linux Kernel
sound/soc/fsl/imx-hdmi.c
static int imx_hdmi_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params) { struct snd_soc_pcm_runtime *rtd = substream->private_data; struct imx_hdmi_data *data = snd_soc_card_get_drvdata(rtd->card); bool tx = substream->stream == SNDRV_PCM_STREAM_PLAYBACK...
[ 1, 0 ]
Linux Kernel
sound/soc/fsl/imx-pcm-dma.c
static bool filter(struct dma_chan *chan, void *param) { if (!imx_dma_is_general_purpose(chan)) return false; chan->private = param; return true; }
[ 0, 0 ]
Linux Kernel
sound/soc/fsl/imx-pcm-fiq.c
static enum hrtimer_restart snd_hrtimer_callback(struct hrtimer *hrt) { struct imx_pcm_runtime_data *iprtd = container_of(hrt, struct imx_pcm_runtime_data, hrt); struct snd_pcm_substream *substream = iprtd->substream; struct pt_regs regs; if (!atomic_read(&iprtd->playing) && !atomic_read(&iprtd->capturi...
[ 1, 0 ]
Linux Kernel
sound/soc/fsl/imx-pcm-fiq.c
static int snd_imx_pcm_prepare(struct snd_soc_component *component, struct snd_pcm_substream *substream) { struct snd_pcm_runtime *runtime = substream->runtime; struct imx_pcm_runtime_data *iprtd = runtime->private_data; struct pt_regs regs; get_fiq_regs(&regs); if (substream-...
[ 0, 0 ]
Linux Kernel
sound/soc/fsl/imx-pcm-fiq.c
static int snd_imx_open(struct snd_soc_component *component, struct snd_pcm_substream *substream) { struct snd_pcm_runtime *runtime = substream->runtime; struct imx_pcm_runtime_data *iprtd; int ret; iprtd = kzalloc(sizeof(*iprtd), GFP_KERNEL); if (iprtd == NULL) return -ENOMEM; ...
[ 0, 0 ]
Linux Kernel
sound/soc/fsl/imx-pcm-fiq.c
static int snd_imx_close(struct snd_soc_component *component, struct snd_pcm_substream *substream) { struct snd_pcm_runtime *runtime = substream->runtime; struct imx_pcm_runtime_data *iprtd = runtime->private_data; hrtimer_cancel(&iprtd->hrt); kfree(iprtd); return 0; }
[ 0, 0 ]
Linux Kernel
sound/soc/fsl/imx-pcm-fiq.c
static int imx_pcm_new(struct snd_soc_pcm_runtime *rtd) { struct snd_card *card = rtd->card->snd_card; struct snd_pcm *pcm = rtd->pcm; int ret; ret = dma_coerce_mask_and_coherent(card->dev, DMA_BIT_MASK(32)); if (ret) return ret; return snd_pcm_set_fixed_buffer_all(pcm, SNDRV_DMA_TYPE_DEV_WC, ...
[ 1, 0 ]
Linux Kernel
sound/soc/fsl/imx-pcm-rpmsg.c
static int imx_rpmsg_pause(struct snd_soc_component *component, struct snd_pcm_substream *substream) { struct rpmsg_info *info = dev_get_drvdata(component->dev); struct rpmsg_msg *msg; if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { msg = &info->msg[TX_PAUSE]; msg->s_msg...
[ 0, 0 ]
Linux Kernel
sound/soc/fsl/imx-pcm-rpmsg.c
static int imx_rpmsg_terminate_all(struct snd_soc_component *component, struct snd_pcm_substream *substream) { struct rpmsg_info *info = dev_get_drvdata(component->dev); struct rpmsg_msg *msg; int cmd; if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { msg = &info->msg...
[ 0, 0 ]
Linux Kernel
sound/soc/fsl/imx-pcm-rpmsg.c
static int imx_rpmsg_pcm_runtime_resume(struct device *dev) { struct rpmsg_info *info = dev_get_drvdata(dev); cpu_latency_qos_add_request(&info->pm_qos_req, 0); return 0; }
[ 0, 0 ]
Linux Kernel
sound/soc/fsl/imx-pcm-rpmsg.c
static int imx_rpmsg_pcm_resume(struct device *dev) { struct rpmsg_info *info = dev_get_drvdata(dev); struct rpmsg_msg *rpmsg_tx; struct rpmsg_msg *rpmsg_rx; rpmsg_tx = &info->msg[TX_RESUME]; rpmsg_rx = &info->msg[RX_RESUME]; rpmsg_tx->s_msg.header.cmd = TX_RESUME; info->send_message(rpmsg_tx, info); ...
[ 0, 0 ]
Linux Kernel
sound/soc/fsl/mpc5200_dma.c
static snd_pcm_uframes_t psc_dma_pointer(struct snd_soc_component *component, struct snd_pcm_substream *substream) { struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); struct psc_dma *psc_dma = snd_soc_dai_get_drvdata(asoc_rtd_to_cpu(rtd, 0)); struct psc_...
[ 1, 0 ]
Linux Kernel
sound/soc/fsl/mpc5200_dma.c
int mpc5200_audio_dma_destroy(struct platform_device *op) { struct psc_dma *psc_dma = dev_get_drvdata(&op->dev); dev_dbg(&op->dev, "mpc5200_audio_dma_destroy()\n"); bcom_gen_bd_rx_release(psc_dma->capture.bcom_task); bcom_gen_bd_tx_release(psc_dma->playback.bcom_task); free_irq(psc_dma->irq, psc_dma); fr...
[ 0, 0 ]
Linux Kernel
sound/soc/fsl/mpc5200_psc_ac97.c
static void psc_ac97_cold_reset(struct snd_ac97 *ac97) { struct mpc52xx_psc __iomem *regs = psc_dma->psc_regs; mutex_lock(&psc_dma->mutex); dev_dbg(psc_dma->dev, "cold reset\n"); mpc5200_psc_ac97_gpio_reset(psc_dma->id); out_be32(&regs->sicr, psc_dma->sicr | MPC52xx_PSC_SICR_ACRB); /* Re-enable RX and T...
[ 0, 0 ]
Linux Kernel
sound/soc/fsl/mpc5200_psc_ac97.c
static int psc_ac97_hw_analog_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params, struct snd_soc_dai *cpu_dai) { struct psc_dma *psc_dma = snd_soc_dai_get_drvdata(cpu_dai); struct psc_dma_stream *s = to_psc_dma_strea...
[ 1, 0 ]
Linux Kernel
sound/soc/fsl/mpc5200_psc_i2s.c
static int psc_i2s_of_remove(struct platform_device *op) { mpc5200_audio_dma_destroy(op); snd_soc_unregister_component(&op->dev); return 0; }
[ 0, 0 ]
Linux Kernel
sound/soc/fsl/p1022_ds.c
static int p1022_ds_machine_probe(struct snd_soc_card *card) { struct machine_data *mdata = container_of(card, struct machine_data, card); struct ccsr_guts __iomem *guts; guts = ioremap(guts_phys, sizeof(struct ccsr_guts)); if (!guts) { dev_err(card->dev, "could not map global utilities\n"); return -EN...
[ 1, 0 ]
Linux Kernel
sound/soc/fsl/p1022_ds.c
static int p1022_ds_machine_remove(struct snd_soc_card *card) { struct machine_data *mdata = container_of(card, struct machine_data, card); struct ccsr_guts __iomem *guts; guts = ioremap(guts_phys, sizeof(struct ccsr_guts)); if (!guts) { dev_err(card->dev, "could not map global utilities\n"); return -E...
[ 1, 0 ]
Linux Kernel
sound/soc/fsl/p1022_ds.c
static int __init p1022_ds_init(void) { struct device_node *guts_np; struct resource res; guts_np = of_find_compatible_node(NULL, NULL, "fsl,p1022-guts"); if (of_address_to_resource(guts_np, 0, &res)) { pr_err("snd-soc-p1022ds: missing/invalid global utils node\n"); of_node_put(guts_np); return -EI...
[ 1, 0 ]
Linux Kernel
sound/soc/fsl/p1022_ds.c
static void __exit p1022_ds_exit(void) { platform_driver_unregister(&p1022_ds_driver); }
[ 0, 0 ]
Linux Kernel
sound/soc/fsl/p1022_rdk.c
static inline void guts_set_dmuxcr(struct ccsr_guts __iomem *guts, unsigned int co, unsigned int ch, unsigned int device) { unsigned int shift = 16 + (8 * (1 - co) + 2 * (3 - ch)); clrsetbits_be32(&guts->dmuxcr, 3 << shift, device << shift); }
[ 1, 0 ]
Linux Kernel
sound/soc/fsl/p1022_rdk.c
static int p1022_rdk_machine_remove(struct snd_soc_card *card) { struct machine_data *mdata = container_of(card, struct machine_data, card); struct ccsr_guts __iomem *guts; guts = ioremap(guts_phys, sizeof(struct ccsr_guts)); if (!guts) { dev_err(card->dev, "could not map global utilities\n"); return -...
[ 1, 0 ]
Linux Kernel
sound/soc/fsl/pcm030-audio-fabric.c
static int pcm030_fabric_probe(struct platform_device *op) { struct device_node *np = op->dev.of_node; struct device_node *platform_np; struct snd_soc_card *card = &pcm030_card; struct pcm030_audio_data *pdata; struct snd_soc_dai_link *dai_link; int ret; int i; if (!of_machine_is_compatible("phytec,pc...
[ 1, 0 ]
Linux Kernel
sound/soc/generic/audio-graph-card.c
static void graph_parse_mclk_fs(struct device_node *top, struct device_node *ep, struct simple_dai_props *props) { struct device_node *port = of_get_parent(ep); struct device_node *ports = of_get_parent(port); of_property_read_u32(top, "mclk-fs", &props->mclk_fs); if (of_node_n...
[ 0, 0 ]
Linux Kernel
sound/soc/generic/audio-graph-card.c
static int graph_count_dpcm(struct asoc_simple_priv *priv, struct device_node *cpu_ep, struct device_node *codec_ep, struct link_info *li) { struct device *dev = simple_priv_to_dev(priv); if (li->link >= SNDRV_MAX_LINKS) { dev_...
[ 0, 0 ]
Linux Kernel
sound/soc/generic/audio-graph-card.c
static int graph_probe(struct platform_device *pdev) { struct asoc_simple_priv *priv; struct device *dev = &pdev->dev; struct snd_soc_card *card; priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL); if (!priv) return -ENOMEM; card = simple_priv_to_card(priv); card->dapm_widgets = graph_dapm_widgets;...
[ 1, 0 ]
Linux Kernel
sound/soc/generic/audio-graph-card2-custom-sample.c
static int custom_card_probe(struct snd_soc_card *card) { struct asoc_simple_priv *simple_priv = snd_soc_card_get_drvdata(card); struct custom_priv *custom_priv = simple_to_custom(simple_priv); struct device *dev = simple_priv_to_dev(simple_priv); dev_info(dev, "custom probe\n"); custom_priv->custom_params ...
[ 0, 0 ]
Linux Kernel
sound/soc/generic/audio-graph-card2-custom-sample.c
static int custom_hook_post(struct asoc_simple_priv *priv) { struct device *dev = simple_priv_to_dev(priv); struct snd_soc_card *card; dev_info(dev, "hook : %s\n", __func__); /* overwrite .probe sample */ card = simple_priv_to_card(priv); card->probe = custom_card_probe; return 0; }
[ 0, 0 ]
Linux Kernel
sound/soc/generic/audio-graph-card2.c
static enum graph_type graph_get_type(struct asoc_simple_priv *priv, struct device_node *lnk) { enum graph_type type = __graph_get_type(lnk); if (type == GRAPH_MULTI) type = GRAPH_NORMAL; #ifdef DEBUG { struct device *dev = simple_priv_to_dev(priv); const char *...
[ 0, 0 ]
Linux Kernel
sound/soc/generic/audio-graph-card2.c
static int graph_parse_node(struct asoc_simple_priv *priv, enum graph_type gtype, struct device_node *port, struct link_info *li, int is_cpu) { struct device_node *ep; int ret = 0; if (graph_lnk_is_multi(port)) { int idx; of_node_get(port); fo...
[ 0, 0 ]
Linux Kernel
sound/soc/generic/audio-graph-card2.c
int audio_graph2_link_normal(struct asoc_simple_priv *priv, struct device_node *lnk, struct link_info *li) { struct device_node *cpu_port = lnk; struct device_node *cpu_ep = port_to_endpoint(cpu_port); struct device_node *codec_port = of_graph_get_remote_port(cpu_ep); int ret; re...
[ 0, 0 ]
Linux Kernel
sound/soc/generic/audio-graph-card2.c
static int graph_link(struct asoc_simple_priv *priv, struct graph2_custom_hooks *hooks, enum graph_type gtype, struct device_node *lnk, struct link_info *li) { struct device *dev = simple_priv_to_dev(priv); GRAPH2_CUSTOM func = NULL; int ret = -EINVAL; switch (gtype...
[ 1, 0 ]
Linux Kernel
sound/soc/generic/audio-graph-card2.c
static int graph_count_c2c(struct asoc_simple_priv *priv, struct device_node *lnk, struct link_info *li) { struct device_node *ports = of_get_parent(lnk); struct device_node *port0 = lnk; struct device_node *port1 = of_get_next_child(ports, lnk); struct device_node *ep0 = port_to_endp...
[ 0, 0 ]
Linux Kernel
sound/soc/generic/audio-graph-card2.c
static int graph_for_each_link( struct asoc_simple_priv *priv, struct graph2_custom_hooks *hooks, struct link_info *li, int (*func)(struct asoc_simple_priv *priv, struct graph2_custom_hooks *hooks, enum graph_type gtype, struct device_node *lnk, struct link_info *li)) { str...
[ 0, 0 ]
Linux Kernel
sound/soc/generic/simple-card-utils.c
void asoc_simple_parse_convert(struct device_node *np, char *prefix, struct asoc_simple_data *data) { char prop[128]; if (!prefix) prefix = ""; snprintf(prop, sizeof(prop), "%s%s", prefix, "convert-rate"); of_property_read_u32(np, prop, &data->convert_rate); /* channels t...
[ 1, 0 ]
Linux Kernel
sound/soc/generic/simple-card-utils.c
bool asoc_simple_is_convert_required(const struct asoc_simple_data *data) { return data->convert_rate || data->convert_channels || data->convert_sample_format; }
[ 0, 0 ]
Linux Kernel
sound/soc/generic/simple-card-utils.c
static int asoc_simple_check_fixed_sysclk(struct device *dev, struct asoc_simple_dai *dai, unsigned int *fixed_sysclk) { if (dai->clk_fixed) { if (*fixed_sysclk && *fixed_sysclk != dai->sysclk) { dev_err(dev, "inconsistent ...
[ 0, 0 ]
Linux Kernel
sound/soc/generic/simple-card-utils.c
void asoc_simple_shutdown(struct snd_pcm_substream *substream) { struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); struct asoc_simple_priv *priv = snd_soc_card_get_drvdata(rtd->card); struct simple_dai_props *props = simple_priv_to_props(priv, rtd->num); struct asoc_simple_dai *dai; int i; ...
[ 0, 0 ]
Linux Kernel
sound/soc/generic/simple-card-utils.c
static int asoc_simple_set_clk_rate(struct device *dev, struct asoc_simple_dai *simple_dai, unsigned long rate) { if (!simple_dai) return 0; if (simple_dai->clk_fixed && rate != simple_dai->sysclk) { dev_err(dev, "dai %s invalid clock...
[ 1, 0 ]
Linux Kernel
sound/soc/generic/simple-card-utils.c
static int asoc_simple_set_tdm(struct snd_soc_dai *dai, struct asoc_simple_dai *simple_dai, struct snd_pcm_hw_params *params) { int sample_bits = params_width(params); int slot_width, slot_count; int i, ret; if (!simple_dai || !simple_dai->tdm_widt...
[ 1, 0 ]
Linux Kernel
sound/soc/generic/simple-card-utils.c
static int asoc_simple_init_for_codec2codec(struct snd_soc_pcm_runtime *rtd, struct simple_dai_props *dai_props) { struct snd_soc_dai_link *dai_link = rtd->dai_link; struct snd_soc_component *component; struct snd_soc_pcm_stream *params; struct snd_pcm_hardware hw; int i, ret,...
[ 1, 0 ]
Linux Kernel
sound/soc/generic/simple-card-utils.c
void asoc_simple_canonicalize_platform( struct snd_soc_dai_link_component *platforms, struct snd_soc_dai_link_component *cpus) { if (!platforms->of_node) platforms->of_node = cpus->of_node; }
[ 0, 0 ]
Linux Kernel
sound/soc/generic/simple-card-utils.c
int asoc_simple_parse_routing(struct snd_soc_card *card, char *prefix) { struct device_node *node = card->dev->of_node; char prop[128]; if (!prefix) prefix = ""; snprintf(prop, sizeof(prop), "%s%s", prefix, "routing"); if (!of_property_read_bool(node, prop)) return 0; return snd_soc_of_parse_au...
[ 1, 0 ]
Linux Kernel
sound/soc/generic/simple-card.c
static int simple_dai_link_of(struct asoc_simple_priv *priv, struct device_node *np, struct device_node *codec, struct link_info *li, bool is_top) { struct device *dev = simple_priv_to_dev(priv); struct snd_soc_dai_link *dai_link = simple_priv_to_link(priv...
[ 1, 0 ]
Linux Kernel
sound/soc/generic/test-component.c
static void test_dai_shutdown(struct snd_pcm_substream *substream, struct snd_soc_dai *dai) { mile_stone(dai); }
[ 0, 0 ]
Linux Kernel
sound/soc/generic/test-component.c
static int test_dai_hw_free(struct snd_pcm_substream *substream, struct snd_soc_dai *dai) { mile_stone(dai); return 0; }
[ 0, 0 ]
Linux Kernel
sound/soc/generic/test-component.c
static int test_dai_bespoke_trigger(struct snd_pcm_substream *substream, int cmd, struct snd_soc_dai *dai) { mile_stone(dai); return 0; }
[ 0, 0 ]
Linux Kernel
sound/soc/generic/test-component.c
static int test_component_set_jack(struct snd_soc_component *component, struct snd_soc_jack *jack, void *data) { mile_stone(component); return 0; }
[ 0, 0 ]
Linux Kernel
sound/soc/generic/test-component.c
static void test_component_timer_start(struct test_priv *priv) { schedule_delayed_work(&priv->dwork, msecs_to_jiffies(10)); }
[ 0, 0 ]
Linux Kernel
sound/soc/generic/test-component.c
static int test_component_trigger(struct snd_soc_component *component, struct snd_pcm_substream *substream, int cmd) { struct test_priv *priv = dev_get_drvdata(component->dev); mile_stone(component); switch (cmd) { case SNDRV_PCM_TRIGGER_STAR...
[ 1, 0 ]
Linux Kernel
sound/soc/hisilicon/hi6210-i2s.c
static inline u32 hi6210_read_reg(struct hi6210_i2s *i2s, int reg) { return readl(i2s->base + reg); }
[ 0, 0 ]