]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - sound/soc/kirkwood/kirkwood-openrd.c
Merge branch 'master' into tk71
[mv-sheeva.git] / sound / soc / kirkwood / kirkwood-openrd.c
index 0353d06bc41ac38c94ea67ae10f6afe307485b4d..d863afb3ee521098b36a1a7b4a50293a52903082 100644 (file)
@@ -2,6 +2,7 @@
  * kirkwood-openrd.c
  *
  * (c) 2010 Arnaud Patard <apatard@mandriva.com>
+ * (c) 2010 Arnaud Patard <arnaud.patard@rtp-net.org>
  *
  *  This program is free software; you can redistribute  it and/or modify it
  *  under  the terms of  the GNU General  Public License as published by the
 #include <mach/kirkwood.h>
 #include <plat/audio.h>
 #include <asm/mach-types.h>
-#include "kirkwood-i2s.h"
-#include "kirkwood-dma.h"
 #include "../codecs/cs42l51.h"
 
 static int openrd_client_hw_params(struct snd_pcm_substream *substream,
                struct snd_pcm_hw_params *params)
 {
        struct snd_soc_pcm_runtime *rtd = substream->private_data;
-       struct snd_soc_dai *codec_dai = rtd->dai->codec_dai;
-       struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai;
+       struct snd_soc_dai *codec_dai = rtd->codec_dai;
+       struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
        int ret;
        unsigned int freq, fmt;
 
@@ -66,8 +65,10 @@ static struct snd_soc_dai_link openrd_client_dai[] = {
 {
        .name = "CS42L51",
        .stream_name = "CS42L51 HiFi",
-       .cpu_dai = &kirkwood_i2s_dai,
-       .codec_dai = &cs42l51_dai,
+       .cpu_dai_name = "kirkwood-i2s",
+       .platform_name = "kirkwood-pcm-audio",
+       .codec_dai_name = "cs42l51-hifi",
+       .codec_name = "cs42l51-codec.0-004a",
        .ops = &openrd_client_ops,
 },
 };
@@ -75,23 +76,17 @@ static struct snd_soc_dai_link openrd_client_dai[] = {
 
 static struct snd_soc_card openrd_client = {
        .name = "OpenRD Client",
-       .platform = &kirkwood_soc_platform,
        .dai_link = openrd_client_dai,
        .num_links = ARRAY_SIZE(openrd_client_dai),
 };
 
-static struct snd_soc_device openrd_client_snd_devdata = {
-       .card = &openrd_client,
-       .codec_dev = &soc_codec_device_cs42l51,
-};
-
 static struct platform_device *openrd_client_snd_device;
 
 static int __init openrd_client_init(void)
 {
        int ret;
 
-       if (!machine_is_openrd_client())
+       if (!machine_is_openrd_client() && !machine_is_openrd_ultimate())
                return 0;
 
        openrd_client_snd_device = platform_device_alloc("soc-audio", -1);
@@ -99,8 +94,7 @@ static int __init openrd_client_init(void)
                return -ENOMEM;
 
        platform_set_drvdata(openrd_client_snd_device,
-                       &openrd_client_snd_devdata);
-       openrd_client_snd_devdata.dev = &openrd_client_snd_device->dev;
+                       &openrd_client);
 
        ret = platform_device_add(openrd_client_snd_device);
        if (ret) {
@@ -120,7 +114,7 @@ module_init(openrd_client_init);
 module_exit(openrd_client_exit);
 
 /* Module information */
-MODULE_AUTHOR("Arnaud Patard <apatard@mandriva.com>");
+MODULE_AUTHOR("Arnaud Patard <arnaud.patard@rtp-net.org>");
 MODULE_DESCRIPTION("ALSA SoC OpenRD Client");
 MODULE_LICENSE("GPL");
 MODULE_ALIAS("platform:soc-audio");