Merge series "ASoC: add asoc_substream_to_rtd() macro" from Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>:
Hi Mark Many ASoC drivers are getting rtd from substream by rtd = substream->private_data OTOH, we have snd_pcm_substream_chip() macro for it. #define snd_pcm_substream_chip(substream) ((substream)->private_data) But, both are not understandable for reader. This patch adds new asoc_substream_to_rtd() which is easy to understand. These are not important, but for readable code. Kuninori Morimoto (29): ASoC: soc-xxx: add asoc_substream_to_rtd() ASoC: ux500: use asoc_substream_to_rtd() ASoC: ti: use asoc_substream_to_rtd() ASoC: tegra: use asoc_substream_to_rtd() ASoC: sunxi: use asoc_substream_to_rtd() ASoC: stm: use asoc_substream_to_rtd() ASoC: sof: use asoc_substream_to_rtd() ASoC: sh: use asoc_substream_to_rtd() ASoC: samsung: use asoc_substream_to_rtd() ASoC: pxa: use asoc_substream_to_rtd() ASoC: cirrus: use asoc_substream_to_rtd() ASoC: rockchip: use asoc_substream_to_rtd() ASoC: amd: use asoc_substream_to_rtd() ASoC: fsl: use asoc_substream_to_rtd() ASoC: mediatek: use asoc_substream_to_rtd() ASoC: atmel: use asoc_substream_to_rtd() ASoC: qcom: use asoc_substream_to_rtd() ASoC: dwc: use asoc_substream_to_rtd() ASoC: intel: use asoc_substream_to_rtd() ASoC: meson: use asoc_substream_to_rtd() ASoC: au1x: use asoc_substream_to_rtd() ASoC: bcm: use asoc_substream_to_rtd() ASoC: codecs: use asoc_substream_to_rtd() ASoC: generic: use asoc_substream_to_rtd() ASoC: sprd: use asoc_substream_to_rtd() ASoC: kirkwood: use asoc_substream_to_rtd() ASoC: xtensa: use asoc_substream_to_rtd() ASoC: mxs: use asoc_substream_to_rtd() ASoC: uniphier: use asoc_substream_to_rtd() include/sound/soc.h | 2 + sound/soc/amd/acp-da7219-max98357a.c | 12 ++-- sound/soc/amd/acp-pcm-dma.c | 2 +- sound/soc/amd/acp-rt5645.c | 2 +- sound/soc/amd/acp3x-rt5682-max9836.c | 8 +-- sound/soc/amd/raven/acp3x-i2s.c | 2 +- sound/soc/amd/raven/acp3x-pcm-dma.c | 6 +- sound/soc/atmel/atmel-classd.c | 8 +-- sound/soc/atmel/atmel-pcm-dma.c | 4 +- sound/soc/atmel/atmel-pcm-pdc.c | 2 +- sound/soc/atmel/atmel-pdmic.c | 10 +-- sound/soc/atmel/atmel_wm8904.c | 2 +- sound/soc/au1x/db1200.c | 2 +- sound/soc/au1x/dbdma2.c | 2 +- sound/soc/au1x/dma.c | 2 +- sound/soc/bcm/bcm63xx-pcm-whistler.c | 12 ++-- sound/soc/bcm/cygnus-pcm.c | 16 ++--- sound/soc/cirrus/edb93xx.c | 2 +- sound/soc/cirrus/snappercl15.c | 2 +- sound/soc/codecs/rt5677-spi.c | 4 +- sound/soc/dwc/dwc-pcm.c | 2 +- sound/soc/fsl/eukrea-tlv320.c | 2 +- sound/soc/fsl/fsl-asoc-card.c | 2 +- sound/soc/fsl/fsl_asrc_dma.c | 4 +- sound/soc/fsl/fsl_dma.c | 2 +- sound/soc/fsl/fsl_spdif.c | 10 +-- sound/soc/fsl/fsl_ssi.c | 8 +-- sound/soc/fsl/imx-audmix.c | 6 +- sound/soc/fsl/imx-mc13783.c | 2 +- sound/soc/fsl/mpc5200_dma.c | 8 +-- sound/soc/fsl/mpc5200_psc_i2s.c | 2 +- sound/soc/fsl/mpc8610_hpcd.c | 2 +- sound/soc/fsl/mx27vis-aic32x4.c | 2 +- sound/soc/fsl/p1022_ds.c | 2 +- sound/soc/fsl/p1022_rdk.c | 2 +- sound/soc/fsl/wm1133-ev1.c | 2 +- sound/soc/generic/simple-card-utils.c | 6 +- sound/soc/intel/atom/sst-mfld-platform-pcm.c | 6 +- sound/soc/intel/baytrail/sst-baytrail-pcm.c | 16 ++--- sound/soc/intel/boards/bdw-rt5650.c | 2 +- sound/soc/intel/boards/bdw-rt5677.c | 4 +- sound/soc/intel/boards/broadwell.c | 2 +- sound/soc/intel/boards/bxt_rt298.c | 2 +- sound/soc/intel/boards/byt-rt5640.c | 2 +- sound/soc/intel/boards/bytcht_da7213.c | 4 +- sound/soc/intel/boards/bytcr_rt5640.c | 2 +- sound/soc/intel/boards/bytcr_rt5651.c | 2 +- sound/soc/intel/boards/cht_bsw_max98090_ti.c | 2 +- sound/soc/intel/boards/cht_bsw_nau8824.c | 2 +- sound/soc/intel/boards/cht_bsw_rt5645.c | 2 +- sound/soc/intel/boards/cht_bsw_rt5672.c | 2 +- sound/soc/intel/boards/cml_rt1011_rt5682.c | 4 +- sound/soc/intel/boards/ehl_rt5660.c | 2 +- sound/soc/intel/boards/glk_rt5682_max98357a.c | 2 +- sound/soc/intel/boards/haswell.c | 2 +- sound/soc/intel/boards/kbl_da7219_max98927.c | 8 +-- sound/soc/intel/boards/kbl_rt5660.c | 2 +- sound/soc/intel/boards/kbl_rt5663_max98927.c | 4 +- .../intel/boards/kbl_rt5663_rt5514_max98927.c | 4 +- .../soc/intel/boards/skl_nau88l25_max98357a.c | 2 +- sound/soc/intel/boards/skl_nau88l25_ssm4567.c | 2 +- sound/soc/intel/boards/skl_rt286.c | 2 +- sound/soc/intel/boards/sof_da7219_max98373.c | 2 +- sound/soc/intel/boards/sof_maxim_common.c | 4 +- sound/soc/intel/boards/sof_pcm512x.c | 4 +- sound/soc/intel/boards/sof_rt5682.c | 4 +- sound/soc/intel/boards/sof_sdw_rt1308.c | 2 +- sound/soc/intel/boards/sof_wm8804.c | 2 +- sound/soc/intel/haswell/sst-haswell-pcm.c | 12 ++-- sound/soc/intel/keembay/kmb_platform.c | 2 +- sound/soc/intel/skylake/skl-pcm.c | 8 +-- sound/soc/kirkwood/armada-370-db.c | 2 +- sound/soc/mediatek/common/mtk-afe-fe-dai.c | 12 ++-- .../mediatek/common/mtk-afe-platform-driver.c | 2 +- sound/soc/mediatek/mt2701/mt2701-afe-pcm.c | 2 +- sound/soc/mediatek/mt2701/mt2701-cs42448.c | 2 +- sound/soc/mediatek/mt2701/mt2701-wm8960.c | 2 +- sound/soc/mediatek/mt6797/mt6797-afe-pcm.c | 4 +- sound/soc/mediatek/mt8173/mt8173-afe-pcm.c | 2 +- sound/soc/mediatek/mt8173/mt8173-max98090.c | 2 +- .../mediatek/mt8173/mt8173-rt5650-rt5514.c | 2 +- .../mediatek/mt8173/mt8173-rt5650-rt5676.c | 2 +- sound/soc/mediatek/mt8173/mt8173-rt5650.c | 2 +- sound/soc/mediatek/mt8183/mt8183-afe-pcm.c | 4 +- .../mediatek/mt8183/mt8183-da7219-max98357.c | 8 +-- .../mt8183/mt8183-mt6358-ts3a227-max98357.c | 12 ++-- sound/soc/meson/axg-card.c | 2 +- sound/soc/meson/gx-card.c | 2 +- sound/soc/meson/meson-card-utils.c | 2 +- sound/soc/meson/meson-codec-glue.c | 2 +- sound/soc/mxs/mxs-sgtl5000.c | 2 +- sound/soc/pxa/brownstone.c | 2 +- sound/soc/pxa/corgi.c | 4 +- sound/soc/pxa/hx4700.c | 2 +- sound/soc/pxa/imote2.c | 2 +- sound/soc/pxa/magician.c | 6 +- sound/soc/pxa/mmp-pcm.c | 2 +- sound/soc/pxa/poodle.c | 4 +- sound/soc/pxa/pxa2xx-i2s.c | 2 +- sound/soc/pxa/spitz.c | 4 +- sound/soc/pxa/tosa.c | 2 +- sound/soc/pxa/z2.c | 2 +- sound/soc/pxa/zylonite.c | 2 +- sound/soc/qcom/apq8096.c | 2 +- sound/soc/qcom/lpass-platform.c | 14 ++--- sound/soc/qcom/qdsp6/q6asm-dai.c | 6 +- sound/soc/qcom/qdsp6/q6routing.c | 2 +- sound/soc/qcom/sdm845.c | 14 ++--- sound/soc/qcom/storm.c | 2 +- sound/soc/rockchip/rk3288_hdmi_analog.c | 2 +- sound/soc/rockchip/rk3399_gru_sound.c | 8 +-- sound/soc/rockchip/rockchip_i2s.c | 2 +- sound/soc/rockchip/rockchip_max98090.c | 2 +- sound/soc/rockchip/rockchip_rt5645.c | 2 +- sound/soc/samsung/aries_wm8994.c | 4 +- sound/soc/samsung/arndale.c | 4 +- sound/soc/samsung/h1940_uda1380.c | 2 +- sound/soc/samsung/i2s.c | 2 +- sound/soc/samsung/jive_wm8750.c | 2 +- sound/soc/samsung/littlemill.c | 2 +- sound/soc/samsung/neo1973_wm8753.c | 8 +-- sound/soc/samsung/odroid.c | 6 +- sound/soc/samsung/pcm.c | 4 +- sound/soc/samsung/rx1950_uda1380.c | 2 +- sound/soc/samsung/s3c-i2s-v2.c | 2 +- sound/soc/samsung/s3c24xx_simtec.c | 2 +- sound/soc/samsung/s3c24xx_uda134x.c | 6 +- sound/soc/samsung/smartq_wm8987.c | 2 +- sound/soc/samsung/smdk_spdif.c | 2 +- sound/soc/samsung/smdk_wm8580.c | 2 +- sound/soc/samsung/smdk_wm8994.c | 2 +- sound/soc/samsung/smdk_wm8994pcm.c | 2 +- sound/soc/samsung/snow.c | 2 +- sound/soc/samsung/spdif.c | 6 +- sound/soc/samsung/tm2_wm5110.c | 8 +-- sound/soc/sh/dma-sh7760.c | 12 ++-- sound/soc/sh/fsi.c | 2 +- sound/soc/sh/migor.c | 4 +- sound/soc/sh/rcar/core.c | 4 +- sound/soc/soc-component.c | 20 +++--- sound/soc/soc-dai.c | 8 +-- sound/soc/soc-dapm.c | 6 +- sound/soc/soc-generic-dmaengine-pcm.c | 4 +- sound/soc/soc-link.c | 12 ++-- sound/soc/soc-pcm.c | 62 +++++++++---------- sound/soc/soc-utils.c | 2 +- sound/soc/sof/intel/hda-dai.c | 10 +-- sound/soc/sof/intel/hda-dsp.c | 2 +- sound/soc/sof/intel/hda-pcm.c | 2 +- sound/soc/sof/pcm.c | 18 +++--- sound/soc/sprd/sprd-pcm-dma.c | 2 +- sound/soc/stm/stm32_adfsdm.c | 12 ++-- sound/soc/stm/stm32_sai_sub.c | 2 +- sound/soc/sunxi/sun4i-codec.c | 12 ++-- sound/soc/sunxi/sun4i-spdif.c | 2 +- sound/soc/tegra/tegra_alc5632.c | 2 +- sound/soc/tegra/tegra_max98090.c | 2 +- sound/soc/tegra/tegra_rt5640.c | 2 +- sound/soc/tegra/tegra_rt5677.c | 2 +- sound/soc/tegra/tegra_sgtl5000.c | 2 +- sound/soc/tegra/tegra_wm8753.c | 2 +- sound/soc/tegra/tegra_wm8903.c | 2 +- sound/soc/tegra/trimslice.c | 2 +- sound/soc/ti/davinci-evm.c | 6 +- sound/soc/ti/davinci-vcif.c | 4 +- sound/soc/ti/j721e-evm.c | 6 +- sound/soc/ti/n810.c | 4 +- sound/soc/ti/omap-abe-twl6040.c | 4 +- sound/soc/ti/omap-mcbsp.c | 4 +- sound/soc/ti/omap-twl4030.c | 2 +- sound/soc/ti/omap3pandora.c | 2 +- sound/soc/ti/osk5912.c | 2 +- sound/soc/ti/rx51.c | 4 +- sound/soc/uniphier/aio-dma.c | 6 +- sound/soc/ux500/mop500_ab8500.c | 8 +-- sound/soc/ux500/ux500_pcm.c | 2 +- sound/soc/xtensa/xtfpga-i2s.c | 2 +- 177 files changed, 397 insertions(+), 395 deletions(-) -- 2.25.1
This commit is contained in:
Коммит
d1e2a97b36
|
@ -1168,6 +1168,8 @@ struct snd_soc_pcm_runtime {
|
|||
/* see soc_new_pcm_runtime() */
|
||||
#define asoc_rtd_to_cpu(rtd, n) (rtd)->dais[n]
|
||||
#define asoc_rtd_to_codec(rtd, n) (rtd)->dais[n + (rtd)->num_cpus]
|
||||
#define asoc_substream_to_rtd(substream) \
|
||||
(struct snd_soc_pcm_runtime *)snd_pcm_substream_chip(substream)
|
||||
|
||||
#define for_each_rtd_components(rtd, i, component) \
|
||||
for ((i) = 0, component = NULL; \
|
||||
|
|
|
@ -99,7 +99,7 @@ static int cz_da7219_init(struct snd_soc_pcm_runtime *rtd)
|
|||
static int da7219_clk_enable(struct snd_pcm_substream *substream)
|
||||
{
|
||||
int ret = 0;
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
|
||||
/*
|
||||
* Set wclk to 48000 because the rate constraint of this driver is
|
||||
|
@ -146,7 +146,7 @@ static const struct snd_pcm_hw_constraint_list constraints_channels = {
|
|||
static int cz_da7219_play_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_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct snd_soc_card *card = rtd->card;
|
||||
struct acp_platform_info *machine = snd_soc_card_get_drvdata(card);
|
||||
|
||||
|
@ -167,7 +167,7 @@ static int cz_da7219_play_startup(struct snd_pcm_substream *substream)
|
|||
static int cz_da7219_cap_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_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct snd_soc_card *card = rtd->card;
|
||||
struct acp_platform_info *machine = snd_soc_card_get_drvdata(card);
|
||||
|
||||
|
@ -189,7 +189,7 @@ static int cz_da7219_cap_startup(struct snd_pcm_substream *substream)
|
|||
static int cz_max_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_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct snd_soc_card *card = rtd->card;
|
||||
struct acp_platform_info *machine = snd_soc_card_get_drvdata(card);
|
||||
|
||||
|
@ -210,7 +210,7 @@ static int cz_max_startup(struct snd_pcm_substream *substream)
|
|||
static int cz_dmic0_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_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct snd_soc_card *card = rtd->card;
|
||||
struct acp_platform_info *machine = snd_soc_card_get_drvdata(card);
|
||||
|
||||
|
@ -231,7 +231,7 @@ static int cz_dmic0_startup(struct snd_pcm_substream *substream)
|
|||
static int cz_dmic1_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_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct snd_soc_card *card = rtd->card;
|
||||
struct acp_platform_info *machine = snd_soc_card_get_drvdata(card);
|
||||
|
||||
|
|
|
@ -840,7 +840,7 @@ static int acp_dma_hw_params(struct snd_soc_component *component,
|
|||
u32 val = 0;
|
||||
struct snd_pcm_runtime *runtime;
|
||||
struct audio_substream_data *rtd;
|
||||
struct snd_soc_pcm_runtime *prtd = substream->private_data;
|
||||
struct snd_soc_pcm_runtime *prtd = asoc_substream_to_rtd(substream);
|
||||
struct audio_drv_data *adata = dev_get_drvdata(component->dev);
|
||||
struct snd_soc_card *card = prtd->card;
|
||||
struct acp_platform_info *pinfo = snd_soc_card_get_drvdata(card);
|
||||
|
|
|
@ -47,7 +47,7 @@ static int cz_aif1_hw_params(struct snd_pcm_substream *substream,
|
|||
struct snd_pcm_hw_params *params)
|
||||
{
|
||||
int ret = 0;
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0);
|
||||
|
||||
ret = snd_soc_dai_set_pll(codec_dai, 0, RT5645_PLL1_S_MCLK,
|
||||
|
|
|
@ -105,7 +105,7 @@ static int acp3x_5682_init(struct snd_soc_pcm_runtime *rtd)
|
|||
static int rt5682_clk_enable(struct snd_pcm_substream *substream)
|
||||
{
|
||||
int ret = 0;
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
|
||||
/* RT5682 will support only 48K output with 48M mclk */
|
||||
clk_set_rate(rt5682_dai_wclk, 48000);
|
||||
|
@ -147,7 +147,7 @@ static const struct snd_pcm_hw_constraint_list constraints_channels = {
|
|||
static int acp3x_5682_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_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct snd_soc_card *card = rtd->card;
|
||||
struct acp3x_platform_info *machine = snd_soc_card_get_drvdata(card);
|
||||
|
||||
|
@ -165,7 +165,7 @@ static int acp3x_5682_startup(struct snd_pcm_substream *substream)
|
|||
static int acp3x_max_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_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct snd_soc_card *card = rtd->card;
|
||||
struct acp3x_platform_info *machine = snd_soc_card_get_drvdata(card);
|
||||
|
||||
|
@ -181,7 +181,7 @@ static int acp3x_max_startup(struct snd_pcm_substream *substream)
|
|||
|
||||
static int acp3x_ec_dmic0_startup(struct snd_pcm_substream *substream)
|
||||
{
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct snd_soc_card *card = rtd->card;
|
||||
struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0);
|
||||
struct acp3x_platform_info *machine = snd_soc_card_get_drvdata(card);
|
||||
|
|
|
@ -80,7 +80,7 @@ static int acp3x_i2s_hwparams(struct snd_pcm_substream *substream,
|
|||
u32 val;
|
||||
u32 reg_val, frmt_reg;
|
||||
|
||||
prtd = substream->private_data;
|
||||
prtd = asoc_substream_to_rtd(substream);
|
||||
rtd = substream->runtime->private_data;
|
||||
card = prtd->card;
|
||||
adata = snd_soc_dai_get_drvdata(dai);
|
||||
|
|
|
@ -217,7 +217,7 @@ static int acp3x_dma_open(struct snd_soc_component *component,
|
|||
int ret;
|
||||
|
||||
runtime = substream->runtime;
|
||||
prtd = substream->private_data;
|
||||
prtd = asoc_substream_to_rtd(substream);
|
||||
component = snd_soc_rtdcom_lookup(prtd, DRV_NAME);
|
||||
adata = dev_get_drvdata(component->dev);
|
||||
i2s_data = kzalloc(sizeof(*i2s_data), GFP_KERNEL);
|
||||
|
@ -258,7 +258,7 @@ static int acp3x_dma_hw_params(struct snd_soc_component *component,
|
|||
struct i2s_dev_data *adata;
|
||||
u64 size;
|
||||
|
||||
prtd = substream->private_data;
|
||||
prtd = asoc_substream_to_rtd(substream);
|
||||
card = prtd->card;
|
||||
pinfo = snd_soc_card_get_drvdata(card);
|
||||
adata = dev_get_drvdata(component->dev);
|
||||
|
@ -340,7 +340,7 @@ static int acp3x_dma_close(struct snd_soc_component *component,
|
|||
struct i2s_dev_data *adata;
|
||||
struct i2s_stream_instance *ins;
|
||||
|
||||
prtd = substream->private_data;
|
||||
prtd = asoc_substream_to_rtd(substream);
|
||||
component = snd_soc_rtdcom_lookup(prtd, DRV_NAME);
|
||||
adata = dev_get_drvdata(component->dev);
|
||||
ins = substream->runtime->private_data;
|
||||
|
|
|
@ -118,7 +118,7 @@ static const struct snd_pcm_hardware atmel_classd_hw = {
|
|||
static int atmel_classd_cpu_dai_startup(struct snd_pcm_substream *substream,
|
||||
struct snd_soc_dai *cpu_dai)
|
||||
{
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct atmel_classd *dd = snd_soc_card_get_drvdata(rtd->card);
|
||||
int err;
|
||||
|
||||
|
@ -141,7 +141,7 @@ atmel_classd_platform_configure_dma(struct snd_pcm_substream *substream,
|
|||
struct snd_pcm_hw_params *params,
|
||||
struct dma_slave_config *slave_config)
|
||||
{
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct atmel_classd *dd = snd_soc_card_get_drvdata(rtd->card);
|
||||
|
||||
if (params_physical_width(params) != 16) {
|
||||
|
@ -338,7 +338,7 @@ atmel_classd_cpu_dai_hw_params(struct snd_pcm_substream *substream,
|
|||
struct snd_pcm_hw_params *params,
|
||||
struct snd_soc_dai *cpu_dai)
|
||||
{
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct atmel_classd *dd = snd_soc_card_get_drvdata(rtd->card);
|
||||
struct snd_soc_component *component = cpu_dai->component;
|
||||
int fs;
|
||||
|
@ -381,7 +381,7 @@ static void
|
|||
atmel_classd_cpu_dai_shutdown(struct snd_pcm_substream *substream,
|
||||
struct snd_soc_dai *cpu_dai)
|
||||
{
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct atmel_classd *dd = snd_soc_card_get_drvdata(rtd->card);
|
||||
|
||||
clk_disable_unprepare(dd->gclk);
|
||||
|
|
|
@ -53,7 +53,7 @@ static const struct snd_pcm_hardware atmel_pcm_dma_hardware = {
|
|||
static void atmel_pcm_dma_irq(u32 ssc_sr,
|
||||
struct snd_pcm_substream *substream)
|
||||
{
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct atmel_pcm_dma_params *prtd;
|
||||
|
||||
prtd = snd_soc_dai_get_dma_data(asoc_rtd_to_cpu(rtd, 0), substream);
|
||||
|
@ -78,7 +78,7 @@ static void atmel_pcm_dma_irq(u32 ssc_sr,
|
|||
static int atmel_pcm_configure_dma(struct snd_pcm_substream *substream,
|
||||
struct snd_pcm_hw_params *params, struct dma_slave_config *slave_config)
|
||||
{
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct atmel_pcm_dma_params *prtd;
|
||||
struct ssc_device *ssc;
|
||||
int ret;
|
||||
|
|
|
@ -205,7 +205,7 @@ static int atmel_pcm_hw_params(struct snd_soc_component *component,
|
|||
{
|
||||
struct snd_pcm_runtime *runtime = substream->runtime;
|
||||
struct atmel_runtime_data *prtd = runtime->private_data;
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
|
||||
/* this may get called several times by oss emulation
|
||||
* with different params */
|
||||
|
|
|
@ -104,7 +104,7 @@ static struct atmel_pdmic_pdata *atmel_pdmic_dt_init(struct device *dev)
|
|||
static int atmel_pdmic_cpu_dai_startup(struct snd_pcm_substream *substream,
|
||||
struct snd_soc_dai *cpu_dai)
|
||||
{
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct atmel_pdmic *dd = snd_soc_card_get_drvdata(rtd->card);
|
||||
int ret;
|
||||
|
||||
|
@ -132,7 +132,7 @@ static int atmel_pdmic_cpu_dai_startup(struct snd_pcm_substream *substream,
|
|||
static void atmel_pdmic_cpu_dai_shutdown(struct snd_pcm_substream *substream,
|
||||
struct snd_soc_dai *cpu_dai)
|
||||
{
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct atmel_pdmic *dd = snd_soc_card_get_drvdata(rtd->card);
|
||||
|
||||
/* Disable the overrun error interrupt */
|
||||
|
@ -145,7 +145,7 @@ static void atmel_pdmic_cpu_dai_shutdown(struct snd_pcm_substream *substream,
|
|||
static int atmel_pdmic_cpu_dai_prepare(struct snd_pcm_substream *substream,
|
||||
struct snd_soc_dai *cpu_dai)
|
||||
{
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct atmel_pdmic *dd = snd_soc_card_get_drvdata(rtd->card);
|
||||
struct snd_soc_component *component = cpu_dai->component;
|
||||
u32 val;
|
||||
|
@ -191,7 +191,7 @@ atmel_pdmic_platform_configure_dma(struct snd_pcm_substream *substream,
|
|||
struct snd_pcm_hw_params *params,
|
||||
struct dma_slave_config *slave_config)
|
||||
{
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct atmel_pdmic *dd = snd_soc_card_get_drvdata(rtd->card);
|
||||
int ret;
|
||||
|
||||
|
@ -356,7 +356,7 @@ atmel_pdmic_cpu_dai_hw_params(struct snd_pcm_substream *substream,
|
|||
struct snd_pcm_hw_params *params,
|
||||
struct snd_soc_dai *cpu_dai)
|
||||
{
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct atmel_pdmic *dd = snd_soc_card_get_drvdata(rtd->card);
|
||||
struct snd_soc_component *component = cpu_dai->component;
|
||||
unsigned int rate_min = substream->runtime->hw.rate_min;
|
||||
|
|
|
@ -26,7 +26,7 @@ static const struct snd_soc_dapm_widget atmel_asoc_wm8904_dapm_widgets[] = {
|
|||
static int atmel_asoc_wm8904_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_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0);
|
||||
int ret;
|
||||
|
||||
|
|
|
@ -94,7 +94,7 @@ static struct snd_soc_card db1550_ac97_machine = {
|
|||
|
||||
static int db1200_i2s_startup(struct snd_pcm_substream *substream)
|
||||
{
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0);
|
||||
|
||||
/* WM8731 has its own 12MHz crystal */
|
||||
|
|
|
@ -278,7 +278,7 @@ static int au1xpsc_pcm_open(struct snd_soc_component *component,
|
|||
struct snd_pcm_substream *substream)
|
||||
{
|
||||
struct au1xpsc_audio_dmadata *pcd = to_dmadata(substream, component);
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
int stype = substream->stream, *dmaids;
|
||||
|
||||
dmaids = snd_soc_dai_get_dma_data(asoc_rtd_to_cpu(rtd, 0), substream);
|
||||
|
|
|
@ -191,7 +191,7 @@ static int alchemy_pcm_open(struct snd_soc_component *component,
|
|||
struct snd_pcm_substream *substream)
|
||||
{
|
||||
struct alchemy_pcm_ctx *ctx = ss_to_ctx(substream, component);
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
int *dmaids, s = substream->stream;
|
||||
char *name;
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ static int bcm63xx_pcm_hw_params(struct snd_soc_component *component,
|
|||
struct snd_pcm_hw_params *params)
|
||||
{
|
||||
struct i2s_dma_desc *dma_desc;
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct snd_pcm_runtime *runtime = substream->runtime;
|
||||
|
||||
snd_pcm_set_runtime_buffer(substream, &substream->dma_buffer);
|
||||
|
@ -64,7 +64,7 @@ static int bcm63xx_pcm_hw_free(struct snd_soc_component *component,
|
|||
struct snd_pcm_substream *substream)
|
||||
{
|
||||
struct i2s_dma_desc *dma_desc;
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
|
||||
dma_desc = snd_soc_dai_get_dma_data(asoc_rtd_to_cpu(rtd, 0), substream);
|
||||
kfree(dma_desc);
|
||||
|
@ -81,7 +81,7 @@ static int bcm63xx_pcm_trigger(struct snd_soc_component *component,
|
|||
struct bcm_i2s_priv *i2s_priv;
|
||||
struct regmap *regmap_i2s;
|
||||
|
||||
rtd = substream->private_data;
|
||||
rtd = asoc_substream_to_rtd(substream);
|
||||
i2s_priv = dev_get_drvdata(asoc_rtd_to_cpu(rtd, 0)->dev);
|
||||
regmap_i2s = i2s_priv->regmap_i2s;
|
||||
|
||||
|
@ -148,7 +148,7 @@ static int bcm63xx_pcm_prepare(struct snd_soc_component *component,
|
|||
struct i2s_dma_desc *dma_desc;
|
||||
struct regmap *regmap_i2s;
|
||||
struct bcm_i2s_priv *i2s_priv;
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct snd_pcm_runtime *runtime = substream->runtime;
|
||||
uint32_t regaddr_desclen, regaddr_descaddr;
|
||||
|
||||
|
@ -267,7 +267,7 @@ static irqreturn_t i2s_dma_isr(int irq, void *bcm_i2s_priv)
|
|||
if (int_status & I2S_RX_DESC_OFF_INTR_EN_MSK) {
|
||||
substream = i2s_priv->capture_substream;
|
||||
runtime = substream->runtime;
|
||||
rtd = substream->private_data;
|
||||
rtd = asoc_substream_to_rtd(substream);
|
||||
prtd = runtime->private_data;
|
||||
dma_desc = snd_soc_dai_get_dma_data(asoc_rtd_to_cpu(rtd, 0), substream);
|
||||
|
||||
|
@ -315,7 +315,7 @@ static irqreturn_t i2s_dma_isr(int irq, void *bcm_i2s_priv)
|
|||
if (int_status & I2S_TX_DESC_OFF_INTR_EN_MSK) {
|
||||
substream = i2s_priv->play_substream;
|
||||
runtime = substream->runtime;
|
||||
rtd = substream->private_data;
|
||||
rtd = asoc_substream_to_rtd(substream);
|
||||
prtd = runtime->private_data;
|
||||
dma_desc = snd_soc_dai_get_dma_data(asoc_rtd_to_cpu(rtd, 0), substream);
|
||||
|
||||
|
|
|
@ -207,7 +207,7 @@ static u64 cygnus_dma_dmamask = DMA_BIT_MASK(32);
|
|||
static struct cygnus_aio_port *cygnus_dai_get_dma_data(
|
||||
struct snd_pcm_substream *substream)
|
||||
{
|
||||
struct snd_soc_pcm_runtime *soc_runtime = substream->private_data;
|
||||
struct snd_soc_pcm_runtime *soc_runtime = asoc_substream_to_rtd(substream);
|
||||
|
||||
return snd_soc_dai_get_dma_data(asoc_rtd_to_cpu(soc_runtime, 0), substream);
|
||||
}
|
||||
|
@ -353,7 +353,7 @@ static void enable_intr(struct snd_pcm_substream *substream)
|
|||
|
||||
static void disable_intr(struct snd_pcm_substream *substream)
|
||||
{
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct cygnus_aio_port *aio;
|
||||
u32 set_mask;
|
||||
|
||||
|
@ -581,7 +581,7 @@ static irqreturn_t cygnus_dma_irq(int irq, void *data)
|
|||
static int cygnus_pcm_open(struct snd_soc_component *component,
|
||||
struct snd_pcm_substream *substream)
|
||||
{
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct snd_pcm_runtime *runtime = substream->runtime;
|
||||
struct cygnus_aio_port *aio;
|
||||
int ret;
|
||||
|
@ -618,7 +618,7 @@ static int cygnus_pcm_open(struct snd_soc_component *component,
|
|||
static int cygnus_pcm_close(struct snd_soc_component *component,
|
||||
struct snd_pcm_substream *substream)
|
||||
{
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct cygnus_aio_port *aio;
|
||||
|
||||
aio = cygnus_dai_get_dma_data(substream);
|
||||
|
@ -640,7 +640,7 @@ static int cygnus_pcm_hw_params(struct snd_soc_component *component,
|
|||
struct snd_pcm_substream *substream,
|
||||
struct snd_pcm_hw_params *params)
|
||||
{
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct snd_pcm_runtime *runtime = substream->runtime;
|
||||
struct cygnus_aio_port *aio;
|
||||
|
||||
|
@ -656,7 +656,7 @@ static int cygnus_pcm_hw_params(struct snd_soc_component *component,
|
|||
static int cygnus_pcm_hw_free(struct snd_soc_component *component,
|
||||
struct snd_pcm_substream *substream)
|
||||
{
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct cygnus_aio_port *aio;
|
||||
|
||||
aio = cygnus_dai_get_dma_data(substream);
|
||||
|
@ -669,7 +669,7 @@ static int cygnus_pcm_hw_free(struct snd_soc_component *component,
|
|||
static int cygnus_pcm_prepare(struct snd_soc_component *component,
|
||||
struct snd_pcm_substream *substream)
|
||||
{
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct snd_pcm_runtime *runtime = substream->runtime;
|
||||
struct cygnus_aio_port *aio;
|
||||
unsigned long bufsize, periodsize;
|
||||
|
@ -733,7 +733,7 @@ static snd_pcm_uframes_t cygnus_pcm_pointer(struct snd_soc_component *component,
|
|||
static int cygnus_pcm_preallocate_dma_buffer(struct snd_pcm *pcm, int stream)
|
||||
{
|
||||
struct snd_pcm_substream *substream = pcm->streams[stream].substream;
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct snd_dma_buffer *buf = &substream->dma_buffer;
|
||||
size_t size;
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
static int edb93xx_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_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0);
|
||||
struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0);
|
||||
int err;
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
static int snappercl15_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_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0);
|
||||
struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0);
|
||||
int err;
|
||||
|
|
|
@ -112,7 +112,7 @@ static int rt5677_spi_pcm_close(
|
|||
struct snd_soc_component *component,
|
||||
struct snd_pcm_substream *substream)
|
||||
{
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct snd_soc_component *codec_component =
|
||||
snd_soc_rtdcom_lookup(rtd, "rt5677");
|
||||
struct rt5677_priv *rt5677 =
|
||||
|
@ -158,7 +158,7 @@ static int rt5677_spi_prepare(
|
|||
struct snd_soc_component *component,
|
||||
struct snd_pcm_substream *substream)
|
||||
{
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct snd_soc_component *rt5677_component =
|
||||
snd_soc_rtdcom_lookup(rtd, "rt5677");
|
||||
struct rt5677_priv *rt5677 =
|
||||
|
|
|
@ -139,7 +139,7 @@ static int dw_pcm_open(struct snd_soc_component *component,
|
|||
struct snd_pcm_substream *substream)
|
||||
{
|
||||
struct snd_pcm_runtime *runtime = substream->runtime;
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct dw_i2s_dev *dev = snd_soc_dai_get_drvdata(asoc_rtd_to_cpu(rtd, 0));
|
||||
|
||||
snd_soc_set_runtime_hwparams(substream, &dw_pcm_hardware);
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
static int eukrea_tlv320_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_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0);
|
||||
struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0);
|
||||
int ret;
|
||||
|
|
|
@ -148,7 +148,7 @@ static bool fsl_asoc_card_is_ac97(struct fsl_asoc_card_priv *priv)
|
|||
static int fsl_asoc_card_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_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct fsl_asoc_card_priv *priv = snd_soc_card_get_drvdata(rtd->card);
|
||||
bool tx = substream->stream == SNDRV_PCM_STREAM_PLAYBACK;
|
||||
struct cpu_priv *cpu_priv = &priv->cpu_priv;
|
||||
|
|
|
@ -129,7 +129,7 @@ static int fsl_asrc_dma_hw_params(struct snd_soc_component *component,
|
|||
struct snd_pcm_hw_params *params)
|
||||
{
|
||||
enum dma_slave_buswidth buswidth = DMA_SLAVE_BUSWIDTH_2_BYTES;
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
bool tx = substream->stream == SNDRV_PCM_STREAM_PLAYBACK;
|
||||
struct snd_dmaengine_dai_dma_data *dma_params_fe = NULL;
|
||||
struct snd_dmaengine_dai_dma_data *dma_params_be = NULL;
|
||||
|
@ -313,7 +313,7 @@ static int fsl_asrc_dma_startup(struct snd_soc_component *component,
|
|||
struct snd_pcm_substream *substream)
|
||||
{
|
||||
bool tx = substream->stream == SNDRV_PCM_STREAM_PLAYBACK;
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct snd_pcm_runtime *runtime = substream->runtime;
|
||||
struct snd_dmaengine_dai_dma_data *dma_data;
|
||||
struct device *dev = component->dev;
|
||||
|
|
|
@ -200,7 +200,7 @@ static irqreturn_t fsl_dma_isr(int irq, void *dev_id)
|
|||
{
|
||||
struct fsl_dma_private *dma_private = dev_id;
|
||||
struct snd_pcm_substream *substream = dma_private->substream;
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct device *dev = rtd->dev;
|
||||
struct ccsr_dma_channel __iomem *dma_channel = dma_private->dma_channel;
|
||||
irqreturn_t ret = IRQ_NONE;
|
||||
|
|
|
@ -405,7 +405,7 @@ static int spdif_set_rx_clksrc(struct fsl_spdif_priv *spdif_priv,
|
|||
static int spdif_set_sample_rate(struct snd_pcm_substream *substream,
|
||||
int sample_rate)
|
||||
{
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct fsl_spdif_priv *spdif_priv = snd_soc_dai_get_drvdata(asoc_rtd_to_cpu(rtd, 0));
|
||||
struct spdif_mixer_control *ctrl = &spdif_priv->fsl_spdif_control;
|
||||
struct regmap *regmap = spdif_priv->regmap;
|
||||
|
@ -492,7 +492,7 @@ clk_set_bypass:
|
|||
static int fsl_spdif_startup(struct snd_pcm_substream *substream,
|
||||
struct snd_soc_dai *cpu_dai)
|
||||
{
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct fsl_spdif_priv *spdif_priv = snd_soc_dai_get_drvdata(asoc_rtd_to_cpu(rtd, 0));
|
||||
struct platform_device *pdev = spdif_priv->pdev;
|
||||
struct regmap *regmap = spdif_priv->regmap;
|
||||
|
@ -534,7 +534,7 @@ static int fsl_spdif_startup(struct snd_pcm_substream *substream,
|
|||
static void fsl_spdif_shutdown(struct snd_pcm_substream *substream,
|
||||
struct snd_soc_dai *cpu_dai)
|
||||
{
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct fsl_spdif_priv *spdif_priv = snd_soc_dai_get_drvdata(asoc_rtd_to_cpu(rtd, 0));
|
||||
struct regmap *regmap = spdif_priv->regmap;
|
||||
u32 scr, mask;
|
||||
|
@ -563,7 +563,7 @@ 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 = substream->private_data;
|
||||
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct fsl_spdif_priv *spdif_priv = snd_soc_dai_get_drvdata(asoc_rtd_to_cpu(rtd, 0));
|
||||
struct spdif_mixer_control *ctrl = &spdif_priv->fsl_spdif_control;
|
||||
struct platform_device *pdev = spdif_priv->pdev;
|
||||
|
@ -591,7 +591,7 @@ static int fsl_spdif_hw_params(struct snd_pcm_substream *substream,
|
|||
static int fsl_spdif_trigger(struct snd_pcm_substream *substream,
|
||||
int cmd, struct snd_soc_dai *dai)
|
||||
{
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct fsl_spdif_priv *spdif_priv = snd_soc_dai_get_drvdata(asoc_rtd_to_cpu(rtd, 0));
|
||||
struct regmap *regmap = spdif_priv->regmap;
|
||||
bool tx = substream->stream == SNDRV_PCM_STREAM_PLAYBACK;
|
||||
|
|
|
@ -629,7 +629,7 @@ static void fsl_ssi_setup_ac97(struct fsl_ssi *ssi)
|
|||
static int fsl_ssi_startup(struct snd_pcm_substream *substream,
|
||||
struct snd_soc_dai *dai)
|
||||
{
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
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));
|
||||
int ret;
|
||||
|
||||
|
@ -653,7 +653,7 @@ static int fsl_ssi_startup(struct snd_pcm_substream *substream,
|
|||
static void fsl_ssi_shutdown(struct snd_pcm_substream *substream,
|
||||
struct snd_soc_dai *dai)
|
||||
{
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
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));
|
||||
|
||||
clk_disable_unprepare(ssi->clk);
|
||||
|
@ -863,7 +863,7 @@ static int fsl_ssi_hw_params(struct snd_pcm_substream *substream,
|
|||
static int fsl_ssi_hw_free(struct snd_pcm_substream *substream,
|
||||
struct snd_soc_dai *dai)
|
||||
{
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
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_master(ssi) &&
|
||||
|
@ -1078,7 +1078,7 @@ static int fsl_ssi_set_dai_tdm_slot(struct snd_soc_dai *dai, u32 tx_mask,
|
|||
static int fsl_ssi_trigger(struct snd_pcm_substream *substream, int cmd,
|
||||
struct snd_soc_dai *dai)
|
||||
{
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
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));
|
||||
bool tx = substream->stream == SNDRV_PCM_STREAM_PLAYBACK;
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ static const struct snd_pcm_hw_constraint_list imx_audmix_rate_constraints = {
|
|||
|
||||
static int imx_audmix_fe_startup(struct snd_pcm_substream *substream)
|
||||
{
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
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;
|
||||
|
@ -73,7 +73,7 @@ static int imx_audmix_fe_startup(struct snd_pcm_substream *substream)
|
|||
static int imx_audmix_fe_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_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct device *dev = rtd->card->dev;
|
||||
bool tx = substream->stream == SNDRV_PCM_STREAM_PLAYBACK;
|
||||
unsigned int fmt = SND_SOC_DAIFMT_DSP_A | SND_SOC_DAIFMT_NB_NF;
|
||||
|
@ -112,7 +112,7 @@ static int imx_audmix_fe_hw_params(struct snd_pcm_substream *substream,
|
|||
static int imx_audmix_be_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_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct device *dev = rtd->card->dev;
|
||||
bool tx = substream->stream == SNDRV_PCM_STREAM_PLAYBACK;
|
||||
unsigned int fmt = SND_SOC_DAIFMT_DSP_A | SND_SOC_DAIFMT_NB_NF;
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
static int imx_mc13783_hifi_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_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 = asoc_rtd_to_codec(rtd, 0);
|
||||
int ret;
|
||||
|
|
|
@ -114,7 +114,7 @@ static int psc_dma_hw_free(struct snd_soc_component *component,
|
|||
static int psc_dma_trigger(struct snd_soc_component *component,
|
||||
struct snd_pcm_substream *substream, int cmd)
|
||||
{
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
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 snd_pcm_runtime *runtime = substream->runtime;
|
||||
struct psc_dma_stream *s = to_psc_dma_stream(substream, psc_dma);
|
||||
|
@ -216,7 +216,7 @@ static int psc_dma_open(struct snd_soc_component *component,
|
|||
struct snd_pcm_substream *substream)
|
||||
{
|
||||
struct snd_pcm_runtime *runtime = substream->runtime;
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
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_dma_stream *s;
|
||||
int rc;
|
||||
|
@ -244,7 +244,7 @@ static int psc_dma_open(struct snd_soc_component *component,
|
|||
static int psc_dma_close(struct snd_soc_component *component,
|
||||
struct snd_pcm_substream *substream)
|
||||
{
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
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_dma_stream *s;
|
||||
|
||||
|
@ -270,7 +270,7 @@ static snd_pcm_uframes_t
|
|||
psc_dma_pointer(struct snd_soc_component *component,
|
||||
struct snd_pcm_substream *substream)
|
||||
{
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
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_dma_stream *s;
|
||||
dma_addr_t count;
|
||||
|
|
|
@ -38,7 +38,7 @@ static int psc_i2s_hw_params(struct snd_pcm_substream *substream,
|
|||
struct snd_pcm_hw_params *params,
|
||||
struct snd_soc_dai *dai)
|
||||
{
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
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));
|
||||
u32 mode;
|
||||
|
||||
|
|
|
@ -98,7 +98,7 @@ static int mpc8610_hpcd_machine_probe(struct snd_soc_card *card)
|
|||
*/
|
||||
static int mpc8610_hpcd_startup(struct snd_pcm_substream *substream)
|
||||
{
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct mpc8610_hpcd_data *machine_data =
|
||||
container_of(rtd->card, struct mpc8610_hpcd_data, card);
|
||||
struct device *dev = rtd->card->dev;
|
||||
|
|
|
@ -36,7 +36,7 @@ static int mx27vis_amp_muter_gpio;
|
|||
static int mx27vis_aic32x4_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_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0);
|
||||
struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0);
|
||||
int ret;
|
||||
|
|
|
@ -121,7 +121,7 @@ static int p1022_ds_machine_probe(struct snd_soc_card *card)
|
|||
*/
|
||||
static int p1022_ds_startup(struct snd_pcm_substream *substream)
|
||||
{
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct machine_data *mdata =
|
||||
container_of(rtd->card, struct machine_data, card);
|
||||
struct device *dev = rtd->card->dev;
|
||||
|
|
|
@ -127,7 +127,7 @@ static int p1022_rdk_machine_probe(struct snd_soc_card *card)
|
|||
*/
|
||||
static int p1022_rdk_startup(struct snd_pcm_substream *substream)
|
||||
{
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct machine_data *mdata =
|
||||
container_of(rtd->card, struct machine_data, card);
|
||||
struct device *dev = rtd->card->dev;
|
||||
|
|
|
@ -75,7 +75,7 @@ static const struct _wm8350_audio wm8350_audio[] = {
|
|||
static int wm1133_ev1_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_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0);
|
||||
struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0);
|
||||
int i, found = 0;
|
||||
|
|
|
@ -193,7 +193,7 @@ EXPORT_SYMBOL_GPL(asoc_simple_parse_clk);
|
|||
|
||||
int asoc_simple_startup(struct snd_pcm_substream *substream)
|
||||
{
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
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 *dai_props = simple_priv_to_props(priv, rtd->num);
|
||||
int ret;
|
||||
|
@ -212,7 +212,7 @@ EXPORT_SYMBOL_GPL(asoc_simple_startup);
|
|||
|
||||
void asoc_simple_shutdown(struct snd_pcm_substream *substream)
|
||||
{
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0);
|
||||
struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0);
|
||||
struct asoc_simple_priv *priv = snd_soc_card_get_drvdata(rtd->card);
|
||||
|
@ -248,7 +248,7 @@ static int asoc_simple_set_clk_rate(struct asoc_simple_dai *simple_dai,
|
|||
int asoc_simple_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_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0);
|
||||
struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0);
|
||||
struct asoc_simple_priv *priv = snd_soc_card_get_drvdata(rtd->card);
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
static int a370db_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_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0);
|
||||
unsigned int freq;
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ static int mtk_regmap_write(struct regmap *map, int reg, unsigned int val)
|
|||
int mtk_afe_fe_startup(struct snd_pcm_substream *substream,
|
||||
struct snd_soc_dai *dai)
|
||||
{
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct mtk_base_afe *afe = snd_soc_dai_get_drvdata(dai);
|
||||
struct snd_pcm_runtime *runtime = substream->runtime;
|
||||
int memif_num = asoc_rtd_to_cpu(rtd, 0)->id;
|
||||
|
@ -98,7 +98,7 @@ EXPORT_SYMBOL_GPL(mtk_afe_fe_startup);
|
|||
void mtk_afe_fe_shutdown(struct snd_pcm_substream *substream,
|
||||
struct snd_soc_dai *dai)
|
||||
{
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct mtk_base_afe *afe = snd_soc_dai_get_drvdata(dai);
|
||||
struct mtk_base_afe_memif *memif = &afe->memif[asoc_rtd_to_cpu(rtd, 0)->id];
|
||||
int irq_id;
|
||||
|
@ -120,7 +120,7 @@ int mtk_afe_fe_hw_params(struct snd_pcm_substream *substream,
|
|||
struct snd_pcm_hw_params *params,
|
||||
struct snd_soc_dai *dai)
|
||||
{
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct mtk_base_afe *afe = snd_soc_dai_get_drvdata(dai);
|
||||
int id = asoc_rtd_to_cpu(rtd, 0)->id;
|
||||
struct mtk_base_afe_memif *memif = &afe->memif[id];
|
||||
|
@ -196,7 +196,7 @@ EXPORT_SYMBOL_GPL(mtk_afe_fe_hw_free);
|
|||
int mtk_afe_fe_trigger(struct snd_pcm_substream *substream, int cmd,
|
||||
struct snd_soc_dai *dai)
|
||||
{
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct snd_pcm_runtime * const runtime = substream->runtime;
|
||||
struct mtk_base_afe *afe = snd_soc_dai_get_drvdata(dai);
|
||||
int id = asoc_rtd_to_cpu(rtd, 0)->id;
|
||||
|
@ -263,7 +263,7 @@ EXPORT_SYMBOL_GPL(mtk_afe_fe_trigger);
|
|||
int mtk_afe_fe_prepare(struct snd_pcm_substream *substream,
|
||||
struct snd_soc_dai *dai)
|
||||
{
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct mtk_base_afe *afe = snd_soc_dai_get_drvdata(dai);
|
||||
int id = asoc_rtd_to_cpu(rtd, 0)->id;
|
||||
int pbuf_size;
|
||||
|
@ -505,7 +505,7 @@ EXPORT_SYMBOL_GPL(mtk_memif_set_rate);
|
|||
int mtk_memif_set_rate_substream(struct snd_pcm_substream *substream,
|
||||
int id, unsigned int rate)
|
||||
{
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct snd_soc_component *component =
|
||||
snd_soc_rtdcom_lookup(rtd, AFE_PCM_NAME);
|
||||
struct mtk_base_afe *afe = snd_soc_component_get_drvdata(component);
|
||||
|
|
|
@ -80,7 +80,7 @@ EXPORT_SYMBOL_GPL(mtk_afe_add_sub_dai_control);
|
|||
snd_pcm_uframes_t mtk_afe_pcm_pointer(struct snd_soc_component *component,
|
||||
struct snd_pcm_substream *substream)
|
||||
{
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct mtk_base_afe *afe = snd_soc_component_get_drvdata(component);
|
||||
struct mtk_base_afe_memif *memif = &afe->memif[asoc_rtd_to_cpu(rtd, 0)->id];
|
||||
const struct mtk_base_memif_data *memif_data = memif->data;
|
||||
|
|
|
@ -494,7 +494,7 @@ static int mt2701_dlm_fe_trigger(struct snd_pcm_substream *substream,
|
|||
static int mt2701_memif_fs(struct snd_pcm_substream *substream,
|
||||
unsigned int rate)
|
||||
{
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
int fs;
|
||||
|
||||
if (asoc_rtd_to_cpu(rtd, 0)->id != MT2701_MEMIF_ULBT)
|
||||
|
|
|
@ -127,7 +127,7 @@ static const struct snd_soc_ops mt2701_cs42448_48k_fe_ops = {
|
|||
static int mt2701_cs42448_be_ops_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_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 = asoc_rtd_to_codec(rtd, 0);
|
||||
unsigned int mclk_rate;
|
||||
|
|
|
@ -24,7 +24,7 @@ static const struct snd_kcontrol_new mt2701_wm8960_controls[] = {
|
|||
static int mt2701_wm8960_be_ops_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_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0);
|
||||
struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0);
|
||||
unsigned int mclk_rate;
|
||||
|
|
|
@ -139,7 +139,7 @@ static const struct snd_pcm_hardware mt6797_afe_hardware = {
|
|||
static int mt6797_memif_fs(struct snd_pcm_substream *substream,
|
||||
unsigned int rate)
|
||||
{
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct snd_soc_component *component =
|
||||
snd_soc_rtdcom_lookup(rtd, AFE_PCM_NAME);
|
||||
struct mtk_base_afe *afe = snd_soc_component_get_drvdata(component);
|
||||
|
@ -150,7 +150,7 @@ static int mt6797_memif_fs(struct snd_pcm_substream *substream,
|
|||
|
||||
static int mt6797_irq_fs(struct snd_pcm_substream *substream, unsigned int rate)
|
||||
{
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct snd_soc_component *component =
|
||||
snd_soc_rtdcom_lookup(rtd, AFE_PCM_NAME);
|
||||
struct mtk_base_afe *afe = snd_soc_component_get_drvdata(component);
|
||||
|
|
|
@ -482,7 +482,7 @@ static int mt8173_afe_hdmi_trigger(struct snd_pcm_substream *substream, int cmd,
|
|||
static int mt8173_memif_fs(struct snd_pcm_substream *substream,
|
||||
unsigned int rate)
|
||||
{
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct snd_soc_component *component = snd_soc_rtdcom_lookup(rtd, AFE_PCM_NAME);
|
||||
struct mtk_base_afe *afe = snd_soc_component_get_drvdata(component);
|
||||
struct mtk_base_afe_memif *memif = &afe->memif[asoc_rtd_to_cpu(rtd, 0)->id];
|
||||
|
|
|
@ -52,7 +52,7 @@ static const struct snd_kcontrol_new mt8173_max98090_controls[] = {
|
|||
static int mt8173_max98090_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_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_sysclk(codec_dai, 0, params_rate(params) * 256,
|
||||
|
|
|
@ -43,7 +43,7 @@ static const struct snd_kcontrol_new mt8173_rt5650_rt5514_controls[] = {
|
|||
static int mt8173_rt5650_rt5514_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_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct snd_soc_dai *codec_dai;
|
||||
int i, ret;
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@ static const struct snd_kcontrol_new mt8173_rt5650_rt5676_controls[] = {
|
|||
static int mt8173_rt5650_rt5676_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_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct snd_soc_dai *codec_dai;
|
||||
int i, ret;
|
||||
|
||||
|
|
|
@ -58,7 +58,7 @@ static const struct snd_kcontrol_new mt8173_rt5650_controls[] = {
|
|||
static int mt8173_rt5650_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_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
unsigned int mclk_clock;
|
||||
struct snd_soc_dai *codec_dai;
|
||||
int i, ret;
|
||||
|
|
|
@ -142,7 +142,7 @@ static const struct snd_pcm_hardware mt8183_afe_hardware = {
|
|||
static int mt8183_memif_fs(struct snd_pcm_substream *substream,
|
||||
unsigned int rate)
|
||||
{
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct snd_soc_component *component =
|
||||
snd_soc_rtdcom_lookup(rtd, AFE_PCM_NAME);
|
||||
struct mtk_base_afe *afe = snd_soc_component_get_drvdata(component);
|
||||
|
@ -153,7 +153,7 @@ static int mt8183_memif_fs(struct snd_pcm_substream *substream,
|
|||
|
||||
static int mt8183_irq_fs(struct snd_pcm_substream *substream, unsigned int rate)
|
||||
{
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct snd_soc_component *component =
|
||||
snd_soc_rtdcom_lookup(rtd, AFE_PCM_NAME);
|
||||
struct mtk_base_afe *afe = snd_soc_component_get_drvdata(component);
|
||||
|
|
|
@ -33,7 +33,7 @@ struct mt8183_da7219_max98357_priv {
|
|||
static int mt8183_mt6358_i2s_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_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
unsigned int rate = params_rate(params);
|
||||
unsigned int mclk_fs_ratio = 128;
|
||||
unsigned int mclk_fs = rate * mclk_fs_ratio;
|
||||
|
@ -49,7 +49,7 @@ static const struct snd_soc_ops mt8183_mt6358_i2s_ops = {
|
|||
static int mt8183_da7219_i2s_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_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct snd_soc_dai *codec_dai;
|
||||
unsigned int rate = params_rate(params);
|
||||
unsigned int mclk_fs_ratio = 256;
|
||||
|
@ -90,7 +90,7 @@ static int mt8183_da7219_i2s_hw_params(struct snd_pcm_substream *substream,
|
|||
|
||||
static int mt8183_da7219_hw_free(struct snd_pcm_substream *substream)
|
||||
{
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct snd_soc_dai *codec_dai;
|
||||
int ret = 0, j;
|
||||
|
||||
|
@ -118,7 +118,7 @@ static int
|
|||
mt8183_da7219_rt1015_i2s_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_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
unsigned int rate = params_rate(params);
|
||||
struct snd_soc_dai *codec_dai;
|
||||
int ret = 0, i;
|
||||
|
|
|
@ -43,7 +43,7 @@ struct mt8183_mt6358_ts3a227_max98357_priv {
|
|||
static int mt8183_mt6358_i2s_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_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
unsigned int rate = params_rate(params);
|
||||
unsigned int mclk_fs_ratio = 128;
|
||||
unsigned int mclk_fs = rate * mclk_fs_ratio;
|
||||
|
@ -60,7 +60,7 @@ static int
|
|||
mt8183_mt6358_rt1015_i2s_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_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
unsigned int rate = params_rate(params);
|
||||
unsigned int mclk_fs_ratio = 128;
|
||||
unsigned int mclk_fs = rate * mclk_fs_ratio;
|
||||
|
@ -264,7 +264,7 @@ SND_SOC_DAILINK_DEFS(tdm,
|
|||
|
||||
static int mt8183_mt6358_tdm_startup(struct snd_pcm_substream *substream)
|
||||
{
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct mt8183_mt6358_ts3a227_max98357_priv *priv =
|
||||
snd_soc_card_get_drvdata(rtd->card);
|
||||
int ret;
|
||||
|
@ -283,7 +283,7 @@ static int mt8183_mt6358_tdm_startup(struct snd_pcm_substream *substream)
|
|||
|
||||
static void mt8183_mt6358_tdm_shutdown(struct snd_pcm_substream *substream)
|
||||
{
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct mt8183_mt6358_ts3a227_max98357_priv *priv =
|
||||
snd_soc_card_get_drvdata(rtd->card);
|
||||
int ret;
|
||||
|
@ -307,7 +307,7 @@ static int
|
|||
mt8183_mt6358_ts3a227_max98357_wov_startup(
|
||||
struct snd_pcm_substream *substream)
|
||||
{
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct snd_soc_card *card = rtd->card;
|
||||
struct mt8183_mt6358_ts3a227_max98357_priv *priv =
|
||||
snd_soc_card_get_drvdata(card);
|
||||
|
@ -320,7 +320,7 @@ static void
|
|||
mt8183_mt6358_ts3a227_max98357_wov_shutdown(
|
||||
struct snd_pcm_substream *substream)
|
||||
{
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct snd_soc_card *card = rtd->card;
|
||||
struct mt8183_mt6358_ts3a227_max98357_priv *priv =
|
||||
snd_soc_card_get_drvdata(card);
|
||||
|
|
|
@ -40,7 +40,7 @@ static const struct snd_soc_pcm_stream codec_params = {
|
|||
static int axg_card_tdm_be_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_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct meson_card *priv = snd_soc_card_get_drvdata(rtd->card);
|
||||
struct axg_dai_link_tdm_data *be =
|
||||
(struct axg_dai_link_tdm_data *)priv->link_data[rtd->num];
|
||||
|
|
|
@ -29,7 +29,7 @@ static const struct snd_soc_pcm_stream codec_params = {
|
|||
static int gx_card_i2s_be_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_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct meson_card *priv = snd_soc_card_get_drvdata(rtd->card);
|
||||
struct gx_dai_link_i2s_data *be =
|
||||
(struct gx_dai_link_i2s_data *)priv->link_data[rtd->num];
|
||||
|
|
|
@ -13,7 +13,7 @@ int meson_card_i2s_set_sysclk(struct snd_pcm_substream *substream,
|
|||
struct snd_pcm_hw_params *params,
|
||||
unsigned int mclk_fs)
|
||||
{
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct snd_soc_dai *codec_dai;
|
||||
unsigned int mclk;
|
||||
int ret, i;
|
||||
|
|
|
@ -98,7 +98,7 @@ EXPORT_SYMBOL_GPL(meson_codec_glue_input_set_fmt);
|
|||
int meson_codec_glue_output_startup(struct snd_pcm_substream *substream,
|
||||
struct snd_soc_dai *dai)
|
||||
{
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct meson_codec_glue_input *in_data =
|
||||
meson_codec_glue_output_get_input_data(dai->capture_widget);
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
static int mxs_sgtl5000_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_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0);
|
||||
struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0);
|
||||
unsigned int rate = params_rate(params);
|
||||
|
|
|
@ -43,7 +43,7 @@ static const struct snd_soc_dapm_route brownstone_audio_map[] = {
|
|||
static int brownstone_wm8994_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_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0);
|
||||
struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0);
|
||||
int freq_out, sspa_mclk, sysclk;
|
||||
|
|
|
@ -96,7 +96,7 @@ static void corgi_ext_control(struct snd_soc_dapm_context *dapm)
|
|||
|
||||
static int corgi_startup(struct snd_pcm_substream *substream)
|
||||
{
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
|
||||
/* check the jack status at stream startup */
|
||||
corgi_ext_control(&rtd->card->dapm);
|
||||
|
@ -115,7 +115,7 @@ static void corgi_shutdown(struct snd_pcm_substream *substream)
|
|||
static int corgi_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_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0);
|
||||
struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0);
|
||||
unsigned int clk = 0;
|
||||
|
|
|
@ -53,7 +53,7 @@ static struct snd_soc_jack_gpio hs_jack_gpio = {
|
|||
static int hx4700_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_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0);
|
||||
struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0);
|
||||
int ret = 0;
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
static int imote2_asoc_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_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0);
|
||||
struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0);
|
||||
unsigned int clk = 0;
|
||||
|
|
|
@ -68,7 +68,7 @@ static void magician_ext_control(struct snd_soc_dapm_context *dapm)
|
|||
|
||||
static int magician_startup(struct snd_pcm_substream *substream)
|
||||
{
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
|
||||
/* check the jack status at stream startup */
|
||||
magician_ext_control(&rtd->card->dapm);
|
||||
|
@ -82,7 +82,7 @@ static int magician_startup(struct snd_pcm_substream *substream)
|
|||
static int magician_playback_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_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0);
|
||||
struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0);
|
||||
unsigned int width;
|
||||
|
@ -120,7 +120,7 @@ static int magician_playback_hw_params(struct snd_pcm_substream *substream,
|
|||
static int magician_capture_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_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0);
|
||||
struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0);
|
||||
int ret = 0;
|
||||
|
|
|
@ -110,7 +110,7 @@ static bool filter(struct dma_chan *chan, void *param)
|
|||
static int mmp_pcm_open(struct snd_soc_component *component,
|
||||
struct snd_pcm_substream *substream)
|
||||
{
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct platform_device *pdev = to_platform_device(component->dev);
|
||||
struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0);
|
||||
struct mmp_dma_data dma_data;
|
||||
|
|
|
@ -68,7 +68,7 @@ static void poodle_ext_control(struct snd_soc_dapm_context *dapm)
|
|||
|
||||
static int poodle_startup(struct snd_pcm_substream *substream)
|
||||
{
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
|
||||
/* check the jack status at stream startup */
|
||||
poodle_ext_control(&rtd->card->dapm);
|
||||
|
@ -89,7 +89,7 @@ static void poodle_shutdown(struct snd_pcm_substream *substream)
|
|||
static int poodle_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_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0);
|
||||
struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0);
|
||||
unsigned int clk = 0;
|
||||
|
|
|
@ -95,7 +95,7 @@ static struct snd_dmaengine_dai_dma_data pxa2xx_i2s_pcm_stereo_in = {
|
|||
static int pxa2xx_i2s_startup(struct snd_pcm_substream *substream,
|
||||
struct snd_soc_dai *dai)
|
||||
{
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0);
|
||||
|
||||
if (IS_ERR(clk_i2s))
|
||||
|
|
|
@ -105,7 +105,7 @@ static void spitz_ext_control(struct snd_soc_dapm_context *dapm)
|
|||
|
||||
static int spitz_startup(struct snd_pcm_substream *substream)
|
||||
{
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
|
||||
/* check the jack status at stream startup */
|
||||
spitz_ext_control(&rtd->card->dapm);
|
||||
|
@ -116,7 +116,7 @@ static int spitz_startup(struct snd_pcm_substream *substream)
|
|||
static int spitz_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_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0);
|
||||
struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0);
|
||||
unsigned int clk = 0;
|
||||
|
|
|
@ -72,7 +72,7 @@ static void tosa_ext_control(struct snd_soc_dapm_context *dapm)
|
|||
|
||||
static int tosa_startup(struct snd_pcm_substream *substream)
|
||||
{
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
|
||||
/* check the jack status at stream startup */
|
||||
tosa_ext_control(&rtd->card->dapm);
|
||||
|
|
|
@ -33,7 +33,7 @@ static struct snd_soc_card snd_soc_z2;
|
|||
static int z2_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_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0);
|
||||
struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0);
|
||||
unsigned int clk = 0;
|
||||
|
|
|
@ -75,7 +75,7 @@ static int zylonite_wm9713_init(struct snd_soc_pcm_runtime *rtd)
|
|||
static int zylonite_voice_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_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0);
|
||||
struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0);
|
||||
unsigned int wm9713_div = 0;
|
||||
|
|
|
@ -30,7 +30,7 @@ static int apq8096_be_hw_params_fixup(struct snd_soc_pcm_runtime *rtd,
|
|||
static int msm_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_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0);
|
||||
struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0);
|
||||
u32 rx_ch[SLIM_MAX_RX_PORTS], tx_ch[SLIM_MAX_TX_PORTS];
|
||||
|
|
|
@ -54,7 +54,7 @@ static int lpass_platform_pcmops_open(struct snd_soc_component *component,
|
|||
struct snd_pcm_substream *substream)
|
||||
{
|
||||
struct snd_pcm_runtime *runtime = substream->runtime;
|
||||
struct snd_soc_pcm_runtime *soc_runtime = substream->private_data;
|
||||
struct snd_soc_pcm_runtime *soc_runtime = asoc_substream_to_rtd(substream);
|
||||
struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(soc_runtime, 0);
|
||||
struct lpass_data *drvdata = snd_soc_component_get_drvdata(component);
|
||||
struct lpass_variant *v = drvdata->variant;
|
||||
|
@ -125,7 +125,7 @@ static int lpass_platform_pcmops_hw_params(struct snd_soc_component *component,
|
|||
struct snd_pcm_substream *substream,
|
||||
struct snd_pcm_hw_params *params)
|
||||
{
|
||||
struct snd_soc_pcm_runtime *soc_runtime = substream->private_data;
|
||||
struct snd_soc_pcm_runtime *soc_runtime = asoc_substream_to_rtd(substream);
|
||||
struct lpass_data *drvdata = snd_soc_component_get_drvdata(component);
|
||||
struct snd_pcm_runtime *rt = substream->runtime;
|
||||
struct lpass_pcm_data *pcm_data = rt->private_data;
|
||||
|
@ -218,7 +218,7 @@ static int lpass_platform_pcmops_hw_params(struct snd_soc_component *component,
|
|||
static int lpass_platform_pcmops_hw_free(struct snd_soc_component *component,
|
||||
struct snd_pcm_substream *substream)
|
||||
{
|
||||
struct snd_soc_pcm_runtime *soc_runtime = substream->private_data;
|
||||
struct snd_soc_pcm_runtime *soc_runtime = asoc_substream_to_rtd(substream);
|
||||
struct lpass_data *drvdata = snd_soc_component_get_drvdata(component);
|
||||
struct snd_pcm_runtime *rt = substream->runtime;
|
||||
struct lpass_pcm_data *pcm_data = rt->private_data;
|
||||
|
@ -239,7 +239,7 @@ static int lpass_platform_pcmops_prepare(struct snd_soc_component *component,
|
|||
struct snd_pcm_substream *substream)
|
||||
{
|
||||
struct snd_pcm_runtime *runtime = substream->runtime;
|
||||
struct snd_soc_pcm_runtime *soc_runtime = substream->private_data;
|
||||
struct snd_soc_pcm_runtime *soc_runtime = asoc_substream_to_rtd(substream);
|
||||
struct lpass_data *drvdata = snd_soc_component_get_drvdata(component);
|
||||
struct snd_pcm_runtime *rt = substream->runtime;
|
||||
struct lpass_pcm_data *pcm_data = rt->private_data;
|
||||
|
@ -291,7 +291,7 @@ static int lpass_platform_pcmops_trigger(struct snd_soc_component *component,
|
|||
struct snd_pcm_substream *substream,
|
||||
int cmd)
|
||||
{
|
||||
struct snd_soc_pcm_runtime *soc_runtime = substream->private_data;
|
||||
struct snd_soc_pcm_runtime *soc_runtime = asoc_substream_to_rtd(substream);
|
||||
struct lpass_data *drvdata = snd_soc_component_get_drvdata(component);
|
||||
struct snd_pcm_runtime *rt = substream->runtime;
|
||||
struct lpass_pcm_data *pcm_data = rt->private_data;
|
||||
|
@ -365,7 +365,7 @@ static snd_pcm_uframes_t lpass_platform_pcmops_pointer(
|
|||
struct snd_soc_component *component,
|
||||
struct snd_pcm_substream *substream)
|
||||
{
|
||||
struct snd_soc_pcm_runtime *soc_runtime = substream->private_data;
|
||||
struct snd_soc_pcm_runtime *soc_runtime = asoc_substream_to_rtd(substream);
|
||||
struct lpass_data *drvdata = snd_soc_component_get_drvdata(component);
|
||||
struct snd_pcm_runtime *rt = substream->runtime;
|
||||
struct lpass_pcm_data *pcm_data = rt->private_data;
|
||||
|
@ -410,7 +410,7 @@ static irqreturn_t lpass_dma_interrupt_handler(
|
|||
struct lpass_data *drvdata,
|
||||
int chan, u32 interrupts)
|
||||
{
|
||||
struct snd_soc_pcm_runtime *soc_runtime = substream->private_data;
|
||||
struct snd_soc_pcm_runtime *soc_runtime = asoc_substream_to_rtd(substream);
|
||||
struct lpass_variant *v = drvdata->variant;
|
||||
irqreturn_t ret = IRQ_NONE;
|
||||
int rv;
|
||||
|
|
|
@ -215,7 +215,7 @@ static int q6asm_dai_prepare(struct snd_soc_component *component,
|
|||
struct snd_pcm_substream *substream)
|
||||
{
|
||||
struct snd_pcm_runtime *runtime = substream->runtime;
|
||||
struct snd_soc_pcm_runtime *soc_prtd = substream->private_data;
|
||||
struct snd_soc_pcm_runtime *soc_prtd = asoc_substream_to_rtd(substream);
|
||||
struct q6asm_dai_rtd *prtd = runtime->private_data;
|
||||
struct q6asm_dai_data *pdata;
|
||||
struct device *dev = component->dev;
|
||||
|
@ -333,7 +333,7 @@ static int q6asm_dai_open(struct snd_soc_component *component,
|
|||
struct snd_pcm_substream *substream)
|
||||
{
|
||||
struct snd_pcm_runtime *runtime = substream->runtime;
|
||||
struct snd_soc_pcm_runtime *soc_prtd = substream->private_data;
|
||||
struct snd_soc_pcm_runtime *soc_prtd = asoc_substream_to_rtd(substream);
|
||||
struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(soc_prtd, 0);
|
||||
struct q6asm_dai_rtd *prtd;
|
||||
struct q6asm_dai_data *pdata;
|
||||
|
@ -425,7 +425,7 @@ static int q6asm_dai_close(struct snd_soc_component *component,
|
|||
struct snd_pcm_substream *substream)
|
||||
{
|
||||
struct snd_pcm_runtime *runtime = substream->runtime;
|
||||
struct snd_soc_pcm_runtime *soc_prtd = substream->private_data;
|
||||
struct snd_soc_pcm_runtime *soc_prtd = asoc_substream_to_rtd(substream);
|
||||
struct q6asm_dai_rtd *prtd = runtime->private_data;
|
||||
|
||||
if (prtd->audio_client) {
|
||||
|
|
|
@ -924,7 +924,7 @@ static int routing_hw_params(struct snd_soc_component *component,
|
|||
struct snd_pcm_substream *substream,
|
||||
struct snd_pcm_hw_params *params)
|
||||
{
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct msm_routing_data *data = dev_get_drvdata(component->dev);
|
||||
unsigned int be_id = asoc_rtd_to_cpu(rtd, 0)->id;
|
||||
struct session_data *session;
|
||||
|
|
|
@ -45,7 +45,7 @@ static unsigned int tdm_slot_offset[8] = {0, 4, 8, 12, 16, 20, 24, 28};
|
|||
static int sdm845_slim_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_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 sdm845_snd_data *pdata = snd_soc_card_get_drvdata(rtd->card);
|
||||
|
@ -85,7 +85,7 @@ static int sdm845_slim_snd_hw_params(struct snd_pcm_substream *substream,
|
|||
static int sdm845_tdm_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_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;
|
||||
int ret = 0, j;
|
||||
|
@ -170,7 +170,7 @@ end:
|
|||
static int sdm845_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_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 = asoc_rtd_to_codec(rtd, 0);
|
||||
int ret = 0;
|
||||
|
@ -301,7 +301,7 @@ static int sdm845_snd_startup(struct snd_pcm_substream *substream)
|
|||
{
|
||||
unsigned int fmt = SND_SOC_DAIFMT_CBS_CFS;
|
||||
unsigned int codec_dai_fmt = SND_SOC_DAIFMT_CBS_CFS;
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct snd_soc_card *card = rtd->card;
|
||||
struct sdm845_snd_data *data = snd_soc_card_get_drvdata(card);
|
||||
struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0);
|
||||
|
@ -391,7 +391,7 @@ static int sdm845_snd_startup(struct snd_pcm_substream *substream)
|
|||
|
||||
static void sdm845_snd_shutdown(struct snd_pcm_substream *substream)
|
||||
{
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct snd_soc_card *card = rtd->card;
|
||||
struct sdm845_snd_data *data = snd_soc_card_get_drvdata(card);
|
||||
struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0);
|
||||
|
@ -437,7 +437,7 @@ static void sdm845_snd_shutdown(struct snd_pcm_substream *substream)
|
|||
|
||||
static int sdm845_snd_prepare(struct snd_pcm_substream *substream)
|
||||
{
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct sdm845_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_dai->id];
|
||||
|
@ -476,7 +476,7 @@ static int sdm845_snd_prepare(struct snd_pcm_substream *substream)
|
|||
|
||||
static int sdm845_snd_hw_free(struct snd_pcm_substream *substream)
|
||||
{
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct sdm845_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_dai->id];
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
static int storm_ops_hw_params(struct snd_pcm_substream *substream,
|
||||
struct snd_pcm_hw_params *params)
|
||||
{
|
||||
struct snd_soc_pcm_runtime *soc_runtime = substream->private_data;
|
||||
struct snd_soc_pcm_runtime *soc_runtime = asoc_substream_to_rtd(substream);
|
||||
struct snd_soc_card *card = soc_runtime->card;
|
||||
snd_pcm_format_t format = params_format(params);
|
||||
unsigned int rate = params_rate(params);
|
||||
|
|
|
@ -66,7 +66,7 @@ static int rk_hw_params(struct snd_pcm_substream *substream,
|
|||
struct snd_pcm_hw_params *params)
|
||||
{
|
||||
int ret = 0;
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
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 = asoc_rtd_to_codec(rtd, 0);
|
||||
int mclk;
|
||||
|
|
|
@ -51,7 +51,7 @@ static const struct snd_kcontrol_new rockchip_controls[] = {
|
|||
static int rockchip_sound_max98357a_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_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
unsigned int mclk;
|
||||
int ret;
|
||||
|
||||
|
@ -70,7 +70,7 @@ static int rockchip_sound_max98357a_hw_params(struct snd_pcm_substream *substrea
|
|||
static int rockchip_sound_rt5514_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_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 = asoc_rtd_to_codec(rtd, 0);
|
||||
unsigned int mclk;
|
||||
|
@ -102,7 +102,7 @@ static int rockchip_sound_rt5514_hw_params(struct snd_pcm_substream *substream,
|
|||
static int rockchip_sound_da7219_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_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 = asoc_rtd_to_codec(rtd, 0);
|
||||
int mclk, ret;
|
||||
|
@ -200,7 +200,7 @@ static int rockchip_sound_da7219_init(struct snd_soc_pcm_runtime *rtd)
|
|||
static int rockchip_sound_dmic_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_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
unsigned int mclk;
|
||||
int ret;
|
||||
|
||||
|
|
|
@ -272,7 +272,7 @@ static int rockchip_i2s_hw_params(struct snd_pcm_substream *substream,
|
|||
struct snd_soc_dai *dai)
|
||||
{
|
||||
struct rk_i2s_dev *i2s = to_info(dai);
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
unsigned int val = 0;
|
||||
unsigned int mclk_rate, bclk_rate, div_bclk, div_lrck;
|
||||
|
||||
|
|
|
@ -145,7 +145,7 @@ static int rk_aif1_hw_params(struct snd_pcm_substream *substream,
|
|||
struct snd_pcm_hw_params *params)
|
||||
{
|
||||
int ret = 0;
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
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 = asoc_rtd_to_codec(rtd, 0);
|
||||
int mclk;
|
||||
|
|
|
@ -55,7 +55,7 @@ static int rk_aif1_hw_params(struct snd_pcm_substream *substream,
|
|||
struct snd_pcm_hw_params *params)
|
||||
{
|
||||
int ret = 0;
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
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 = asoc_rtd_to_codec(rtd, 0);
|
||||
int mclk;
|
||||
|
|
|
@ -260,7 +260,7 @@ static const struct snd_soc_dapm_widget aries_dapm_widgets[] = {
|
|||
static int aries_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_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 ret;
|
||||
|
@ -288,7 +288,7 @@ static int aries_hw_params(struct snd_pcm_substream *substream,
|
|||
|
||||
static int aries_hw_free(struct snd_pcm_substream *substream)
|
||||
{
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0);
|
||||
int ret;
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
static int arndale_rt5631_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_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 = asoc_rtd_to_codec(rtd, 0);
|
||||
int rfs, ret;
|
||||
|
@ -55,7 +55,7 @@ static struct snd_soc_ops arndale_rt5631_ops = {
|
|||
static int arndale_wm1811_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_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0);
|
||||
unsigned int rfs, rclk;
|
||||
|
||||
|
|
|
@ -67,7 +67,7 @@ static int h1940_startup(struct snd_pcm_substream *substream)
|
|||
static int h1940_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_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0);
|
||||
int div;
|
||||
int ret;
|
||||
|
|
|
@ -931,7 +931,7 @@ static int i2s_trigger(struct snd_pcm_substream *substream,
|
|||
{
|
||||
struct samsung_i2s_priv *priv = snd_soc_dai_get_drvdata(dai);
|
||||
int capture = (substream->stream == SNDRV_PCM_STREAM_CAPTURE);
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct i2s_dai *i2s = to_info(asoc_rtd_to_cpu(rtd, 0));
|
||||
unsigned long flags;
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ static const struct snd_soc_dapm_widget wm8750_dapm_widgets[] = {
|
|||
static int jive_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_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0);
|
||||
struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0);
|
||||
struct s3c_i2sv2_rate_calc div;
|
||||
|
|
|
@ -104,7 +104,7 @@ static int littlemill_set_bias_level_post(struct snd_soc_card *card,
|
|||
static int littlemill_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_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0);
|
||||
int ret;
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
static int neo1973_hifi_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_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0);
|
||||
struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0);
|
||||
unsigned int pll_out = 0, bclk = 0;
|
||||
|
@ -99,7 +99,7 @@ static int neo1973_hifi_hw_params(struct snd_pcm_substream *substream,
|
|||
|
||||
static int neo1973_hifi_hw_free(struct snd_pcm_substream *substream)
|
||||
{
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0);
|
||||
|
||||
/* disable the PLL */
|
||||
|
@ -117,7 +117,7 @@ static struct snd_soc_ops neo1973_hifi_ops = {
|
|||
static int neo1973_voice_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_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;
|
||||
|
@ -154,7 +154,7 @@ static int neo1973_voice_hw_params(struct snd_pcm_substream *substream,
|
|||
|
||||
static int neo1973_voice_hw_free(struct snd_pcm_substream *substream)
|
||||
{
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0);
|
||||
|
||||
/* disable the PLL */
|
||||
|
|
|
@ -35,7 +35,7 @@ static int odroid_card_fe_startup(struct snd_pcm_substream *substream)
|
|||
static int odroid_card_fe_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_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;
|
||||
|
@ -56,7 +56,7 @@ static const struct snd_soc_ops odroid_card_fe_ops = {
|
|||
static int odroid_card_be_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_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct odroid_priv *priv = snd_soc_card_get_drvdata(rtd->card);
|
||||
unsigned int pll_freq, rclk_freq, rfs;
|
||||
unsigned long flags;
|
||||
|
@ -115,7 +115,7 @@ static int odroid_card_be_hw_params(struct snd_pcm_substream *substream,
|
|||
|
||||
static int odroid_card_be_trigger(struct snd_pcm_substream *substream, int cmd)
|
||||
{
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
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;
|
||||
|
||||
|
|
|
@ -216,7 +216,7 @@ static void s3c_pcm_snd_rxctrl(struct s3c_pcm_info *pcm, int on)
|
|||
static int s3c_pcm_trigger(struct snd_pcm_substream *substream, int cmd,
|
||||
struct snd_soc_dai *dai)
|
||||
{
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
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;
|
||||
|
||||
|
@ -260,7 +260,7 @@ static int s3c_pcm_hw_params(struct snd_pcm_substream *substream,
|
|||
struct snd_pcm_hw_params *params,
|
||||
struct snd_soc_dai *socdai)
|
||||
{
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
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));
|
||||
void __iomem *regs = pcm->regs;
|
||||
struct clk *clk;
|
||||
|
|
|
@ -148,7 +148,7 @@ static int rx1950_spk_power(struct snd_soc_dapm_widget *w,
|
|||
static int rx1950_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_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0);
|
||||
int div;
|
||||
int ret;
|
||||
|
|
|
@ -379,7 +379,7 @@ static int s3c_i2sv2_set_sysclk(struct snd_soc_dai *cpu_dai,
|
|||
static int s3c2412_i2s_trigger(struct snd_pcm_substream *substream, int cmd,
|
||||
struct snd_soc_dai *dai)
|
||||
{
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct s3c_i2sv2_info *i2s = to_info(asoc_rtd_to_cpu(rtd, 0));
|
||||
int capture = (substream->stream == SNDRV_PCM_STREAM_CAPTURE);
|
||||
unsigned long irqs;
|
||||
|
|
|
@ -159,7 +159,7 @@ EXPORT_SYMBOL_GPL(simtec_audio_init);
|
|||
static int simtec_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_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0);
|
||||
struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0);
|
||||
int ret;
|
||||
|
|
|
@ -49,7 +49,7 @@ static const struct snd_pcm_hw_constraint_list hw_constraints_rates = {
|
|||
|
||||
static int s3c24xx_uda134x_startup(struct snd_pcm_substream *substream)
|
||||
{
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
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;
|
||||
|
@ -101,7 +101,7 @@ static int s3c24xx_uda134x_startup(struct snd_pcm_substream *substream)
|
|||
|
||||
static void s3c24xx_uda134x_shutdown(struct snd_pcm_substream *substream)
|
||||
{
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct s3c24xx_uda134x *priv = snd_soc_card_get_drvdata(rtd->card);
|
||||
|
||||
mutex_lock(&priv->clk_lock);
|
||||
|
@ -118,7 +118,7 @@ static void s3c24xx_uda134x_shutdown(struct snd_pcm_substream *substream)
|
|||
static int s3c24xx_uda134x_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_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0);
|
||||
struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0);
|
||||
unsigned int clk = 0;
|
||||
|
|
|
@ -24,7 +24,7 @@ static struct snd_soc_card snd_soc_smartq;
|
|||
static int smartq_hifi_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_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0);
|
||||
struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0);
|
||||
unsigned int clk = 0;
|
||||
|
|
|
@ -100,7 +100,7 @@ static int set_audio_clock_rate(unsigned long epll_rate,
|
|||
static int smdk_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_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;
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
static int smdk_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_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;
|
||||
|
|
|
@ -44,7 +44,7 @@ static struct smdk_wm8994_data smdk_board_data = {
|
|||
static int smdk_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_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 ret;
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
static int smdk_wm8994_pcm_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_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0);
|
||||
struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0);
|
||||
unsigned long mclk_freq;
|
||||
|
|
|
@ -30,7 +30,7 @@ static int snow_card_hw_params(struct snd_pcm_substream *substream,
|
|||
static const unsigned int pll_rate[] = {
|
||||
73728000U, 67737602U, 49152000U, 45158401U, 32768001U
|
||||
};
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct snow_priv *priv = snd_soc_card_get_drvdata(rtd->card);
|
||||
int bfs, psr, rfs, bitwidth;
|
||||
unsigned long int rclk;
|
||||
|
|
|
@ -141,7 +141,7 @@ static int spdif_set_sysclk(struct snd_soc_dai *cpu_dai,
|
|||
static int spdif_trigger(struct snd_pcm_substream *substream, int cmd,
|
||||
struct snd_soc_dai *dai)
|
||||
{
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct samsung_spdif_info *spdif = to_info(asoc_rtd_to_cpu(rtd, 0));
|
||||
unsigned long flags;
|
||||
|
||||
|
@ -177,7 +177,7 @@ static int spdif_hw_params(struct snd_pcm_substream *substream,
|
|||
struct snd_pcm_hw_params *params,
|
||||
struct snd_soc_dai *socdai)
|
||||
{
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct samsung_spdif_info *spdif = to_info(asoc_rtd_to_cpu(rtd, 0));
|
||||
void __iomem *regs = spdif->regs;
|
||||
struct snd_dmaengine_dai_dma_data *dma_data;
|
||||
|
@ -279,7 +279,7 @@ err:
|
|||
static void spdif_shutdown(struct snd_pcm_substream *substream,
|
||||
struct snd_soc_dai *dai)
|
||||
{
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct samsung_spdif_info *spdif = to_info(asoc_rtd_to_cpu(rtd, 0));
|
||||
void __iomem *regs = spdif->regs;
|
||||
u32 con, clkcon;
|
||||
|
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче