aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/blackfin
diff options
context:
space:
mode:
authorBarry Song <21cnbao@gmail.com>2010-03-18 23:18:40 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2010-03-19 08:47:34 -0400
commit698c3756660f7afd6fa5051f667a259a953eea77 (patch)
treeda7ef22a89952e7cc39ce14b6934032572decb30 /sound/soc/blackfin
parentcffce322be94ecdd3bbb74dfd3f3834c51b4232a (diff)
ASoC: change bf5xx-ad1938 machine driver to bf5xx-ad193x machine driver
Signed-off-by: Barry Song <21cnbao@gmail.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/blackfin')
-rw-r--r--sound/soc/blackfin/Kconfig9
-rw-r--r--sound/soc/blackfin/Makefile4
-rw-r--r--sound/soc/blackfin/bf5xx-ad193x.c (renamed from sound/soc/blackfin/bf5xx-ad1938.c)66
3 files changed, 40 insertions, 39 deletions
diff --git a/sound/soc/blackfin/Kconfig b/sound/soc/blackfin/Kconfig
index 97f1a251e446..8ef25025f3dc 100644
--- a/sound/soc/blackfin/Kconfig
+++ b/sound/soc/blackfin/Kconfig
@@ -49,13 +49,14 @@ config SND_BF5XX_SOC_AD1836
49 help 49 help
50 Say Y if you want to add support for SoC audio on BF5xx STAMP/EZKIT. 50 Say Y if you want to add support for SoC audio on BF5xx STAMP/EZKIT.
51 51
52config SND_BF5XX_SOC_AD1938 52config SND_BF5XX_SOC_AD193X
53 tristate "SoC AD1938 Audio support for Blackfin" 53 tristate "SoC AD193X Audio support for Blackfin"
54 depends on SND_BF5XX_TDM 54 depends on SND_BF5XX_TDM
55 select SND_BF5XX_SOC_TDM 55 select SND_BF5XX_SOC_TDM
56 select SND_SOC_AD1938 56 select SND_SOC_AD193X
57 help 57 help
58 Say Y if you want to add support for AD1938 codec on Blackfin. 58 Say Y if you want to add support for AD193X codec on Blackfin.
59 This driver supports AD1936, AD1937, AD1938 and AD1939.
59 60
60config SND_BF5XX_AC97 61config SND_BF5XX_AC97
61 tristate "SoC AC97 Audio for the ADI BF5xx chip" 62 tristate "SoC AC97 Audio for the ADI BF5xx chip"
diff --git a/sound/soc/blackfin/Makefile b/sound/soc/blackfin/Makefile
index 87e30423912f..49af3f32aec8 100644
--- a/sound/soc/blackfin/Makefile
+++ b/sound/soc/blackfin/Makefile
@@ -20,10 +20,10 @@ snd-ad1836-objs := bf5xx-ad1836.o
20snd-ad1980-objs := bf5xx-ad1980.o 20snd-ad1980-objs := bf5xx-ad1980.o
21snd-ssm2602-objs := bf5xx-ssm2602.o 21snd-ssm2602-objs := bf5xx-ssm2602.o
22snd-ad73311-objs := bf5xx-ad73311.o 22snd-ad73311-objs := bf5xx-ad73311.o
23snd-ad1938-objs := bf5xx-ad1938.o 23snd-ad193x-objs := bf5xx-ad193x.o
24 24
25obj-$(CONFIG_SND_BF5XX_SOC_AD1836) += snd-ad1836.o 25obj-$(CONFIG_SND_BF5XX_SOC_AD1836) += snd-ad1836.o
26obj-$(CONFIG_SND_BF5XX_SOC_AD1980) += snd-ad1980.o 26obj-$(CONFIG_SND_BF5XX_SOC_AD1980) += snd-ad1980.o
27obj-$(CONFIG_SND_BF5XX_SOC_SSM2602) += snd-ssm2602.o 27obj-$(CONFIG_SND_BF5XX_SOC_SSM2602) += snd-ssm2602.o
28obj-$(CONFIG_SND_BF5XX_SOC_AD73311) += snd-ad73311.o 28obj-$(CONFIG_SND_BF5XX_SOC_AD73311) += snd-ad73311.o
29obj-$(CONFIG_SND_BF5XX_SOC_AD1938) += snd-ad1938.o 29obj-$(CONFIG_SND_BF5XX_SOC_AD193X) += snd-ad193x.o
diff --git a/sound/soc/blackfin/bf5xx-ad1938.c b/sound/soc/blackfin/bf5xx-ad193x.c
index 2ef1e5013b8c..b8c9060cfd8e 100644
--- a/sound/soc/blackfin/bf5xx-ad1938.c
+++ b/sound/soc/blackfin/bf5xx-ad193x.c
@@ -1,9 +1,9 @@
1/* 1/*
2 * File: sound/soc/blackfin/bf5xx-ad1938.c 2 * File: sound/soc/blackfin/bf5xx-ad193x.c
3 * Author: Barry Song <Barry.Song@analog.com> 3 * Author: Barry Song <Barry.Song@analog.com>
4 * 4 *
5 * Created: Thur June 4 2009 5 * Created: Thur June 4 2009
6 * Description: Board driver for ad1938 sound chip 6 * Description: Board driver for ad193x sound chip
7 * 7 *
8 * Bugs: Enter bugs at http://blackfin.uclinux.org/ 8 * Bugs: Enter bugs at http://blackfin.uclinux.org/
9 * 9 *
@@ -38,15 +38,15 @@
38#include <asm/dma.h> 38#include <asm/dma.h>
39#include <asm/portmux.h> 39#include <asm/portmux.h>
40 40
41#include "../codecs/ad1938.h" 41#include "../codecs/ad193x.h"
42#include "bf5xx-sport.h" 42#include "bf5xx-sport.h"
43 43
44#include "bf5xx-tdm-pcm.h" 44#include "bf5xx-tdm-pcm.h"
45#include "bf5xx-tdm.h" 45#include "bf5xx-tdm.h"
46 46
47static struct snd_soc_card bf5xx_ad1938; 47static struct snd_soc_card bf5xx_ad193x;
48 48
49static int bf5xx_ad1938_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->dai->cpu_dai;
@@ -55,7 +55,7 @@ static int bf5xx_ad1938_startup(struct snd_pcm_substream *substream)
55 return 0; 55 return 0;
56} 56}
57 57
58static int bf5xx_ad1938_hw_params(struct snd_pcm_substream *substream, 58static 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;
@@ -89,61 +89,61 @@ static int bf5xx_ad1938_hw_params(struct snd_pcm_substream *substream,
89 return 0; 89 return 0;
90} 90}
91 91
92static struct snd_soc_ops bf5xx_ad1938_ops = { 92static struct snd_soc_ops bf5xx_ad193x_ops = {
93 .startup = bf5xx_ad1938_startup, 93 .startup = bf5xx_ad193x_startup,
94 .hw_params = bf5xx_ad1938_hw_params, 94 .hw_params = bf5xx_ad193x_hw_params,
95}; 95};
96 96
97static struct snd_soc_dai_link bf5xx_ad1938_dai = { 97static struct snd_soc_dai_link bf5xx_ad193x_dai = {
98 .name = "ad1938", 98 .name = "ad193x",
99 .stream_name = "AD1938", 99 .stream_name = "AD193X",
100 .cpu_dai = &bf5xx_tdm_dai, 100 .cpu_dai = &bf5xx_tdm_dai,
101 .codec_dai = &ad1938_dai, 101 .codec_dai = &ad193x_dai,
102 .ops = &bf5xx_ad1938_ops, 102 .ops = &bf5xx_ad193x_ops,
103}; 103};
104 104
105static struct snd_soc_card bf5xx_ad1938 = { 105static struct snd_soc_card bf5xx_ad193x = {
106 .name = "bf5xx_ad1938", 106 .name = "bf5xx_ad193x",
107 .platform = &bf5xx_tdm_soc_platform, 107 .platform = &bf5xx_tdm_soc_platform,
108 .dai_link = &bf5xx_ad1938_dai, 108 .dai_link = &bf5xx_ad193x_dai,
109 .num_links = 1, 109 .num_links = 1,
110}; 110};
111 111
112static struct snd_soc_device bf5xx_ad1938_snd_devdata = { 112static struct snd_soc_device bf5xx_ad193x_snd_devdata = {
113 .card = &bf5xx_ad1938, 113 .card = &bf5xx_ad193x,
114 .codec_dev = &soc_codec_dev_ad1938, 114 .codec_dev = &soc_codec_dev_ad193x,
115}; 115};
116 116
117static struct platform_device *bfxx_ad1938_snd_device; 117static struct platform_device *bfxx_ad193x_snd_device;
118 118
119static int __init bf5xx_ad1938_init(void) 119static int __init bf5xx_ad193x_init(void)
120{ 120{
121 int ret; 121 int ret;
122 122
123 bfxx_ad1938_snd_device = platform_device_alloc("soc-audio", -1); 123 bfxx_ad193x_snd_device = platform_device_alloc("soc-audio", -1);
124 if (!bfxx_ad1938_snd_device) 124 if (!bfxx_ad193x_snd_device)
125 return -ENOMEM; 125 return -ENOMEM;
126 126
127 platform_set_drvdata(bfxx_ad1938_snd_device, &bf5xx_ad1938_snd_devdata); 127 platform_set_drvdata(bfxx_ad193x_snd_device, &bf5xx_ad193x_snd_devdata);
128 bf5xx_ad1938_snd_devdata.dev = &bfxx_ad1938_snd_device->dev; 128 bf5xx_ad193x_snd_devdata.dev = &bfxx_ad193x_snd_device->dev;
129 ret = platform_device_add(bfxx_ad1938_snd_device); 129 ret = platform_device_add(bfxx_ad193x_snd_device);
130 130
131 if (ret) 131 if (ret)
132 platform_device_put(bfxx_ad1938_snd_device); 132 platform_device_put(bfxx_ad193x_snd_device);
133 133
134 return ret; 134 return ret;
135} 135}
136 136
137static void __exit bf5xx_ad1938_exit(void) 137static void __exit bf5xx_ad193x_exit(void)
138{ 138{
139 platform_device_unregister(bfxx_ad1938_snd_device); 139 platform_device_unregister(bfxx_ad193x_snd_device);
140} 140}
141 141
142module_init(bf5xx_ad1938_init); 142module_init(bf5xx_ad193x_init);
143module_exit(bf5xx_ad1938_exit); 143module_exit(bf5xx_ad193x_exit);
144 144
145/* Module information */ 145/* Module information */
146MODULE_AUTHOR("Barry Song"); 146MODULE_AUTHOR("Barry Song");
147MODULE_DESCRIPTION("ALSA SoC AD1938 board driver"); 147MODULE_DESCRIPTION("ALSA SoC AD193X board driver");
148MODULE_LICENSE("GPL"); 148MODULE_LICENSE("GPL");
149 149