Commit 698c3756 authored by Barry Song's avatar Barry Song Committed by Mark Brown

ASoC: change bf5xx-ad1938 machine driver to bf5xx-ad193x machine driver

Signed-off-by: default avatarBarry Song <21cnbao@gmail.com>
Acked-by: default avatarLiam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent cffce322
...@@ -49,13 +49,14 @@ config SND_BF5XX_SOC_AD1836 ...@@ -49,13 +49,14 @@ config SND_BF5XX_SOC_AD1836
help help
Say Y if you want to add support for SoC audio on BF5xx STAMP/EZKIT. Say Y if you want to add support for SoC audio on BF5xx STAMP/EZKIT.
config SND_BF5XX_SOC_AD1938 config SND_BF5XX_SOC_AD193X
tristate "SoC AD1938 Audio support for Blackfin" tristate "SoC AD193X Audio support for Blackfin"
depends on SND_BF5XX_TDM depends on SND_BF5XX_TDM
select SND_BF5XX_SOC_TDM select SND_BF5XX_SOC_TDM
select SND_SOC_AD1938 select SND_SOC_AD193X
help help
Say Y if you want to add support for AD1938 codec on Blackfin. Say Y if you want to add support for AD193X codec on Blackfin.
This driver supports AD1936, AD1937, AD1938 and AD1939.
config SND_BF5XX_AC97 config SND_BF5XX_AC97
tristate "SoC AC97 Audio for the ADI BF5xx chip" tristate "SoC AC97 Audio for the ADI BF5xx chip"
......
...@@ -20,10 +20,10 @@ snd-ad1836-objs := bf5xx-ad1836.o ...@@ -20,10 +20,10 @@ snd-ad1836-objs := bf5xx-ad1836.o
snd-ad1980-objs := bf5xx-ad1980.o snd-ad1980-objs := bf5xx-ad1980.o
snd-ssm2602-objs := bf5xx-ssm2602.o snd-ssm2602-objs := bf5xx-ssm2602.o
snd-ad73311-objs := bf5xx-ad73311.o snd-ad73311-objs := bf5xx-ad73311.o
snd-ad1938-objs := bf5xx-ad1938.o snd-ad193x-objs := bf5xx-ad193x.o
obj-$(CONFIG_SND_BF5XX_SOC_AD1836) += snd-ad1836.o obj-$(CONFIG_SND_BF5XX_SOC_AD1836) += snd-ad1836.o
obj-$(CONFIG_SND_BF5XX_SOC_AD1980) += snd-ad1980.o obj-$(CONFIG_SND_BF5XX_SOC_AD1980) += snd-ad1980.o
obj-$(CONFIG_SND_BF5XX_SOC_SSM2602) += snd-ssm2602.o obj-$(CONFIG_SND_BF5XX_SOC_SSM2602) += snd-ssm2602.o
obj-$(CONFIG_SND_BF5XX_SOC_AD73311) += snd-ad73311.o obj-$(CONFIG_SND_BF5XX_SOC_AD73311) += snd-ad73311.o
obj-$(CONFIG_SND_BF5XX_SOC_AD1938) += snd-ad1938.o obj-$(CONFIG_SND_BF5XX_SOC_AD193X) += snd-ad193x.o
/* /*
* File: sound/soc/blackfin/bf5xx-ad1938.c * File: sound/soc/blackfin/bf5xx-ad193x.c
* Author: Barry Song <Barry.Song@analog.com> * Author: Barry Song <Barry.Song@analog.com>
* *
* Created: Thur June 4 2009 * Created: Thur June 4 2009
* Description: Board driver for ad1938 sound chip * Description: Board driver for ad193x sound chip
* *
* Bugs: Enter bugs at http://blackfin.uclinux.org/ * Bugs: Enter bugs at http://blackfin.uclinux.org/
* *
...@@ -38,15 +38,15 @@ ...@@ -38,15 +38,15 @@
#include <asm/dma.h> #include <asm/dma.h>
#include <asm/portmux.h> #include <asm/portmux.h>
#include "../codecs/ad1938.h" #include "../codecs/ad193x.h"
#include "bf5xx-sport.h" #include "bf5xx-sport.h"
#include "bf5xx-tdm-pcm.h" #include "bf5xx-tdm-pcm.h"
#include "bf5xx-tdm.h" #include "bf5xx-tdm.h"
static struct snd_soc_card bf5xx_ad1938; static struct snd_soc_card bf5xx_ad193x;
static int bf5xx_ad1938_startup(struct snd_pcm_substream *substream) static int bf5xx_ad193x_startup(struct snd_pcm_substream *substream)
{ {
struct snd_soc_pcm_runtime *rtd = substream->private_data; struct snd_soc_pcm_runtime *rtd = substream->private_data;
struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai; 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,7 +55,7 @@ static int bf5xx_ad1938_startup(struct snd_pcm_substream *substream)
return 0; return 0;
} }
static int bf5xx_ad1938_hw_params(struct snd_pcm_substream *substream, static int bf5xx_ad193x_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params) struct snd_pcm_hw_params *params)
{ {
struct snd_soc_pcm_runtime *rtd = substream->private_data; 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,61 +89,61 @@ static int bf5xx_ad1938_hw_params(struct snd_pcm_substream *substream,
return 0; return 0;
} }
static struct snd_soc_ops bf5xx_ad1938_ops = { static struct snd_soc_ops bf5xx_ad193x_ops = {
.startup = bf5xx_ad1938_startup, .startup = bf5xx_ad193x_startup,
.hw_params = bf5xx_ad1938_hw_params, .hw_params = bf5xx_ad193x_hw_params,
}; };
static struct snd_soc_dai_link bf5xx_ad1938_dai = { static struct snd_soc_dai_link bf5xx_ad193x_dai = {
.name = "ad1938", .name = "ad193x",
.stream_name = "AD1938", .stream_name = "AD193X",
.cpu_dai = &bf5xx_tdm_dai, .cpu_dai = &bf5xx_tdm_dai,
.codec_dai = &ad1938_dai, .codec_dai = &ad193x_dai,
.ops = &bf5xx_ad1938_ops, .ops = &bf5xx_ad193x_ops,
}; };
static struct snd_soc_card bf5xx_ad1938 = { static struct snd_soc_card bf5xx_ad193x = {
.name = "bf5xx_ad1938", .name = "bf5xx_ad193x",
.platform = &bf5xx_tdm_soc_platform, .platform = &bf5xx_tdm_soc_platform,
.dai_link = &bf5xx_ad1938_dai, .dai_link = &bf5xx_ad193x_dai,
.num_links = 1, .num_links = 1,
}; };
static struct snd_soc_device bf5xx_ad1938_snd_devdata = { static struct snd_soc_device bf5xx_ad193x_snd_devdata = {
.card = &bf5xx_ad1938, .card = &bf5xx_ad193x,
.codec_dev = &soc_codec_dev_ad1938, .codec_dev = &soc_codec_dev_ad193x,
}; };
static struct platform_device *bfxx_ad1938_snd_device; static struct platform_device *bfxx_ad193x_snd_device;
static int __init bf5xx_ad1938_init(void) static int __init bf5xx_ad193x_init(void)
{ {
int ret; int ret;
bfxx_ad1938_snd_device = platform_device_alloc("soc-audio", -1); bfxx_ad193x_snd_device = platform_device_alloc("soc-audio", -1);
if (!bfxx_ad1938_snd_device) if (!bfxx_ad193x_snd_device)
return -ENOMEM; return -ENOMEM;
platform_set_drvdata(bfxx_ad1938_snd_device, &bf5xx_ad1938_snd_devdata); platform_set_drvdata(bfxx_ad193x_snd_device, &bf5xx_ad193x_snd_devdata);
bf5xx_ad1938_snd_devdata.dev = &bfxx_ad1938_snd_device->dev; bf5xx_ad193x_snd_devdata.dev = &bfxx_ad193x_snd_device->dev;
ret = platform_device_add(bfxx_ad1938_snd_device); ret = platform_device_add(bfxx_ad193x_snd_device);
if (ret) if (ret)
platform_device_put(bfxx_ad1938_snd_device); platform_device_put(bfxx_ad193x_snd_device);
return ret; return ret;
} }
static void __exit bf5xx_ad1938_exit(void) static void __exit bf5xx_ad193x_exit(void)
{ {
platform_device_unregister(bfxx_ad1938_snd_device); platform_device_unregister(bfxx_ad193x_snd_device);
} }
module_init(bf5xx_ad1938_init); module_init(bf5xx_ad193x_init);
module_exit(bf5xx_ad1938_exit); module_exit(bf5xx_ad193x_exit);
/* Module information */ /* Module information */
MODULE_AUTHOR("Barry Song"); MODULE_AUTHOR("Barry Song");
MODULE_DESCRIPTION("ALSA SoC AD1938 board driver"); MODULE_DESCRIPTION("ALSA SoC AD193X board driver");
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment