From 3a56d0ca72f8fc47240849b83acacd1c92283b99 Mon Sep 17 00:00:00 2001 From: Jassi Brar Date: Mon, 22 Nov 2010 15:35:36 +0900 Subject: ASoC: Samsung: Remove redundant AQUILA driver AQUILA and GONI are essentially the same h/w w.r.t ASoC. They only differ by the fact that GONI has stereo speaker-out whereas AQUILA has mono. The difference can easily be handled in the same MACHINE driver by making machine-specific runtime changes. Signed-off-by: Jassi Brar Acked-by: Liam Girdwood Signed-off-by: Mark Brown --- sound/soc/s3c24xx/goni_wm8994.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'sound/soc/s3c24xx/goni_wm8994.c') diff --git a/sound/soc/s3c24xx/goni_wm8994.c b/sound/soc/s3c24xx/goni_wm8994.c index bcbfe8534f32..62134ed3aa57 100644 --- a/sound/soc/s3c24xx/goni_wm8994.c +++ b/sound/soc/s3c24xx/goni_wm8994.c @@ -27,6 +27,14 @@ #include "s3c-dma.h" #include "s3c64xx-i2s.h" +#define MACHINE_NAME 0 +#define CPU_VOICE_DAI 1 + +static const char *aquila_str[] = { + [MACHINE_NAME] = "aquila", + [CPU_VOICE_DAI] = "aquila-voice-dai", +}; + static struct snd_soc_card goni; static struct platform_device *goni_snd_device; @@ -115,6 +123,11 @@ static int goni_wm8994_init(struct snd_soc_pcm_runtime *rtd) snd_soc_dapm_nc_pin(dapm, "LINEOUT2N"); snd_soc_dapm_nc_pin(dapm, "LINEOUT2P"); + if (machine_is_aquila()) { + snd_soc_dapm_nc_pin(dapm, "SPKOUTRN"); + snd_soc_dapm_nc_pin(dapm, "SPKOUTRP"); + } + snd_soc_dapm_sync(dapm); /* Headset jack detection */ @@ -263,7 +276,11 @@ static int __init goni_init(void) { int ret; - if (!machine_is_goni()) + if (machine_is_aquila()) { + voice_dai.name = aquila_str[CPU_VOICE_DAI]; + goni_dai[1].cpu_dai_name = aquila_str[CPU_VOICE_DAI]; + goni.name = aquila_str[MACHINE_NAME]; + } else if (!machine_is_goni()) return -ENODEV; goni_snd_device = platform_device_alloc("soc-audio", -1); -- cgit v1.2.3