diff options
Diffstat (limited to 'sound/soc/sh/sh7760-ac97.c')
-rw-r--r-- | sound/soc/sh/sh7760-ac97.c | 25 |
1 files changed, 9 insertions, 16 deletions
diff --git a/sound/soc/sh/sh7760-ac97.c b/sound/soc/sh/sh7760-ac97.c index ce7f95b59de3..b897f7b96d89 100644 --- a/sound/soc/sh/sh7760-ac97.c +++ b/sound/soc/sh/sh7760-ac97.c @@ -15,41 +15,35 @@ #include <sound/soc-dapm.h> #include <asm/io.h> -#include "../codecs/ac97.h" - #define IPSEL 0xFE400034 /* platform specific structs can be declared here */ -extern struct snd_soc_dai sh4_hac_dai[2]; -extern struct snd_soc_platform sh7760_soc_platform; +extern struct snd_soc_dai_driver sh4_hac_dai[2]; +extern struct snd_soc_platform_driver sh7760_soc_platform; -static int machine_init(struct snd_soc_codec *codec) +static int machine_init(struct snd_soc_pcm_runtime *rtd) { - snd_soc_dapm_sync(codec); + snd_soc_dapm_sync(rtd->codec); return 0; } static struct snd_soc_dai_link sh7760_ac97_dai = { .name = "AC97", .stream_name = "AC97 HiFi", - .cpu_dai = &sh4_hac_dai[0], /* HAC0 */ - .codec_dai = &ac97_dai, + .cpu_dai_name = "hac-dai.0", /* HAC0 */ + .codec_dai_name = "ac97-hifi", + .platform_name = "sh7760-pcm-audio", + .codec_name = "ac97-codec", .init = machine_init, .ops = NULL, }; 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, - .codec_dev = &soc_codec_dev_ac97, -}; - static struct platform_device *sh7760_ac97_snd_device; static int __init sh7760_ac97_init(void) @@ -67,8 +61,7 @@ static int __init sh7760_ac97_init(void) goto out; platform_set_drvdata(sh7760_ac97_snd_device, - &sh7760_ac97_snd_devdata); - sh7760_ac97_snd_devdata.dev = &sh7760_ac97_snd_device->dev; + &sh7760_ac97_soc_machine); ret = platform_device_add(sh7760_ac97_snd_device); if (ret) |