From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B82F5C432C0 for ; Wed, 20 Nov 2019 12:00:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 95A2E22444 for ; Wed, 20 Nov 2019 12:00:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729458AbfKTMAD (ORCPT ); Wed, 20 Nov 2019 07:00:03 -0500 Received: from esa1.mentor.iphmx.com ([68.232.129.153]:63369 "EHLO esa1.mentor.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728728AbfKTMAD (ORCPT ); Wed, 20 Nov 2019 07:00:03 -0500 IronPort-SDR: 0rYJjlmUZ2h0Bk9T3L0tlEfBVNf3VAn2vqhX7FB4ADOSPnK9T5L6qBB5AccqqIPoOjuJ0+WLUp M1XuQhvGXaZExxIPA6OZ3Jp6Tf6EriJdNcP6vvwWgBhsmsOW5/ZiNqYXaDGxMVO4xIV9MAjZID lcMpyAMtotX+HSnU4T6iN9XC4F5yZd+vszghFExZvUocEOPB5DIsjZ+4htfvkw8RNZIn3lEgYC kqm8QbrMKv/MXhgfdqOA3LBBh6ZF8Olbjow9r72oTgxt15lK+2Wh+H9syix1l0kR0e4Sce7pk9 hmc= X-IronPort-AV: E=Sophos;i="5.69,221,1571731200"; d="scan'208";a="45210031" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa1.mentor.iphmx.com with ESMTP; 20 Nov 2019 04:00:02 -0800 IronPort-SDR: M1RGJJYL1O4xfWcRR3qoAvqTVwR7qqWdH+Jd3iuqh7Yo+ZCJGQngPf0MhlnX4erpKXvVpz8IKE JoP5CVmiueKYN0xUlDIGHkqvNh2sb5x1kkBDl40VJEwLPEJTwY7KRk1dMe1TWpO2JR5rRzFLsv 1dILFDKGd5pxoN9HrCPBOW+W1nrqAOTbLCkyqO5hB4i4sxcRZ2hoYsmfCvOdwdvjvZYR4PsJfo Xlvxex/6BUBkml1lI1Gmm7qs7VXSEjTvhMLm7owk9+Nc8DrUz04ve3PIw68WoagRpRiccGhRfd H0c= From: Andrew Gabbasov To: , , Jaroslav Kysela , Takashi Iwai , Timo Wischer , Andrew Gabbasov Subject: [PATCH v4 5/7] ALSA: aloop: Move CABLE_VALID_BOTH to the top of file Date: Wed, 20 Nov 2019 05:58:54 -0600 Message-ID: <20191120115856.4125-6-andrew_gabbasov@mentor.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191120115856.4125-5-andrew_gabbasov@mentor.com> References: <20191120115856.4125-1-andrew_gabbasov@mentor.com> <20191120115856.4125-2-andrew_gabbasov@mentor.com> <20191120115856.4125-3-andrew_gabbasov@mentor.com> <20191120115856.4125-4-andrew_gabbasov@mentor.com> <20191120115856.4125-5-andrew_gabbasov@mentor.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-02.mgc.mentorg.com (139.181.222.2) To svr-ies-mbx-02.mgc.mentorg.com (139.181.222.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Timo Wischer so all functions can use the same. Signed-off-by: Timo Wischer Signed-off-by: Andrew Gabbasov --- sound/drivers/aloop.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sound/drivers/aloop.c b/sound/drivers/aloop.c index 2f208aaa54cf..0eacaa9d7862 100644 --- a/sound/drivers/aloop.c +++ b/sound/drivers/aloop.c @@ -55,6 +55,10 @@ MODULE_PARM_DESC(pcm_notify, "Break capture when PCM format/rate/channels change #define NO_PITCH 100000 +#define CABLE_VALID_PLAYBACK BIT(SNDRV_PCM_STREAM_PLAYBACK) +#define CABLE_VALID_CAPTURE BIT(SNDRV_PCM_STREAM_CAPTURE) +#define CABLE_VALID_BOTH (CABLE_VALID_PLAYBACK | CABLE_VALID_CAPTURE) + struct loopback_cable; struct loopback_pcm; @@ -224,10 +228,6 @@ static inline int loopback_jiffies_timer_stop_sync(struct loopback_pcm *dpcm) return 0; } -#define CABLE_VALID_PLAYBACK (1 << SNDRV_PCM_STREAM_PLAYBACK) -#define CABLE_VALID_CAPTURE (1 << SNDRV_PCM_STREAM_CAPTURE) -#define CABLE_VALID_BOTH (CABLE_VALID_PLAYBACK|CABLE_VALID_CAPTURE) - static int loopback_check_format(struct loopback_cable *cable, int stream) { struct snd_pcm_runtime *runtime, *cruntime; -- 2.21.0