From patchwork Mon Jan 12 05:34:55 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oder Chiou X-Patchwork-Id: 5608131 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id CC7D39F357 for ; Mon, 12 Jan 2015 05:35:25 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BDDD32063D for ; Mon, 12 Jan 2015 05:35:24 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 71CE62062D for ; Mon, 12 Jan 2015 05:35:23 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 4D3BB260620; Mon, 12 Jan 2015 06:35:22 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 2897C2605E4; Mon, 12 Jan 2015 06:35:14 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 2E1B42605F5; Mon, 12 Jan 2015 06:35:13 +0100 (CET) Received: from rtits2.realtek.com (rtits2.realtek.com [60.250.210.242]) by alsa0.perex.cz (Postfix) with ESMTP id B229D2605C7 for ; Mon, 12 Jan 2015 06:35:05 +0100 (CET) Authenticated-By: X-SpamFilter-By: BOX Solutions SpamTrap 5.52 with qID t0C5Z11i000551, This message is accepted by code: ctloc85258 Received: from mail.realtek.com (rtitcas12.realtek.com.tw[172.21.6.16]) by rtits2.realtek.com (8.14.9/2.40/5.64) with ESMTP id t0C5Z11i000551 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT); Mon, 12 Jan 2015 13:35:01 +0800 Received: from sw-server.rtdomain (172.21.81.164) by RTITCAS12.realtek.com.tw (172.21.6.16) with Microsoft SMTP Server id 14.3.181.6; Mon, 12 Jan 2015 13:35:01 +0800 From: Oder Chiou To: , Date: Mon, 12 Jan 2015 13:34:55 +0800 Message-ID: <1421040895-15345-1-git-send-email-oder_chiou@realtek.com> X-Mailer: git-send-email 1.8.1.1.439.g50a6b54 MIME-Version: 1.0 X-Originating-IP: [172.21.81.164] Cc: Oder Chiou , alsa-devel@alsa-project.org, yang.a.fang@intel.com, john.lin@realtek.com, bardliao@realtek.com, flove@realtek.com Subject: [alsa-devel] [PATCH] ASoC: rt5677: Add the slot_width "25" support in the TDM mode X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP Add the slot_width "25" support in the TDM mode for the Intel platform. Signed-off-by: Oder Chiou --- sound/soc/codecs/rt5677.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sound/soc/codecs/rt5677.c b/sound/soc/codecs/rt5677.c index 32c368c..af34ffc 100644 --- a/sound/soc/codecs/rt5677.c +++ b/sound/soc/codecs/rt5677.c @@ -4123,6 +4123,7 @@ static int rt5677_set_tdm_slot(struct snd_soc_dai *dai, unsigned int tx_mask, val |= (1 << 8); break; case 24: + case 25: val |= (2 << 8); break; case 32: @@ -4136,9 +4137,14 @@ static int rt5677_set_tdm_slot(struct snd_soc_dai *dai, unsigned int tx_mask, switch (dai->id) { case RT5677_AIF1: snd_soc_update_bits(codec, RT5677_TDM1_CTRL1, 0x1f00, val); + if (slot_width == 25) + snd_soc_update_bits(codec, RT5677_DIG_MISC, 0x8000, + 0x8000); break; case RT5677_AIF2: snd_soc_update_bits(codec, RT5677_TDM2_CTRL1, 0x1f00, val); + if (slot_width == 25) + snd_soc_update_bits(codec, RT5677_DIG_MISC, 0x80, 0x80); break; default: break;