Projectname
large_stringclasses
15 values
Filepath
large_stringlengths
4
106
⌀
Function
large_stringlengths
11
3.45k
Label
list
Linux Kernel
sound/soc/qcom/qdsp6/topology.c
int audioreach_tplg_init(struct snd_soc_component *component) { struct snd_soc_card *card = component->card; struct device *dev = component->dev; const struct firmware *fw; char *tplg_fw_name; int ret; tplg_fw_name = kasprintf(GFP_KERNEL, "qcom/%s/%s-tplg.bin", card->driver_name, ...
[ 1, 0 ]
Linux Kernel
sound/soc/qcom/sc7180.c
static int sc7180_adau7002_init(struct snd_soc_pcm_runtime *rtd) { struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); switch (cpu_dai->id) { case MI2S_PRIMARY: return 0; case MI2S_SECONDARY: return 0; case LPASS_DP_RX: return sc7180_hdmi_init(rtd); default: dev_err(rtd->dev, "%s: inval...
[ 0, 0 ]
Linux Kernel
sound/soc/qcom/sc7180.c
static int sc7180_adau7002_snd_startup(struct snd_pcm_substream *substream) { struct snd_soc_pcm_runtime *rtd = substream->private_data; struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); struct snd_pcm_runtime *runtime = substream->runtime; swi...
[ 0, 0 ]
Linux Kernel
sound/soc/qcom/sc7280.c
static int sc7280_snd_prepare(struct snd_pcm_substream *substream) { struct snd_soc_pcm_runtime *rtd = substream->private_data; const struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); switch (cpu_dai->id) { case LPASS_CDC_DMA_RX0: case LPASS_CDC_DMA_TX3: case RX_CODEC_DMA_RX_0: case TX_CODEC_DMA_TX...
[ 0, 0 ]
Linux Kernel
sound/soc/qcom/sc7280.c
static int sc7280_snd_hw_free(struct snd_pcm_substream *substream) { struct snd_soc_pcm_runtime *rtd = substream->private_data; struct sc7280_snd_data *data = snd_soc_card_get_drvdata(rtd->card); const struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); struct sdw_stream_runtime *sruntime = data->sruntime[c...
[ 1, 0 ]
Linux Kernel
sound/soc/qcom/sc7280.c
static void sc7280_snd_shutdown(struct snd_pcm_substream *substream) { struct snd_soc_pcm_runtime *rtd = substream->private_data; struct snd_soc_card *card = rtd->card; struct sc7280_snd_data *data = snd_soc_card_get_drvdata(card); struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); switch (cpu_dai->id) ...
[ 1, 0 ]
Linux Kernel
sound/soc/qcom/sc8280xp.c
static int sc8280xp_snd_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params) { struct snd_soc_pcm_runtime *rtd = substream->private_data; struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); struct sc8280xp_snd_data *pdata = snd_soc_card_get_drvdata...
[ 0, 0 ]
Linux Kernel
sound/soc/qcom/sc8280xp.c
static int sc8280xp_snd_hw_free(struct snd_pcm_substream *substream) { struct snd_soc_pcm_runtime *rtd = substream->private_data; struct sc8280xp_snd_data *data = snd_soc_card_get_drvdata(rtd->card); struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); struct sdw_stream_runtime *sruntime = data->sruntime[cpu...
[ 1, 0 ]
Linux Kernel
sound/soc/qcom/sc8280xp.c
static void sc8280xp_add_be_ops(struct snd_soc_card *card) { struct snd_soc_dai_link *link; int i; for_each_card_prelinks(card, i, link) { if (link->no_pcm == 1) { link->init = sc8280xp_snd_init; link->be_hw_params_fixup = sc8280xp_be_hw_params_fixup; link->ops = &sc8280xp_be_ops; } ...
[ 0, 0 ]
Linux Kernel
sound/soc/qcom/sc8280xp.c
static int sc8280xp_platform_probe(struct platform_device *pdev) { struct snd_soc_card *card; struct sc8280xp_snd_data *data; struct device *dev = &pdev->dev; int ret; card = devm_kzalloc(dev, sizeof(*card), GFP_KERNEL); if (!card) return -ENOMEM; card->owner = THIS_MODULE; data = devm_kzalloc(dev...
[ 1, 0 ]
Linux Kernel
sound/soc/qcom/sdm845.c
static int sdm845_slim_snd_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 *cpu_dai = asoc_rtd_to_cpu(rtd, 0); struct snd_soc_dai *codec_dai; struct sdm8...
[ 1, 0 ]
Linux Kernel
sound/soc/qcom/sdm845.c
static int sdm845_snd_platform_probe(struct platform_device *pdev) { struct snd_soc_card *card; struct sdm845_snd_data *data; struct device *dev = &pdev->dev; int ret; card = devm_kzalloc(dev, sizeof(*card), GFP_KERNEL); if (!card) return -ENOMEM; data = devm_kzalloc(dev, sizeof(*data), GFP_KERNEL);...
[ 1, 0 ]
Linux Kernel
sound/soc/qcom/sm8250.c
static int sm8250_platform_probe(struct platform_device *pdev) { struct snd_soc_card *card; struct sm8250_snd_data *data; struct device *dev = &pdev->dev; int ret; card = devm_kzalloc(dev, sizeof(*card), GFP_KERNEL); if (!card) return -ENOMEM; card->owner = THIS_MODULE; data = devm_kzalloc(dev, s...
[ 1, 0 ]
Linux Kernel
sound/soc/qcom/storm.c
static int storm_parse_of(struct snd_soc_card *card) { struct snd_soc_dai_link *dai_link = card->dai_link; struct device_node *np = card->dev->of_node; dai_link->cpus->of_node = of_parse_phandle(np, "cpu", 0); if (!dai_link->cpus->of_node) { dev_err(card->dev, "error getting cpu phandle\n"); return -E...
[ 1, 0 ]
Linux Kernel
sound/soc/rockchip/rk3288_hdmi_analog.c
static int rk_init(struct snd_soc_pcm_runtime *runtime) { struct rk_drvdata *machine = snd_soc_card_get_drvdata(runtime->card); if (gpio_is_valid(machine->gpio_hp_det)) { snd_soc_card_jack_new_pins( runtime->card, "Headphone Jack", SND_JACK_HEADPHONE, &headphone_jack, headphone_jack_pins, ARRAY...
[ 0, 0 ]
Linux Kernel
sound/soc/rockchip/rk3399_gru_sound.c
static int rockchip_sound_rt5514_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 *cpu_dai = asoc_rtd_to_cpu(rtd, 0); struct snd_soc_dai *codec_dai = ...
[ 1, 0 ]
Linux Kernel
sound/soc/rockchip/rk3399_gru_sound.c
static int rockchip_sound_cdndp_init(struct snd_soc_pcm_runtime *rtd) { struct snd_soc_component *component = asoc_rtd_to_codec(rtd, 0)->component; struct snd_soc_card *card = rtd->card; int ret; ret = snd_soc_card_jack_new(card, "DP Jack", SND_JACK_LINEOUT, &cdn_dp_card_jack); ...
[ 0, 0 ]
Linux Kernel
sound/soc/rockchip/rockchip_i2s.c
static int rockchip_i2s_set_bclk_ratio(struct snd_soc_dai *dai, unsigned int ratio) { struct rk_i2s_dev *i2s = to_info(dai); i2s->bclk_ratio = ratio; return 0; }
[ 0, 0 ]
Linux Kernel
sound/soc/rockchip/rockchip_i2s.c
static bool rockchip_i2s_precious_reg(struct device *dev, unsigned int reg) { switch (reg) { case I2S_RXDR: return true; default: return false; } }
[ 0, 0 ]
Linux Kernel
sound/soc/rockchip/rockchip_i2s_tdm.c
static int to_ch_num(unsigned int val) { switch (val) { case I2S_CHN_4: return 4; case I2S_CHN_6: return 6; case I2S_CHN_8: return 8; default: return 2; } }
[ 0, 0 ]
Linux Kernel
sound/soc/rockchip/rockchip_i2s_tdm.c
static int __maybe_unused i2s_tdm_runtime_suspend(struct device *dev) { struct rk_i2s_tdm_dev *i2s_tdm = dev_get_drvdata(dev); regcache_cache_only(i2s_tdm->regmap, true); i2s_tdm_disable_unprepare_mclk(i2s_tdm); clk_disable_unprepare(i2s_tdm->hclk); return 0; }
[ 0, 0 ]
Linux Kernel
sound/soc/rockchip/rockchip_i2s_tdm.c
static int __maybe_unused i2s_tdm_runtime_resume(struct device *dev) { struct rk_i2s_tdm_dev *i2s_tdm = dev_get_drvdata(dev); int ret; ret = clk_prepare_enable(i2s_tdm->hclk); if (ret) goto err_hclk; ret = i2s_tdm_prepare_enable_mclk(i2s_tdm); if (ret) goto err_mclk; regcache_cache_only(i2s_td...
[ 0, 0 ]
Linux Kernel
sound/soc/rockchip/rockchip_i2s_tdm.c
static void rockchip_snd_reset(struct reset_control *rc) { reset_control_assert(rc); udelay(10); reset_control_deassert(rc); udelay(10); }
[ 0, 0 ]
Linux Kernel
sound/soc/rockchip/rockchip_i2s_tdm.c
static void rockchip_snd_txrxctrl(struct snd_pcm_substream *substream, struct snd_soc_dai *dai, int on) { struct rk_i2s_tdm_dev *i2s_tdm = to_info(dai); unsigned long flags; spin_lock_irqsave(&i2s_tdm->lock, flags); if (on) { if (substream->stream == SNDRV_PCM_STREAM_PLAYB...
[ 1, 0 ]
Linux Kernel
sound/soc/rockchip/rockchip_i2s_tdm.c
static void rockchip_i2s_tdm_xfer_resume(struct snd_pcm_substream *substream, struct rk_i2s_tdm_dev *i2s_tdm) { int stream; stream = SNDRV_PCM_STREAM_LAST - substream->stream; if (stream == SNDRV_PCM_STREAM_PLAYBACK) rockchip_enable_tde(i2s_tdm->regmap); else r...
[ 0, 0 ]
Linux Kernel
sound/soc/rockchip/rockchip_i2s_tdm.c
static int rockchip_i2s_tdm_set_mclk(struct rk_i2s_tdm_dev *i2s_tdm, struct snd_pcm_substream *substream, struct clk **mclk) { unsigned int mclk_freq; int ret; if (i2s_tdm->clk_trcm) { if (i2s_tdm->mclk_tx_freq != i2s_tdm->mclk_rx_freq...
[ 0, 0 ]
Linux Kernel
sound/soc/rockchip/rockchip_i2s_tdm.c
static int rockchip_i2s_tdm_set_bclk_ratio(struct snd_soc_dai *dai, unsigned int ratio) { struct rk_i2s_tdm_dev *i2s_tdm = snd_soc_dai_get_drvdata(dai); if (ratio < 32 || ratio > 512 || ratio % 2 == 1) return -EINVAL; i2s_tdm->frame_width = ratio; return 0; }
[ 1, 0 ]
Linux Kernel
sound/soc/rockchip/rockchip_i2s_tdm.c
static int rockchip_i2s_tdm_path_check(struct rk_i2s_tdm_dev *i2s_tdm, int num, bool is_rx_path) { unsigned int *i2s_data; int i, j; if (is_rx_path) i2s_data = i2s_tdm->i2s_sdis; else i2s_data = i2s_tdm->i2s_sdos; for (i = 0; i < num; i++) { if (i2s_data[i...
[ 1, 0 ]
Linux Kernel
sound/soc/rockchip/rockchip_i2s_tdm.c
static int rockchip_i2s_tdm_get_calibrate_mclks(struct rk_i2s_tdm_dev *i2s_tdm) { int num_mclks = 0; i2s_tdm->mclk_tx_src = devm_clk_get(i2s_tdm->dev, "mclk_tx_src"); if (!IS_ERR(i2s_tdm->mclk_tx_src)) num_mclks++; i2s_tdm->mclk_rx_src = devm_clk_get(i2s_tdm->dev, "mclk_rx_src"); if (!IS_ERR(i2s_tdm->m...
[ 1, 0 ]
Linux Kernel
sound/soc/rockchip/rockchip_i2s_tdm.c
static int rockchip_i2s_tdm_rx_path_prepare(struct rk_i2s_tdm_dev *i2s_tdm, struct device_node *np) { return rockchip_i2s_tdm_path_prepare(i2s_tdm, np, 1); }
[ 0, 0 ]
Linux Kernel
sound/soc/rockchip/rockchip_i2s_tdm.c
static int rockchip_i2s_tdm_remove(struct platform_device *pdev) { if (!pm_runtime_status_suspended(&pdev->dev)) i2s_tdm_runtime_suspend(&pdev->dev); pm_runtime_disable(&pdev->dev); return 0; }
[ 0, 0 ]
Linux Kernel
sound/soc/rockchip/rockchip_i2s_tdm.c
static int __maybe_unused rockchip_i2s_tdm_suspend(struct device *dev) { struct rk_i2s_tdm_dev *i2s_tdm = dev_get_drvdata(dev); regcache_mark_dirty(i2s_tdm->regmap); return 0; }
[ 0, 0 ]
Linux Kernel
sound/soc/rockchip/rockchip_max98090.c
static int rk_init(struct snd_soc_pcm_runtime *runtime) { snd_soc_jack_notifier_register(&headset_jack, &rk_jack_nb); return 0; }
[ 0, 0 ]
Linux Kernel
sound/soc/rockchip/rockchip_max98090.c
static int rk_parse_headset_from_of(struct device *dev, struct device_node *np) { rk_98090_headset_dev.dlc.of_node = of_parse_phandle(np, "rockchip,headset-codec", 0); if (!rk_98090_headset_dev.dlc.of_node) { dev_err(dev, "Property 'rockchip,headset-codec' missing/inva...
[ 0, 0 ]
Linux Kernel
sound/soc/rockchip/rockchip_pdm.c
static unsigned int get_pdm_clk(struct rk_pdm_dev *pdm, unsigned int sr, unsigned int *clk_src, unsigned int *clk_out) { unsigned int i, count, clk, div, rate; clk = 0; if (!sr) return clk; count = ARRAY_SIZE(clkref); for (i = 0; i < count; i++) { if (sr % clkref[i]....
[ 0, 0 ]
Linux Kernel
sound/soc/rockchip/rockchip_pdm.c
static inline struct rk_pdm_dev *to_info(struct snd_soc_dai *dai) { return snd_soc_dai_get_drvdata(dai); }
[ 0, 0 ]
Linux Kernel
sound/soc/rockchip/rockchip_pdm.c
static int rockchip_pdm_remove(struct platform_device *pdev) { struct rk_pdm_dev *pdm = dev_get_drvdata(&pdev->dev); pm_runtime_disable(&pdev->dev); if (!pm_runtime_status_suspended(&pdev->dev)) rockchip_pdm_runtime_suspend(&pdev->dev); clk_disable_unprepare(pdm->clk); clk_disable_unprepare(pdm->hclk);...
[ 0, 0 ]
Linux Kernel
sound/soc/rockchip/rockchip_pdm.c
static int rockchip_pdm_resume(struct device *dev) { struct rk_pdm_dev *pdm = dev_get_drvdata(dev); int ret; ret = pm_runtime_resume_and_get(dev); if (ret < 0) return ret; ret = regcache_sync(pdm->regmap); pm_runtime_put(dev); return ret; }
[ 0, 0 ]
Linux Kernel
sound/soc/rockchip/rockchip_spdif.c
static int rk_spdif_dai_probe(struct snd_soc_dai *dai) { struct rk_spdif_dev *spdif = snd_soc_dai_get_drvdata(dai); dai->playback_dma_data = &spdif->playback_dma_data; return 0; }
[ 0, 0 ]
Linux Kernel
sound/soc/rockchip/rockchip_spdif.c
static int rk_spdif_remove(struct platform_device *pdev) { pm_runtime_disable(&pdev->dev); if (!pm_runtime_status_suspended(&pdev->dev)) rk_spdif_runtime_suspend(&pdev->dev); return 0; }
[ 0, 0 ]
Linux Kernel
sound/soc/samsung/aries_wm8994.c
static int aries_main_bias(struct snd_soc_dapm_widget *w, struct snd_kcontrol *kcontrol, int event) { struct snd_soc_card *card = w->dapm->card; struct aries_wm8994_data *priv = snd_soc_card_get_drvdata(card); int ret = 0; switch (event) { case SND_SOC_DAPM_PRE_PMU: ret = regu...
[ 1, 0 ]
Linux Kernel
sound/soc/samsung/aries_wm8994.c
static int aries_baseband_init(struct snd_soc_pcm_runtime *rtd) { struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); unsigned int pll_out; int ret; pll_out = 8000 * 512; ret = snd_soc_dai_set_pll(codec_dai, WM8994_FLL2, WM8994_FLL_SRC_MCLK1, ARIES_MCLK1_FREQ, pll_out); ...
[ 0, 0 ]
Linux Kernel
sound/soc/samsung/aries_wm8994.c
static int aries_late_probe(struct snd_soc_card *card) { struct aries_wm8994_data *priv = snd_soc_card_get_drvdata(card); int ret, irq; ret = snd_soc_card_jack_new_pins(card, "Dock", SND_JACK_LINEOUT, &aries_dock, dock_pins, ARRAY_SIZE(dock_pins)); if (ret) return ret; ...
[ 0, 0 ]
Linux Kernel
sound/soc/samsung/arndale.c
static int arndale_audio_probe(struct platform_device *pdev) { struct device_node *np = pdev->dev.of_node; struct snd_soc_card *card; struct snd_soc_dai_link *dai_link; int ret; card = (struct snd_soc_card *)of_device_get_match_data(&pdev->dev); card->dev = &pdev->dev; dai_link = card->dai_link; dai_...
[ 1, 0 ]
Linux Kernel
sound/soc/samsung/arndale.c
static int arndale_audio_remove(struct platform_device *pdev) { struct snd_soc_card *card = platform_get_drvdata(pdev); arndale_put_of_nodes(card); return 0; }
[ 0, 0 ]
Linux Kernel
sound/soc/samsung/dmaengine.c
int samsung_asoc_dma_platform_register(struct device *dev, dma_filter_fn filter, const char *tx, const char *rx, struct device *dma_dev) { struct snd_dmaengine_pcm_config *pcm_conf; pcm_conf = devm_kzalloc(dev, sizeof(*pcm_conf), GFP_KE...
[ 1, 0 ]
Linux Kernel
sound/soc/samsung/h1940_uda1380.c
static int h1940_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 *cpu_dai = asoc_rtd_to_cpu(rtd, 0); int div; int ret; unsigned int rate = params_rate(params); ...
[ 1, 0 ]
Linux Kernel
sound/soc/samsung/i2s.c
static inline bool tx_active(struct i2s_dai *i2s) { u32 active; if (!i2s) return false; active = readl(i2s->priv->addr + I2SCON); if (is_secondary(i2s)) active &= CON_TXSDMA_ACTIVE; else active &= CON_TXDMA_ACTIVE; return active ? true : false; }
[ 1, 0 ]
Linux Kernel
sound/soc/samsung/i2s.c
static inline bool any_tx_active(struct i2s_dai *i2s) { return tx_active(i2s) || other_tx_active(i2s); }
[ 0, 0 ]
Linux Kernel
sound/soc/samsung/i2s.c
static inline bool other_rx_active(struct i2s_dai *i2s) { struct i2s_dai *other = get_other_dai(i2s); return rx_active(other); }
[ 0, 0 ]
Linux Kernel
sound/soc/samsung/i2s.c
static inline struct i2s_dai *to_info(struct snd_soc_dai *dai) { struct samsung_i2s_priv *priv = snd_soc_dai_get_drvdata(dai); return &priv->dai[dai->id - 1]; }
[ 1, 0 ]
Linux Kernel
sound/soc/samsung/i2s.c
static inline unsigned get_rfs(struct i2s_dai *i2s) { struct samsung_i2s_priv *priv = i2s->priv; u32 rfs; rfs = readl(priv->addr + I2SMOD) >> priv->variant_regs->rfs_off; rfs &= priv->variant_regs->rfs_mask; switch (rfs) { case 7: return 192; case 6: return 96; case 5: return 128; case 4...
[ 1, 0 ]
Linux Kernel
sound/soc/samsung/i2s.c
static inline void i2s_fifo(struct i2s_dai *i2s, u32 flush) { void __iomem *fic; u32 val; if (!i2s) return; if (is_secondary(i2s)) fic = i2s->priv->addr + I2SFICS; else fic = i2s->priv->addr + I2SFIC; writel(readl(fic) | flush, fic); /* Be patient */ val = msecs_to_loops(1) / 1000; /* 1 ...
[ 1, 0 ]
Linux Kernel
sound/soc/samsung/i2s.c
static int config_setup(struct i2s_dai *i2s) { struct samsung_i2s_priv *priv = i2s->priv; struct i2s_dai *other = get_other_dai(i2s); unsigned rfs, bfs, blc; u32 psr; blc = get_blc(i2s); bfs = i2s->bfs; if (!bfs && other) bfs = other->bfs; if (!bfs) bfs = blc * 2; rfs = i2s->rfs; if (!...
[ 1, 0 ]
Linux Kernel
sound/soc/samsung/i2s.c
static int i2s_set_clkdiv(struct snd_soc_dai *dai, int div_id, int div) { struct i2s_dai *i2s = to_info(dai); struct i2s_dai *other = get_other_dai(i2s); switch (div_id) { case SAMSUNG_I2S_DIV_BCLK: pm_runtime_get_sync(dai->dev); if ((any_active(i2s) && div && (get_bfs(i2s) != div)) || (other ...
[ 1, 0 ]
Linux Kernel
sound/soc/samsung/i2s.c
static snd_pcm_sframes_t i2s_delay(struct snd_pcm_substream *substream, struct snd_soc_dai *dai) { struct samsung_i2s_priv *priv = snd_soc_dai_get_drvdata(dai); struct i2s_dai *i2s = to_info(dai); u32 reg = readl(priv->addr + I2SFIC); snd_pcm_sframes_t delay; WARN_ON(!pm_r...
[ 1, 0 ]
Linux Kernel
sound/soc/samsung/i2s.c
static int samsung_i2s_dai_remove(struct snd_soc_dai *dai) { struct samsung_i2s_priv *priv = snd_soc_dai_get_drvdata(dai); struct i2s_dai *i2s = to_info(dai); unsigned long flags; pm_runtime_get_sync(dai->dev); if (!is_secondary(i2s)) { if (priv->quirks & QUIRK_NEED_RSTCLR) { spin_lock_irqsave(&p...
[ 0, 0 ]
Linux Kernel
sound/soc/samsung/i2s.c
static int i2s_create_secondary_device(struct samsung_i2s_priv *priv) { struct platform_device *pdev_sec; const char *devname; int ret; devname = devm_kasprintf(&priv->pdev->dev, GFP_KERNEL, "%s-sec", dev_name(&priv->pdev->dev)); if (!devname) return -ENOMEM; pdev_sec = plat...
[ 0, 0 ]
Linux Kernel
sound/soc/samsung/idma.c
static int idma_enqueue(struct snd_pcm_substream *substream) { struct snd_pcm_runtime *runtime = substream->runtime; struct idma_ctrl *prtd = substream->runtime->private_data; u32 val; spin_lock(&prtd->lock); prtd->token = (void *)substream; spin_unlock(&prtd->lock); val = idma.lp_tx_addr + prtd->period...
[ 1, 0 ]
Linux Kernel
sound/soc/samsung/idma.c
static void idma_setcallbk(struct snd_pcm_substream *substream, void (*cb)(void *, int)) { struct idma_ctrl *prtd = substream->runtime->private_data; spin_lock(&prtd->lock); prtd->cb = cb; spin_unlock(&prtd->lock); }
[ 1, 0 ]
Linux Kernel
sound/soc/samsung/idma.c
static void idma_done(void *id, int bytes_xfer) { struct snd_pcm_substream *substream = id; struct idma_ctrl *prtd = substream->runtime->private_data; if (prtd && (prtd->state & ST_RUNNING)) snd_pcm_period_elapsed(substream); }
[ 1, 0 ]
Linux Kernel
sound/soc/samsung/idma.c
static int idma_mmap(struct snd_soc_component *component, struct snd_pcm_substream *substream, struct vm_area_struct *vma) { struct snd_pcm_runtime *runtime = substream->runtime; unsigned long size, offset; vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot); size ...
[ 0, 0 ]
Linux Kernel
sound/soc/samsung/idma.c
static int idma_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; int ret; ret = dma_coerce_mask_and_coherent(card->dev, DMA_BIT_MASK(32)); if (ret) return ret; if (pcm->streams[...
[ 1, 0 ]
Linux Kernel
sound/soc/samsung/jive_wm8750.c
static void __exit jive_exit(void) { platform_device_unregister(jive_snd_device); }
[ 0, 0 ]
Linux Kernel
sound/soc/samsung/littlemill.c
static int bbclk_ev(struct snd_soc_dapm_widget *w, struct snd_kcontrol *kcontrol, int event) { struct snd_soc_card *card = w->dapm->card; struct snd_soc_pcm_runtime *rtd; struct snd_soc_dai *aif2_dai; int ret; rtd = snd_soc_get_pcm_runtime(card, &card->dai_link[1]); aif2_dai = asoc_rtd...
[ 1, 0 ]
Linux Kernel
sound/soc/samsung/lowland.c
static int lowland_probe(struct platform_device *pdev) { struct snd_soc_card *card = &lowland; 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/samsung/midas_wm1811.c
static int midas_set_bias_level(struct snd_soc_card *card, struct snd_soc_dapm_context *dapm, enum snd_soc_bias_level level) { struct snd_soc_pcm_runtime *rtd = snd_soc_get_pcm_runtime(card, &card->dai_link[0]); struct snd_soc_dai *aif1_dai = as...
[ 0, 0 ]
Linux Kernel
sound/soc/samsung/neo1973_wm8753.c
static int neo1973_voice_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); unsigned int pcmdiv = 0; int ret = 0; un...
[ 1, 0 ]
Linux Kernel
sound/soc/samsung/neo1973_wm8753.c
static int neo1973_voice_hw_free(struct snd_pcm_substream *substream) { struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); return snd_soc_dai_set_pll(codec_dai, WM8753_PLL2, 0, 0, 0); }
[ 0, 0 ]
Linux Kernel
sound/soc/samsung/neo1973_wm8753.c
static int lm4853_event(struct snd_soc_dapm_widget *w, struct snd_kcontrol *k, int event) { gpiod_set_value(gpiod_amp_shut, SND_SOC_DAPM_EVENT_OFF(event)); return 0; }
[ 0, 0 ]
Linux Kernel
sound/soc/samsung/odroid.c
static int odroid_card_fe_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 odroid_priv *priv = snd_soc_card_get_drvdata(rtd->card); unsigned long flags; int ret = 0; ...
[ 1, 0 ]
Linux Kernel
sound/soc/samsung/pcm.c
static int s3c_pcm_trigger(struct snd_pcm_substream *substream, int cmd, struct snd_soc_dai *dai) { struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); struct s3c_pcm_info *pcm = snd_soc_dai_get_drvdata(asoc_rtd_to_cpu(rtd, 0)); unsigned long flags; dev_dbg(pcm->dev,...
[ 0, 0 ]
Linux Kernel
sound/soc/samsung/rx1950_uda1380.c
static int rx1950_spk_power(struct snd_soc_dapm_widget *w, struct snd_kcontrol *kcontrol, int event) { if (SND_SOC_DAPM_EVENT_ON(event)) gpiod_set_value(gpiod_speaker_power, 1); else gpiod_set_value(gpiod_speaker_power, 0); return 0; }
[ 0, 0 ]
Linux Kernel
sound/soc/samsung/rx1950_uda1380.c
static int rx1950_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 *cpu_dai = asoc_rtd_to_cpu(rtd, 0); int div; int ret; unsigned int rate = params_rate(params);...
[ 1, 0 ]
Linux Kernel
sound/soc/samsung/s3c-i2s-v2.c
static void dbg_showcon(const char *fn, u32 con) { printk(KERN_DEBUG "%s: LRI=%d, TXFEMPT=%d, RXFEMPT=%d, TXFFULL=%d, RXFFULL=%d\n", fn, bit_set(con, S3C2412_IISCON_LRINDEX), bit_set(con, S3C2412_IISCON_TXFIFO_EMPTY), bit_set(con, S3C2412_IISCON_RXFIFO_EMPTY), bit_set(con,...
[ 0, 0 ]
Linux Kernel
sound/soc/samsung/s3c2412-i2s.c
static int s3c2412_i2s_probe(struct snd_soc_dai *dai) { int ret; pr_debug("Entered %s\n", __func__); snd_soc_dai_init_dma_data(dai, &s3c2412_i2s_pcm_stereo_out, &s3c2412_i2s_pcm_stereo_in); ret = s3c_i2sv2_probe(dai, &s3c2412_i2s); if (ret) return ret; s3c2412_i2s.dma_cap...
[ 0, 0 ]
Linux Kernel
sound/soc/samsung/s3c24xx-i2s.c
static int s3c24xx_i2s_set_sysclk(struct snd_soc_dai *cpu_dai, int clk_id, unsigned int freq, int dir) { u32 iismod = readl(s3c24xx_i2s.regs + S3C2410_IISMOD); iismod &= ~S3C2440_IISMOD_MPLL; switch (clk_id) { case S3C24XX_CLKSRC_PCLK: break; case S3C24XX_CLKSRC_MPLL: ...
[ 0, 0 ]
Linux Kernel
sound/soc/samsung/s3c24xx-i2s.c
static int s3c24xx_iis_dev_probe(struct platform_device *pdev) { struct resource *res; int ret; s3c24xx_i2s.regs = devm_platform_get_and_ioremap_resource(pdev, 0, &res); if (IS_ERR(s3c24xx_i2s.regs)) return PTR_ERR(s3c24xx_i2s.regs); s3c24xx_i2s_pcm_stereo_out.addr = res->start + S3C2410_IISFIFO; s3c...
[ 0, 0 ]
Linux Kernel
sound/soc/samsung/s3c24xx_simtec.c
static int speaker_gain_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { ucontrol->value.integer.value[0] = spk_gain; return 0; }
[ 0, 0 ]
Linux Kernel
sound/soc/samsung/s3c24xx_simtec.c
static int speaker_unmute_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { ucontrol->value.integer.value[0] = spk_unmute; return 0; }
[ 0, 0 ]
Linux Kernel
sound/soc/samsung/s3c24xx_simtec.c
static int speaker_unmute_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { spk_unmute_state(ucontrol->value.integer.value[0]); return 0; }
[ 0, 0 ]
Linux Kernel
sound/soc/samsung/s3c24xx_simtec.c
void simtec_audio_init(struct snd_soc_pcm_runtime *rtd) { struct snd_soc_card *card = rtd->card; if (pdata->amp_gpio > 0) { pr_debug("%s: adding amp routes\n", __func__); snd_soc_add_card_controls(card, amp_unmute_controls, ARRAY_SIZE(amp_unmute_controls)); } if (pdata-...
[ 0, 0 ]
Linux Kernel
sound/soc/samsung/s3c24xx_simtec.c
static int simtec_audio_resume(struct device *dev) { simtec_call_startup(pdata); return 0; }
[ 0, 0 ]
Linux Kernel
sound/soc/samsung/s3c24xx_simtec.c
int simtec_audio_core_probe(struct platform_device *pdev, struct snd_soc_card *card) { struct platform_device *snd_dev; int ret; card->dai_link->ops = &simtec_snd_ops; card->dai_link->dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM; pdata = pde...
[ 1, 0 ]
Linux Kernel
sound/soc/samsung/s3c24xx_simtec.c
int simtec_audio_remove(struct platform_device *pdev) { struct platform_device *snd_dev = platform_get_drvdata(pdev); platform_device_unregister(snd_dev); detach_gpio_amp(pdata); clk_put(xtal_clk); return 0; }
[ 0, 0 ]
Linux Kernel
sound/soc/samsung/s3c24xx_uda134x.c
static int s3c24xx_uda134x_startup(struct snd_pcm_substream *substream) { struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); struct s3c24xx_uda134x *priv = snd_soc_card_get_drvdata(rtd->card); struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); int ret = 0; mutex_lock(&priv->clk_lock); ...
[ 0, 0 ]
Linux Kernel
sound/soc/samsung/smdk_spdif.c
static int smdk_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 *cpu_dai = asoc_rtd_to_cpu(rtd, 0); unsigned long pll_out, rclk_rate; int ret, ratio; switch (par...
[ 0, 0 ]
Linux Kernel
sound/soc/samsung/smdk_spdif.c
static int __init smdk_init(void) { int ret; smdk_snd_spdif_dit_device = platform_device_alloc("spdif-dit", -1); if (!smdk_snd_spdif_dit_device) return -ENOMEM; ret = platform_device_add(smdk_snd_spdif_dit_device); if (ret) goto err1; smdk_snd_spdif_device = platform_device_alloc("soc-audio", -1)...
[ 0, 0 ]
Linux Kernel
sound/soc/samsung/smdk_spdif.c
static void __exit smdk_exit(void) { platform_device_unregister(smdk_snd_spdif_device); platform_device_unregister(smdk_snd_spdif_dit_device); }
[ 0, 0 ]
Linux Kernel
sound/soc/samsung/smdk_wm8580.c
static int smdk_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); unsigned int pll_out; int rfs, ret; switch (params_width(...
[ 0, 0 ]
Linux Kernel
sound/soc/samsung/smdk_wm8580.c
static int __init smdk_audio_init(void) { int ret; smdk_snd_device = platform_device_alloc("soc-audio", -1); if (!smdk_snd_device) return -ENOMEM; platform_set_drvdata(smdk_snd_device, &smdk); ret = platform_device_add(smdk_snd_device); if (ret) platform_device_put(smdk_snd_device); return re...
[ 0, 0 ]
Linux Kernel
sound/soc/samsung/snow.c
static int snow_remove(struct platform_device *pdev) { struct snow_priv *priv = platform_get_drvdata(pdev); struct snd_soc_dai_link *link = &priv->dai_link; of_node_put(link->cpus->of_node); of_node_put(link->codecs->of_node); snd_soc_of_put_dai_link_codecs(link); clk_put(priv->clk_i2s_bus); return 0;...
[ 0, 0 ]
Linux Kernel
sound/soc/samsung/spdif.c
static inline struct samsung_spdif_info *to_info(struct snd_soc_dai *cpu_dai) { return snd_soc_dai_get_drvdata(cpu_dai); }
[ 0, 0 ]
Linux Kernel
sound/soc/samsung/spdif.c
static void spdif_snd_txctrl(struct samsung_spdif_info *spdif, int on) { void __iomem *regs = spdif->regs; u32 clkcon; dev_dbg(spdif->dev, "Entered %s\n", __func__); clkcon = readl(regs + CLKCON) & CLKCTL_MASK; if (on) writel(clkcon | CLKCTL_PWR_ON, regs + CLKCON); else writel(clkcon & ~CLKCTL_PW...
[ 0, 0 ]
Linux Kernel
sound/soc/samsung/spdif.c
static int spdif_suspend(struct snd_soc_component *component) { struct samsung_spdif_info *spdif = component_to_info(component); u32 con = spdif->saved_con; dev_dbg(spdif->dev, "Entered %s\n", __func__); spdif->saved_clkcon = readl(spdif->regs + CLKCON) & CLKCTL_MASK; spdif->saved_con = readl(spdif->regs + ...
[ 0, 0 ]
Linux Kernel
sound/soc/samsung/spdif.c
static int spdif_resume(struct snd_soc_component *component) { struct samsung_spdif_info *spdif = component_to_info(component); dev_dbg(spdif->dev, "Entered %s\n", __func__); writel(spdif->saved_clkcon, spdif->regs + CLKCON); writel(spdif->saved_con, spdif->regs + CON); writel(spdif->saved_cstas, spdif->re...
[ 1, 0 ]
Linux Kernel
sound/soc/samsung/tm2_wm5110.c
static int tm2_stop_sysclk(struct snd_soc_card *card) { struct tm2_machine_priv *priv = snd_soc_card_get_drvdata(card); struct snd_soc_component *component = priv->component; int ret; ret = snd_soc_component_set_pll(component, WM5110_FLL1, 0, 0, 0); if (ret < 0) { dev_err(component->dev, "Failed to stop...
[ 0, 0 ]
Linux Kernel
sound/soc/samsung/tm2_wm5110.c
static int tm2_aif1_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_component *component = asoc_rtd_to_codec(rtd, 0)->component; struct tm2_machine_priv *priv = snd_s...
[ 0, 0 ]
Linux Kernel
sound/soc/samsung/tm2_wm5110.c
static int tm2_aif2_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_component *component = asoc_rtd_to_codec(rtd, 0)->component; unsigned int asyncclk_rate; int ret...
[ 0, 0 ]
Linux Kernel
sound/soc/samsung/tm2_wm5110.c
static int tm2_hdmi_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 *cpu_dai = asoc_rtd_to_cpu(rtd, 0); unsigned int bfs; int bitwidth, ret; bitwidth = snd_...
[ 1, 0 ]