From patchwork Fri Feb 1 05:39:38 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [U-Boot,3/7,V3] Sound: Support for MAX98095 codec in driver Date: Thu, 31 Jan 2013 19:39:38 -0000 From: Rajeshwari Shinde X-Patchwork-Id: 217344 Message-Id: <1359697182-18843-4-git-send-email-rajeshwari.s@samsung.com> To: u-boot@lists.denx.de Cc: patches@linaro.org This patchs adds support for MAX98095 codec in sound driver. Signed-off-by: Rajeshwari Shinde Acked-by: Simon Glass --- Changes in V2: - None Chnages in V3: - Removed non DT support for MAX98095 drivers/sound/sound.c | 9 +++++++-- include/sound.h | 1 + 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/sound/sound.c b/drivers/sound/sound.c index fa8432d..a4bf4ad 100644 --- a/drivers/sound/sound.c +++ b/drivers/sound/sound.c @@ -31,6 +31,7 @@ #include #include #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; diff --git a/include/sound.h b/include/sound.h index d73839d..94922f6 100644 --- a/include/sound.h +++ b/include/sound.h @@ -28,6 +28,7 @@ enum en_sound_codec { CODEC_WM_8994, CODEC_WM_8995, + CODEC_MAX_98095, CODEC_MAX };