aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/kirkwood/kirkwood-openrd.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/kirkwood/kirkwood-openrd.c')
-rw-r--r--sound/soc/kirkwood/kirkwood-openrd.c21
1 files changed, 7 insertions, 14 deletions
diff --git a/sound/soc/kirkwood/kirkwood-openrd.c b/sound/soc/kirkwood/kirkwood-openrd.c
index 0353d06bc41a..cc1a1e277edf 100644
--- a/sound/soc/kirkwood/kirkwood-openrd.c
+++ b/sound/soc/kirkwood/kirkwood-openrd.c
@@ -18,16 +18,14 @@
18#include <mach/kirkwood.h> 18#include <mach/kirkwood.h>
19#include <plat/audio.h> 19#include <plat/audio.h>
20#include <asm/mach-types.h> 20#include <asm/mach-types.h>
21#include "kirkwood-i2s.h"
22#include "kirkwood-dma.h"
23#include "../codecs/cs42l51.h" 21#include "../codecs/cs42l51.h"
24 22
25static int openrd_client_hw_params(struct snd_pcm_substream *substream, 23static int openrd_client_hw_params(struct snd_pcm_substream *substream,
26 struct snd_pcm_hw_params *params) 24 struct snd_pcm_hw_params *params)
27{ 25{
28 struct snd_soc_pcm_runtime *rtd = substream->private_data; 26 struct snd_soc_pcm_runtime *rtd = substream->private_data;
29 struct snd_soc_dai *codec_dai = rtd->dai->codec_dai; 27 struct snd_soc_dai *codec_dai = rtd->codec_dai;
30 struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai; 28 struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
31 int ret; 29 int ret;
32 unsigned int freq, fmt; 30 unsigned int freq, fmt;
33 31
@@ -66,8 +64,10 @@ static struct snd_soc_dai_link openrd_client_dai[] = {
66{ 64{
67 .name = "CS42L51", 65 .name = "CS42L51",
68 .stream_name = "CS42L51 HiFi", 66 .stream_name = "CS42L51 HiFi",
69 .cpu_dai = &kirkwood_i2s_dai, 67 .cpu_dai_name = "kirkwood-i2s",
70 .codec_dai = &cs42l51_dai, 68 .platform_name = "kirkwood-pcm-audio",
69 .codec_dai_name = "cs42l51_hifi",
70 .codec_name = "cs42l51-codec.0-004a",
71 .ops = &openrd_client_ops, 71 .ops = &openrd_client_ops,
72}, 72},
73}; 73};
@@ -75,16 +75,10 @@ static struct snd_soc_dai_link openrd_client_dai[] = {
75 75
76static struct snd_soc_card openrd_client = { 76static struct snd_soc_card openrd_client = {
77 .name = "OpenRD Client", 77 .name = "OpenRD Client",
78 .platform = &kirkwood_soc_platform,
79 .dai_link = openrd_client_dai, 78 .dai_link = openrd_client_dai,
80 .num_links = ARRAY_SIZE(openrd_client_dai), 79 .num_links = ARRAY_SIZE(openrd_client_dai),
81}; 80};
82 81
83static struct snd_soc_device openrd_client_snd_devdata = {
84 .card = &openrd_client,
85 .codec_dev = &soc_codec_device_cs42l51,
86};
87
88static struct platform_device *openrd_client_snd_device; 82static struct platform_device *openrd_client_snd_device;
89 83
90static int __init openrd_client_init(void) 84static int __init openrd_client_init(void)
@@ -99,8 +93,7 @@ static int __init openrd_client_init(void)
99 return -ENOMEM; 93 return -ENOMEM;
100 94
101 platform_set_drvdata(openrd_client_snd_device, 95 platform_set_drvdata(openrd_client_snd_device,
102 &openrd_client_snd_devdata); 96 &openrd_client);
103 openrd_client_snd_devdata.dev = &openrd_client_snd_device->dev;
104 97
105 ret = platform_device_add(openrd_client_snd_device); 98 ret = platform_device_add(openrd_client_snd_device);
106 if (ret) { 99 if (ret) {