From patchwork Mon Jun 24 13:42:05 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Ujfalusi X-Patchwork-Id: 18075 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yh0-f72.google.com (mail-yh0-f72.google.com [209.85.213.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id C714C25CFE for ; Mon, 24 Jun 2013 13:43:06 +0000 (UTC) Received: by mail-yh0-f72.google.com with SMTP id z20sf16066304yhz.11 for ; Mon, 24 Jun 2013 06:43:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-beenthere:x-forwarded-to:x-forwarded-for:delivered-to:from:to:cc :subject:date:message-id:x-mailer:in-reply-to:references :mime-version:x-gm-message-state:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-google-group-id:list-post:list-help:list-archive:list-unsubscribe :content-type; bh=Z3OyQ7TC6I09aFW1GYkQTyR4uaQfL6b7RI1xXC4W2I4=; b=kgsl74ccMj5cESLi6cqCniHmAbhSDPmUypT56hqOgPTO0yato+6xPWR4MhK900Ko2O OkKyUoWNX+32yQf4xgv9GjcE+jK2yL/zekuTEIAAyqAGqx2/c9+lwLDsEl1vrQocV36y +dgXiuvhHjRzErNHhKsFRHfD0k5qYLeYk+wJlO14HHN/b57b3eTesDw7O41JB2KVSlr1 4Xl7olAoUPQgoiFzvyPGF7oh9yy+Jo07Fi/qP2T6o89XYv58yH3+m4ZRBacUBC+6uQyQ 3W0fUOdH6sNkKShAc9gcbYG94Z/+A6oxqecZtSzSPmeJaga3L2aBzmYBCZktlf/HqzDh r7nw== X-Received: by 10.224.59.205 with SMTP id m13mr25974222qah.7.1372081345269; Mon, 24 Jun 2013 06:42:25 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.82.136 with SMTP id i8ls465706qey.37.gmail; Mon, 24 Jun 2013 06:42:25 -0700 (PDT) X-Received: by 10.58.46.48 with SMTP id s16mr11694875vem.52.1372081345144; Mon, 24 Jun 2013 06:42:25 -0700 (PDT) Received: from mail-vb0-x233.google.com (mail-vb0-x233.google.com [2607:f8b0:400c:c02::233]) by mx.google.com with ESMTPS id d5si4881308vcz.8.2013.06.24.06.42.25 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 24 Jun 2013 06:42:25 -0700 (PDT) Received-SPF: neutral (google.com: 2607:f8b0:400c:c02::233 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=2607:f8b0:400c:c02::233; Received: by mail-vb0-f51.google.com with SMTP id x17so8164432vbf.10 for ; Mon, 24 Jun 2013 06:42:25 -0700 (PDT) X-Received: by 10.220.110.78 with SMTP id m14mr11315011vcp.53.1372081345034; Mon, 24 Jun 2013 06:42:25 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.58.165.8 with SMTP id yu8csp28077veb; Mon, 24 Jun 2013 06:42:23 -0700 (PDT) X-Received: by 10.236.172.228 with SMTP id t64mr13152339yhl.88.1372081342694; Mon, 24 Jun 2013 06:42:22 -0700 (PDT) Received: from comal.ext.ti.com (comal.ext.ti.com. [198.47.26.152]) by mx.google.com with ESMTPS id l27si9313137yhm.240.2013.06.24.06.42.22 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 24 Jun 2013 06:42:22 -0700 (PDT) Received-SPF: pass (google.com: domain of peter.ujfalusi@ti.com designates 198.47.26.152 as permitted sender) client-ip=198.47.26.152; Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id r5ODgD6G007508; Mon, 24 Jun 2013 08:42:13 -0500 Received: from DLEE71.ent.ti.com (dlee71.ent.ti.com [157.170.170.114]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id r5ODgDbC003001; Mon, 24 Jun 2013 08:42:13 -0500 Received: from dlelxv22.itg.ti.com (172.17.1.197) by DLEE71.ent.ti.com (157.170.170.114) with Microsoft SMTP Server id 14.2.342.3; Mon, 24 Jun 2013 08:42:13 -0500 Received: from barack.emea.dhcp.ti.com (barack.emea.dhcp.ti.com [137.167.125.74]) by dlelxv22.itg.ti.com (8.13.8/8.13.8) with ESMTP id r5ODg7o9028079; Mon, 24 Jun 2013 08:42:12 -0500 From: Peter Ujfalusi To: Mark Brown , Liam Girdwood CC: Misael Lopez Cruz , , , Jyri Sarha Subject: [PATCH 3/4] ASoC: twl6040: Assign id for each DAI Date: Mon, 24 Jun 2013 15:42:05 +0200 Message-ID: <1372081326-6917-4-git-send-email-peter.ujfalusi@ti.com> X-Mailer: git-send-email 1.8.2.1 In-Reply-To: <1372081326-6917-1-git-send-email-peter.ujfalusi@ti.com> References: <1372081326-6917-1-git-send-email-peter.ujfalusi@ti.com> MIME-Version: 1.0 X-Gm-Message-State: ALoCoQklNMoYvC0Ebr8WVgxoaOxjeeO/aGltFN02hFnQtX6VreRVmVBAPTcOvI+OqKuCvTt/2+9U X-Original-Sender: peter.ujfalusi@ti.com X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 2607:f8b0:400c:c02::233 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Later we can identify the DAIs by this ID number. Signed-off-by: Peter Ujfalusi --- sound/soc/codecs/twl6040.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/sound/soc/codecs/twl6040.c b/sound/soc/codecs/twl6040.c index c2f2fdb..9ea3dbc 100644 --- a/sound/soc/codecs/twl6040.c +++ b/sound/soc/codecs/twl6040.c @@ -38,6 +38,14 @@ #include "twl6040.h" +enum twl6040_dai_id { + TWL6040_DAI_LEGACY = 0, + TWL6040_DAI_UL, + TWL6040_DAI_DL1, + TWL6040_DAI_DL2, + TWL6040_DAI_VIB, +}; + #define TWL6040_RATES SNDRV_PCM_RATE_8000_96000 #define TWL6040_FORMATS (SNDRV_PCM_FMTBIT_S32_LE) @@ -1036,6 +1044,7 @@ static const struct snd_soc_dai_ops twl6040_dai_ops = { static struct snd_soc_dai_driver twl6040_dai[] = { { .name = "twl6040-legacy", + .id = TWL6040_DAI_LEGACY, .playback = { .stream_name = "Legacy Playback", .channels_min = 1, @@ -1054,6 +1063,7 @@ static struct snd_soc_dai_driver twl6040_dai[] = { }, { .name = "twl6040-ul", + .id = TWL6040_DAI_UL, .capture = { .stream_name = "Capture", .channels_min = 1, @@ -1065,6 +1075,7 @@ static struct snd_soc_dai_driver twl6040_dai[] = { }, { .name = "twl6040-dl1", + .id = TWL6040_DAI_DL1, .playback = { .stream_name = "Headset Playback", .channels_min = 1, @@ -1076,6 +1087,7 @@ static struct snd_soc_dai_driver twl6040_dai[] = { }, { .name = "twl6040-dl2", + .id = TWL6040_DAI_DL2, .playback = { .stream_name = "Handsfree Playback", .channels_min = 1, @@ -1087,6 +1099,7 @@ static struct snd_soc_dai_driver twl6040_dai[] = { }, { .name = "twl6040-vib", + .id = TWL6040_DAI_VIB, .playback = { .stream_name = "Vibra Playback", .channels_min = 1,