Commit 87689d56 authored by Mark Brown's avatar Mark Brown

ASoC: Push platform registration down into the card

As part of the deprecation of snd_soc_device push the registration of
the platform down into the card structure.
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent 6308419a
......@@ -352,6 +352,7 @@ struct snd_soc_card {
struct snd_soc_device *socdev;
struct snd_soc_platform *platform;
struct delayed_work delayed_work;
struct work_struct deferred_resume_work;
};
......@@ -360,7 +361,6 @@ struct snd_soc_card {
struct snd_soc_device {
struct device *dev;
struct snd_soc_card *card;
struct snd_soc_platform *platform;
struct snd_soc_codec *codec;
struct snd_soc_codec_device *codec_dev;
void *codec_data;
......
......@@ -363,6 +363,7 @@ static struct snd_soc_dai_link playpaq_wm8510_dai = {
static struct snd_soc_card snd_soc_playpaq = {
.name = "LRS_PlayPaq_WM8510",
.platform = &at32_soc_platform,
.dai_link = &playpaq_wm8510_dai,
.num_links = 1,
};
......@@ -378,7 +379,6 @@ static struct wm8510_setup_data playpaq_wm8510_setup = {
static struct snd_soc_device playpaq_wm8510_snd_devdata = {
.card = &snd_soc_playpaq,
.platform = &at32_soc_platform,
.codec_dev = &soc_codec_dev_wm8510,
.codec_data = &playpaq_wm8510_setup,
};
......
......@@ -244,6 +244,7 @@ static struct snd_soc_dai_link at91sam9g20ek_dai = {
static struct snd_soc_card snd_soc_at91sam9g20ek = {
.name = "WM8731",
.platform = &atmel_soc_platform,
.dai_link = &at91sam9g20ek_dai,
.num_links = 1,
};
......@@ -255,7 +256,6 @@ static struct wm8731_setup_data at91sam9g20ek_wm8731_setup = {
static struct snd_soc_device at91sam9g20ek_snd_devdata = {
.card = &snd_soc_at91sam9g20ek,
.platform = &atmel_soc_platform,
.codec_dev = &soc_codec_dev_wm8731,
.codec_data = &at91sam9g20ek_wm8731_setup,
};
......
......@@ -69,13 +69,13 @@ static struct snd_soc_dai_link bf5xx_board_dai = {
static struct snd_soc_card bf5xx_board = {
.name = "bf5xx-board",
.platform = &bf5xx_ac97_soc_platform,
.dai_link = &bf5xx_board_dai,
.num_links = 1,
};
static struct snd_soc_device bf5xx_board_snd_devdata = {
.card = &bf5xx_board,
.platform = &bf5xx_ac97_soc_platform,
.codec_dev = &soc_codec_dev_ad1980,
};
......
......@@ -192,6 +192,7 @@ static struct snd_soc_dai_link bf5xx_ad73311_dai = {
static struct snd_soc_card bf5xx_ad73311 = {
.name = "bf5xx_ad73311",
.platform = &bf5xx_i2s_soc_platform,
.probe = bf5xx_probe,
.dai_link = &bf5xx_ad73311_dai,
.num_links = 1,
......@@ -199,7 +200,6 @@ static struct snd_soc_card bf5xx_ad73311 = {
static struct snd_soc_device bf5xx_ad73311_snd_devdata = {
.card = &bf5xx_ad73311,
.platform = &bf5xx_i2s_soc_platform,
.codec_dev = &soc_codec_dev_ad73311,
};
......
......@@ -137,13 +137,13 @@ static struct ssm2602_setup_data bf5xx_ssm2602_setup = {
static struct snd_soc_card bf5xx_ssm2602 = {
.name = "bf5xx_ssm2602",
.platform = &bf5xx_i2s_soc_platform,
.dai_link = &bf5xx_ssm2602_dai,
.num_links = 1,
};
static struct snd_soc_device bf5xx_ssm2602_snd_devdata = {
.card = &bf5xx_ssm2602,
.platform = &bf5xx_i2s_soc_platform,
.codec_dev = &soc_codec_dev_ssm2602,
.codec_data = &bf5xx_ssm2602_setup,
};
......
......@@ -130,6 +130,7 @@ static struct snd_soc_dai_link evm_dai = {
/* davinci-evm audio machine driver */
static struct snd_soc_card snd_soc_card_evm = {
.name = "DaVinci EVM",
.platform = &davinci_soc_platform,
.dai_link = &evm_dai,
.num_links = 1,
};
......@@ -143,7 +144,6 @@ static struct aic3x_setup_data evm_aic3x_setup = {
/* evm audio subsystem */
static struct snd_soc_device evm_snd_devdata = {
.card = &snd_soc_card_evm,
.platform = &davinci_soc_platform,
.codec_dev = &soc_codec_dev_aic3x,
.codec_data = &evm_aic3x_setup,
};
......
......@@ -112,7 +112,7 @@ static void davinci_mcbsp_start(struct snd_pcm_substream *substream)
struct snd_soc_pcm_runtime *rtd = substream->private_data;
struct davinci_mcbsp_dev *dev = rtd->dai->cpu_dai->private_data;
struct snd_soc_device *socdev = rtd->socdev;
struct snd_soc_platform *platform = socdev->platform;
struct snd_soc_platform *platform = socdev->card->platform;
u32 w;
int ret;
......
......@@ -76,6 +76,7 @@ static struct snd_soc_dai_link sffsdr_dai = {
/* davinci-sffsdr audio machine driver */
static struct snd_soc_card snd_soc_sffsdr = {
.name = "DaVinci SFFSDR",
.platform = &davinci_soc_platform,
.dai_link = &sffsdr_dai,
.num_links = 1,
};
......@@ -91,7 +92,6 @@ static struct pcm3008_setup_data sffsdr_pcm3008_setup = {
/* sffsdr audio subsystem */
static struct snd_soc_device sffsdr_snd_devdata = {
.card = &snd_soc_sffsdr,
.platform = &davinci_soc_platform,
.codec_dev = &soc_codec_dev_pcm3008,
.codec_data = &sffsdr_pcm3008_setup,
};
......
......@@ -467,7 +467,7 @@ static int mpc8610_hpcd_probe(struct of_device *ofdev,
machine_data->sound_devdata.card = &mpc8610_hpcd_machine;
machine_data->sound_devdata.codec_dev = &soc_codec_device_cs4270;
machine_data->sound_devdata.platform = &fsl_soc_platform;
machine_data->machine.platform = &fsl_soc_platform;
sound_device->dev.platform_data = machine_data;
......
......@@ -158,7 +158,7 @@ int of_snd_soc_register_platform(struct snd_soc_platform *platform,
of_soc->platform_node = node;
of_soc->dai_link.cpu_dai = cpu_dai;
of_soc->device.platform = platform;
of_soc->card.platform = platform;
of_soc->card.name = of_soc->dai_link.cpu_dai->name;
/* Now try to register the SoC device */
......
......@@ -288,6 +288,7 @@ static struct snd_soc_dai_link n810_dai = {
/* Audio machine driver */
static struct snd_soc_card snd_soc_n810 = {
.name = "N810",
.platform = &omap_soc_platform,
.dai_link = &n810_dai,
.num_links = 1,
};
......@@ -303,7 +304,6 @@ static struct aic3x_setup_data n810_aic33_setup = {
/* Audio subsystem */
static struct snd_soc_device n810_snd_devdata = {
.card = &snd_soc_n810,
.platform = &omap_soc_platform,
.codec_dev = &soc_codec_dev_aic3x,
.codec_data = &n810_aic33_setup,
};
......
......@@ -93,6 +93,7 @@ static struct snd_soc_dai_link omap2evm_dai = {
/* Audio machine driver */
static struct snd_soc_card snd_soc_omap2evm = {
.name = "omap2evm",
.platform = &omap_soc_platform,
.dai_link = &omap2evm_dai,
.num_links = 1,
};
......@@ -100,7 +101,6 @@ static struct snd_soc_card snd_soc_omap2evm = {
/* Audio subsystem */
static struct snd_soc_device omap2evm_snd_devdata = {
.card = &snd_soc_omap2evm,
.platform = &omap_soc_platform,
.codec_dev = &soc_codec_dev_twl4030,
};
......
......@@ -90,6 +90,7 @@ static struct snd_soc_dai_link omap3beagle_dai = {
/* Audio machine driver */
static struct snd_soc_card snd_soc_omap3beagle = {
.name = "omap3beagle",
.platform = &omap_soc_platform,
.dai_link = &omap3beagle_dai,
.num_links = 1,
};
......@@ -97,7 +98,6 @@ static struct snd_soc_card snd_soc_omap3beagle = {
/* Audio subsystem */
static struct snd_soc_device omap3beagle_snd_devdata = {
.card = &snd_soc_omap3beagle,
.platform = &omap_soc_platform,
.codec_dev = &soc_codec_dev_twl4030,
};
......
......@@ -145,6 +145,7 @@ static struct snd_soc_dai_link osk_dai = {
/* Audio machine driver */
static struct snd_soc_card snd_soc_card_osk = {
.name = "OSK5912",
.platform = &omap_soc_platform,
.dai_link = &osk_dai,
.num_links = 1,
};
......@@ -152,7 +153,6 @@ static struct snd_soc_card snd_soc_card_osk = {
/* Audio subsystem */
static struct snd_soc_device osk_snd_devdata = {
.card = &snd_soc_card_osk,
.platform = &omap_soc_platform,
.codec_dev = &soc_codec_dev_tlv320aic23,
};
......
......@@ -90,6 +90,7 @@ static struct snd_soc_dai_link overo_dai = {
/* Audio machine driver */
static struct snd_soc_card snd_soc_card_overo = {
.name = "overo",
.platform = &omap_soc_platform,
.dai_link = &overo_dai,
.num_links = 1,
};
......@@ -97,7 +98,6 @@ static struct snd_soc_card snd_soc_card_overo = {
/* Audio subsystem */
static struct snd_soc_device overo_snd_devdata = {
.card = &snd_soc_card_overo,
.platform = &omap_soc_platform,
.codec_dev = &soc_codec_dev_twl4030,
};
......
......@@ -93,6 +93,7 @@ static struct snd_soc_dai_link sdp3430_dai = {
/* Audio machine driver */
static struct snd_soc_machine snd_soc_machine_sdp3430 = {
.name = "SDP3430",
.platform = &omap_soc_platform,
.dai_link = &sdp3430_dai,
.num_links = 1,
};
......@@ -100,7 +101,6 @@ static struct snd_soc_machine snd_soc_machine_sdp3430 = {
/* Audio subsystem */
static struct snd_soc_device sdp3430_snd_devdata = {
.machine = &snd_soc_machine_sdp3430,
.platform = &omap_soc_platform,
.codec_dev = &soc_codec_dev_twl4030,
};
......
......@@ -312,6 +312,7 @@ static struct snd_soc_dai_link corgi_dai = {
/* corgi audio machine driver */
static struct snd_soc_card snd_soc_corgi = {
.name = "Corgi",
.platform = &pxa2xx_soc_platform,
.dai_link = &corgi_dai,
.num_links = 1,
};
......@@ -325,7 +326,6 @@ static struct wm8731_setup_data corgi_wm8731_setup = {
/* corgi audio subsystem */
static struct snd_soc_device corgi_snd_devdata = {
.card = &snd_soc_corgi,
.platform = &pxa2xx_soc_platform,
.codec_dev = &soc_codec_dev_wm8731,
.codec_data = &corgi_wm8731_setup,
};
......
......@@ -42,13 +42,13 @@ static struct snd_soc_dai_link e800_dai[] = {
static struct snd_soc_card e800 = {
.name = "Toshiba e800",
.platform = &pxa2xx_soc_platform,
.dai_link = e800_dai,
.num_links = ARRAY_SIZE(e800_dai),
};
static struct snd_soc_device e800_snd_devdata = {
.card = &e800,
.platform = &pxa2xx_soc_platform,
.codec_dev = &soc_codec_dev_wm9712,
};
......
......@@ -54,13 +54,13 @@ static struct snd_soc_dai_link em_x270_dai[] = {
static struct snd_soc_card em_x270 = {
.name = "EM-X270",
.platform = &pxa2xx_soc_platform,
.dai_link = em_x270_dai,
.num_links = ARRAY_SIZE(em_x270_dai),
};
static struct snd_soc_device em_x270_snd_devdata = {
.card = &em_x270,
.platform = &pxa2xx_soc_platform,
.codec_dev = &soc_codec_dev_wm9712,
};
......
......@@ -191,13 +191,13 @@ static struct snd_soc_dai_link palm27x_dai[] = {
static struct snd_soc_card palm27x_asoc = {
.name = "Palm/PXA27x",
.platform = &pxa2xx_soc_platform,
.dai_link = palm27x_dai,
.num_links = ARRAY_SIZE(palm27x_dai),
};
static struct snd_soc_device palm27x_snd_devdata = {
.card = &palm27x_asoc,
.platform = &pxa2xx_soc_platform,
.codec_dev = &soc_codec_dev_wm9712,
};
......
......@@ -278,6 +278,7 @@ static struct snd_soc_dai_link poodle_dai = {
/* poodle audio machine driver */
static struct snd_soc_card snd_soc_poodle = {
.name = "Poodle",
.platform = &pxa2xx_soc_platform,
.dai_link = &poodle_dai,
.num_links = 1,
};
......@@ -291,7 +292,6 @@ static struct wm8731_setup_data poodle_wm8731_setup = {
/* poodle audio subsystem */
static struct snd_soc_device poodle_snd_devdata = {
.card = &snd_soc_poodle,
.platform = &pxa2xx_soc_platform,
.codec_dev = &soc_codec_dev_wm8731,
.codec_data = &poodle_wm8731_setup,
};
......
......@@ -321,6 +321,7 @@ static struct snd_soc_dai_link spitz_dai = {
/* spitz audio machine driver */
static struct snd_soc_card snd_soc_spitz = {
.name = "Spitz",
.platform = &pxa2xx_soc_platform,
.dai_link = &spitz_dai,
.num_links = 1,
};
......@@ -334,7 +335,6 @@ static struct wm8750_setup_data spitz_wm8750_setup = {
/* spitz audio subsystem */
static struct snd_soc_device spitz_snd_devdata = {
.card = &snd_soc_spitz,
.platform = &pxa2xx_soc_platform,
.codec_dev = &soc_codec_dev_wm8750,
.codec_data = &spitz_wm8750_setup,
};
......
......@@ -252,6 +252,7 @@ static int tosa_remove(struct platform_device *dev)
static struct snd_soc_card tosa = {
.name = "Tosa",
.platform = &pxa2xx_soc_platform,
.dai_link = tosa_dai,
.num_links = ARRAY_SIZE(tosa_dai),
.probe = tosa_probe,
......@@ -260,7 +261,6 @@ static struct snd_soc_card tosa = {
static struct snd_soc_device tosa_snd_devdata = {
.card = &tosa,
.platform = &pxa2xx_soc_platform,
.codec_dev = &soc_codec_dev_wm9712,
};
......
......@@ -175,13 +175,13 @@ static struct snd_soc_dai_link zylonite_dai[] = {
static struct snd_soc_card zylonite = {
.name = "Zylonite",
.platform = &pxa2xx_soc_platform,
.dai_link = zylonite_dai,
.num_links = ARRAY_SIZE(zylonite_dai),
};
static struct snd_soc_device zylonite_snd_ac97_devdata = {
.card = &zylonite,
.platform = &pxa2xx_soc_platform,
.codec_dev = &soc_codec_dev_wm9713,
};
......
......@@ -40,13 +40,13 @@ static struct snd_soc_dai_link ln2440sbc_dai[] = {
static struct snd_soc_card ln2440sbc = {
.name = "LN2440SBC",
.platform = &s3c24xx_soc_platform,
.dai_link = ln2440sbc_dai,
.num_links = ARRAY_SIZE(ln2440sbc_dai),
};
static struct snd_soc_device ln2440sbc_snd_ac97_devdata = {
.card = &ln2440sbc,
.platform = &s3c24xx_soc_platform,
.codec_dev = &soc_codec_dev_ac97,
};
......
......@@ -580,6 +580,7 @@ static struct snd_soc_dai_link neo1973_dai[] = {
static struct snd_soc_card neo1973 = {
.name = "neo1973",
.platform = &s3c24xx_soc_platform,
.dai_link = neo1973_dai,
.num_links = ARRAY_SIZE(neo1973_dai),
};
......@@ -591,7 +592,6 @@ static struct wm8753_setup_data neo1973_wm8753_setup = {
static struct snd_soc_device neo1973_snd_devdata = {
.card = &neo1973,
.platform = &s3c24xx_soc_platform,
.codec_dev = &soc_codec_dev_wm8753,
.codec_data = &neo1973_wm8753_setup,
};
......
......@@ -234,6 +234,7 @@ static struct snd_soc_dai_link s3c24xx_uda134x_dai_link = {
static struct snd_soc_card snd_soc_s3c24xx_uda134x = {
.name = "S3C24XX_UDA134X",
.platform = &s3c24xx_soc_platform,
.dai_link = &s3c24xx_uda134x_dai_link,
.num_links = 1,
};
......@@ -271,7 +272,6 @@ static struct uda134x_platform_data s3c24xx_uda134x = {
static struct snd_soc_device s3c24xx_uda134x_snd_devdata = {
.card = &snd_soc_s3c24xx_uda134x,
.platform = &s3c24xx_soc_platform,
.codec_dev = &soc_codec_dev_uda134x,
.codec_data = &s3c24xx_uda134x,
};
......
......@@ -36,13 +36,13 @@ static struct snd_soc_dai_link smdk2443_dai[] = {
static struct snd_soc_card smdk2443 = {
.name = "SMDK2443",
.platform = &s3c24xx_soc_platform,
.dai_link = smdk2443_dai,
.num_links = ARRAY_SIZE(smdk2443_dai),
};
static struct snd_soc_device smdk2443_snd_ac97_devdata = {
.card = &smdk2443,
.platform = &s3c24xx_soc_platform,
.codec_dev = &soc_codec_dev_ac97,
};
......
......@@ -40,13 +40,13 @@ static struct snd_soc_dai_link sh7760_ac97_dai = {
static struct snd_soc_card sh7760_ac97_soc_machine = {
.name = "SH7760 AC97",
.platform = &sh7760_soc_platform,
.dai_link = &sh7760_ac97_dai,
.num_links = 1,
};
static struct snd_soc_device sh7760_ac97_snd_devdata = {
.card = &sh7760_ac97_soc_machine,
.platform = &sh7760_soc_platform,
.codec_dev = &soc_codec_dev_ac97,
};
......
......@@ -109,9 +109,10 @@ static int soc_pcm_open(struct snd_pcm_substream *substream)
{
struct snd_soc_pcm_runtime *rtd = substream->private_data;
struct snd_soc_device *socdev = rtd->socdev;
struct snd_soc_card *card = socdev->card;
struct snd_pcm_runtime *runtime = substream->runtime;
struct snd_soc_dai_link *machine = rtd->dai;
struct snd_soc_platform *platform = socdev->platform;
struct snd_soc_platform *platform = card->platform;
struct snd_soc_dai *cpu_dai = machine->cpu_dai;
struct snd_soc_dai *codec_dai = machine->codec_dai;
int ret = 0;
......@@ -302,7 +303,7 @@ static int soc_codec_close(struct snd_pcm_substream *substream)
struct snd_soc_device *socdev = rtd->socdev;
struct snd_soc_card *card = socdev->card;
struct snd_soc_dai_link *machine = rtd->dai;
struct snd_soc_platform *platform = socdev->platform;
struct snd_soc_platform *platform = card->platform;
struct snd_soc_dai *cpu_dai = machine->cpu_dai;
struct snd_soc_dai *codec_dai = machine->codec_dai;
struct snd_soc_codec *codec = socdev->codec;
......@@ -370,7 +371,7 @@ static int soc_pcm_prepare(struct snd_pcm_substream *substream)
struct snd_soc_device *socdev = rtd->socdev;
struct snd_soc_card *card = socdev->card;
struct snd_soc_dai_link *machine = rtd->dai;
struct snd_soc_platform *platform = socdev->platform;
struct snd_soc_platform *platform = card->platform;
struct snd_soc_dai *cpu_dai = machine->cpu_dai;
struct snd_soc_dai *codec_dai = machine->codec_dai;
struct snd_soc_codec *codec = socdev->codec;
......@@ -464,7 +465,8 @@ static int soc_pcm_hw_params(struct snd_pcm_substream *substream,
struct snd_soc_pcm_runtime *rtd = substream->private_data;
struct snd_soc_device *socdev = rtd->socdev;
struct snd_soc_dai_link *machine = rtd->dai;
struct snd_soc_platform *platform = socdev->platform;
struct snd_soc_card *card = socdev->card;
struct snd_soc_platform *platform = card->platform;
struct snd_soc_dai *cpu_dai = machine->cpu_dai;
struct snd_soc_dai *codec_dai = machine->codec_dai;
int ret = 0;
......@@ -534,7 +536,8 @@ static int soc_pcm_hw_free(struct snd_pcm_substream *substream)
struct snd_soc_pcm_runtime *rtd = substream->private_data;
struct snd_soc_device *socdev = rtd->socdev;
struct snd_soc_dai_link *machine = rtd->dai;
struct snd_soc_platform *platform = socdev->platform;
struct snd_soc_card *card = socdev->card;
struct snd_soc_platform *platform = card->platform;
struct snd_soc_dai *cpu_dai = machine->cpu_dai;
struct snd_soc_dai *codec_dai = machine->codec_dai;
struct snd_soc_codec *codec = socdev->codec;
......@@ -568,8 +571,9 @@ static int soc_pcm_trigger(struct snd_pcm_substream *substream, int cmd)
{
struct snd_soc_pcm_runtime *rtd = substream->private_data;
struct snd_soc_device *socdev = rtd->socdev;
struct snd_soc_card *card= socdev->card;
struct snd_soc_dai_link *machine = rtd->dai;
struct snd_soc_platform *platform = socdev->platform;
struct snd_soc_platform *platform = card->platform;
struct snd_soc_dai *cpu_dai = machine->cpu_dai;
struct snd_soc_dai *codec_dai = machine->codec_dai;
int ret;
......@@ -610,7 +614,7 @@ static int soc_suspend(struct platform_device *pdev, pm_message_t state)
{
struct snd_soc_device *socdev = platform_get_drvdata(pdev);
struct snd_soc_card *card = socdev->card;
struct snd_soc_platform *platform = socdev->platform;
struct snd_soc_platform *platform = card->platform;
struct snd_soc_codec_device *codec_dev = socdev->codec_dev;
struct snd_soc_codec *codec = socdev->codec;
int i;
......@@ -686,7 +690,7 @@ static void soc_resume_deferred(struct work_struct *work)
struct snd_soc_card,
deferred_resume_work);
struct snd_soc_device *socdev = card->socdev;
struct snd_soc_platform *platform = socdev->platform;
struct snd_soc_platform *platform = card->platform;
struct snd_soc_codec_device *codec_dev = socdev->codec_dev;
struct snd_soc_codec *codec = socdev->codec;
struct platform_device *pdev = to_platform_device(socdev->dev);
......@@ -770,7 +774,7 @@ static int soc_probe(struct platform_device *pdev)
int ret = 0, i;
struct snd_soc_device *socdev = platform_get_drvdata(pdev);
struct snd_soc_card *card = socdev->card;
struct snd_soc_platform *platform = socdev->platform;
struct snd_soc_platform *platform = card->platform;
struct snd_soc_codec_device *codec_dev = socdev->codec_dev;
/* Bodge while we push things out of socdev */
......@@ -835,7 +839,7 @@ static int soc_remove(struct platform_device *pdev)
int i;
struct snd_soc_device *socdev = platform_get_drvdata(pdev);
struct snd_soc_card *card = socdev->card;
struct snd_soc_platform *platform = socdev->platform;
struct snd_soc_platform *platform = card->platform;
struct snd_soc_codec_device *codec_dev = socdev->codec_dev;
run_delayed_work(&card->delayed_work);
......@@ -875,6 +879,8 @@ static int soc_new_pcm(struct snd_soc_device *socdev,
struct snd_soc_dai_link *dai_link, int num)
{
struct snd_soc_codec *codec = socdev->codec;
struct snd_soc_card *card = socdev->card;
struct snd_soc_platform *platform = card->platform;
struct snd_soc_dai *codec_dai = dai_link->codec_dai;
struct snd_soc_dai *cpu_dai = dai_link->cpu_dai;
struct snd_soc_pcm_runtime *rtd;
......@@ -910,13 +916,13 @@ static int soc_new_pcm(struct snd_soc_device *socdev,
dai_link->pcm = pcm;
pcm->private_data = rtd;
soc_pcm_ops.mmap = socdev->platform->pcm_ops->mmap;
soc_pcm_ops.pointer = socdev->platform->pcm_ops->pointer;
soc_pcm_ops.ioctl = socdev->platform->pcm_ops->ioctl;
soc_pcm_ops.copy = socdev->platform->pcm_ops->copy;
soc_pcm_ops.silence = socdev->platform->pcm_ops->silence;
soc_pcm_ops.ack = socdev->platform->pcm_ops->ack;
soc_pcm_ops.page = socdev->platform->pcm_ops->page;
soc_pcm_ops.mmap = platform->pcm_ops->mmap;
soc_pcm_ops.pointer = platform->pcm_ops->pointer;
soc_pcm_ops.ioctl = platform->pcm_ops->ioctl;
soc_pcm_ops.copy = platform->pcm_ops->copy;
soc_pcm_ops.silence = platform->pcm_ops->silence;
soc_pcm_ops.ack = platform->pcm_ops->ack;
soc_pcm_ops.page = platform->pcm_ops->page;
if (playback)
snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &soc_pcm_ops);
......@@ -924,14 +930,14 @@ static int soc_new_pcm(struct snd_soc_device *socdev,
if (capture)
snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &soc_pcm_ops);
ret = socdev->platform->pcm_new(codec->card, codec_dai, pcm);
ret = platform->pcm_new(codec->card, codec_dai, pcm);
if (ret < 0) {
printk(KERN_ERR "asoc: platform pcm constructor failed\n");
kfree(rtd);
return ret;
}
pcm->private_free = socdev->platform->pcm_free;
pcm->private_free = platform->pcm_free;
printk(KERN_INFO "asoc: %s <-> %s mapping ok\n", codec_dai->name,
cpu_dai->name);
return ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment