From patchwork Thu Apr 21 18:19:03 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Gardiner X-Patchwork-Id: 725291 Received: from devils.ext.ti.com (devils.ext.ti.com [198.47.26.153]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p3LIKhZA013066 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 21 Apr 2011 18:21:03 GMT Received: from dlep34.itg.ti.com ([157.170.170.115]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id p3LIJNQZ002979 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 21 Apr 2011 13:19:23 -0500 Received: from linux.omap.com (localhost [127.0.0.1]) by dlep34.itg.ti.com (8.13.7/8.13.7) with ESMTP id p3LIJLcR009364; Thu, 21 Apr 2011 13:19:23 -0500 (CDT) Received: from linux.omap.com (localhost [127.0.0.1]) by linux.omap.com (Postfix) with ESMTP id 4F8AC8062A; Thu, 21 Apr 2011 13:19:21 -0500 (CDT) X-Original-To: davinci-linux-open-source@linux.davincidsp.com Delivered-To: davinci-linux-open-source@linux.davincidsp.com Received: from dflp52.itg.ti.com (dflp52.itg.ti.com [128.247.22.96]) by linux.omap.com (Postfix) with ESMTP id A3D2E8062C for ; Thu, 21 Apr 2011 13:19:14 -0500 (CDT) Received: from neches.ext.ti.com (localhost [127.0.0.1]) by dflp52.itg.ti.com (8.13.7/8.13.7) with ESMTP id p3LIJEem002556 for ; Thu, 21 Apr 2011 13:19:14 -0500 (CDT) Received: from psmtp.com (na3sys009amx226.postini.com [74.125.149.110]) by neches.ext.ti.com (8.13.7/8.13.7) with SMTP id p3LIJDsU014567 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 21 Apr 2011 13:19:14 -0500 Received: from na3sys009aog104.obsmtp.com ([209.85.161.176]) (using TLSv1) by na3sys009amx226.postini.com ([74.125.148.10]) with SMTP; Thu, 21 Apr 2011 11:19:14 PDT Received: from mail-gx0-f176.google.com ([209.85.161.176]) (using TLSv1) by na3sys009aob104.postini.com ([74.125.148.12]) with SMTP ID DSNKTbB1IYTO8tCvdk3N1eWDrWafNY8JYA9S@postini.com; Thu, 21 Apr 2011 11:19:14 PDT Received: by mail-gx0-f176.google.com with SMTP id 7so779855gxk.7 for ; Thu, 21 Apr 2011 11:19:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nanometrics.ca; s=google; h=domainkey-signature:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references; bh=O6KfR/ApYC5Ht4t6s76zWmNYZBfA1d3+nTHrbFXo3WE=; b=QUTLXGJt4l9w3YuUhKE20yWFjAeN//LBeIp4A8DqnUcSgy8YFOJXb6IIfxzmTnDJ5C YVjkq2XmSeWxsv+NVL74mBCpJlGblfkvtehBldeZ/mJ1/JAGScC0TKOu/VTlJMl7iOju SMRIrgb+wRHrryPtJgYnD45XzNdxkPuUGRVbg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=nanometrics.ca; s=google; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; b=SqVnwZsHN/Jyg8WONjYdczbnnjrwTlOlS6sEtn6/5tzGxthOifSBwWEMm8UMiNPs7t rIvjrIhL9017+xdF4d0AX7ZicbNmLgglACoOVt3Od69533Wf2HJURB9KKbLeta44Ty75 WRrq9NQ1+8K9PQd8sH0Zd+s9O6woaRDDLaONU= Received: by 10.236.28.129 with SMTP id g1mr324135yha.84.1303409951620; Thu, 21 Apr 2011 11:19:11 -0700 (PDT) Received: from localhost.localdomain ([206.191.47.130]) by mx.google.com with ESMTPS id 13sm940691yhl.72.2011.04.21.11.19.10 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 21 Apr 2011 11:19:10 -0700 (PDT) From: Ben Gardiner To: Liam Girdwood , alsa-devel@alsa-project.org Subject: [PATCH 3/4] davinci-mcasp: fix _CBM_CFS hw_params Date: Thu, 21 Apr 2011 14:19:03 -0400 Message-Id: <831ad13442c7bca120d24d8679da614b20a0090d.1303408522.git.bengardiner@nanometrics.ca> X-Mailer: git-send-email 1.7.1 In-Reply-To: References: X-pstn-neptune: 0/0/0.00/0 X-pstn-levels: (S:99.90000/99.90000 CV:99.9000 FC:95.5390 LC:95.5390 R:95.9108 P:95.9108 M:97.0282 C:98.6951 ) X-pstn-settings: 2 (0.5000:0.0750) s cv GT3 gt2 gt1 r p m c X-pstn-addresses: from [db-null] Cc: davinci-linux-open-source@linux.davincidsp.com, Takashi Iwai , Mark Brown , linux-kernel@vger.kernel.org, Jaroslav Kysela X-BeenThere: davinci-linux-open-source@linux.davincidsp.com X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: davinci-linux-open-source-bounces@linux.davincidsp.com Errors-To: davinci-linux-open-source-bounces@linux.davincidsp.com X-Greylist: Sender succeeded STARTTLS authentication, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Thu, 21 Apr 2011 18:21:03 +0000 (UTC) The current davinci_mcasp_set_dai_fmt() sets bits ACLKXE and ACLKRE (CLKXM and CLKRM as they are reffered to in SPRUFM1 [1]) for codec clock-slave/ frame-slave mode (_CBS_CFS) which selects internally generated bit-clock and frame-sync signals; however, it does the same thing again for codec clock-master/frame-slave mode (_CBM_CFS) in the very next case statement which is incorrectly selecting internally generated bit-clocks in this mode. For codec clock-master/frame-slave mode (_CBM_CFS), clear bits ACLKXE and ACLKRE to select externally-generated bit-clocks. [1] http://www.ti.com/litv/pdf/sprufm1 Signed-off-by: Ben Gardiner Reviewed-by: James Nuss --- sound/soc/davinci/davinci-mcasp.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/davinci/davinci-mcasp.c b/sound/soc/davinci/davinci-mcasp.c index 1aa24a1..8004643 100644 --- a/sound/soc/davinci/davinci-mcasp.c +++ b/sound/soc/davinci/davinci-mcasp.c @@ -439,10 +439,10 @@ static int davinci_mcasp_set_dai_fmt(struct snd_soc_dai *cpu_dai, break; case SND_SOC_DAIFMT_CBM_CFS: /* codec is clock master and frame slave */ - mcasp_set_bits(base + DAVINCI_MCASP_ACLKXCTL_REG, ACLKXE); + mcasp_clr_bits(base + DAVINCI_MCASP_ACLKXCTL_REG, ACLKXE); mcasp_set_bits(base + DAVINCI_MCASP_TXFMCTL_REG, AFSXE); - mcasp_set_bits(base + DAVINCI_MCASP_ACLKRCTL_REG, ACLKRE); + mcasp_clr_bits(base + DAVINCI_MCASP_ACLKRCTL_REG, ACLKRE); mcasp_set_bits(base + DAVINCI_MCASP_RXFMCTL_REG, AFSRE); mcasp_set_bits(base + DAVINCI_MCASP_PDIR_REG,