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.c19
1 files changed, 7 insertions, 12 deletions
diff --git a/sound/soc/blackfin/bf5xx-ad1980.c b/sound/soc/blackfin/bf5xx-ad1980.c
index d8f591273778..a31bdf656fce 100644
--- a/sound/soc/blackfin/bf5xx-ad1980.c
+++ b/sound/soc/blackfin/bf5xx-ad1980.c
@@ -48,10 +48,10 @@ static struct snd_soc_card bf5xx_board;
48static int bf5xx_board_startup(struct snd_pcm_substream *substream) 48static int bf5xx_board_startup(struct snd_pcm_substream *substream)
49{ 49{
50 struct snd_soc_pcm_runtime *rtd = substream->private_data; 50 struct snd_soc_pcm_runtime *rtd = substream->private_data;
51 struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai; 51 struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
52 52
53 pr_debug("%s enter\n", __func__); 53 pr_debug("%s enter\n", __func__);
54 cpu_dai->private_data = sport_handle; 54 snd_soc_dai_set_drvdata(cpu_dai, sport_handle);
55 return 0; 55 return 0;
56} 56}
57 57
@@ -62,23 +62,19 @@ static struct snd_soc_ops bf5xx_board_ops = {
62static struct snd_soc_dai_link bf5xx_board_dai = { 62static struct snd_soc_dai_link bf5xx_board_dai = {
63 .name = "AC97", 63 .name = "AC97",
64 .stream_name = "AC97 HiFi", 64 .stream_name = "AC97 HiFi",
65 .cpu_dai = &bfin_ac97_dai, 65 .cpu_dai_name = "bfin-ac97",
66 .codec_dai = &ad1980_dai, 66 .codec_dai_name = "ad1980-hifi",
67 .platform_name = "bfin-pcm-audio",
68 .codec_name = "ad1980-codec",
67 .ops = &bf5xx_board_ops, 69 .ops = &bf5xx_board_ops,
68}; 70};
69 71
70static struct snd_soc_card bf5xx_board = { 72static struct snd_soc_card bf5xx_board = {
71 .name = "bf5xx-board", 73 .name = "bf5xx-board",
72 .platform = &bf5xx_ac97_soc_platform,
73 .dai_link = &bf5xx_board_dai, 74 .dai_link = &bf5xx_board_dai,
74 .num_links = 1, 75 .num_links = 1,
75}; 76};
76 77
77static struct snd_soc_device bf5xx_board_snd_devdata = {
78 .card = &bf5xx_board,
79 .codec_dev = &soc_codec_dev_ad1980,
80};
81
82static struct platform_device *bf5xx_board_snd_device; 78static struct platform_device *bf5xx_board_snd_device;
83 79
84static int __init bf5xx_board_init(void) 80static int __init bf5xx_board_init(void)
@@ -89,8 +85,7 @@ static int __init bf5xx_board_init(void)
89 if (!bf5xx_board_snd_device) 85 if (!bf5xx_board_snd_device)
90 return -ENOMEM; 86 return -ENOMEM;
91 87
92 platform_set_drvdata(bf5xx_board_snd_device, &bf5xx_board_snd_devdata); 88 platform_set_drvdata(bf5xx_board_snd_device, &bf5xx_board);
93 bf5xx_board_snd_devdata.dev = &bf5xx_board_snd_device->dev;
94 ret = platform_device_add(bf5xx_board_snd_device); 89 ret = platform_device_add(bf5xx_board_snd_device);
95 90
96 if (ret) 91 if (ret)