diff options
Diffstat (limited to 'sound/soc/pxa/imote2.c')
-rw-r--r-- | sound/soc/pxa/imote2.c | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/sound/soc/pxa/imote2.c b/sound/soc/pxa/imote2.c index 405587a01160..03765fc5ac74 100644 --- a/sound/soc/pxa/imote2.c +++ b/sound/soc/pxa/imote2.c | |||
@@ -6,14 +6,13 @@ | |||
6 | 6 | ||
7 | #include "../codecs/wm8940.h" | 7 | #include "../codecs/wm8940.h" |
8 | #include "pxa2xx-i2s.h" | 8 | #include "pxa2xx-i2s.h" |
9 | #include "pxa2xx-pcm.h" | ||
10 | 9 | ||
11 | static int imote2_asoc_hw_params(struct snd_pcm_substream *substream, | 10 | static int imote2_asoc_hw_params(struct snd_pcm_substream *substream, |
12 | struct snd_pcm_hw_params *params) | 11 | struct snd_pcm_hw_params *params) |
13 | { | 12 | { |
14 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | 13 | struct snd_soc_pcm_runtime *rtd = substream->private_data; |
15 | struct snd_soc_dai *codec_dai = rtd->dai->codec_dai; | 14 | struct snd_soc_dai *codec_dai = rtd->codec_dai; |
16 | struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai; | 15 | struct snd_soc_dai *cpu_dai = rtd->cpu_dai; |
17 | unsigned int clk = 0; | 16 | unsigned int clk = 0; |
18 | int ret; | 17 | int ret; |
19 | 18 | ||
@@ -64,23 +63,19 @@ static struct snd_soc_ops imote2_asoc_ops = { | |||
64 | static struct snd_soc_dai_link imote2_dai = { | 63 | static struct snd_soc_dai_link imote2_dai = { |
65 | .name = "WM8940", | 64 | .name = "WM8940", |
66 | .stream_name = "WM8940", | 65 | .stream_name = "WM8940", |
67 | .cpu_dai = &pxa_i2s_dai, | 66 | .cpu_dai_name = "pxa-i2s", |
68 | .codec_dai = &wm8940_dai, | 67 | .codec_dai_name = "wm8940-hifi", |
68 | .platform_name = "pxa-pcm-audio", | ||
69 | .codec_name = "wm8940-codec.0-0034", | ||
69 | .ops = &imote2_asoc_ops, | 70 | .ops = &imote2_asoc_ops, |
70 | }; | 71 | }; |
71 | 72 | ||
72 | static struct snd_soc_card snd_soc_imote2 = { | 73 | static struct snd_soc_card snd_soc_imote2 = { |
73 | .name = "Imote2", | 74 | .name = "Imote2", |
74 | .platform = &pxa2xx_soc_platform, | ||
75 | .dai_link = &imote2_dai, | 75 | .dai_link = &imote2_dai, |
76 | .num_links = 1, | 76 | .num_links = 1, |
77 | }; | 77 | }; |
78 | 78 | ||
79 | static struct snd_soc_device imote2_snd_devdata = { | ||
80 | .card = &snd_soc_imote2, | ||
81 | .codec_dev = &soc_codec_dev_wm8940, | ||
82 | }; | ||
83 | |||
84 | static struct platform_device *imote2_snd_device; | 79 | static struct platform_device *imote2_snd_device; |
85 | 80 | ||
86 | static int __init imote2_asoc_init(void) | 81 | static int __init imote2_asoc_init(void) |
@@ -93,8 +88,7 @@ static int __init imote2_asoc_init(void) | |||
93 | if (!imote2_snd_device) | 88 | if (!imote2_snd_device) |
94 | return -ENOMEM; | 89 | return -ENOMEM; |
95 | 90 | ||
96 | platform_set_drvdata(imote2_snd_device, &imote2_snd_devdata); | 91 | platform_set_drvdata(imote2_snd_device, &snd_soc_imote2); |
97 | imote2_snd_devdata.dev = &imote2_snd_device->dev; | ||
98 | ret = platform_device_add(imote2_snd_device); | 92 | ret = platform_device_add(imote2_snd_device); |
99 | if (ret) | 93 | if (ret) |
100 | platform_device_put(imote2_snd_device); | 94 | platform_device_put(imote2_snd_device); |