From patchwork Mon Jan 19 17:38:34 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean-Francois Moine X-Patchwork-Id: 5671851 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 011CDC058D for ; Tue, 20 Jan 2015 19:44:39 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4CED9202DD for ; Tue, 20 Jan 2015 19:44:38 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 21CD62049D for ; Tue, 20 Jan 2015 19:44:37 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 35C55261A97; Tue, 20 Jan 2015 20:44:36 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Status: No, score=-0.6 required=5.0 tests=BAYES_00, DATE_IN_PAST_24_48, FREEMAIL_FROM,UNPARSEABLE_RELAY autolearn=no version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 6081C260882; Tue, 20 Jan 2015 20:43:49 +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 D909E2606DA; Tue, 20 Jan 2015 20:43:47 +0100 (CET) Received: from smtp6-g21.free.fr (smtp6-g21.free.fr [212.27.42.6]) by alsa0.perex.cz (Postfix) with ESMTP id 5C6C32606B0 for ; Tue, 20 Jan 2015 20:43:23 +0100 (CET) Received: from localhost (unknown [IPv6:2a01:e35:2f5c:9de0:21c:dfff:fe9f:57fb]) by smtp6-g21.free.fr (Postfix) with ESMTP id 6007482298; Tue, 20 Jan 2015 20:41:15 +0100 (CET) X-Mailbox-Line: From c5ce41929ab14a3d200a6237181715539712ef07 Mon Sep 17 00:00:00 2001 Message-Id: In-Reply-To: References: From: Jean-Francois Moine Date: Mon, 19 Jan 2015 18:38:34 +0100 To: Mark Brown , Russell King - ARM Linux Cc: devicetree@vger.kernel.org, alsa-devel@alsa-project.org, Andrew Jackson , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Jyri Sarha , Dave Airlie Subject: [alsa-devel] [PATCH v10 2/9] ASoC: kirkwood: check the DAI type from the DAI name 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 When the DAIs are created from a graph of ports, their types are not tied to their ID. Signed-off-by: Jean-Francois Moine --- sound/soc/kirkwood/kirkwood-i2s.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/kirkwood/kirkwood-i2s.c b/sound/soc/kirkwood/kirkwood-i2s.c index 62d9c12..357f963 100644 --- a/sound/soc/kirkwood/kirkwood-i2s.c +++ b/sound/soc/kirkwood/kirkwood-i2s.c @@ -263,7 +263,7 @@ static int kirkwood_i2s_play_trigger(struct snd_pcm_substream *substream, case SNDRV_PCM_TRIGGER_START: /* configure */ ctl = priv->ctl_play; - if (dai->id == 0) + if (dai->name[0] == 'i') ctl &= ~KIRKWOOD_PLAYCTL_SPDIF_EN; /* i2s */ else ctl &= ~KIRKWOOD_PLAYCTL_I2S_EN; /* spdif */ @@ -331,7 +331,7 @@ static int kirkwood_i2s_rec_trigger(struct snd_pcm_substream *substream, case SNDRV_PCM_TRIGGER_START: /* configure */ ctl = priv->ctl_rec; - if (dai->id == 0) + if (dai->name[0] == 'i') ctl &= ~KIRKWOOD_RECCTL_SPDIF_EN; /* i2s */ else ctl &= ~KIRKWOOD_RECCTL_I2S_EN; /* spdif */