From patchwork Fri Feb 15 05:46:13 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rajeshwari Birje X-Patchwork-Id: 220631 X-Patchwork-Delegate: promsoft@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id E73592C007B for ; Fri, 15 Feb 2013 16:39:51 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 936034A138; Fri, 15 Feb 2013 06:39:49 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id hjZrEJcG2hYp; Fri, 15 Feb 2013 06:39:49 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 9C44A4A168; Fri, 15 Feb 2013 06:39:12 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id EC63E4A141 for ; Fri, 15 Feb 2013 06:39:02 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id TQDo43DXXtfc for ; Fri, 15 Feb 2013 06:38:59 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mailout3.samsung.com (mailout3.samsung.com [203.254.224.33]) by theia.denx.de (Postfix) with ESMTP id 312BB4A0F6 for ; Fri, 15 Feb 2013 06:38:59 +0100 (CET) Received: from epcpsbgr5.samsung.com (u145.gpu120.samsung.co.kr [203.254.230.145]) by mailout3.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MI800KPQYCNO6I0@mailout3.samsung.com> for u-boot@lists.denx.de; Fri, 15 Feb 2013 14:38:53 +0900 (KST) Received: from epcpsbgm1.samsung.com ( [172.20.52.125]) by epcpsbgr5.samsung.com (EPCPMTA) with SMTP id 55.07.06692.DE9CD115; Fri, 15 Feb 2013 14:38:53 +0900 (KST) X-AuditID: cbfee691-b7f556d000001a24-10-511dc9ed9a32 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id D4.90.03918.DE9CD115; Fri, 15 Feb 2013 14:38:53 +0900 (KST) Received: from rajeshwari-linux.sisodomain.com ([107.108.215.115]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MI8007CCYCJCBN0@mmp1.samsung.com> for u-boot@lists.denx.de; Fri, 15 Feb 2013 14:38:53 +0900 (KST) From: Rajeshwari Shinde To: u-boot@lists.denx.de Date: Fri, 15 Feb 2013 11:16:13 +0530 Message-id: <1360907176-18802-4-git-send-email-rajeshwari.s@samsung.com> X-Mailer: git-send-email 1.7.4.4 In-reply-to: <1360907176-18802-1-git-send-email-rajeshwari.s@samsung.com> References: <1360907176-18802-1-git-send-email-rajeshwari.s@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrMLMWRmVeSWpSXmKPExsWyRsSkVvftSdlAg/89RhZv93ayOzB6nL2z gzGAMYrLJiU1J7MstUjfLoEr4+zxl8wF+3kqPk0sbWB8y9nFyMEhIWAicf+TeRcjJ5ApJnHh 3nq2LkYuDiGBpYwSH3dvZINImEis33uEFSKxiFFi5YfrLBDOKiaJp19+s4JUsQkYSWw9OY0R xBYRkJD41X8VzGYWiJF4vf8H2CRhAWeJlv7JYDaLgKrErovnmEGu4BXwkJjTqwixTEHi2NSv YCM5BTwlXlz8wgJiCwG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lIs3OPt6hEPyK+2ymu/k20znu2qcf1c0oX3qlcx+38b51YZklgeZHv8eHVNzc +jU+aMHSCwY35EX+Ru6ewSxYfvISt2rnbuF+oUOuYZ/S2iWUWIozEg21mIuKEwEkjPIWtAIA AA== DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Cc: patches@linaro.org Subject: [U-Boot] [PATCH 3/6 V4] Sound: Support for MAX98095 codec in driver X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de 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 Changes in V4: - None 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 };