aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2013-05-28 13:22:16 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2013-05-30 07:33:41 -0400
commit34f4095564ff334adae5ab4a9904f8d66d03e994 (patch)
tree69af0f50af94822c7ad1d5b9963cfb5a379f1f16
parentb88546324ef1b61fc6e844e56ad4e90169514fb7 (diff)
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: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
-rw-r--r--arch/blackfin/mach-bf527/boards/ezkit.c2
-rw-r--r--arch/blackfin/mach-bf533/boards/stamp.c2
-rw-r--r--arch/blackfin/mach-bf537/boards/stamp.c2
-rw-r--r--arch/blackfin/mach-bf561/boards/ezkit.c2
-rw-r--r--arch/blackfin/mach-bf609/boards/ezkit.c2
-rw-r--r--sound/soc/blackfin/Kconfig16
-rw-r--r--sound/soc/blackfin/bf5xx-ad1836.c18
7 files changed, 20 insertions, 24 deletions
diff --git a/arch/blackfin/mach-bf527/boards/ezkit.c b/arch/blackfin/mach-bf527/boards/ezkit.c
index 29f16e5c37b9..82248955b624 100644
--- a/arch/blackfin/mach-bf527/boards/ezkit.c
+++ b/arch/blackfin/mach-bf527/boards/ezkit.c
@@ -590,7 +590,7 @@ static struct platform_device bfin_tdm = {
590#if defined(CONFIG_SND_BF5XX_SOC_AD1836) \ 590#if defined(CONFIG_SND_BF5XX_SOC_AD1836) \
591 || defined(CONFIG_SND_BF5XX_SOC_AD1836_MODULE) 591 || defined(CONFIG_SND_BF5XX_SOC_AD1836_MODULE)
592static const char * const ad1836_link[] = { 592static const char * const ad1836_link[] = {
593 "bfin-tdm.0", 593 "bfin-i2s.0",
594 "spi0.4", 594 "spi0.4",
595}; 595};
596static struct platform_device bfin_ad1836_machine = { 596static struct platform_device bfin_ad1836_machine = {
diff --git a/arch/blackfin/mach-bf533/boards/stamp.c b/arch/blackfin/mach-bf533/boards/stamp.c
index 6fca8698bf3b..a644a8bf92b5 100644
--- a/arch/blackfin/mach-bf533/boards/stamp.c
+++ b/arch/blackfin/mach-bf533/boards/stamp.c
@@ -620,7 +620,7 @@ static struct platform_device bfin_ac97_pcm = {
620#if defined(CONFIG_SND_BF5XX_SOC_AD1836) \ 620#if defined(CONFIG_SND_BF5XX_SOC_AD1836) \
621 || defined(CONFIG_SND_BF5XX_SOC_AD1836_MODULE) 621 || defined(CONFIG_SND_BF5XX_SOC_AD1836_MODULE)
622static const char * const ad1836_link[] = { 622static const char * const ad1836_link[] = {
623 "bfin-tdm.0", 623 "bfin-i2s.0",
624 "spi0.4", 624 "spi0.4",
625}; 625};
626static struct platform_device bfin_ad1836_machine = { 626static struct platform_device bfin_ad1836_machine = {
diff --git a/arch/blackfin/mach-bf537/boards/stamp.c b/arch/blackfin/mach-bf537/boards/stamp.c
index 6a3a14bcd3a1..d978ca93fcf7 100644
--- a/arch/blackfin/mach-bf537/boards/stamp.c
+++ b/arch/blackfin/mach-bf537/boards/stamp.c
@@ -2645,7 +2645,7 @@ static struct platform_device bfin_ac97_pcm = {
2645#if defined(CONFIG_SND_BF5XX_SOC_AD1836) \ 2645#if defined(CONFIG_SND_BF5XX_SOC_AD1836) \
2646 || defined(CONFIG_SND_BF5XX_SOC_AD1836_MODULE) 2646 || defined(CONFIG_SND_BF5XX_SOC_AD1836_MODULE)
2647static const char * const ad1836_link[] = { 2647static const char * const ad1836_link[] = {
2648 "bfin-tdm.0", 2648 "bfin-i2s.0",
2649 "spi0.4", 2649 "spi0.4",
2650}; 2650};
2651static struct platform_device bfin_ad1836_machine = { 2651static struct platform_device bfin_ad1836_machine = {
diff --git a/arch/blackfin/mach-bf561/boards/ezkit.c b/arch/blackfin/mach-bf561/boards/ezkit.c
index 551f866172cf..9512c369bc0e 100644
--- a/arch/blackfin/mach-bf561/boards/ezkit.c
+++ b/arch/blackfin/mach-bf561/boards/ezkit.c
@@ -542,7 +542,7 @@ static struct platform_device bfin_ac97 = {
542#if defined(CONFIG_SND_BF5XX_SOC_AD1836) \ 542#if defined(CONFIG_SND_BF5XX_SOC_AD1836) \
543 || defined(CONFIG_SND_BF5XX_SOC_AD1836_MODULE) 543 || defined(CONFIG_SND_BF5XX_SOC_AD1836_MODULE)
544static const char * const ad1836_link[] = { 544static const char * const ad1836_link[] = {
545 "bfin-tdm.0", 545 "bfin-i2s.0",
546 "spi0.4", 546 "spi0.4",
547}; 547};
548static struct platform_device bfin_ad1836_machine = { 548static struct platform_device bfin_ad1836_machine = {
diff --git a/arch/blackfin/mach-bf609/boards/ezkit.c b/arch/blackfin/mach-bf609/boards/ezkit.c
index 97d701639585..bba40aed4273 100644
--- a/arch/blackfin/mach-bf609/boards/ezkit.c
+++ b/arch/blackfin/mach-bf609/boards/ezkit.c
@@ -821,7 +821,7 @@ static struct platform_device bfin_i2s = {
821#if defined(CONFIG_SND_BF5XX_SOC_AD1836) \ 821#if defined(CONFIG_SND_BF5XX_SOC_AD1836) \
822 || defined(CONFIG_SND_BF5XX_SOC_AD1836_MODULE) 822 || defined(CONFIG_SND_BF5XX_SOC_AD1836_MODULE)
823static const char * const ad1836_link[] = { 823static const char * const ad1836_link[] = {
824 "bfin-tdm.0", 824 "bfin-i2s.0",
825 "spi0.76", 825 "spi0.76",
826}; 826};
827static struct platform_device bfin_ad1836_machine = { 827static struct platform_device bfin_ad1836_machine = {
diff --git a/sound/soc/blackfin/Kconfig b/sound/soc/blackfin/Kconfig
index 906c349a00ea..4a67865bc4fc 100644
--- a/sound/soc/blackfin/Kconfig
+++ b/sound/soc/blackfin/Kconfig
@@ -56,6 +56,14 @@ config SND_SOC_BFIN_EVAL_ADAV80X
56 Note: This driver assumes that the ADAV80X digital record and playback 56 Note: This driver assumes that the ADAV80X digital record and playback
57 interfaces are connected to the first SPORT port on the BF5XX board. 57 interfaces are connected to the first SPORT port on the BF5XX board.
58 58
59config SND_BF5XX_SOC_AD1836
60 tristate "SoC AD1836 Audio support for BF5xx"
61 depends on SND_BF5XX_I2S
62 select SND_BF5XX_SOC_I2S
63 select SND_SOC_AD1836
64 help
65 Say Y if you want to add support for SoC audio on BF5xx STAMP/EZKIT.
66
59config SND_BF5XX_SOC_AD193X 67config SND_BF5XX_SOC_AD193X
60 tristate "SoC AD193X Audio support for Blackfin" 68 tristate "SoC AD193X Audio support for Blackfin"
61 depends on SND_BF5XX_I2S 69 depends on SND_BF5XX_I2S
@@ -91,14 +99,6 @@ config SND_BF5XX_TDM
91 mode. 99 mode.
92 You will also need to select the audio interfaces to support below. 100 You will also need to select the audio interfaces to support below.
93 101
94config SND_BF5XX_SOC_AD1836
95 tristate "SoC AD1836 Audio support for BF5xx"
96 depends on SND_BF5XX_TDM
97 select SND_BF5XX_SOC_TDM
98 select SND_SOC_AD1836
99 help
100 Say Y if you want to add support for SoC audio on BF5xx STAMP/EZKIT.
101
102config SND_BF5XX_AC97 102config SND_BF5XX_AC97
103 tristate "SoC AC97 Audio for the ADI BF5xx chip" 103 tristate "SoC AC97 Audio for the ADI BF5xx chip"
104 depends on BLACKFIN 104 depends on BLACKFIN
diff --git a/sound/soc/blackfin/bf5xx-ad1836.c b/sound/soc/blackfin/bf5xx-ad1836.c
index 152817633256..8fcfc4ec3a51 100644
--- a/sound/soc/blackfin/bf5xx-ad1836.c
+++ b/sound/soc/blackfin/bf5xx-ad1836.c
@@ -30,14 +30,10 @@
30 30
31#include "../codecs/ad1836.h" 31#include "../codecs/ad1836.h"
32 32
33#include "bf5xx-tdm.h"
34
35static struct snd_soc_card bf5xx_ad1836; 33static struct snd_soc_card bf5xx_ad1836;
36 34
37static int bf5xx_ad1836_hw_params(struct snd_pcm_substream *substream, 35static int bf5xx_ad1836_init(struct snd_soc_pcm_runtime *rtd)
38 struct snd_pcm_hw_params *params)
39{ 36{
40 struct snd_soc_pcm_runtime *rtd = substream->private_data;
41 struct snd_soc_dai *cpu_dai = rtd->cpu_dai; 37 struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
42 unsigned int channel_map[] = {0, 4, 1, 5, 2, 6, 3, 7}; 38 unsigned int channel_map[] = {0, 4, 1, 5, 2, 6, 3, 7};
43 int ret = 0; 39 int ret = 0;
@@ -48,13 +44,13 @@ static int bf5xx_ad1836_hw_params(struct snd_pcm_substream *substream,
48 if (ret < 0) 44 if (ret < 0)
49 return ret; 45 return ret;
50 46
47 ret = snd_soc_dai_set_tdm_slot(cpu_dai, 0xFF, 0xFF, 8, 32);
48 if (ret < 0)
49 return ret;
50
51 return 0; 51 return 0;
52} 52}
53 53
54static struct snd_soc_ops bf5xx_ad1836_ops = {
55 .hw_params = bf5xx_ad1836_hw_params,
56};
57
58#define BF5XX_AD1836_DAIFMT (SND_SOC_DAIFMT_DSP_A | SND_SOC_DAIFMT_IB_IF | \ 54#define BF5XX_AD1836_DAIFMT (SND_SOC_DAIFMT_DSP_A | SND_SOC_DAIFMT_IB_IF | \
59 SND_SOC_DAIFMT_CBM_CFM) 55 SND_SOC_DAIFMT_CBM_CFM)
60 56
@@ -62,9 +58,9 @@ static struct snd_soc_dai_link bf5xx_ad1836_dai = {
62 .name = "ad1836", 58 .name = "ad1836",
63 .stream_name = "AD1836", 59 .stream_name = "AD1836",
64 .codec_dai_name = "ad1836-hifi", 60 .codec_dai_name = "ad1836-hifi",
65 .platform_name = "bfin-tdm-pcm-audio", 61 .platform_name = "bfin-i2s-pcm-audio",
66 .ops = &bf5xx_ad1836_ops,
67 .dai_fmt = BF5XX_AD1836_DAIFMT, 62 .dai_fmt = BF5XX_AD1836_DAIFMT,
63 .init = bf5xx_ad1836_init,
68}; 64};
69 65
70static struct snd_soc_card bf5xx_ad1836 = { 66static struct snd_soc_card bf5xx_ad1836 = {