CHROMIUM: ASoC: samsung: Enable daisy platform to support MAX98088.
authorDylan Reid <dgreid@chromium.org>
Fri, 15 Feb 2013 00:00:50 +0000 (16:00 -0800)
committerChromeBot <chrome-bot@google.com>
Tue, 19 Feb 2013 18:28:17 +0000 (10:28 -0800)
The Spring board will use the MAX98088 instead of the MAX98095.  Add
the ability to use this codec to the daisy platform driver.

BUG=chrome-os-partner:17794
TEST=play audio on snow and spring.

Change-Id: I7beb941d931d198a37d50e970821b8a32786a2e3
Signed-off-by: Dylan Reid <dgreid@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/43358
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
sound/soc/samsung/Kconfig
sound/soc/samsung/daisy_max98095.c

index 4dc6cb6..23bdd12 100644 (file)
@@ -223,9 +223,10 @@ config SND_SOC_LITTLEMILL
        select SND_SOC_WM8994
 
 config SND_SOC_EXYNOS_MAX98095
-       tristate "SoC I2S Audio support for MAX98095 on EXYNOS5"
+       tristate "SoC I2S Audio support for MAX98095 or MAX98088 on EXYNOS5"
        depends on SND_SOC_SAMSUNG && SOC_EXYNOS5250
        select SND_SOC_MAX98095
+       select SND_SOC_MAX98088
        select SND_SAMSUNG_I2S
        help
-               Say Y if you want to add support for SoC audio for max98095 on exynos5.
+               Say Y if you want to add support for SoC audio for max98095 or max98088 on exynos5.
index 2b98b3a..c3b6015 100644 (file)
@@ -1,5 +1,6 @@
 /*
- * Exynos machine ASoC driver for boards using MAX98095 codec.
+ * Exynos machine ASoC driver for boards using MAX98095 or MAX98088
+ * codec.
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
@@ -32,6 +33,7 @@
 #include <sound/pcm_params.h>
 #include <sound/jack.h>
 #include <sound/max98095.h>
+#include <sound/max98088.h>
 
 #include <mach/regs-clock.h>
 #include <mach/gpio.h>
@@ -39,6 +41,7 @@
 #include "i2s.h"
 #include "s3c-i2s-v2.h"
 #include "../codecs/max98095.h"
+#include "../codecs/max98088.h"
 #include "codec_plugin.h"
 
 #define DRV_NAME "daisy-snd-max98095"
@@ -527,8 +530,11 @@ static __devinit int daisy_max98095_driver_probe(struct platform_device *pdev)
                return -ENODEV;
 
        dn = of_find_compatible_node(NULL, NULL, "maxim,max98095");
-       if (!dn)
-               return -ENODEV;
+       if (!dn) {
+               dn = of_find_compatible_node(NULL, NULL, "maxim,max98088");
+               if (!dn)
+                       return -ENODEV;
+       }
 
        for (i = 0; i < ARRAY_SIZE(daisy_dai); i++)
                daisy_dai[i].codec_of_node = of_node_get(dn);
@@ -586,6 +592,7 @@ static int __devexit daisy_max98095_driver_remove(struct platform_device *pdev)
 
 static const struct of_device_id daisy_max98095_of_match[] __devinitconst = {
        { .compatible = "google,daisy-audio-max98095", },
+       { .compatible = "google,daisy-audio-max98088", },
        {},
 };