diff options
Diffstat (limited to 'sound/soc/blackfin/bf5xx-ad1980.c')
-rw-r--r-- | sound/soc/blackfin/bf5xx-ad1980.c | 52 |
1 files changed, 21 insertions, 31 deletions
diff --git a/sound/soc/blackfin/bf5xx-ad1980.c b/sound/soc/blackfin/bf5xx-ad1980.c index 92f7c327bb7a..06a84b211b52 100644 --- a/sound/soc/blackfin/bf5xx-ad1980.c +++ b/sound/soc/blackfin/bf5xx-ad1980.c | |||
@@ -47,46 +47,37 @@ | |||
47 | #include <asm/portmux.h> | 47 | #include <asm/portmux.h> |
48 | 48 | ||
49 | #include "../codecs/ad1980.h" | 49 | #include "../codecs/ad1980.h" |
50 | #include "bf5xx-sport.h" | 50 | |
51 | #include "bf5xx-ac97-pcm.h" | 51 | #include "bf5xx-ac97-pcm.h" |
52 | #include "bf5xx-ac97.h" | 52 | #include "bf5xx-ac97.h" |
53 | 53 | ||
54 | static struct snd_soc_card bf5xx_board; | 54 | static struct snd_soc_card bf5xx_board; |
55 | 55 | ||
56 | static int bf5xx_board_startup(struct snd_pcm_substream *substream) | 56 | static struct snd_soc_dai_link bf5xx_board_dai[] = { |
57 | { | 57 | { |
58 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | 58 | .name = "AC97", |
59 | struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai; | 59 | .stream_name = "AC97 HiFi", |
60 | 60 | .cpu_dai_name = "bfin-ac97.0", | |
61 | pr_debug("%s enter\n", __func__); | 61 | .codec_dai_name = "ad1980-hifi", |
62 | cpu_dai->private_data = sport_handle; | 62 | .platform_name = "bfin-ac97-pcm-audio", |
63 | return 0; | 63 | .codec_name = "ad1980", |
64 | } | 64 | }, |
65 | 65 | { | |
66 | static struct snd_soc_ops bf5xx_board_ops = { | 66 | .name = "AC97", |
67 | .startup = bf5xx_board_startup, | 67 | .stream_name = "AC97 HiFi", |
68 | }; | 68 | .cpu_dai_name = "bfin-ac97.1", |
69 | 69 | .codec_dai_name = "ad1980-hifi", | |
70 | static struct snd_soc_dai_link bf5xx_board_dai = { | 70 | .platform_name = "bfin-ac97-pcm-audio", |
71 | .name = "AC97", | 71 | .codec_name = "ad1980", |
72 | .stream_name = "AC97 HiFi", | 72 | }, |
73 | .cpu_dai = &bfin_ac97_dai, | ||
74 | .codec_dai = &ad1980_dai, | ||
75 | .ops = &bf5xx_board_ops, | ||
76 | }; | 73 | }; |
77 | 74 | ||
78 | static struct snd_soc_card bf5xx_board = { | 75 | static struct snd_soc_card bf5xx_board = { |
79 | .name = "bf5xx-board", | 76 | .name = "bfin-ad1980", |
80 | .platform = &bf5xx_ac97_soc_platform, | 77 | .dai_link = &bf5xx_board_dai[CONFIG_SND_BF5XX_SPORT_NUM], |
81 | .dai_link = &bf5xx_board_dai, | ||
82 | .num_links = 1, | 78 | .num_links = 1, |
83 | }; | 79 | }; |
84 | 80 | ||
85 | static struct snd_soc_device bf5xx_board_snd_devdata = { | ||
86 | .card = &bf5xx_board, | ||
87 | .codec_dev = &soc_codec_dev_ad1980, | ||
88 | }; | ||
89 | |||
90 | static struct platform_device *bf5xx_board_snd_device; | 81 | static struct platform_device *bf5xx_board_snd_device; |
91 | 82 | ||
92 | static int __init bf5xx_board_init(void) | 83 | static int __init bf5xx_board_init(void) |
@@ -97,8 +88,7 @@ static int __init bf5xx_board_init(void) | |||
97 | if (!bf5xx_board_snd_device) | 88 | if (!bf5xx_board_snd_device) |
98 | return -ENOMEM; | 89 | return -ENOMEM; |
99 | 90 | ||
100 | platform_set_drvdata(bf5xx_board_snd_device, &bf5xx_board_snd_devdata); | 91 | platform_set_drvdata(bf5xx_board_snd_device, &bf5xx_board); |
101 | bf5xx_board_snd_devdata.dev = &bf5xx_board_snd_device->dev; | ||
102 | ret = platform_device_add(bf5xx_board_snd_device); | 92 | ret = platform_device_add(bf5xx_board_snd_device); |
103 | 93 | ||
104 | if (ret) | 94 | if (ret) |