提交 cd9e2b62 编写于 作者: K Krzysztof Kozlowski 提交者: Mark Brown

ASoC: samsung: smdk_wm8580: Remove old platforms and drop mach-types usage

MACH_SMDKC100, MACH_SMDKV210 and MACH_SMDKC110 are no longer supported
so we can drop the dead code.  After this the driver no longer
differentiates between machines (S3C24xx machines are not supported by
it) so there is no need to override I2S device id in cpu_dai_name and
SEC_PLAYBACK dai_link can be removed as well.
Signed-off-by: NKrzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: NMark Brown <broonie@kernel.org>
上级 f8cbab42
...@@ -14,8 +14,6 @@ ...@@ -14,8 +14,6 @@
#include <sound/soc.h> #include <sound/soc.h>
#include <sound/pcm_params.h> #include <sound/pcm_params.h>
#include <asm/mach-types.h>
#include "../codecs/wm8580.h" #include "../codecs/wm8580.h"
#include "i2s.h" #include "i2s.h"
...@@ -147,7 +145,6 @@ static int smdk_wm8580_init_paiftx(struct snd_soc_pcm_runtime *rtd) ...@@ -147,7 +145,6 @@ static int smdk_wm8580_init_paiftx(struct snd_soc_pcm_runtime *rtd)
enum { enum {
PRI_PLAYBACK = 0, PRI_PLAYBACK = 0,
PRI_CAPTURE, PRI_CAPTURE,
SEC_PLAYBACK,
}; };
#define SMDK_DAI_FMT (SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | \ #define SMDK_DAI_FMT (SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | \
...@@ -157,7 +154,7 @@ static struct snd_soc_dai_link smdk_dai[] = { ...@@ -157,7 +154,7 @@ static struct snd_soc_dai_link smdk_dai[] = {
[PRI_PLAYBACK] = { /* Primary Playback i/f */ [PRI_PLAYBACK] = { /* Primary Playback i/f */
.name = "WM8580 PAIF RX", .name = "WM8580 PAIF RX",
.stream_name = "Playback", .stream_name = "Playback",
.cpu_dai_name = "samsung-i2s.0", .cpu_dai_name = "samsung-i2s.2",
.codec_dai_name = "wm8580-hifi-playback", .codec_dai_name = "wm8580-hifi-playback",
.platform_name = "samsung-i2s.0", .platform_name = "samsung-i2s.0",
.codec_name = "wm8580.0-001b", .codec_name = "wm8580.0-001b",
...@@ -167,7 +164,7 @@ static struct snd_soc_dai_link smdk_dai[] = { ...@@ -167,7 +164,7 @@ static struct snd_soc_dai_link smdk_dai[] = {
[PRI_CAPTURE] = { /* Primary Capture i/f */ [PRI_CAPTURE] = { /* Primary Capture i/f */
.name = "WM8580 PAIF TX", .name = "WM8580 PAIF TX",
.stream_name = "Capture", .stream_name = "Capture",
.cpu_dai_name = "samsung-i2s.0", .cpu_dai_name = "samsung-i2s.2",
.codec_dai_name = "wm8580-hifi-capture", .codec_dai_name = "wm8580-hifi-capture",
.platform_name = "samsung-i2s.0", .platform_name = "samsung-i2s.0",
.codec_name = "wm8580.0-001b", .codec_name = "wm8580.0-001b",
...@@ -175,23 +172,13 @@ static struct snd_soc_dai_link smdk_dai[] = { ...@@ -175,23 +172,13 @@ static struct snd_soc_dai_link smdk_dai[] = {
.init = smdk_wm8580_init_paiftx, .init = smdk_wm8580_init_paiftx,
.ops = &smdk_ops, .ops = &smdk_ops,
}, },
[SEC_PLAYBACK] = { /* Sec_Fifo Playback i/f */
.name = "Sec_FIFO TX",
.stream_name = "Playback",
.cpu_dai_name = "samsung-i2s-sec",
.codec_dai_name = "wm8580-hifi-playback",
.platform_name = "samsung-i2s-sec",
.codec_name = "wm8580.0-001b",
.dai_fmt = SMDK_DAI_FMT,
.ops = &smdk_ops,
},
}; };
static struct snd_soc_card smdk = { static struct snd_soc_card smdk = {
.name = "SMDK-I2S", .name = "SMDK-I2S",
.owner = THIS_MODULE, .owner = THIS_MODULE,
.dai_link = smdk_dai, .dai_link = smdk_dai,
.num_links = 2, .num_links = ARRAY_SIZE(smdk_dai),
.dapm_widgets = smdk_wm8580_dapm_widgets, .dapm_widgets = smdk_wm8580_dapm_widgets,
.num_dapm_widgets = ARRAY_SIZE(smdk_wm8580_dapm_widgets), .num_dapm_widgets = ARRAY_SIZE(smdk_wm8580_dapm_widgets),
...@@ -204,17 +191,6 @@ static struct platform_device *smdk_snd_device; ...@@ -204,17 +191,6 @@ static struct platform_device *smdk_snd_device;
static int __init smdk_audio_init(void) static int __init smdk_audio_init(void)
{ {
int ret; int ret;
char *str;
if (machine_is_smdkc100()
|| machine_is_smdkv210() || machine_is_smdkc110()) {
smdk.num_links = 3;
} else if (machine_is_smdk6410()) {
str = (char *)smdk_dai[PRI_PLAYBACK].cpu_dai_name;
str[strlen(str) - 1] = '2';
str = (char *)smdk_dai[PRI_CAPTURE].cpu_dai_name;
str[strlen(str) - 1] = '2';
}
smdk_snd_device = platform_device_alloc("soc-audio", -1); smdk_snd_device = platform_device_alloc("soc-audio", -1);
if (!smdk_snd_device) if (!smdk_snd_device)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册