Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp5540159ybv; Mon, 17 Feb 2020 22:47:45 -0800 (PST) X-Google-Smtp-Source: APXvYqz1kF4b8UCIwSwWvMcPG277o3SOGJkdvNcsnEM0pluY/56X56fJfbO9HLJV+eZcteiiqNpt X-Received: by 2002:a9d:6a53:: with SMTP id h19mr15355584otn.120.1582008465604; Mon, 17 Feb 2020 22:47:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582008465; cv=none; d=google.com; s=arc-20160816; b=zl4JkL2m2iV+/m7LY0YIZQYsM7ZxkLAzV/TxN6FyVZrGDAEmWaEvIpm/Vh4oXEJd29 ep92h2Z8K9TfL6QtWP19DxgjwYqgeCfmgU4WmNRlWiWJGiZ1AUwt4iMPpXzysY5EC41x SFc1f/HcTuUcpEQru+03coSUUn0Z0nSRWghbPcgw9pEKIZWO4QwS8oJj84xVTKd0zaTH pfmMYodnje/cAj78Qvd7+MYX6oiILPtNrXY3OlAAppofzAM/+2i9YSsXfBymqPfG8UbG 48WOYZL57Nr/RApNoPff4AiuWKeoBt+UzkWw/sV9yIANYfoeGeNLxfl3ptA34d48SRPP tIKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from; bh=go90j01wpjVRyBBWCGDewXW5411kBNBEoi+DaOOcrm8=; b=rQaXO+JNRSIe295+GRVlBYeDmFI4R4jheyv8tg1l/0oIQTPk+3urVLSoR7fIuxCn7T RcN7cFUOB8lzshInPOAs636aiAMIl+aOPeobrlT6N5jAlS6QhiOkjkhwRHCs56zK1M7D m9I0QhVN/4koa/p4JRomIoUY0Qk2emdT0QHNnTE9bmVKJ60tZOzyFq5fFyblCDQzo6lv TC4qDG+7LmBgb2ByWvrBGRg3RN74xVAewk03c/ceFpCJvYIv2eGNtT3ISOvfzMjWt4jw dz/cJjdmr2w65H4zqhUjysZ4fTsD7cGkjvmktZ5VkpBhz5QDexLrrB0WEP1cuhQeKsTq GtOA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k128si7727235oih.274.2020.02.17.22.47.33; Mon, 17 Feb 2020 22:47:45 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726293AbgBRGqO (ORCPT + 99 others); Tue, 18 Feb 2020 01:46:14 -0500 Received: from inva020.nxp.com ([92.121.34.13]:42366 "EHLO inva020.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726180AbgBRGqN (ORCPT ); Tue, 18 Feb 2020 01:46:13 -0500 Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 2240F1A1005; Tue, 18 Feb 2020 07:46:12 +0100 (CET) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 1E6731A3774; Tue, 18 Feb 2020 07:46:05 +0100 (CET) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 8738C4034D; Tue, 18 Feb 2020 14:45:27 +0800 (SGT) From: Shengjiu Wang To: timur@kernel.org, nicoleotsuka@gmail.com, Xiubo.Lee@gmail.com, festevam@gmail.com, broonie@kernel.org, alsa-devel@alsa-project.org, lgirdwood@gmail.com, perex@perex.cz, tiwai@suse.com, robh+dt@kernel.org, mark.rutland@arm.com, devicetree@vger.kernel.org Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 1/3] ASoC: fsl_asrc: Move common definition to fsl_asrc_common Date: Tue, 18 Feb 2020 14:39:35 +0800 Message-Id: X-Mailer: git-send-email 2.7.4 In-Reply-To: References: In-Reply-To: References: X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org There is a new ASRC included in i.MX serial platform, there are some common definition can be shared with each other. So move the common definition to a separate header file. Signed-off-by: Shengjiu Wang --- sound/soc/fsl/fsl_asrc.h | 11 +---------- sound/soc/fsl/fsl_asrc_common.h | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+), 10 deletions(-) create mode 100644 sound/soc/fsl/fsl_asrc_common.h diff --git a/sound/soc/fsl/fsl_asrc.h b/sound/soc/fsl/fsl_asrc.h index 8a821132d9d0..e8abb27ffeda 100644 --- a/sound/soc/fsl/fsl_asrc.h +++ b/sound/soc/fsl/fsl_asrc.h @@ -10,8 +10,7 @@ #ifndef _FSL_ASRC_H #define _FSL_ASRC_H -#define IN 0 -#define OUT 1 +#include "fsl_asrc_common.h" #define ASRC_DMA_BUFFER_NUM 2 #define ASRC_INPUTFIFO_THRESHOLD 32 @@ -283,14 +282,6 @@ #define ASRMCR1i_OW16_MASK (1 << ASRMCR1i_OW16_SHIFT) #define ASRMCR1i_OW16(v) ((v) << ASRMCR1i_OW16_SHIFT) - -enum asrc_pair_index { - ASRC_INVALID_PAIR = -1, - ASRC_PAIR_A = 0, - ASRC_PAIR_B = 1, - ASRC_PAIR_C = 2, -}; - #define ASRC_PAIR_MAX_NUM (ASRC_PAIR_C + 1) enum asrc_inclk { diff --git a/sound/soc/fsl/fsl_asrc_common.h b/sound/soc/fsl/fsl_asrc_common.h new file mode 100644 index 000000000000..8acc55778ff2 --- /dev/null +++ b/sound/soc/fsl/fsl_asrc_common.h @@ -0,0 +1,21 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright 2019 NXP + * + */ + +#ifndef _FSL_ASRC_COMMON_H +#define _FSL_ASRC_COMMON_H + +/* directions */ +#define IN 0 +#define OUT 1 + +enum asrc_pair_index { + ASRC_INVALID_PAIR = -1, + ASRC_PAIR_A = 0, + ASRC_PAIR_B = 1, + ASRC_PAIR_C = 2, +}; + +#endif /* _FSL_ASRC_COMMON_H */ -- 2.21.0