mirror of
https://github.com/torvalds/linux.git
synced 2026-10-14 11:54:03 +02:00
ASoC: soc-component: re-add pcm_new()/pcm_free()
Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> says: Because old pcm_new()/pcm_free() didn't care about parameter component, to avoid name collisions, we have added pcm_construct()/pcm_destruct() by commitc64bfc9066("ASoC: soc-core: add new pcm_construct/pcm_destruct") Because all driver switch to new pcm_construct()/pcm_destruct(), old pcm_new()/pcm_free() were remoted by commite9067bb502("ASoC: soc-component: remove snd_pcm_ops from component driver") But naming of pcm_construct()/pcm_destruct() are not goot. re-add pcm_new()/pcm_free(), and switch to use it, again. Because it has no functional significance, 1 patch is for 1 vender.
This commit is contained in:
commit
0861893cff
|
|
@ -86,10 +86,10 @@ struct snd_soc_component_driver {
|
|||
unsigned int reg, unsigned int val);
|
||||
|
||||
/* pcm creation and destruction */
|
||||
int (*pcm_construct)(struct snd_soc_component *component,
|
||||
struct snd_soc_pcm_runtime *rtd);
|
||||
void (*pcm_destruct)(struct snd_soc_component *component,
|
||||
struct snd_pcm *pcm);
|
||||
int (*pcm_new)(struct snd_soc_component *component,
|
||||
struct snd_soc_pcm_runtime *rtd);
|
||||
void (*pcm_free)(struct snd_soc_component *component,
|
||||
struct snd_pcm *pcm);
|
||||
|
||||
/* component wide operations */
|
||||
int (*set_sysclk)(struct snd_soc_component *component,
|
||||
|
|
|
|||
|
|
@ -1252,7 +1252,7 @@ static const struct snd_soc_component_driver acp_asoc_platform = {
|
|||
.pointer = acp_dma_pointer,
|
||||
.delay = acp_dma_delay,
|
||||
.prepare = acp_dma_prepare,
|
||||
.pcm_construct = acp_dma_new,
|
||||
.pcm_new = acp_dma_new,
|
||||
};
|
||||
|
||||
static int acp_audio_probe(struct platform_device *pdev)
|
||||
|
|
|
|||
|
|
@ -321,7 +321,7 @@ static const struct snd_soc_component_driver acp_pcm_component = {
|
|||
.close = acp_dma_close,
|
||||
.hw_params = acp_dma_hw_params,
|
||||
.pointer = acp_dma_pointer,
|
||||
.pcm_construct = acp_dma_new,
|
||||
.pcm_new = acp_dma_new,
|
||||
.legacy_dai_naming = 1,
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -351,7 +351,7 @@ static const struct snd_soc_component_driver acp63_pdm_component = {
|
|||
.close = acp63_pdm_dma_close,
|
||||
.hw_params = acp63_pdm_dma_hw_params,
|
||||
.pointer = acp63_pdm_dma_pointer,
|
||||
.pcm_construct = acp63_pdm_dma_new,
|
||||
.pcm_new = acp63_pdm_dma_new,
|
||||
};
|
||||
|
||||
static int acp63_pdm_audio_probe(struct platform_device *pdev)
|
||||
|
|
|
|||
|
|
@ -634,7 +634,7 @@ static const struct snd_soc_component_driver acp63_sdw_component = {
|
|||
.hw_params = acp63_sdw_dma_hw_params,
|
||||
.trigger = acp63_sdw_dma_trigger,
|
||||
.pointer = acp63_sdw_dma_pointer,
|
||||
.pcm_construct = acp63_sdw_dma_new,
|
||||
.pcm_new = acp63_sdw_dma_new,
|
||||
.use_dai_pcm_id = true,
|
||||
|
||||
};
|
||||
|
|
|
|||
|
|
@ -363,7 +363,7 @@ static const struct snd_soc_component_driver acp3x_i2s_component = {
|
|||
.close = acp3x_dma_close,
|
||||
.hw_params = acp3x_dma_hw_params,
|
||||
.pointer = acp3x_dma_pointer,
|
||||
.pcm_construct = acp3x_dma_new,
|
||||
.pcm_new = acp3x_dma_new,
|
||||
};
|
||||
|
||||
static int acp3x_audio_probe(struct platform_device *pdev)
|
||||
|
|
|
|||
|
|
@ -376,7 +376,7 @@ static const struct snd_soc_component_driver acp_pdm_component = {
|
|||
.close = acp_pdm_dma_close,
|
||||
.hw_params = acp_pdm_dma_hw_params,
|
||||
.pointer = acp_pdm_dma_pointer,
|
||||
.pcm_construct = acp_pdm_dma_new,
|
||||
.pcm_new = acp_pdm_dma_new,
|
||||
.legacy_dai_naming = 1,
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -357,7 +357,7 @@ static const struct snd_soc_component_driver acp5x_i2s_component = {
|
|||
.close = acp5x_dma_close,
|
||||
.hw_params = acp5x_dma_hw_params,
|
||||
.pointer = acp5x_dma_pointer,
|
||||
.pcm_construct = acp5x_dma_new,
|
||||
.pcm_new = acp5x_dma_new,
|
||||
};
|
||||
|
||||
static int acp5x_audio_probe(struct platform_device *pdev)
|
||||
|
|
|
|||
|
|
@ -346,7 +346,7 @@ static const struct snd_soc_component_driver acp6x_pdm_component = {
|
|||
.close = acp6x_pdm_dma_close,
|
||||
.hw_params = acp6x_pdm_dma_hw_params,
|
||||
.pointer = acp6x_pdm_dma_pointer,
|
||||
.pcm_construct = acp6x_pdm_dma_new,
|
||||
.pcm_new = acp6x_pdm_dma_new,
|
||||
.legacy_dai_naming = 1,
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -1002,8 +1002,8 @@ static const struct snd_soc_component_driver mca_component = {
|
|||
.hw_params = mca_hw_params,
|
||||
.trigger = mca_trigger,
|
||||
.pointer = mca_pointer,
|
||||
.pcm_construct = mca_pcm_new,
|
||||
.pcm_destruct = mca_pcm_free,
|
||||
.pcm_new = mca_pcm_new,
|
||||
.pcm_free = mca_pcm_free,
|
||||
};
|
||||
|
||||
static void apple_mca_release(struct mca_data *mca)
|
||||
|
|
|
|||
|
|
@ -316,7 +316,7 @@ static const struct snd_soc_component_driver atmel_soc_platform = {
|
|||
.prepare = atmel_pcm_prepare,
|
||||
.trigger = atmel_pcm_trigger,
|
||||
.pointer = atmel_pcm_pointer,
|
||||
.pcm_construct = atmel_pcm_new,
|
||||
.pcm_new = atmel_pcm_new,
|
||||
};
|
||||
|
||||
int atmel_pcm_pdc_platform_register(struct device *dev)
|
||||
|
|
|
|||
|
|
@ -319,7 +319,7 @@ static const struct snd_soc_component_driver au1xpsc_soc_component = {
|
|||
.prepare = au1xpsc_pcm_prepare,
|
||||
.trigger = au1xpsc_pcm_trigger,
|
||||
.pointer = au1xpsc_pcm_pointer,
|
||||
.pcm_construct = au1xpsc_pcm_new,
|
||||
.pcm_new = au1xpsc_pcm_new,
|
||||
};
|
||||
|
||||
static int au1xpsc_pcm_drvprobe(struct platform_device *pdev)
|
||||
|
|
|
|||
|
|
@ -296,7 +296,7 @@ static const struct snd_soc_component_driver alchemy_pcm_soc_component = {
|
|||
.hw_free = alchemy_pcm_hw_free,
|
||||
.trigger = alchemy_pcm_trigger,
|
||||
.pointer = alchemy_pcm_pointer,
|
||||
.pcm_construct = alchemy_pcm_new,
|
||||
.pcm_new = alchemy_pcm_new,
|
||||
};
|
||||
|
||||
static int alchemy_pcm_drvprobe(struct platform_device *pdev)
|
||||
|
|
|
|||
|
|
@ -386,7 +386,7 @@ static const struct snd_soc_component_driver bcm63xx_soc_platform = {
|
|||
.prepare = bcm63xx_pcm_prepare,
|
||||
.trigger = bcm63xx_pcm_trigger,
|
||||
.pointer = bcm63xx_pcm_pointer,
|
||||
.pcm_construct = bcm63xx_soc_pcm_new,
|
||||
.pcm_new = bcm63xx_soc_pcm_new,
|
||||
};
|
||||
|
||||
int bcm63xx_soc_platform_probe(struct platform_device *pdev,
|
||||
|
|
|
|||
|
|
@ -713,7 +713,7 @@ static const struct snd_soc_component_driver cygnus_soc_platform = {
|
|||
.prepare = cygnus_pcm_prepare,
|
||||
.trigger = cygnus_pcm_trigger,
|
||||
.pointer = cygnus_pcm_pointer,
|
||||
.pcm_construct = cygnus_dma_new,
|
||||
.pcm_new = cygnus_dma_new,
|
||||
};
|
||||
|
||||
int cygnus_soc_platform_register(struct device *dev,
|
||||
|
|
|
|||
|
|
@ -948,7 +948,7 @@ static const struct snd_soc_component_driver wov_component_driver = {
|
|||
.hw_params = wov_pcm_hw_params,
|
||||
.hw_free = wov_pcm_hw_free,
|
||||
.pointer = wov_pcm_pointer,
|
||||
.pcm_construct = wov_pcm_new,
|
||||
.pcm_new = wov_pcm_new,
|
||||
};
|
||||
|
||||
static int cros_ec_codec_platform_probe(struct platform_device *pdev)
|
||||
|
|
|
|||
|
|
@ -303,7 +303,7 @@ static const struct snd_soc_component_driver rt5514_spi_component = {
|
|||
.hw_params = rt5514_spi_hw_params,
|
||||
.hw_free = rt5514_spi_hw_free,
|
||||
.pointer = rt5514_spi_pcm_pointer,
|
||||
.pcm_construct = rt5514_spi_pcm_new,
|
||||
.pcm_new = rt5514_spi_pcm_new,
|
||||
.legacy_dai_naming = 1,
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -404,7 +404,7 @@ static const struct snd_soc_component_driver rt5677_spi_dai_component = {
|
|||
.hw_free = rt5677_spi_hw_free,
|
||||
.prepare = rt5677_spi_prepare,
|
||||
.pointer = rt5677_spi_pcm_pointer,
|
||||
.pcm_construct = rt5677_spi_pcm_new,
|
||||
.pcm_new = rt5677_spi_pcm_new,
|
||||
.legacy_dai_naming = 1,
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -253,7 +253,7 @@ static const struct snd_soc_component_driver dw_pcm_component = {
|
|||
.hw_params = dw_pcm_hw_params,
|
||||
.trigger = dw_pcm_trigger,
|
||||
.pointer = dw_pcm_pointer,
|
||||
.pcm_construct = dw_pcm_new,
|
||||
.pcm_new = dw_pcm_new,
|
||||
};
|
||||
|
||||
int dw_pcm_register(struct platform_device *pdev)
|
||||
|
|
|
|||
|
|
@ -505,7 +505,7 @@ struct snd_soc_component_driver fsl_asrc_component = {
|
|||
.open = fsl_asrc_dma_startup,
|
||||
.close = fsl_asrc_dma_shutdown,
|
||||
.pointer = fsl_asrc_dma_pcm_pointer,
|
||||
.pcm_construct = fsl_asrc_dma_pcm_new,
|
||||
.pcm_new = fsl_asrc_dma_pcm_new,
|
||||
.legacy_dai_naming = 1,
|
||||
#ifdef CONFIG_DEBUG_FS
|
||||
.debugfs_prefix = "asrc",
|
||||
|
|
|
|||
|
|
@ -860,7 +860,7 @@ static int fsl_soc_dma_probe(struct platform_device *pdev)
|
|||
dma->dai.hw_params = fsl_dma_hw_params;
|
||||
dma->dai.hw_free = fsl_dma_hw_free;
|
||||
dma->dai.pointer = fsl_dma_pointer;
|
||||
dma->dai.pcm_construct = fsl_dma_new;
|
||||
dma->dai.pcm_new = fsl_dma_new;
|
||||
|
||||
/* Store the SSI-specific information that we need */
|
||||
dma->ssi_stx_phys = res.start + REG_SSI_STX0;
|
||||
|
|
|
|||
|
|
@ -54,8 +54,8 @@ struct qmc_dai_prtd {
|
|||
struct snd_pcm_substream *substream;
|
||||
};
|
||||
|
||||
static int qmc_audio_pcm_construct(struct snd_soc_component *component,
|
||||
struct snd_soc_pcm_runtime *rtd)
|
||||
static int qmc_audio_pcm_new(struct snd_soc_component *component,
|
||||
struct snd_soc_pcm_runtime *rtd)
|
||||
{
|
||||
struct snd_card *card = rtd->card->snd_card;
|
||||
int ret;
|
||||
|
|
@ -340,7 +340,7 @@ static const struct snd_soc_component_driver qmc_audio_soc_platform = {
|
|||
.hw_params = qmc_audio_pcm_hw_params,
|
||||
.trigger = qmc_audio_pcm_trigger,
|
||||
.pointer = qmc_audio_pcm_pointer,
|
||||
.pcm_construct = qmc_audio_pcm_construct,
|
||||
.pcm_new = qmc_audio_pcm_new,
|
||||
.of_xlate_dai_name = qmc_audio_of_xlate_dai_name,
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -273,8 +273,8 @@ static const struct snd_soc_component_driver imx_soc_component_fiq = {
|
|||
.prepare = snd_imx_pcm_prepare,
|
||||
.trigger = snd_imx_pcm_trigger,
|
||||
.pointer = snd_imx_pcm_pointer,
|
||||
.pcm_construct = snd_imx_pcm_new,
|
||||
.pcm_destruct = snd_imx_pcm_free,
|
||||
.pcm_new = snd_imx_pcm_new,
|
||||
.pcm_free = snd_imx_pcm_free,
|
||||
};
|
||||
|
||||
int imx_pcm_fiq_init(struct platform_device *pdev,
|
||||
|
|
|
|||
|
|
@ -624,7 +624,7 @@ static int imx_rpmsg_pcm_new(struct snd_soc_component *component,
|
|||
|
||||
static const struct snd_soc_component_driver imx_rpmsg_soc_component = {
|
||||
.name = IMX_PCM_DRV_NAME,
|
||||
.pcm_construct = imx_rpmsg_pcm_new,
|
||||
.pcm_new = imx_rpmsg_pcm_new,
|
||||
.open = imx_rpmsg_pcm_open,
|
||||
.close = imx_rpmsg_pcm_close,
|
||||
.hw_params = imx_rpmsg_pcm_hw_params,
|
||||
|
|
|
|||
|
|
@ -307,7 +307,7 @@ static const struct snd_soc_component_driver mpc5200_audio_dma_component = {
|
|||
.close = psc_dma_close,
|
||||
.pointer = psc_dma_pointer,
|
||||
.trigger = psc_dma_trigger,
|
||||
.pcm_construct = psc_dma_new,
|
||||
.pcm_new = psc_dma_new,
|
||||
};
|
||||
|
||||
int mpc5200_audio_dma_create(struct platform_device *op)
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ static bool soc_component_is_pcm(struct snd_soc_dai_link_component *dlc)
|
|||
{
|
||||
struct snd_soc_dai *dai = snd_soc_find_dai_with_mutex(dlc);
|
||||
|
||||
if (dai && (dai->component->driver->pcm_construct ||
|
||||
if (dai && (dai->component->driver->pcm_new ||
|
||||
(dai->driver->ops && dai->driver->ops->pcm_new)))
|
||||
return true;
|
||||
|
||||
|
|
|
|||
|
|
@ -273,8 +273,8 @@ static int test_component_resume(struct snd_soc_component *component)
|
|||
}
|
||||
|
||||
#define PREALLOC_BUFFER (32 * 1024)
|
||||
static int test_component_pcm_construct(struct snd_soc_component *component,
|
||||
struct snd_soc_pcm_runtime *rtd)
|
||||
static int test_component_pcm_new(struct snd_soc_component *component,
|
||||
struct snd_soc_pcm_runtime *rtd)
|
||||
{
|
||||
mile_stone(component);
|
||||
|
||||
|
|
@ -287,8 +287,8 @@ static int test_component_pcm_construct(struct snd_soc_component *component,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void test_component_pcm_destruct(struct snd_soc_component *component,
|
||||
struct snd_pcm *pcm)
|
||||
static void test_component_pcm_free(struct snd_soc_component *component,
|
||||
struct snd_pcm *pcm)
|
||||
{
|
||||
mile_stone(component);
|
||||
}
|
||||
|
|
@ -562,7 +562,7 @@ static int test_driver_probe(struct platform_device *pdev)
|
|||
|
||||
if (adata->is_cpu) {
|
||||
cdriv->name = "test_cpu";
|
||||
cdriv->pcm_construct = test_component_pcm_construct;
|
||||
cdriv->pcm_new = test_component_pcm_new;
|
||||
cdriv->pointer = test_component_pointer;
|
||||
cdriv->trigger = test_component_trigger;
|
||||
cdriv->legacy_dai_naming = 1;
|
||||
|
|
@ -597,7 +597,7 @@ static int test_driver_probe(struct platform_device *pdev)
|
|||
cdriv->be_hw_params_fixup = test_component_be_hw_params_fixup;
|
||||
|
||||
if (adata->is_cpu)
|
||||
cdriv->pcm_destruct = test_component_pcm_destruct;
|
||||
cdriv->pcm_free = test_component_pcm_free;
|
||||
}
|
||||
|
||||
i = 0;
|
||||
|
|
|
|||
|
|
@ -163,8 +163,8 @@ static int chv3_dma_close(struct snd_soc_component *component,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int chv3_dma_pcm_construct(struct snd_soc_component *component,
|
||||
struct snd_soc_pcm_runtime *rtd)
|
||||
static int chv3_dma_pcm_new(struct snd_soc_component *component,
|
||||
struct snd_soc_pcm_runtime *rtd)
|
||||
{
|
||||
struct chv3_i2s_dev *i2s = snd_soc_dai_get_drvdata(snd_soc_rtd_to_cpu(rtd, 0));
|
||||
struct snd_pcm_substream *substream;
|
||||
|
|
@ -271,7 +271,7 @@ static const struct snd_soc_component_driver chv3_i2s_comp = {
|
|||
.name = "chv3-i2s-comp",
|
||||
.open = chv3_dma_open,
|
||||
.close = chv3_dma_close,
|
||||
.pcm_construct = chv3_dma_pcm_construct,
|
||||
.pcm_new = chv3_dma_pcm_new,
|
||||
.hw_params = chv3_dma_hw_params,
|
||||
.prepare = chv3_dma_prepare,
|
||||
.pointer = chv3_dma_pointer,
|
||||
|
|
|
|||
|
|
@ -707,7 +707,7 @@ static const struct snd_soc_component_driver sst_soc_platform_drv = {
|
|||
.pointer = sst_soc_pointer,
|
||||
.delay = sst_soc_delay,
|
||||
.compress_ops = &sst_platform_compress_ops,
|
||||
.pcm_construct = sst_soc_pcm_new,
|
||||
.pcm_new = sst_soc_pcm_new,
|
||||
};
|
||||
|
||||
static int sst_platform_probe(struct platform_device *pdev)
|
||||
|
|
|
|||
|
|
@ -1349,8 +1349,8 @@ static int avs_component_mmap(struct snd_soc_component *component,
|
|||
|
||||
#define MAX_PREALLOC_SIZE (32 * 1024 * 1024)
|
||||
|
||||
static int avs_component_construct(struct snd_soc_component *component,
|
||||
struct snd_soc_pcm_runtime *rtd)
|
||||
static int avs_component_new(struct snd_soc_component *component,
|
||||
struct snd_soc_pcm_runtime *rtd)
|
||||
{
|
||||
struct snd_soc_dai *dai = snd_soc_rtd_to_cpu(rtd, 0);
|
||||
struct snd_pcm *pcm = rtd->pcm;
|
||||
|
|
@ -1377,7 +1377,7 @@ static struct snd_soc_component_driver avs_component_driver = {
|
|||
.open = avs_component_open,
|
||||
.pointer = avs_component_pointer,
|
||||
.mmap = avs_component_mmap,
|
||||
.pcm_construct = avs_component_construct,
|
||||
.pcm_new = avs_component_new,
|
||||
.module_get_upon_open = 1, /* increment refcount when a pcm is opened */
|
||||
.topology_name_prefix = "intel/avs",
|
||||
};
|
||||
|
|
@ -1755,7 +1755,7 @@ static struct snd_soc_component_driver avs_hda_component_driver = {
|
|||
.open = avs_component_hda_open,
|
||||
.pointer = avs_component_pointer,
|
||||
.mmap = avs_component_mmap,
|
||||
.pcm_construct = avs_component_construct,
|
||||
.pcm_new = avs_component_new,
|
||||
/*
|
||||
* hda platform component's probe() is dependent on
|
||||
* codec->pcm_list_head, it needs to be initialized after codec
|
||||
|
|
|
|||
|
|
@ -603,8 +603,8 @@ static const struct snd_pcm_hardware catpt_pcm_hardware = {
|
|||
.buffer_bytes_max = CATPT_BUFFER_MAX_SIZE,
|
||||
};
|
||||
|
||||
static int catpt_component_pcm_construct(struct snd_soc_component *component,
|
||||
struct snd_soc_pcm_runtime *rtm)
|
||||
static int catpt_component_pcm_new(struct snd_soc_component *component,
|
||||
struct snd_soc_pcm_runtime *rtm)
|
||||
{
|
||||
struct catpt_dev *cdev = dev_get_drvdata(component->dev);
|
||||
|
||||
|
|
@ -1056,7 +1056,7 @@ static const struct snd_soc_dapm_route component_routes[] = {
|
|||
static const struct snd_soc_component_driver catpt_comp_driver = {
|
||||
.name = "catpt-platform",
|
||||
|
||||
.pcm_construct = catpt_component_pcm_construct,
|
||||
.pcm_new = catpt_component_pcm_new,
|
||||
.open = catpt_component_open,
|
||||
.pointer = catpt_component_pointer,
|
||||
|
||||
|
|
|
|||
|
|
@ -388,7 +388,7 @@ static snd_pcm_uframes_t kmb_pcm_pointer(struct snd_soc_component *component,
|
|||
|
||||
static const struct snd_soc_component_driver kmb_component = {
|
||||
.name = "kmb",
|
||||
.pcm_construct = kmb_platform_pcm_new,
|
||||
.pcm_new = kmb_platform_pcm_new,
|
||||
.open = kmb_pcm_open,
|
||||
.trigger = kmb_pcm_trigger,
|
||||
.pointer = kmb_pcm_pointer,
|
||||
|
|
|
|||
|
|
@ -261,5 +261,5 @@ const struct snd_soc_component_driver kirkwood_soc_component = {
|
|||
.hw_params = kirkwood_dma_hw_params,
|
||||
.prepare = kirkwood_dma_prepare,
|
||||
.pointer = kirkwood_dma_pointer,
|
||||
.pcm_construct = kirkwood_dma_new,
|
||||
.pcm_new = kirkwood_dma_new,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -341,5 +341,5 @@ const struct snd_soc_component_driver loongson_i2s_component = {
|
|||
.trigger = loongson_pcm_trigger,
|
||||
.pointer = loongson_pcm_pointer,
|
||||
.mmap = loongson_pcm_mmap,
|
||||
.pcm_construct = loongson_pcm_new,
|
||||
.pcm_new = loongson_pcm_new,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@ static int mtk_afe_component_probe(struct snd_soc_component *component)
|
|||
const struct snd_soc_component_driver mtk_afe_pcm_platform = {
|
||||
.name = AFE_PCM_NAME,
|
||||
.pointer = mtk_afe_pcm_pointer,
|
||||
.pcm_construct = mtk_afe_pcm_new,
|
||||
.pcm_new = mtk_afe_pcm_new,
|
||||
.probe = mtk_afe_component_probe,
|
||||
};
|
||||
EXPORT_SYMBOL_GPL(mtk_afe_pcm_platform);
|
||||
|
|
|
|||
|
|
@ -2773,7 +2773,7 @@ static int mt8186_afe_component_probe(struct snd_soc_component *component)
|
|||
|
||||
static const struct snd_soc_component_driver mt8186_afe_component = {
|
||||
.name = AFE_PCM_NAME,
|
||||
.pcm_construct = mtk_afe_pcm_new,
|
||||
.pcm_new = mtk_afe_pcm_new,
|
||||
.pointer = mtk_afe_pcm_pointer,
|
||||
.probe = mt8186_afe_component_probe,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -2378,8 +2378,8 @@ static void mt8189_afe_pcm_free(struct snd_soc_component *component,
|
|||
static const struct snd_soc_component_driver mt8189_afe_component = {
|
||||
.name = AFE_PCM_NAME,
|
||||
.probe = mt8189_afe_component_probe,
|
||||
.pcm_construct = mtk_afe_pcm_new,
|
||||
.pcm_destruct = mt8189_afe_pcm_free,
|
||||
.pcm_new = mtk_afe_pcm_new,
|
||||
.pcm_free = mt8189_afe_pcm_free,
|
||||
.open = mt8189_afe_pcm_open,
|
||||
.pointer = mtk_afe_pcm_pointer,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -843,7 +843,7 @@ static struct snd_soc_dai_driver pxa_ssp_dai = {
|
|||
|
||||
static const struct snd_soc_component_driver pxa_ssp_component = {
|
||||
.name = "pxa-ssp",
|
||||
.pcm_construct = pxa2xx_soc_pcm_new,
|
||||
.pcm_new = pxa2xx_soc_pcm_new,
|
||||
.open = pxa2xx_soc_pcm_open,
|
||||
.close = pxa2xx_soc_pcm_close,
|
||||
.hw_params = pxa2xx_soc_pcm_hw_params,
|
||||
|
|
|
|||
|
|
@ -198,7 +198,7 @@ static struct snd_soc_dai_driver pxa_ac97_dai_driver[] = {
|
|||
|
||||
static const struct snd_soc_component_driver pxa_ac97_component = {
|
||||
.name = "pxa-ac97",
|
||||
.pcm_construct = pxa2xx_soc_pcm_new,
|
||||
.pcm_new = pxa2xx_soc_pcm_new,
|
||||
.open = pxa2xx_soc_pcm_open,
|
||||
.close = pxa2xx_soc_pcm_close,
|
||||
.hw_params = pxa2xx_soc_pcm_hw_params,
|
||||
|
|
|
|||
|
|
@ -356,7 +356,7 @@ static struct snd_soc_dai_driver pxa_i2s_dai = {
|
|||
|
||||
static const struct snd_soc_component_driver pxa_i2s_component = {
|
||||
.name = "pxa-i2s",
|
||||
.pcm_construct = pxa2xx_soc_pcm_new,
|
||||
.pcm_new = pxa2xx_soc_pcm_new,
|
||||
.open = pxa2xx_soc_pcm_open,
|
||||
.close = pxa2xx_soc_pcm_close,
|
||||
.hw_params = pxa2xx_soc_pcm_hw_params,
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
#include <sound/dmaengine_pcm.h>
|
||||
|
||||
static const struct snd_soc_component_driver pxa2xx_soc_platform = {
|
||||
.pcm_construct = pxa2xx_soc_pcm_new,
|
||||
.pcm_new = pxa2xx_soc_pcm_new,
|
||||
.open = pxa2xx_soc_pcm_open,
|
||||
.close = pxa2xx_soc_pcm_close,
|
||||
.hw_params = pxa2xx_soc_pcm_hw_params,
|
||||
|
|
|
|||
|
|
@ -1268,7 +1268,7 @@ static const struct snd_soc_component_driver lpass_component_driver = {
|
|||
.trigger = lpass_platform_pcmops_trigger,
|
||||
.pointer = lpass_platform_pcmops_pointer,
|
||||
.mmap = lpass_platform_pcmops_mmap,
|
||||
.pcm_construct = lpass_platform_pcm_new,
|
||||
.pcm_new = lpass_platform_pcm_new,
|
||||
.suspend = lpass_platform_pcmops_suspend,
|
||||
.resume = lpass_platform_pcmops_resume,
|
||||
.copy = lpass_platform_copy,
|
||||
|
|
|
|||
|
|
@ -831,7 +831,7 @@ static const struct snd_soc_component_driver q6apm_fe_dai_component = {
|
|||
.open = q6apm_dai_open,
|
||||
.close = q6apm_dai_close,
|
||||
.prepare = q6apm_dai_prepare,
|
||||
.pcm_construct = q6apm_dai_pcm_new,
|
||||
.pcm_new = q6apm_dai_pcm_new,
|
||||
.hw_params = q6apm_dai_hw_params,
|
||||
.pointer = q6apm_dai_pointer,
|
||||
.trigger = q6apm_dai_trigger,
|
||||
|
|
|
|||
|
|
@ -1224,7 +1224,7 @@ static const struct snd_soc_component_driver q6asm_fe_dai_component = {
|
|||
.trigger = q6asm_dai_trigger,
|
||||
.ack = q6asm_dai_ack,
|
||||
.pointer = q6asm_dai_pointer,
|
||||
.pcm_construct = q6asm_dai_pcm_new,
|
||||
.pcm_new = q6asm_dai_pcm_new,
|
||||
.compress_ops = &q6asm_dai_compress_ops,
|
||||
.dapm_widgets = q6asm_dapm_widgets,
|
||||
.num_dapm_widgets = ARRAY_SIZE(q6asm_dapm_widgets),
|
||||
|
|
|
|||
|
|
@ -310,7 +310,7 @@ static const struct snd_soc_component_driver sh7760_soc_component = {
|
|||
.prepare = camelot_prepare,
|
||||
.trigger = camelot_trigger,
|
||||
.pointer = camelot_pos,
|
||||
.pcm_construct = camelot_pcm_new,
|
||||
.pcm_new = camelot_pcm_new,
|
||||
};
|
||||
|
||||
static int sh7760_soc_platform_probe(struct platform_device *pdev)
|
||||
|
|
|
|||
|
|
@ -1817,7 +1817,7 @@ static const struct snd_soc_component_driver fsi_soc_component = {
|
|||
.name = "fsi",
|
||||
.open = fsi_pcm_open,
|
||||
.pointer = fsi_pointer,
|
||||
.pcm_construct = fsi_pcm_new,
|
||||
.pcm_new = fsi_pcm_new,
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -514,7 +514,7 @@ static const struct snd_soc_component_driver msiof_component_driver = {
|
|||
.open = msiof_open,
|
||||
.close = msiof_close,
|
||||
.pointer = msiof_pointer,
|
||||
.pcm_construct = msiof_new,
|
||||
.pcm_new = msiof_new,
|
||||
.trigger = msiof_trigger,
|
||||
.hw_params = msiof_hw_params,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1117,7 +1117,7 @@ static const struct snd_soc_component_driver rz_ssi_soc_component = {
|
|||
.name = "rz-ssi",
|
||||
.open = rz_ssi_pcm_open,
|
||||
.pointer = rz_ssi_pcm_pointer,
|
||||
.pcm_construct = rz_ssi_pcm_new,
|
||||
.pcm_new = rz_ssi_pcm_new,
|
||||
.legacy_dai_naming = 1,
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -546,8 +546,8 @@ const struct snd_soc_component_driver siu_component = {
|
|||
.prepare = siu_pcm_prepare,
|
||||
.trigger = siu_pcm_trigger,
|
||||
.pointer = siu_pcm_pointer_dma,
|
||||
.pcm_construct = siu_pcm_new,
|
||||
.pcm_destruct = siu_pcm_free,
|
||||
.pcm_new = siu_pcm_new,
|
||||
.pcm_free = siu_pcm_free,
|
||||
.legacy_dai_naming = 1,
|
||||
};
|
||||
EXPORT_SYMBOL_GPL(siu_component);
|
||||
|
|
|
|||
|
|
@ -399,8 +399,8 @@ static const struct snd_soc_component_driver asoc_idma_platform = {
|
|||
.hw_params = idma_hw_params,
|
||||
.hw_free = idma_hw_free,
|
||||
.prepare = idma_prepare,
|
||||
.pcm_construct = idma_new,
|
||||
.pcm_destruct = idma_free,
|
||||
.pcm_new = idma_new,
|
||||
.pcm_free = idma_free,
|
||||
};
|
||||
|
||||
static int asoc_idma_platform_probe(struct platform_device *pdev)
|
||||
|
|
|
|||
|
|
@ -1037,8 +1037,8 @@ int snd_soc_pcm_component_new(struct snd_soc_pcm_runtime *rtd)
|
|||
int i;
|
||||
|
||||
for_each_rtd_components(rtd, i, component) {
|
||||
if (component->driver->pcm_construct) {
|
||||
ret = component->driver->pcm_construct(component, rtd);
|
||||
if (component->driver->pcm_new) {
|
||||
ret = component->driver->pcm_new(component, rtd);
|
||||
if (ret < 0)
|
||||
return soc_component_ret(component, ret);
|
||||
}
|
||||
|
|
@ -1056,8 +1056,8 @@ void snd_soc_pcm_component_free(struct snd_soc_pcm_runtime *rtd)
|
|||
return;
|
||||
|
||||
for_each_rtd_components(rtd, i, component)
|
||||
if (component->driver->pcm_destruct)
|
||||
component->driver->pcm_destruct(component, rtd->pcm);
|
||||
if (component->driver->pcm_free)
|
||||
component->driver->pcm_free(component, rtd->pcm);
|
||||
}
|
||||
|
||||
int snd_soc_pcm_component_prepare(struct snd_pcm_substream *substream)
|
||||
|
|
|
|||
|
|
@ -332,7 +332,7 @@ static const struct snd_soc_component_driver dmaengine_pcm_component = {
|
|||
.hw_params = dmaengine_pcm_hw_params,
|
||||
.trigger = dmaengine_pcm_trigger,
|
||||
.pointer = dmaengine_pcm_pointer,
|
||||
.pcm_construct = dmaengine_pcm_new,
|
||||
.pcm_new = dmaengine_pcm_new,
|
||||
.sync_stop = dmaengine_pcm_sync_stop,
|
||||
};
|
||||
|
||||
|
|
@ -345,7 +345,7 @@ static const struct snd_soc_component_driver dmaengine_pcm_component_process = {
|
|||
.trigger = dmaengine_pcm_trigger,
|
||||
.pointer = dmaengine_pcm_pointer,
|
||||
.copy = dmaengine_copy,
|
||||
.pcm_construct = dmaengine_pcm_new,
|
||||
.pcm_new = dmaengine_pcm_new,
|
||||
.sync_stop = dmaengine_pcm_sync_stop,
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -651,7 +651,7 @@ static int sof_pcm_new(struct snd_soc_component *component,
|
|||
return 0;
|
||||
}
|
||||
|
||||
dev_dbg(spcm->scomp->dev, "pcm%u (%s): Entry: pcm_construct\n",
|
||||
dev_dbg(spcm->scomp->dev, "pcm%u (%s): Entry: pcm_new\n",
|
||||
le32_to_cpu(spcm->pcm.pcm_id), spcm->pcm.pcm_name);
|
||||
|
||||
/* do we need to pre-allocate playback audio buffer pages */
|
||||
|
|
@ -850,7 +850,7 @@ void snd_sof_new_platform_drv(struct snd_sof_dev *sdev)
|
|||
pd->compress_ops = &sof_compressed_ops;
|
||||
#endif
|
||||
|
||||
pd->pcm_construct = sof_pcm_new;
|
||||
pd->pcm_new = sof_pcm_new;
|
||||
pd->ignore_machine = drv_name;
|
||||
pd->be_pcm_base = SOF_BE_PCM_BASE;
|
||||
pd->use_dai_pcm_id = true;
|
||||
|
|
|
|||
|
|
@ -453,7 +453,7 @@ static const struct snd_soc_component_driver sprd_soc_component = {
|
|||
.hw_free = sprd_pcm_hw_free,
|
||||
.trigger = sprd_pcm_trigger,
|
||||
.pointer = sprd_pcm_pointer,
|
||||
.pcm_construct = sprd_pcm_new,
|
||||
.pcm_new = sprd_pcm_new,
|
||||
.compress_ops = &sprd_platform_compress_ops,
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -315,7 +315,7 @@ static const struct snd_soc_component_driver stm32_adfsdm_soc_platform = {
|
|||
.hw_params = stm32_adfsdm_pcm_hw_params,
|
||||
.trigger = stm32_adfsdm_trigger,
|
||||
.pointer = stm32_adfsdm_pcm_pointer,
|
||||
.pcm_construct = stm32_adfsdm_pcm_new,
|
||||
.pcm_new = stm32_adfsdm_pcm_new,
|
||||
};
|
||||
|
||||
static const struct of_device_id stm32_adfsdm_of_match[] = {
|
||||
|
|
|
|||
|
|
@ -839,7 +839,7 @@ static struct snd_kcontrol_new tegra264_admaif_controls[] = {
|
|||
static const struct snd_soc_component_driver tegra210_admaif_cmpnt = {
|
||||
.controls = tegra210_admaif_controls,
|
||||
.num_controls = ARRAY_SIZE(tegra210_admaif_controls),
|
||||
.pcm_construct = tegra_pcm_construct,
|
||||
.pcm_new = tegra_pcm_new,
|
||||
.open = tegra_pcm_open,
|
||||
.close = tegra_pcm_close,
|
||||
.hw_params = tegra_pcm_hw_params,
|
||||
|
|
@ -849,7 +849,7 @@ static const struct snd_soc_component_driver tegra210_admaif_cmpnt = {
|
|||
static const struct snd_soc_component_driver tegra186_admaif_cmpnt = {
|
||||
.controls = tegra186_admaif_controls,
|
||||
.num_controls = ARRAY_SIZE(tegra186_admaif_controls),
|
||||
.pcm_construct = tegra_pcm_construct,
|
||||
.pcm_new = tegra_pcm_new,
|
||||
.open = tegra_pcm_open,
|
||||
.close = tegra_pcm_close,
|
||||
.hw_params = tegra_pcm_hw_params,
|
||||
|
|
@ -859,7 +859,7 @@ static const struct snd_soc_component_driver tegra186_admaif_cmpnt = {
|
|||
static const struct snd_soc_component_driver tegra264_admaif_cmpnt = {
|
||||
.controls = tegra264_admaif_controls,
|
||||
.num_controls = ARRAY_SIZE(tegra264_admaif_controls),
|
||||
.pcm_construct = tegra_pcm_construct,
|
||||
.pcm_new = tegra_pcm_new,
|
||||
.open = tegra_pcm_open,
|
||||
.close = tegra_pcm_close,
|
||||
.hw_params = tegra_pcm_hw_params,
|
||||
|
|
|
|||
|
|
@ -204,8 +204,8 @@ static int tegra_pcm_dma_allocate(struct device *dev, struct snd_soc_pcm_runtime
|
|||
return snd_pcm_set_fixed_buffer_all(pcm, SNDRV_DMA_TYPE_DEV_WC, dev, size);
|
||||
}
|
||||
|
||||
int tegra_pcm_construct(struct snd_soc_component *component,
|
||||
struct snd_soc_pcm_runtime *rtd)
|
||||
int tegra_pcm_new(struct snd_soc_component *component,
|
||||
struct snd_soc_pcm_runtime *rtd)
|
||||
{
|
||||
struct device *dev = component->dev;
|
||||
|
||||
|
|
@ -218,7 +218,7 @@ int tegra_pcm_construct(struct snd_soc_component *component,
|
|||
|
||||
return tegra_pcm_dma_allocate(dev, rtd, tegra_pcm_hardware.buffer_bytes_max);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(tegra_pcm_construct);
|
||||
EXPORT_SYMBOL_GPL(tegra_pcm_new);
|
||||
|
||||
MODULE_AUTHOR("Stephen Warren <swarren@nvidia.com>");
|
||||
MODULE_DESCRIPTION("Tegra PCM ASoC driver");
|
||||
|
|
|
|||
|
|
@ -20,8 +20,8 @@
|
|||
#include <sound/dmaengine_pcm.h>
|
||||
#include <sound/asound.h>
|
||||
|
||||
int tegra_pcm_construct(struct snd_soc_component *component,
|
||||
struct snd_soc_pcm_runtime *rtd);
|
||||
int tegra_pcm_new(struct snd_soc_component *component,
|
||||
struct snd_soc_pcm_runtime *rtd);
|
||||
int tegra_pcm_open(struct snd_soc_component *component,
|
||||
struct snd_pcm_substream *substream);
|
||||
int tegra_pcm_close(struct snd_soc_component *component,
|
||||
|
|
|
|||
|
|
@ -226,7 +226,7 @@ static const struct snd_soc_component_driver uniphier_soc_platform = {
|
|||
.trigger = uniphier_aiodma_trigger,
|
||||
.pointer = uniphier_aiodma_pointer,
|
||||
.mmap = uniphier_aiodma_mmap,
|
||||
.pcm_construct = uniphier_aiodma_new,
|
||||
.pcm_new = uniphier_aiodma_new,
|
||||
.compress_ops = &uniphier_aio_compress_ops,
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -582,7 +582,7 @@ static const struct snd_soc_component_driver xlnx_asoc_component = {
|
|||
.hw_params = xlnx_formatter_pcm_hw_params,
|
||||
.trigger = xlnx_formatter_pcm_trigger,
|
||||
.pointer = xlnx_formatter_pcm_pointer,
|
||||
.pcm_construct = xlnx_formatter_pcm_new,
|
||||
.pcm_new = xlnx_formatter_pcm_new,
|
||||
};
|
||||
|
||||
static int xlnx_formatter_pcm_probe(struct platform_device *pdev)
|
||||
|
|
|
|||
|
|
@ -481,7 +481,7 @@ static const struct snd_soc_component_driver xtfpga_i2s_component = {
|
|||
.hw_params = xtfpga_pcm_hw_params,
|
||||
.trigger = xtfpga_pcm_trigger,
|
||||
.pointer = xtfpga_pcm_pointer,
|
||||
.pcm_construct = xtfpga_pcm_new,
|
||||
.pcm_new = xtfpga_pcm_new,
|
||||
.legacy_dai_naming = 1,
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user