aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/blackfin/bf5xx-ad1980.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/blackfin/bf5xx-ad1980.c')
-rw-r--r--sound/soc/blackfin/bf5xx-ad1980.c52
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
54static struct snd_soc_card bf5xx_board; 54static struct snd_soc_card bf5xx_board;
55 55
56static int bf5xx_board_startup(struct snd_pcm_substream *substream) 56static 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 {
66static 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",
70static 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
78static struct snd_soc_card bf5xx_board = { 75static 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
85static struct snd_soc_device bf5xx_board_snd_devdata = {
86 .card = &bf5xx_board,
87 .codec_dev = &soc_codec_dev_ad1980,
88};
89
90static struct platform_device *bf5xx_board_snd_device; 81static struct platform_device *bf5xx_board_snd_device;
91 82
92static int __init bf5xx_board_init(void) 83static 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)