From patchwork Sun Sep 28 14:19:27 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean-Francois Moine X-Patchwork-Id: 4991931 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.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 103489F1D4 for ; Sun, 28 Sep 2014 15:03:30 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 42DF520270 for ; Sun, 28 Sep 2014 15:03:29 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 207DF20260 for ; Sun, 28 Sep 2014 15:03:28 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id CC968260590; Sun, 28 Sep 2014 17:03:25 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id C00A1260580; Sun, 28 Sep 2014 17:03:14 +0200 (CEST) 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 85015260582; Sun, 28 Sep 2014 17:03:13 +0200 (CEST) Received: from smtp4-g21.free.fr (smtp4-g21.free.fr [212.27.42.4]) by alsa0.perex.cz (Postfix) with ESMTP id 57B6926057C for ; Sun, 28 Sep 2014 17:03:05 +0200 (CEST) Received: from localhost (unknown [IPv6:2a01:e35:2f5c:9de0:212:bfff:fe1e:9ce4]) by smtp4-g21.free.fr (Postfix) with ESMTP id AEB654C8090; Sun, 28 Sep 2014 17:02:32 +0200 (CEST) X-Mailbox-Line: From e9c39a7f13addee8a259a41118176e99de2c9f46 Mon Sep 17 00:00:00 2001 From: Jean-Francois Moine Date: Sun, 28 Sep 2014 16:19:27 +0200 To: Mark Brown , Russell King - ARM Linux Message-Id: <20140928150313.85015260582@alsa0.perex.cz> Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Subject: [alsa-devel] [PATCH] ASoC:kirkwood: Don't raise an error when no DAI format 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: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP The two DAIs of the kirkwood controller have a unique PCM format. The simple-card sets the audio hardware definitions of all CPU DAIs. The PCM format is defined only when it is present in the DT. This patch prevents the controller to raise an error when the DT audio card definition by the simple card contains the PCM format of one CPU DAI only. Signed-off-by: Jean-Francois Moine --- sound/soc/kirkwood/kirkwood-i2s.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sound/soc/kirkwood/kirkwood-i2s.c b/sound/soc/kirkwood/kirkwood-i2s.c index 0704cd6..26d5f85 100644 --- a/sound/soc/kirkwood/kirkwood-i2s.c +++ b/sound/soc/kirkwood/kirkwood-i2s.c @@ -45,6 +45,8 @@ static int kirkwood_i2s_set_fmt(struct snd_soc_dai *cpu_dai, unsigned long value; switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) { + case 0: + return 0; /* already done (simple-card) */ case SND_SOC_DAIFMT_RIGHT_J: mask = KIRKWOOD_I2S_CTL_RJ; break;