aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/blackfin/bf5xx-ad193x.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/blackfin/bf5xx-ad193x.c')
-rw-r--r--sound/soc/blackfin/bf5xx-ad193x.c23
1 files changed, 9 insertions, 14 deletions
diff --git a/sound/soc/blackfin/bf5xx-ad193x.c b/sound/soc/blackfin/bf5xx-ad193x.c
index b8c9060cfd8e..e4a625317a1a 100644
--- a/sound/soc/blackfin/bf5xx-ad193x.c
+++ b/sound/soc/blackfin/bf5xx-ad193x.c
@@ -49,9 +49,9 @@ static struct snd_soc_card bf5xx_ad193x;
49static int bf5xx_ad193x_startup(struct snd_pcm_substream *substream) 49static int bf5xx_ad193x_startup(struct snd_pcm_substream *substream)
50{ 50{
51 struct snd_soc_pcm_runtime *rtd = substream->private_data; 51 struct snd_soc_pcm_runtime *rtd = substream->private_data;
52 struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai; 52 struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
53 53
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
@@ -59,8 +59,8 @@ static int bf5xx_ad193x_hw_params(struct snd_pcm_substream *substream,
59 struct snd_pcm_hw_params *params) 59 struct snd_pcm_hw_params *params)
60{ 60{
61 struct snd_soc_pcm_runtime *rtd = substream->private_data; 61 struct snd_soc_pcm_runtime *rtd = substream->private_data;
62 struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai; 62 struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
63 struct snd_soc_dai *codec_dai = rtd->dai->codec_dai; 63 struct snd_soc_dai *codec_dai = rtd->codec_dai;
64 unsigned int channel_map[] = {0, 1, 2, 3, 4, 5, 6, 7}; 64 unsigned int channel_map[] = {0, 1, 2, 3, 4, 5, 6, 7};
65 int ret = 0; 65 int ret = 0;
66 /* set cpu DAI configuration */ 66 /* set cpu DAI configuration */
@@ -97,23 +97,19 @@ static struct snd_soc_ops bf5xx_ad193x_ops = {
97static struct snd_soc_dai_link bf5xx_ad193x_dai = { 97static struct snd_soc_dai_link bf5xx_ad193x_dai = {
98 .name = "ad193x", 98 .name = "ad193x",
99 .stream_name = "AD193X", 99 .stream_name = "AD193X",
100 .cpu_dai = &bf5xx_tdm_dai, 100 .cpu_dai_name = "bf5xx-tdm",
101 .codec_dai = &ad193x_dai, 101 .codec_dai_name ="ad193x-hifi",
102 .platform_name = "bf5xx-tdm-pcm-audio",
103 .codec_name = "ad193x-codec.5",
102 .ops = &bf5xx_ad193x_ops, 104 .ops = &bf5xx_ad193x_ops,
103}; 105};
104 106
105static struct snd_soc_card bf5xx_ad193x = { 107static struct snd_soc_card bf5xx_ad193x = {
106 .name = "bf5xx_ad193x", 108 .name = "bf5xx_ad193x",
107 .platform = &bf5xx_tdm_soc_platform,
108 .dai_link = &bf5xx_ad193x_dai, 109 .dai_link = &bf5xx_ad193x_dai,
109 .num_links = 1, 110 .num_links = 1,
110}; 111};
111 112
112static struct snd_soc_device bf5xx_ad193x_snd_devdata = {
113 .card = &bf5xx_ad193x,
114 .codec_dev = &soc_codec_dev_ad193x,
115};
116
117static struct platform_device *bfxx_ad193x_snd_device; 113static struct platform_device *bfxx_ad193x_snd_device;
118 114
119static int __init bf5xx_ad193x_init(void) 115static int __init bf5xx_ad193x_init(void)
@@ -124,8 +120,7 @@ static int __init bf5xx_ad193x_init(void)
124 if (!bfxx_ad193x_snd_device) 120 if (!bfxx_ad193x_snd_device)
125 return -ENOMEM; 121 return -ENOMEM;
126 122
127 platform_set_drvdata(bfxx_ad193x_snd_device, &bf5xx_ad193x_snd_devdata); 123 platform_set_drvdata(bfxx_ad193x_snd_device, &bf5xx_ad193x);
128 bf5xx_ad193x_snd_devdata.dev = &bfxx_ad193x_snd_device->dev;
129 ret = platform_device_add(bfxx_ad193x_snd_device); 124 ret = platform_device_add(bfxx_ad193x_snd_device);
130 125
131 if (ret) 126 if (ret)