From patchwork Mon Jul 22 18:27:21 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?TWljaGHFgiBNaXJvc8WCYXc=?= X-Patchwork-Id: 11053271 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6A85013AC for ; Mon, 22 Jul 2019 18:29:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5B19D21FAD for ; Mon, 22 Jul 2019 18:29:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4C45126E76; Mon, 22 Jul 2019 18:29:43 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.4 required=2.0 tests=BAYES_00,DKIM_ADSP_ALL, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id F2B2121FAD for ; Mon, 22 Jul 2019 18:29:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:To:MIME-Version:Subject:From:References :In-Reply-To:Message-Id:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=tee/EMWYKt+lkDBvTms3pZ21Ee8oWxlhfIi3lkbKIdY=; b=pzN+HaC0QoZyA5 W0xl6xZvZke+YLY2u+n3obeJDHnR+jvu9OURvvpquIt1Xs2lmqstUXakd+54wYvMSMW0xdAqJT+GR 3WWAtwNc3IpBehPHOgJ59oHs0RIr0H04k8CN5oibHrODkZk/U64dya/dk1B86ju1hgdn4/Vuc8h1F gRg9rsI3bOV1JZcwWF2NDzGO9qvewartqeZM8k9rm+5uqFj9JKi+NIeHBUKrsDW+8euEq1kmwRgsM Qf0LVglLff9RoUSGp7w0NQm1rnmMwWlQkkYLMQ4A0XN7noNbHscQs4ncGTwMmS69rZi3ft6OnQrKU rEBxGBHrtAixwsASpKOA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hpd49-0002Kj-N1; Mon, 22 Jul 2019 18:29:42 +0000 Received: from rere.qmqm.pl ([91.227.64.183]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hpd24-0001PF-6D for linux-arm-kernel@lists.infradead.org; Mon, 22 Jul 2019 18:27:35 +0000 Received: from remote.user (localhost [127.0.0.1]) by rere.qmqm.pl (Postfix) with ESMTPSA id 45sqmp2BlBzKH; Mon, 22 Jul 2019 20:26:02 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=rere.qmqm.pl; s=1; t=1563819962; bh=VdkVzwoOtZlqZueF8/cl4Cw/TEd5aeM0H0H+HkKBuHw=; h=Date:In-Reply-To:References:From:Subject:To:Cc:From; b=RUZuuVyAeEN08aQbW1aMBGHCntMzvEQsWdZxsnV2TlF6VAHLXArCKYrnuuj36S7mg 2qWx/TLjBSSR6CZk7m5jRtdBSNt8cceRKCfVNhR2JN+yUN9Bnren11ECGv7NA6KSb6 E3iWesF/2y7vRobyqmMapyKQu1lj741wKFYJQf/poAs/E8adqu90kYe1+C+EEodrnk KRmbQ6Fvle1+zSacZp2Tvk70Mtgdyd6HVdVhehmMqXRa66g+Cjnk3N5FO6uNO/J/aw 8d/dktp4sRjoFl+NdsfJY/QPNdinmKY8wOGJUImuEpDUqhBrzb1CkSIjiX6Xju4x7e ZEEwZKewbbucw== X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.100.3 at mail Date: Mon, 22 Jul 2019 20:27:21 +0200 Message-Id: In-Reply-To: References: From: =?utf-8?b?TWljaGHFgiBNaXJvc8WCYXc=?= Subject: [PATCH 3/5] ASoC: atmel_ssc_dai: implement left-justified data mode MIME-Version: 1.0 To: alsa-devel@alsa-project.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190722_112733_298524_6A2028ED X-CRM114-Status: UNSURE ( 6.63 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alexandre Belloni , Liam Girdwood , Takashi Iwai , Ludovic Desroches , Mark Brown , Codrin Ciubotariu , Jaroslav Kysela , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Michał Mirosław Reviewed-by: Codrin Ciubotariu --- sound/soc/atmel/atmel_ssc_dai.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/sound/soc/atmel/atmel_ssc_dai.c b/sound/soc/atmel/atmel_ssc_dai.c index b2992496e52f..04541d7c33fe 100644 --- a/sound/soc/atmel/atmel_ssc_dai.c +++ b/sound/soc/atmel/atmel_ssc_dai.c @@ -564,7 +564,20 @@ static int atmel_ssc_hw_params(struct snd_pcm_substream *substream, switch (ssc_p->daifmt & SND_SOC_DAIFMT_FORMAT_MASK) { + case SND_SOC_DAIFMT_LEFT_J: + /* left-justified format */ + fs_osync = SSC_FSOS_POSITIVE; + + rcmr = SSC_BF(RCMR_STTDLY, 0) + | SSC_BF(RCMR_START, SSC_START_RISING_RF); + + tcmr = SSC_BF(TCMR_STTDLY, 0) + | SSC_BF(TCMR_START, SSC_START_RISING_RF); + + break; + case SND_SOC_DAIFMT_I2S: + /* I2S format = left-justified with start bit and inverted LRCLK */ fs_osync = SSC_FSOS_NEGATIVE; rcmr = SSC_BF(RCMR_STTDLY, 1)