aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/sh/sh7760-ac97.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/sh/sh7760-ac97.c')
-rw-r--r--sound/soc/sh/sh7760-ac97.c25
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 @@
15#include <sound/soc-dapm.h> 15#include <sound/soc-dapm.h>
16#include <asm/io.h> 16#include <asm/io.h>
17 17
18#include "../codecs/ac97.h"
19
20#define IPSEL 0xFE400034 18#define IPSEL 0xFE400034
21 19
22/* platform specific structs can be declared here */ 20/* platform specific structs can be declared here */
23extern struct snd_soc_dai sh4_hac_dai[2]; 21extern struct snd_soc_dai_driver sh4_hac_dai[2];
24extern struct snd_soc_platform sh7760_soc_platform; 22extern struct snd_soc_platform_driver sh7760_soc_platform;
25 23
26static int machine_init(struct snd_soc_codec *codec) 24static int machine_init(struct snd_soc_pcm_runtime *rtd)
27{ 25{
28 snd_soc_dapm_sync(codec); 26 snd_soc_dapm_sync(rtd->codec);
29 return 0; 27 return 0;
30} 28}
31 29
32static struct snd_soc_dai_link sh7760_ac97_dai = { 30static struct snd_soc_dai_link sh7760_ac97_dai = {
33 .name = "AC97", 31 .name = "AC97",
34 .stream_name = "AC97 HiFi", 32 .stream_name = "AC97 HiFi",
35 .cpu_dai = &sh4_hac_dai[0], /* HAC0 */ 33 .cpu_dai_name = "hac-dai.0", /* HAC0 */
36 .codec_dai = &ac97_dai, 34 .codec_dai_name = "ac97-hifi",
35 .platform_name = "sh7760-pcm-audio",
36 .codec_name = "ac97-codec",
37 .init = machine_init, 37 .init = machine_init,
38 .ops = NULL, 38 .ops = NULL,
39}; 39};
40 40
41static struct snd_soc_card sh7760_ac97_soc_machine = { 41static struct snd_soc_card sh7760_ac97_soc_machine = {
42 .name = "SH7760 AC97", 42 .name = "SH7760 AC97",
43 .platform = &sh7760_soc_platform,
44 .dai_link = &sh7760_ac97_dai, 43 .dai_link = &sh7760_ac97_dai,
45 .num_links = 1, 44 .num_links = 1,
46}; 45};
47 46
48static struct snd_soc_device sh7760_ac97_snd_devdata = {
49 .card = &sh7760_ac97_soc_machine,
50 .codec_dev = &soc_codec_dev_ac97,
51};
52
53static struct platform_device *sh7760_ac97_snd_device; 47static struct platform_device *sh7760_ac97_snd_device;
54 48
55static int __init sh7760_ac97_init(void) 49static int __init sh7760_ac97_init(void)
@@ -67,8 +61,7 @@ static int __init sh7760_ac97_init(void)
67 goto out; 61 goto out;
68 62
69 platform_set_drvdata(sh7760_ac97_snd_device, 63 platform_set_drvdata(sh7760_ac97_snd_device,
70 &sh7760_ac97_snd_devdata); 64 &sh7760_ac97_soc_machine);
71 sh7760_ac97_snd_devdata.dev = &sh7760_ac97_snd_device->dev;
72 ret = platform_device_add(sh7760_ac97_snd_device); 65 ret = platform_device_add(sh7760_ac97_snd_device);
73 66
74 if (ret) 67 if (ret)