Commit 34f40955 authored by Lars-Peter Clausen's avatar Lars-Peter Clausen Committed by Mark Brown

ASoC: blackfin: Switch bf5xx-ad1836 from bf5xx-tdm to bf5xx-i2s

The bf5xx-i2s driver now has support for TDM mode and the bf5xx-tdm driver is
going to be removed soon, so switch the driver over to bf5xx-i2s.
Signed-off-by: default avatarLars-Peter Clausen <lars@metafoo.de>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent b8854632
...@@ -590,7 +590,7 @@ static struct platform_device bfin_tdm = { ...@@ -590,7 +590,7 @@ static struct platform_device bfin_tdm = {
#if defined(CONFIG_SND_BF5XX_SOC_AD1836) \ #if defined(CONFIG_SND_BF5XX_SOC_AD1836) \
|| defined(CONFIG_SND_BF5XX_SOC_AD1836_MODULE) || defined(CONFIG_SND_BF5XX_SOC_AD1836_MODULE)
static const char * const ad1836_link[] = { static const char * const ad1836_link[] = {
"bfin-tdm.0", "bfin-i2s.0",
"spi0.4", "spi0.4",
}; };
static struct platform_device bfin_ad1836_machine = { static struct platform_device bfin_ad1836_machine = {
......
...@@ -620,7 +620,7 @@ static struct platform_device bfin_ac97_pcm = { ...@@ -620,7 +620,7 @@ static struct platform_device bfin_ac97_pcm = {
#if defined(CONFIG_SND_BF5XX_SOC_AD1836) \ #if defined(CONFIG_SND_BF5XX_SOC_AD1836) \
|| defined(CONFIG_SND_BF5XX_SOC_AD1836_MODULE) || defined(CONFIG_SND_BF5XX_SOC_AD1836_MODULE)
static const char * const ad1836_link[] = { static const char * const ad1836_link[] = {
"bfin-tdm.0", "bfin-i2s.0",
"spi0.4", "spi0.4",
}; };
static struct platform_device bfin_ad1836_machine = { static struct platform_device bfin_ad1836_machine = {
......
...@@ -2645,7 +2645,7 @@ static struct platform_device bfin_ac97_pcm = { ...@@ -2645,7 +2645,7 @@ static struct platform_device bfin_ac97_pcm = {
#if defined(CONFIG_SND_BF5XX_SOC_AD1836) \ #if defined(CONFIG_SND_BF5XX_SOC_AD1836) \
|| defined(CONFIG_SND_BF5XX_SOC_AD1836_MODULE) || defined(CONFIG_SND_BF5XX_SOC_AD1836_MODULE)
static const char * const ad1836_link[] = { static const char * const ad1836_link[] = {
"bfin-tdm.0", "bfin-i2s.0",
"spi0.4", "spi0.4",
}; };
static struct platform_device bfin_ad1836_machine = { static struct platform_device bfin_ad1836_machine = {
......
...@@ -542,7 +542,7 @@ static struct platform_device bfin_ac97 = { ...@@ -542,7 +542,7 @@ static struct platform_device bfin_ac97 = {
#if defined(CONFIG_SND_BF5XX_SOC_AD1836) \ #if defined(CONFIG_SND_BF5XX_SOC_AD1836) \
|| defined(CONFIG_SND_BF5XX_SOC_AD1836_MODULE) || defined(CONFIG_SND_BF5XX_SOC_AD1836_MODULE)
static const char * const ad1836_link[] = { static const char * const ad1836_link[] = {
"bfin-tdm.0", "bfin-i2s.0",
"spi0.4", "spi0.4",
}; };
static struct platform_device bfin_ad1836_machine = { static struct platform_device bfin_ad1836_machine = {
......
...@@ -821,7 +821,7 @@ static struct platform_device bfin_i2s = { ...@@ -821,7 +821,7 @@ static struct platform_device bfin_i2s = {
#if defined(CONFIG_SND_BF5XX_SOC_AD1836) \ #if defined(CONFIG_SND_BF5XX_SOC_AD1836) \
|| defined(CONFIG_SND_BF5XX_SOC_AD1836_MODULE) || defined(CONFIG_SND_BF5XX_SOC_AD1836_MODULE)
static const char * const ad1836_link[] = { static const char * const ad1836_link[] = {
"bfin-tdm.0", "bfin-i2s.0",
"spi0.76", "spi0.76",
}; };
static struct platform_device bfin_ad1836_machine = { static struct platform_device bfin_ad1836_machine = {
......
...@@ -56,6 +56,14 @@ config SND_SOC_BFIN_EVAL_ADAV80X ...@@ -56,6 +56,14 @@ config SND_SOC_BFIN_EVAL_ADAV80X
Note: This driver assumes that the ADAV80X digital record and playback Note: This driver assumes that the ADAV80X digital record and playback
interfaces are connected to the first SPORT port on the BF5XX board. interfaces are connected to the first SPORT port on the BF5XX board.
config SND_BF5XX_SOC_AD1836
tristate "SoC AD1836 Audio support for BF5xx"
depends on SND_BF5XX_I2S
select SND_BF5XX_SOC_I2S
select SND_SOC_AD1836
help
Say Y if you want to add support for SoC audio on BF5xx STAMP/EZKIT.
config SND_BF5XX_SOC_AD193X config SND_BF5XX_SOC_AD193X
tristate "SoC AD193X Audio support for Blackfin" tristate "SoC AD193X Audio support for Blackfin"
depends on SND_BF5XX_I2S depends on SND_BF5XX_I2S
...@@ -91,14 +99,6 @@ config SND_BF5XX_TDM ...@@ -91,14 +99,6 @@ config SND_BF5XX_TDM
mode. mode.
You will also need to select the audio interfaces to support below. You will also need to select the audio interfaces to support below.
config SND_BF5XX_SOC_AD1836
tristate "SoC AD1836 Audio support for BF5xx"
depends on SND_BF5XX_TDM
select SND_BF5XX_SOC_TDM
select SND_SOC_AD1836
help
Say Y if you want to add support for SoC audio on BF5xx STAMP/EZKIT.
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"
depends on BLACKFIN depends on BLACKFIN
......
...@@ -30,14 +30,10 @@ ...@@ -30,14 +30,10 @@
#include "../codecs/ad1836.h" #include "../codecs/ad1836.h"
#include "bf5xx-tdm.h"
static struct snd_soc_card bf5xx_ad1836; static struct snd_soc_card bf5xx_ad1836;
static int bf5xx_ad1836_hw_params(struct snd_pcm_substream *substream, static int bf5xx_ad1836_init(struct snd_soc_pcm_runtime *rtd)
struct snd_pcm_hw_params *params)
{ {
struct snd_soc_pcm_runtime *rtd = substream->private_data;
struct snd_soc_dai *cpu_dai = rtd->cpu_dai; struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
unsigned int channel_map[] = {0, 4, 1, 5, 2, 6, 3, 7}; unsigned int channel_map[] = {0, 4, 1, 5, 2, 6, 3, 7};
int ret = 0; int ret = 0;
...@@ -48,13 +44,13 @@ static int bf5xx_ad1836_hw_params(struct snd_pcm_substream *substream, ...@@ -48,13 +44,13 @@ static int bf5xx_ad1836_hw_params(struct snd_pcm_substream *substream,
if (ret < 0) if (ret < 0)
return ret; return ret;
ret = snd_soc_dai_set_tdm_slot(cpu_dai, 0xFF, 0xFF, 8, 32);
if (ret < 0)
return ret;
return 0; return 0;
} }
static struct snd_soc_ops bf5xx_ad1836_ops = {
.hw_params = bf5xx_ad1836_hw_params,
};
#define BF5XX_AD1836_DAIFMT (SND_SOC_DAIFMT_DSP_A | SND_SOC_DAIFMT_IB_IF | \ #define BF5XX_AD1836_DAIFMT (SND_SOC_DAIFMT_DSP_A | SND_SOC_DAIFMT_IB_IF | \
SND_SOC_DAIFMT_CBM_CFM) SND_SOC_DAIFMT_CBM_CFM)
...@@ -62,9 +58,9 @@ static struct snd_soc_dai_link bf5xx_ad1836_dai = { ...@@ -62,9 +58,9 @@ static struct snd_soc_dai_link bf5xx_ad1836_dai = {
.name = "ad1836", .name = "ad1836",
.stream_name = "AD1836", .stream_name = "AD1836",
.codec_dai_name = "ad1836-hifi", .codec_dai_name = "ad1836-hifi",
.platform_name = "bfin-tdm-pcm-audio", .platform_name = "bfin-i2s-pcm-audio",
.ops = &bf5xx_ad1836_ops,
.dai_fmt = BF5XX_AD1836_DAIFMT, .dai_fmt = BF5XX_AD1836_DAIFMT,
.init = bf5xx_ad1836_init,
}; };
static struct snd_soc_card bf5xx_ad1836 = { static struct snd_soc_card bf5xx_ad1836 = {
......
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