Projectname
large_stringclasses
15 values
Filepath
large_stringlengths
4
106
⌀
Function
large_stringlengths
11
3.45k
Label
list
Linux Kernel
sound/soc/sunxi/sun4i-codec.c
static int sun4i_codec_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 sun4i_codec *scodec = snd_soc_card_get_drvd...
[ 0, 0 ]
Linux Kernel
sound/soc/sunxi/sun4i-codec.c
static int sun4i_codec_startup(struct snd_pcm_substream *substream, struct snd_soc_dai *dai) { struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); struct sun4i_codec *scodec = snd_soc_card_get_drvdata(rtd->card); snd_pcm_hw_constraint_list(substream->runtime, 0, SND...
[ 0, 0 ]
Linux Kernel
sound/soc/sunxi/sun4i-codec.c
static void sun4i_codec_shutdown(struct snd_pcm_substream *substream, struct snd_soc_dai *dai) { struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); struct sun4i_codec *scodec = snd_soc_card_get_drvdata(rtd->card); clk_disable_unprepare(scodec->clk_module); }
[ 0, 0 ]
Linux Kernel
sound/soc/sunxi/sun4i-codec.c
static struct snd_soc_dai_link *sun4i_codec_create_link(struct device *dev, int *num_links) { struct snd_soc_dai_link *link = devm_kzalloc(dev, sizeof(*link), GFP_KERNEL); struct snd_soc_dai_link_component *dlc = devm_kzalloc(dev, 3 * sizeof(*dlc), GFP_...
[ 1, 0 ]
Linux Kernel
sound/soc/sunxi/sun4i-codec.c
static struct snd_soc_card *sun6i_codec_create_card(struct device *dev) { struct snd_soc_card *card; int ret; card = devm_kzalloc(dev, sizeof(*card), GFP_KERNEL); if (!card) return ERR_PTR(-ENOMEM); card->dai_link = sun4i_codec_create_link(dev, &card->num_links); if (!card->dai_link) return ERR_P...
[ 1, 0 ]
Linux Kernel
sound/soc/sunxi/sun4i-codec.c
static struct snd_soc_card *sun8i_a23_codec_create_card(struct device *dev) { struct snd_soc_card *card; int ret; card = devm_kzalloc(dev, sizeof(*card), GFP_KERNEL); if (!card) return ERR_PTR(-ENOMEM); aux_dev.dlc.of_node = of_parse_phandle(dev->of_node, "allwinner,codec-analog-controls", 0); ...
[ 1, 0 ]
Linux Kernel
sound/soc/sunxi/sun4i-codec.c
static int sun4i_codec_remove(struct platform_device *pdev) { struct snd_soc_card *card = platform_get_drvdata(pdev); struct sun4i_codec *scodec = snd_soc_card_get_drvdata(card); snd_soc_unregister_card(card); if (scodec->rst) reset_control_assert(scodec->rst); clk_disable_unprepare(scodec->clk_apb); ...
[ 0, 0 ]
Linux Kernel
sound/soc/sunxi/sun4i-i2s.c
static int sun4i_i2s_set_chan_cfg(const struct sun4i_i2s *i2s, unsigned int channels, unsigned int slots, unsigned int slot_width) { regmap_write(i2s->regmap, SUN4I_I2S_TX_CHAN_MAP_REG, 0x76543210); regmap_write(i2s->regmap, SUN4I_I2S_RX_CHAN_MAP_...
[ 0, 0 ]
Linux Kernel
sound/soc/sunxi/sun4i-i2s.c
static void sun4i_i2s_start_playback(struct sun4i_i2s *i2s) { regmap_update_bits(i2s->regmap, SUN4I_I2S_FIFO_CTRL_REG, SUN4I_I2S_FIFO_CTRL_FLUSH_TX, SUN4I_I2S_FIFO_CTRL_FLUSH_TX); /* Clear TX counter */ regmap_write(i2s->regmap, SUN4I_I2S_TX_CNT_REG, 0); /* Enable TX...
[ 0, 0 ]
Linux Kernel
sound/soc/sunxi/sun4i-i2s.c
static int sun4i_i2s_set_tdm_slot(struct snd_soc_dai *dai, unsigned int tx_mask, unsigned int rx_mask, int slots, int slot_width) { struct sun4i_i2s *i2s = snd_soc_dai_get_drvdata(dai); if (slots > 8) return -EINVAL; i2s->slots = slots; ...
[ 0, 0 ]
Linux Kernel
sound/soc/sunxi/sun4i-i2s.c
static bool sun8i_i2s_rd_reg(struct device *dev, unsigned int reg) { switch (reg) { case SUN8I_I2S_FIFO_TX_REG: return false; default: return true; } }
[ 0, 0 ]
Linux Kernel
sound/soc/sunxi/sun4i-spdif.c
static void sun4i_spdif_configure(struct sun4i_spdif_dev *host) { const struct sun4i_spdif_quirks *quirks = host->quirks; regmap_write(host->regmap, SUN4I_SPDIF_CTL, SUN4I_SPDIF_CTL_RESET); /* flush TX FIFO */ regmap_update_bits(host->regmap, SUN4I_SPDIF_FCTL, quirks->val_fctl_ftx, quirks...
[ 0, 0 ]
Linux Kernel
sound/soc/sunxi/sun4i-spdif.c
static int sun4i_spdif_get_status(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_soc_dai *cpu_dai = snd_kcontrol_chip(kcontrol); struct sun4i_spdif_dev *host = snd_soc_dai_get_drvdata(cpu_dai); u8 *status = ucontrol->value.iec958.status; unsig...
[ 1, 0 ]
Linux Kernel
sound/soc/sunxi/sun4i-spdif.c
static int sun4i_spdif_runtime_resume(struct device *dev) { struct sun4i_spdif_dev *host = dev_get_drvdata(dev); int ret; ret = clk_prepare_enable(host->spdif_clk); if (ret) return ret; ret = clk_prepare_enable(host->apb_clk); if (ret) clk_disable_unprepare(host->spdif_clk); return ret; }
[ 0, 0 ]
Linux Kernel
sound/soc/sunxi/sun50i-codec-analog.c
static int sun50i_a64_codec_resume(struct snd_soc_component *component) { return regmap_update_bits(component->regmap, SUN50I_ADDA_HP_CTRL, BIT(SUN50I_ADDA_HP_CTRL_PA_CLK_GATE), 0); }
[ 0, 0 ]
Linux Kernel
sound/soc/sunxi/sun50i-dmic.c
static int sun50i_dmic_soc_dai_probe(struct snd_soc_dai *dai) { struct sun50i_dmic_dev *host = snd_soc_dai_get_drvdata(dai); snd_soc_dai_init_dma_data(dai, NULL, &host->dma_params_rx); return 0; }
[ 0, 0 ]
Linux Kernel
sound/soc/sunxi/sun50i-dmic.c
static int sun50i_dmic_runtime_resume(struct device *dev) { struct sun50i_dmic_dev *host = dev_get_drvdata(dev); int ret; ret = clk_prepare_enable(host->dmic_clk); if (ret) return ret; ret = clk_prepare_enable(host->bus_clk); if (ret) { clk_disable_unprepare(host->dmic_clk); return ret; } ...
[ 0, 0 ]
Linux Kernel
sound/soc/sunxi/sun8i-codec-analog.c
static int sun8i_codec_add_headphone(struct snd_soc_component *cmpnt) { struct snd_soc_dapm_context *dapm = snd_soc_component_get_dapm(cmpnt); struct device *dev = cmpnt->dev; int ret; ret = snd_soc_add_component_controls( cmpnt, sun8i_codec_headphone_controls, ARRAY_SIZE(sun8i_codec_headphone_con...
[ 0, 0 ]
Linux Kernel
sound/soc/sunxi/sun8i-codec-analog.c
static int sun8i_codec_add_linein(struct snd_soc_component *cmpnt) { struct snd_soc_dapm_context *dapm = snd_soc_component_get_dapm(cmpnt); struct device *dev = cmpnt->dev; int ret; ret = snd_soc_add_component_controls(cmpnt, sun8i_codec_linein_controls, ARRAY_SIZE(sun8i...
[ 0, 0 ]
Linux Kernel
sound/soc/sunxi/sun8i-codec-analog.c
static int sun8i_codec_add_lineout(struct snd_soc_component *cmpnt) { struct snd_soc_dapm_context *dapm = snd_soc_component_get_dapm(cmpnt); struct device *dev = cmpnt->dev; int ret; ret = snd_soc_add_component_controls(cmpnt, sun8i_codec_lineout_controls, ARRAY_SIZE...
[ 0, 0 ]
Linux Kernel
sound/soc/sunxi/sun8i-codec.c
static int sun8i_codec_runtime_suspend(struct device *dev) { struct sun8i_codec *scodec = dev_get_drvdata(dev); regcache_cache_only(scodec->regmap, true); regcache_mark_dirty(scodec->regmap); return 0; }
[ 0, 0 ]
Linux Kernel
sound/soc/sunxi/sun8i-codec.c
static int sun8i_codec_hw_free(struct snd_pcm_substream *substream, struct snd_soc_dai *dai) { struct sun8i_codec *scodec = snd_soc_dai_get_drvdata(dai); struct sun8i_codec_aif *aif = &scodec->aifs[dai->id]; if (aif->open_streams != BIT(substream->stream)) goto done; clk_rat...
[ 0, 0 ]
Linux Kernel
sound/soc/sunxi/sun8i-codec.c
static int sun8i_codec_remove(struct platform_device *pdev) { pm_runtime_disable(&pdev->dev); if (!pm_runtime_status_suspended(&pdev->dev)) sun8i_codec_runtime_suspend(&pdev->dev); return 0; }
[ 0, 0 ]
Linux Kernel
sound/soc/tegra/tegra186_asrc.c
static int __maybe_unused tegra186_asrc_runtime_suspend(struct device *dev) { struct tegra186_asrc *asrc = dev_get_drvdata(dev); regcache_cache_only(asrc->regmap, true); regcache_mark_dirty(asrc->regmap); return 0; }
[ 0, 0 ]
Linux Kernel
sound/soc/tegra/tegra186_asrc.c
static int tegra186_asrc_get_ratio_source(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct soc_enum *asrc_private = (struct soc_enum *)kcontrol->private_value; struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); struct tegr...
[ 1, 0 ]
Linux Kernel
sound/soc/tegra/tegra186_asrc.c
static int tegra186_asrc_put_ratio_int(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct soc_mixer_control *asrc_private = (struct soc_mixer_control *)kcontrol->private_value; struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontr...
[ 1, 0 ]
Linux Kernel
sound/soc/tegra/tegra186_asrc.c
static int tegra186_asrc_get_ratio_frac(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct soc_mreg_control *asrc_private = (struct soc_mreg_control *)kcontrol->private_value; struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontr...
[ 1, 0 ]
Linux Kernel
sound/soc/tegra/tegra186_asrc.c
static int tegra186_asrc_put_ratio_frac(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct soc_mreg_control *asrc_private = (struct soc_mreg_control *)kcontrol->private_value; struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontr...
[ 1, 0 ]
Linux Kernel
sound/soc/tegra/tegra186_asrc.c
static int tegra186_asrc_put_hwcomp_disable(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct soc_mixer_control *asrc_private = (struct soc_mixer_control *)kcontrol->private_value; struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontro...
[ 1, 0 ]
Linux Kernel
sound/soc/tegra/tegra186_asrc.c
static int tegra186_asrc_put_output_threshold(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct soc_mixer_control *asrc_private = (struct soc_mixer_control *)kcontrol->private_value; struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kco...
[ 1, 0 ]
Linux Kernel
sound/soc/tegra/tegra186_asrc.c
static int tegra186_asrc_platform_remove(struct platform_device *pdev) { pm_runtime_disable(&pdev->dev); return 0; }
[ 0, 0 ]
Linux Kernel
sound/soc/tegra/tegra186_dspk.c
static int tegra186_dspk_get_pol_sel(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_soc_component *codec = snd_soc_kcontrol_component(kcontrol); struct tegra186_dspk *dspk = snd_soc_component_get_drvdata(codec); ucontrol->value.enumerated.it...
[ 0, 0 ]
Linux Kernel
sound/soc/tegra/tegra186_dspk.c
static int tegra186_dspk_get_ch_sel(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_soc_component *codec = snd_soc_kcontrol_component(kcontrol); struct tegra186_dspk *dspk = snd_soc_component_get_drvdata(codec); ucontrol->value.enumerated.item...
[ 0, 0 ]
Linux Kernel
sound/soc/tegra/tegra186_dspk.c
static int tegra186_dspk_put_ch_sel(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_soc_component *codec = snd_soc_kcontrol_component(kcontrol); struct tegra186_dspk *dspk = snd_soc_component_get_drvdata(codec); unsigned int value = ucontrol->v...
[ 1, 0 ]
Linux Kernel
sound/soc/tegra/tegra186_dspk.c
static int tegra186_dspk_platform_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct tegra186_dspk *dspk; void __iomem *regs; int err; dspk = devm_kzalloc(dev, sizeof(*dspk), GFP_KERNEL); if (!dspk) return -ENOMEM; dspk->osr_val = DSPK_OSR_64; dspk->lrsel = DSPK_LRSEL_LE...
[ 1, 0 ]
Linux Kernel
sound/soc/tegra/tegra20_ac97.c
static void tegra20_ac97_codec_reset(struct snd_ac97 *ac97) { u32 readback; unsigned long timeout; gpio_set_value(workdata->reset_gpio, 0); udelay(2); gpio_set_value(workdata->reset_gpio, 1); udelay(2); timeout = jiffies + msecs_to_jiffies(100); do { regmap_read(workdata->regmap, TEGRA20_AC97_ST...
[ 0, 0 ]
Linux Kernel
sound/soc/tegra/tegra20_ac97.c
static void tegra20_ac97_codec_write(struct snd_ac97 *ac97_snd, unsigned short reg, unsigned short val) { u32 readback; unsigned long timeout; regmap_write(workdata->regmap, TEGRA20_AC97_CMD, ((reg << TEGRA20_AC97_CMD_CMD_ADDR_SHIFT) & TEGRA20_...
[ 0, 0 ]
Linux Kernel
sound/soc/tegra/tegra20_ac97.c
static inline void tegra20_ac97_start_capture(struct tegra20_ac97 *ac97) { regmap_update_bits(ac97->regmap, TEGRA20_AC97_FIFO1_SCR, TEGRA20_AC97_FIFO_SCR_REC_FULL_EN, TEGRA20_AC97_FIFO_SCR_REC_FULL_EN); }
[ 0, 0 ]
Linux Kernel
sound/soc/tegra/tegra20_ac97.c
static int tegra20_ac97_trigger(struct snd_pcm_substream *substream, int cmd, struct snd_soc_dai *dai) { struct tegra20_ac97 *ac97 = snd_soc_dai_get_drvdata(dai); switch (cmd) { case SNDRV_PCM_TRIGGER_START: case SNDRV_PCM_TRIGGER_PAUSE_RELEASE: case SNDRV_PCM_TRIGGER_RESUME:...
[ 0, 0 ]
Linux Kernel
sound/soc/tegra/tegra20_das.c
static bool tegra20_das_wr_rd_reg(struct device *dev, unsigned int reg) { if (reg <= LAST_REG(DAP_CTRL_SEL)) return true; if ((reg >= TEGRA20_DAS_DAC_INPUT_DATA_CLK_SEL) && (reg <= LAST_REG(DAC_INPUT_DATA_CLK_SEL))) return true; return false; }
[ 0, 0 ]
Linux Kernel
sound/soc/tegra/tegra20_i2s.c
static __maybe_unused int tegra20_i2s_runtime_resume(struct device *dev) { struct tegra20_i2s *i2s = dev_get_drvdata(dev); int ret; ret = reset_control_assert(i2s->reset); if (ret) return ret; ret = clk_prepare_enable(i2s->clk_i2s); if (ret) { dev_err(dev, "clk_enable failed: %d\n", ret); ret...
[ 0, 0 ]
Linux Kernel
sound/soc/tegra/tegra20_i2s.c
static void tegra20_i2s_stop_playback(struct tegra20_i2s *i2s) { regmap_update_bits(i2s->regmap, TEGRA20_I2S_CTRL, TEGRA20_I2S_CTRL_FIFO1_ENABLE, 0); }
[ 0, 0 ]
Linux Kernel
sound/soc/tegra/tegra20_i2s.c
static bool tegra20_i2s_volatile_reg(struct device *dev, unsigned int reg) { switch (reg) { case TEGRA20_I2S_STATUS: case TEGRA20_I2S_FIFO_SCR: case TEGRA20_I2S_FIFO1: case TEGRA20_I2S_FIFO2: return true; default: return false; } }
[ 0, 0 ]
Linux Kernel
sound/soc/tegra/tegra20_i2s.c
static bool tegra20_i2s_precious_reg(struct device *dev, unsigned int reg) { switch (reg) { case TEGRA20_I2S_FIFO1: case TEGRA20_I2S_FIFO2: return true; default: return false; } }
[ 0, 0 ]
Linux Kernel
sound/soc/tegra/tegra20_i2s.c
static int tegra20_i2s_platform_remove(struct platform_device *pdev) { tegra_pcm_platform_unregister(&pdev->dev); snd_soc_unregister_component(&pdev->dev); pm_runtime_disable(&pdev->dev); return 0; }
[ 0, 0 ]
Linux Kernel
sound/soc/tegra/tegra20_spdif.c
static void tegra20_spdif_stop_playback(struct tegra20_spdif *spdif) { regmap_update_bits(spdif->regmap, TEGRA20_SPDIF_CTRL, TEGRA20_SPDIF_CTRL_TX_EN, 0); }
[ 0, 0 ]
Linux Kernel
sound/soc/tegra/tegra20_spdif.c
static int tegra20_spdif_trigger(struct snd_pcm_substream *substream, int cmd, struct snd_soc_dai *dai) { struct tegra20_spdif *spdif = dev_get_drvdata(dai->dev); switch (cmd) { case SNDRV_PCM_TRIGGER_START: case SNDRV_PCM_TRIGGER_PAUSE_RELEASE: case SNDRV_PCM_TRIGGER_RESUME...
[ 0, 0 ]
Linux Kernel
sound/soc/tegra/tegra20_spdif.c
static bool tegra20_spdif_precious_reg(struct device *dev, unsigned int reg) { switch (reg) { case TEGRA20_SPDIF_DATA_OUT: case TEGRA20_SPDIF_DATA_IN: case TEGRA20_SPDIF_USR_STA_RX_A: case TEGRA20_SPDIF_USR_DAT_TX_A: return true; default: return false; } }
[ 0, 0 ]
Linux Kernel
sound/soc/tegra/tegra210_admaif.c
static int tegra_admaif_trigger(struct snd_pcm_substream *substream, int cmd, struct snd_soc_dai *dai) { int err; err = snd_dmaengine_pcm_trigger(substream, cmd); if (err) return err; switch (cmd) { case SNDRV_PCM_TRIGGER_START: case SNDRV_PCM_TRIGGER_PAUSE_RELEASE: ...
[ 0, 0 ]
Linux Kernel
sound/soc/tegra/tegra210_admaif.c
static int tegra210_admaif_pget_mono_to_stereo(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); struct tegra_admaif *admaif = snd_soc_component_get_drvdata(cmpnt); struct soc_enum *ec ...
[ 0, 0 ]
Linux Kernel
sound/soc/tegra/tegra210_admaif.c
static int tegra210_admaif_pput_mono_to_stereo(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); struct tegra_admaif *admaif = snd_soc_component_get_drvdata(cmpnt); struct soc_enum *ec ...
[ 1, 0 ]
Linux Kernel
sound/soc/tegra/tegra210_admaif.c
static int tegra210_admaif_pput_stereo_to_mono(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); struct tegra_admaif *admaif = snd_soc_component_get_drvdata(cmpnt); struct soc_enum *ec ...
[ 1, 0 ]
Linux Kernel
sound/soc/tegra/tegra210_adx.c
static void tegra210_adx_write_map_ram(struct tegra210_adx *adx) { int i; regmap_write(adx->regmap, TEGRA210_ADX_CFG_RAM_CTRL, TEGRA210_ADX_CFG_RAM_CTRL_SEQ_ACCESS_EN | TEGRA210_ADX_CFG_RAM_CTRL_ADDR_INIT_EN | TEGRA210_ADX_CFG_RAM_CTRL_RW_WRITE); for (i = 0;...
[ 0, 0 ]
Linux Kernel
sound/soc/tegra/tegra210_adx.c
static int __maybe_unused tegra210_adx_runtime_resume(struct device *dev) { struct tegra210_adx *adx = dev_get_drvdata(dev); regcache_cache_only(adx->regmap, false); regcache_sync(adx->regmap); tegra210_adx_write_map_ram(adx); return 0; }
[ 0, 0 ]
Linux Kernel
sound/soc/tegra/tegra210_adx.c
static int tegra210_adx_out_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params, struct snd_soc_dai *dai) { return tegra210_adx_set_audio_cif( dai, params_channels(params), params_format(params), TEGRA...
[ 0, 0 ]
Linux Kernel
sound/soc/tegra/tegra210_adx.c
static int tegra210_adx_get_byte_map(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); struct tegra210_adx *adx = snd_soc_component_get_drvdata(cmpnt); struct soc_mixer_control *mc; ...
[ 0, 0 ]
Linux Kernel
sound/soc/tegra/tegra210_adx.c
static int tegra210_adx_put_byte_map(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); struct tegra210_adx *adx = snd_soc_component_get_drvdata(cmpnt); unsigned char *bytes_map = (unsig...
[ 1, 0 ]
Linux Kernel
sound/soc/tegra/tegra210_adx.c
static int tegra210_adx_platform_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct tegra210_adx *adx; void __iomem *regs; int err; adx = devm_kzalloc(dev, sizeof(*adx), GFP_KERNEL); if (!adx) return -ENOMEM; dev_set_drvdata(dev, adx); regs = devm_platform_ioremap_reso...
[ 1, 0 ]
Linux Kernel
sound/soc/tegra/tegra210_ahub.c
static int tegra_ahub_get_value_enum(struct snd_kcontrol *kctl, struct snd_ctl_elem_value *uctl) { struct snd_soc_component *cmpnt = snd_soc_dapm_kcontrol_component(kctl); struct tegra_ahub *ahub = snd_soc_component_get_drvdata(cmpnt); struct soc_enum *e = (struct soc_enum *)k...
[ 1, 0 ]
Linux Kernel
sound/soc/tegra/tegra210_ahub.c
static int tegra_ahub_probe(struct platform_device *pdev) { struct tegra_ahub *ahub; void __iomem *regs; int err; ahub = devm_kzalloc(&pdev->dev, sizeof(*ahub), GFP_KERNEL); if (!ahub) return -ENOMEM; ahub->soc_data = of_device_get_match_data(&pdev->dev); platform_set_drvdata(pdev, ahub); ahub-...
[ 1, 0 ]
Linux Kernel
sound/soc/tegra/tegra210_amx.c
static int tegra210_amx_get_byte_map(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); struct soc_mixer_control *mc = (struct soc_mixer_control *)kcontrol->private_value; struct ...
[ 0, 0 ]
Linux Kernel
sound/soc/tegra/tegra210_amx.c
static bool tegra194_amx_wr_reg(struct device *dev, unsigned int reg) { switch (reg) { case TEGRA194_AMX_RX1_FRAME_PERIOD ... TEGRA194_AMX_RX4_FRAME_PERIOD: return true; default: return tegra210_amx_wr_reg(dev, reg); } }
[ 0, 0 ]
Linux Kernel
sound/soc/tegra/tegra210_amx.c
static bool tegra210_amx_volatile_reg(struct device *dev, unsigned int reg) { switch (reg) { case TEGRA210_AMX_RX_STATUS: case TEGRA210_AMX_RX_INT_STATUS: case TEGRA210_AMX_RX_INT_SET: case TEGRA210_AMX_TX_STATUS: case TEGRA210_AMX_TX_INT_STATUS: case TEGRA210_AMX_TX_INT_SET: case TEGRA210_AMX_SOFT_RES...
[ 0, 0 ]
Linux Kernel
sound/soc/tegra/tegra210_dmic.c
static int tegra210_dmic_put_mono_to_stereo(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_soc_component *comp = snd_soc_kcontrol_component(kcontrol); struct tegra210_dmic *dmic = snd_soc_component_get_drvdata(comp); unsigned int value = ucontrol...
[ 1, 0 ]
Linux Kernel
sound/soc/tegra/tegra210_dmic.c
static int tegra210_dmic_put_stereo_to_mono(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_soc_component *comp = snd_soc_kcontrol_component(kcontrol); struct tegra210_dmic *dmic = snd_soc_component_get_drvdata(comp); unsigned int value = ucontrol...
[ 1, 0 ]
Linux Kernel
sound/soc/tegra/tegra210_dmic.c
static int tegra210_dmic_get_osr_val(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_soc_component *comp = snd_soc_kcontrol_component(kcontrol); struct tegra210_dmic *dmic = snd_soc_component_get_drvdata(comp); ucontrol->value.enumerated.item...
[ 0, 0 ]
Linux Kernel
sound/soc/tegra/tegra210_dmic.c
static int tegra210_dmic_put_osr_val(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_soc_component *comp = snd_soc_kcontrol_component(kcontrol); struct tegra210_dmic *dmic = snd_soc_component_get_drvdata(comp); unsigned int value = ucontrol->v...
[ 1, 0 ]
Linux Kernel
sound/soc/tegra/tegra210_dmic.c
static int tegra210_dmic_remove(struct platform_device *pdev) { pm_runtime_disable(&pdev->dev); return 0; }
[ 0, 0 ]
Linux Kernel
sound/soc/tegra/tegra210_i2s.c
static int __maybe_unused tegra210_i2s_runtime_suspend(struct device *dev) { struct tegra210_i2s *i2s = dev_get_drvdata(dev); regcache_cache_only(i2s->regmap, true); regcache_mark_dirty(i2s->regmap); clk_disable_unprepare(i2s->clk_i2s); return 0; }
[ 0, 0 ]
Linux Kernel
sound/soc/tegra/tegra210_i2s.c
static int __maybe_unused tegra210_i2s_runtime_resume(struct device *dev) { struct tegra210_i2s *i2s = dev_get_drvdata(dev); int err; err = clk_prepare_enable(i2s->clk_i2s); if (err) { dev_err(dev, "failed to enable I2S bit clock, err: %d\n", err); return err; } regcache_cache_only(i2s->regmap, f...
[ 0, 0 ]
Linux Kernel
sound/soc/tegra/tegra210_i2s.c
static int tegra210_i2s_get_loopback(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_soc_component *compnt = snd_soc_kcontrol_component(kcontrol); struct tegra210_i2s *i2s = snd_soc_component_get_drvdata(compnt); ucontrol->value.integer.value...
[ 0, 0 ]
Linux Kernel
sound/soc/tegra/tegra210_i2s.c
static int tegra210_i2s_cget_mono_to_stereo(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_soc_component *compnt = snd_soc_kcontrol_component(kcontrol); struct tegra210_i2s *i2s = snd_soc_component_get_drvdata(compnt); ucontrol->value.enumerated...
[ 0, 0 ]
Linux Kernel
sound/soc/tegra/tegra210_i2s.c
static int tegra210_i2s_pput_stereo_to_mono(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_soc_component *compnt = snd_soc_kcontrol_component(kcontrol); struct tegra210_i2s *i2s = snd_soc_component_get_drvdata(compnt); unsigned int value = ucontr...
[ 1, 0 ]
Linux Kernel
sound/soc/tegra/tegra210_i2s.c
static int tegra210_i2s_pput_fifo_th(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_soc_component *compnt = snd_soc_kcontrol_component(kcontrol); struct tegra210_i2s *i2s = snd_soc_component_get_drvdata(compnt); int value = ucontrol->value.in...
[ 0, 0 ]
Linux Kernel
sound/soc/tegra/tegra210_i2s.c
static bool tegra210_i2s_volatile_reg(struct device *dev, unsigned int reg) { switch (reg) { case TEGRA210_I2S_RX_STATUS: case TEGRA210_I2S_RX_INT_STATUS: case TEGRA210_I2S_RX_CIF_FIFO_STATUS: case TEGRA210_I2S_TX_STATUS: case TEGRA210_I2S_TX_INT_STATUS: case TEGRA210_I2S_TX_CIF_FIFO_STATUS: case TEGRA...
[ 0, 0 ]
Linux Kernel
sound/soc/tegra/tegra210_i2s.c
static int tegra210_i2s_remove(struct platform_device *pdev) { pm_runtime_disable(&pdev->dev); return 0; }
[ 0, 0 ]
Linux Kernel
sound/soc/tegra/tegra210_mbdrc.c
static int tegra210_mbdrc_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct soc_mixer_control *mc = (struct soc_mixer_control *)kcontrol->private_value; struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); struct tegra210_ope *...
[ 0, 0 ]
Linux Kernel
sound/soc/tegra/tegra210_mbdrc.c
static int tegra210_mbdrc_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct soc_mixer_control *mc = (struct soc_mixer_control *)kcontrol->private_value; struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); struct tegra210_ope *...
[ 1, 0 ]
Linux Kernel
sound/soc/tegra/tegra210_mbdrc.c
static int tegra210_mbdrc_get_enum(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); struct tegra210_ope *ope = snd_soc_component_get_drvdata(cmpnt); struct soc_enum *e = (struct soc_enu...
[ 0, 0 ]
Linux Kernel
sound/soc/tegra/tegra210_mbdrc.c
static int tegra210_mbdrc_band_params_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct tegra_soc_bytes *params = (void *)kcontrol->private_value; struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); struct tegra210_ope *...
[ 1, 0 ]
Linux Kernel
sound/soc/tegra/tegra210_mbdrc.c
static int tegra210_mbdrc_band_params_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct tegra_soc_bytes *params = (void *)kcontrol->private_value; struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); struct tegra210_ope *...
[ 1, 0 ]
Linux Kernel
sound/soc/tegra/tegra210_mbdrc.c
static int tegra210_mbdrc_threshold_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct tegra_soc_bytes *params = (void *)kcontrol->private_value; struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); struct tegra210_ope *ope ...
[ 1, 0 ]
Linux Kernel
sound/soc/tegra/tegra210_mbdrc.c
static bool tegra210_mbdrc_rd_reg(struct device *dev, unsigned int reg) { if (tegra210_mbdrc_wr_reg(dev, reg)) return true; if (reg >= TEGRA210_MBDRC_IIR_CFG) reg -= ((reg - TEGRA210_MBDRC_IIR_CFG) % (TEGRA210_MBDRC_FILTER_PARAM_STRIDE * TEGRA210_MBDRC_FILTER_COUNT)); switch (reg) { case ...
[ 0, 0 ]
Linux Kernel
sound/soc/tegra/tegra210_mixer.c
static int tegra210_mixer_out_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params, struct snd_soc_dai *dai) { struct tegra210_mixer *mixer = snd_soc_dai_get_drvdata(dai); return tegra210_mixer_set_audio_cif...
[ 0, 0 ]
Linux Kernel
sound/soc/tegra/tegra210_mvc.c
static int __maybe_unused tegra210_mvc_runtime_suspend(struct device *dev) { struct tegra210_mvc *mvc = dev_get_drvdata(dev); regmap_read(mvc->regmap, TEGRA210_MVC_CTRL, &(mvc->ctrl_value)); regcache_cache_only(mvc->regmap, true); regcache_mark_dirty(mvc->regmap); return 0; }
[ 0, 0 ]
Linux Kernel
sound/soc/tegra/tegra210_mvc.c
static bool tegra210_mvc_wr_reg(struct device *dev, unsigned int reg) { switch (reg) { case TEGRA210_MVC_RX_INT_MASK ... TEGRA210_MVC_RX_CIF_CTRL: case TEGRA210_MVC_TX_INT_MASK ... TEGRA210_MVC_TX_CIF_CTRL: case TEGRA210_MVC_ENABLE ... TEGRA210_MVC_CG: case TEGRA210_MVC_CTRL ... TEGRA210_MVC_CFG_RAM_DATA: ...
[ 0, 0 ]
Linux Kernel
sound/soc/tegra/tegra210_mvc.c
static bool tegra210_mvc_volatile_reg(struct device *dev, unsigned int reg) { switch (reg) { case TEGRA210_MVC_RX_STATUS: case TEGRA210_MVC_RX_INT_STATUS: case TEGRA210_MVC_RX_INT_SET: case TEGRA210_MVC_TX_STATUS: case TEGRA210_MVC_TX_INT_STATUS: case TEGRA210_MVC_TX_INT_SET: case TEGRA210_MVC_SOFT_R...
[ 0, 0 ]
Linux Kernel
sound/soc/tegra/tegra210_ope.c
static int tegra210_ope_get_data_dir(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); struct tegra210_ope *ope = snd_soc_component_get_drvdata(cmpnt); ucontrol->value.enumerated.item...
[ 0, 0 ]
Linux Kernel
sound/soc/tegra/tegra210_ope.c
static int tegra210_ope_remove(struct platform_device *pdev) { pm_runtime_disable(&pdev->dev); return 0; }
[ 0, 0 ]
Linux Kernel
sound/soc/tegra/tegra210_ope.c
static int __maybe_unused tegra210_ope_runtime_suspend(struct device *dev) { struct tegra210_ope *ope = dev_get_drvdata(dev); tegra210_peq_save(ope->peq_regmap, ope->peq_biquad_gains, ope->peq_biquad_shifts); regcache_cache_only(ope->mbdrc_regmap, true); regcache_cache_only(ope->peq_regma...
[ 0, 0 ]
Linux Kernel
sound/soc/tegra/tegra210_peq.c
static int tegra210_peq_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct soc_mixer_control *mc = (struct soc_mixer_control *)kcontrol->private_value; struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); struct tegra210_ope *ope ...
[ 1, 0 ]
Linux Kernel
sound/soc/tegra/tegra210_peq.c
static int tegra210_peq_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct soc_mixer_control *mc = (struct soc_mixer_control *)kcontrol->private_value; struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); struct tegra210_ope *ope ...
[ 1, 0 ]
Linux Kernel
sound/soc/tegra/tegra210_peq.c
static int tegra210_peq_ram_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct tegra_soc_bytes *params = (void *)kcontrol->private_value; struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); struct tegra210_ope *ope = snd_soc_compon...
[ 0, 0 ]
Linux Kernel
sound/soc/tegra/tegra210_peq.c
void tegra210_peq_save(struct regmap *regmap, u32 *biquad_gains, u32 *biquad_shifts) { unsigned int i; for (i = 0; i < TEGRA210_PEQ_MAX_CHANNELS; i++) { tegra210_peq_read_ram(regmap, TEGRA210_PEQ_CFG_RAM_CTRL, TEGRA210_PEQ_CFG_RAM_DATA, ...
[ 0, 0 ]
Linux Kernel
sound/soc/tegra/tegra210_peq.c
int tegra210_peq_regmap_init(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct tegra210_ope *ope = dev_get_drvdata(dev); struct device_node *child; struct resource mem; void __iomem *regs; int err; child = of_get_child_by_name(dev->of_node, "equalizer"); if (!child) return -E...
[ 0, 0 ]
Linux Kernel
sound/soc/tegra/tegra210_sfc.c
static int tegra210_sfc_iput_mono_to_stereo(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); struct tegra210_sfc *sfc = snd_soc_component_get_drvdata(cmpnt); unsigned int value = ucontrol...
[ 1, 0 ]
Linux Kernel
sound/soc/tegra/tegra210_sfc.c
static int tegra210_sfc_oput_mono_to_stereo(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); struct tegra210_sfc *sfc = snd_soc_component_get_drvdata(cmpnt); unsigned int value = ucontrol...
[ 1, 0 ]
Linux Kernel
sound/soc/tegra/tegra210_sfc.c
static bool tegra210_sfc_rd_reg(struct device *dev, unsigned int reg) { switch (reg) { case TEGRA210_SFC_RX_STATUS ... TEGRA210_SFC_RX_FREQ: case TEGRA210_SFC_TX_STATUS ... TEGRA210_SFC_TX_FREQ: case TEGRA210_SFC_ENABLE ... TEGRA210_SFC_INT_STATUS: case TEGRA210_SFC_COEF_RAM ... TEGRA210_SFC_CFG_RAM_DATA: ...
[ 0, 0 ]
Linux Kernel
sound/soc/tegra/tegra30_ahub.c
static __maybe_unused int tegra30_ahub_runtime_resume(struct device *dev) { int ret; ret = reset_control_bulk_assert(ahub->nresets, ahub->resets); if (ret) return ret; ret = clk_bulk_prepare_enable(ahub->nclocks, ahub->clocks); if (ret) return ret; usleep_range(10, 100); ret = reset_control_bu...
[ 0, 0 ]
Linux Kernel
sound/soc/tegra/tegra30_ahub.c
int tegra30_ahub_disable_rx_fifo(enum tegra30_ahub_rxcif rxcif) { int channel = rxcif - TEGRA30_AHUB_RXCIF_APBIF_RX0; int reg, val; pm_runtime_get_sync(ahub->dev); reg = TEGRA30_AHUB_CHANNEL_CTRL + (channel * TEGRA30_AHUB_CHANNEL_CTRL_STRIDE); val = tegra30_apbif_read(reg); val &= ~TEGRA30_AHUB_CHA...
[ 0, 0 ]