From patchwork Sun Jul 21 16:24:01 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Nazzareno Trimarchi X-Patchwork-Id: 2830931 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 7C3459F4D4 for ; Sun, 21 Jul 2013 16:24:12 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A6DCD20143 for ; Sun, 21 Jul 2013 16:24:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D0BB02012D for ; Sun, 21 Jul 2013 16:24:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755740Ab3GUQYK (ORCPT ); Sun, 21 Jul 2013 12:24:10 -0400 Received: from mail-ee0-f50.google.com ([74.125.83.50]:43913 "EHLO mail-ee0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755584Ab3GUQYI (ORCPT ); Sun, 21 Jul 2013 12:24:08 -0400 Received: by mail-ee0-f50.google.com with SMTP id d49so3382308eek.9 for ; Sun, 21 Jul 2013 09:24:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=date:from:to:cc:subject:message-id:mime-version:content-type :content-disposition:user-agent:x-gm-message-state; bh=qRJEMeFWUCSAxE6b4TIseSp9O+buKl8GXnP3/k+Mkcw=; b=FeKklgi2VhCGB+UKzdQIQt1KUtmF+vmj8r4Kyjh3p7FNB7JcAbD45ihexA0HMS7/NS Yh0/RWdJBbUzBjQ5PIIU3XyPHvaNZ+UArsUJ7t5ZdmO8h12sZj9IcpyS1EqqVQYlOTQ+ qVPb8VhflrnP7DSQkP+RFnbYKfAPgb/LZzEqqlluGucUjJmq9wNiXEBZcuwzrtU5NFjz LKMDP5/UoPDrKM7hFL9qNX+DGTjIo6luXG6EJ224hTy/1AmHNbigeMU9EoIqT7J6zHRj SBQM8OjSWLyMz4MvI7KEtsFSloLgEx663QfAGDh1IuDB0lEwXAHPWSE3t3ANch03TKiy jlFw== X-Received: by 10.15.107.194 with SMTP id cb42mr23827981eeb.136.1374423846870; Sun, 21 Jul 2013 09:24:06 -0700 (PDT) Received: from panicking (net-2-39-214-241.cust.dsl.vodafone.it. [2.39.214.241]) by mx.google.com with ESMTPSA id w43sm44021940eez.6.2013.07.21.09.24.04 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sun, 21 Jul 2013 09:24:06 -0700 (PDT) Date: Sun, 21 Jul 2013 18:24:01 +0200 From: Michael Trimarchi To: Peter Ujfalusi , Liam Girdwood , Mark Brown Cc: linux-omap@vger.kernel.org, alsa-devel@alsa-project.org Subject: [PATCH] ASoC: omap-mcbsp: Support SND_SOC_DAIFMT_CBM_CFS for omap3/4 Message-ID: <20130721162400.GA17491@panicking> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-Gm-Message-State: ALoCoQkxvFLVuSsPJF7arkk5pXBkpNnVuqLRUC/yHoPW7Xr5iEVdvavqKFXugrtvMQUvywIKksHn Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Spam-Status: No, score=-8.3 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add SND_SOC_DAIFMT_CBM_CFS support for omap3/omap4. The patch was tested on a pandaboard-es board connected to the pcm1792a codec. mcbspx_fsx must configured as output and mcbspx_clkx must be configured as input. Signed-off-by: Michael Trimarchi Acked-by: Peter Ujfalusi --- sound/soc/omap/omap-mcbsp.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sound/soc/omap/omap-mcbsp.c b/sound/soc/omap/omap-mcbsp.c index 7483efb..6c19bba 100644 --- a/sound/soc/omap/omap-mcbsp.c +++ b/sound/soc/omap/omap-mcbsp.c @@ -433,6 +433,11 @@ static int omap_mcbsp_dai_set_dai_fmt(struct snd_soc_dai *cpu_dai, /* Sample rate generator drives the FS */ regs->srgr2 |= FSGM; break; + case SND_SOC_DAIFMT_CBM_CFS: + /* McBSP slave. FS clock as output */ + regs->srgr2 |= FSGM; + regs->pcr0 |= FSXM; + break; case SND_SOC_DAIFMT_CBM_CFM: /* McBSP slave */ break;