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.c24
1 files changed, 9 insertions, 15 deletions
diff --git a/sound/soc/kirkwood/kirkwood-openrd.c b/sound/soc/kirkwood/kirkwood-openrd.c
index 0353d06bc41a..9d7c81e921f1 100644
--- a/sound/soc/kirkwood/kirkwood-openrd.c
+++ b/sound/soc/kirkwood/kirkwood-openrd.c
@@ -2,6 +2,7 @@
2 * kirkwood-openrd.c 2 * kirkwood-openrd.c
3 * 3 *
4 * (c) 2010 Arnaud Patard <apatard@mandriva.com> 4 * (c) 2010 Arnaud Patard <apatard@mandriva.com>
5 * (c) 2010 Arnaud Patard <arnaud.patard@rtp-net.org>
5 * 6 *
6 * This program is free software; you can redistribute it and/or modify it 7 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the 8 * under the terms of the GNU General Public License as published by the
@@ -18,16 +19,14 @@
18#include <mach/kirkwood.h> 19#include <mach/kirkwood.h>
19#include <plat/audio.h> 20#include <plat/audio.h>
20#include <asm/mach-types.h> 21#include <asm/mach-types.h>
21#include "kirkwood-i2s.h"
22#include "kirkwood-dma.h"
23#include "../codecs/cs42l51.h" 22#include "../codecs/cs42l51.h"
24 23
25static int openrd_client_hw_params(struct snd_pcm_substream *substream, 24static int openrd_client_hw_params(struct snd_pcm_substream *substream,
26 struct snd_pcm_hw_params *params) 25 struct snd_pcm_hw_params *params)
27{ 26{
28 struct snd_soc_pcm_runtime *rtd = substream->private_data; 27 struct snd_soc_pcm_runtime *rtd = substream->private_data;
29 struct snd_soc_dai *codec_dai = rtd->dai->codec_dai; 28 struct snd_soc_dai *codec_dai = rtd->codec_dai;
30 struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai; 29 struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
31 int ret; 30 int ret;
32 unsigned int freq, fmt; 31 unsigned int freq, fmt;
33 32
@@ -66,8 +65,10 @@ static struct snd_soc_dai_link openrd_client_dai[] = {
66{ 65{
67 .name = "CS42L51", 66 .name = "CS42L51",
68 .stream_name = "CS42L51 HiFi", 67 .stream_name = "CS42L51 HiFi",
69 .cpu_dai = &kirkwood_i2s_dai, 68 .cpu_dai_name = "kirkwood-i2s",
70 .codec_dai = &cs42l51_dai, 69 .platform_name = "kirkwood-pcm-audio",
70 .codec_dai_name = "cs42l51-hifi",
71 .codec_name = "cs42l51-codec.0-004a",
71 .ops = &openrd_client_ops, 72 .ops = &openrd_client_ops,
72}, 73},
73}; 74};
@@ -75,16 +76,10 @@ static struct snd_soc_dai_link openrd_client_dai[] = {
75 76
76static struct snd_soc_card openrd_client = { 77static struct snd_soc_card openrd_client = {
77 .name = "OpenRD Client", 78 .name = "OpenRD Client",
78 .platform = &kirkwood_soc_platform,
79 .dai_link = openrd_client_dai, 79 .dai_link = openrd_client_dai,
80 .num_links = ARRAY_SIZE(openrd_client_dai), 80 .num_links = ARRAY_SIZE(openrd_client_dai),
81}; 81};
82 82
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; 83static struct platform_device *openrd_client_snd_device;
89 84
90static int __init openrd_client_init(void) 85static int __init openrd_client_init(void)
@@ -99,8 +94,7 @@ static int __init openrd_client_init(void)
99 return -ENOMEM; 94 return -ENOMEM;
100 95
101 platform_set_drvdata(openrd_client_snd_device, 96 platform_set_drvdata(openrd_client_snd_device,
102 &openrd_client_snd_devdata); 97 &openrd_client);
103 openrd_client_snd_devdata.dev = &openrd_client_snd_device->dev;
104 98
105 ret = platform_device_add(openrd_client_snd_device); 99 ret = platform_device_add(openrd_client_snd_device);
106 if (ret) { 100 if (ret) {
@@ -120,7 +114,7 @@ module_init(openrd_client_init);
120module_exit(openrd_client_exit); 114module_exit(openrd_client_exit);
121 115
122/* Module information */ 116/* Module information */
123MODULE_AUTHOR("Arnaud Patard <apatard@mandriva.com>"); 117MODULE_AUTHOR("Arnaud Patard <arnaud.patard@rtp-net.org>");
124MODULE_DESCRIPTION("ALSA SoC OpenRD Client"); 118MODULE_DESCRIPTION("ALSA SoC OpenRD Client");
125MODULE_LICENSE("GPL"); 119MODULE_LICENSE("GPL");
126MODULE_ALIAS("platform:soc-audio"); 120MODULE_ALIAS("platform:soc-audio");