]> git.sur5r.net Git - u-boot/commitdiff
Sound: Support for MAX98095 codec in driver
authorRajeshwari Shinde <rajeshwari.s@samsung.com>
Thu, 14 Feb 2013 19:46:13 +0000 (19:46 +0000)
committerMinkyu Kang <mk7.kang@samsung.com>
Fri, 8 Mar 2013 13:34:18 +0000 (22:34 +0900)
This patchs adds support for MAX98095 codec in
sound driver.

Signed-off-by: Rajeshwari Shinde <rajeshwari.s@samsung.com>
Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
drivers/sound/sound.c
include/sound.h

index fa8432d48acedc2acc0fc341b90fee62eb9e980c..a4bf4adcb38bf744d379f84613006483e22e7119 100644 (file)
@@ -31,6 +31,7 @@
 #include <sound.h>
 #include <asm/arch/sound.h>
 #include "wm8994.h"
+#include "max98095.h"
 
 /* defines */
 #define SOUND_400_HZ 400
@@ -149,11 +150,15 @@ static int codec_init(const void *blob, struct i2stx_info *pi2s_tx)
                        pi2s_tx->samplingrate,
                        (pi2s_tx->samplingrate * (pi2s_tx->rfs)),
                        pi2s_tx->bitspersample, pi2s_tx->channels);
+       } else if (!strcmp(codectype, "max98095")) {
+               ret = max98095_init(blob, pi2s_tx->samplingrate,
+                               (pi2s_tx->samplingrate * (pi2s_tx->rfs)),
+                               pi2s_tx->bitspersample);
        } else {
-               debug("%s: Unknown code type %s\n", __func__,
-                     codectype);
+               debug("%s: Unknown codec type %s\n", __func__, codectype);
                return -1;
        }
+
        if (ret) {
                debug("%s: Codec init failed\n", __func__);
                return -1;
index d73839d9f04a08b7891f5bac48b4289c712bebdf..94922f66daeaf6d5a56c3722d243eeeb254d9f8a 100644 (file)
@@ -28,6 +28,7 @@
 enum en_sound_codec {
        CODEC_WM_8994,
        CODEC_WM_8995,
+       CODEC_MAX_98095,
        CODEC_MAX
 };