LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: alsa-devel@alsa-project.org
Cc: linux-kernel@vger.kernel.org, tiwai@suse.de, broonie@kernel.org,
	vkoul@kernel.org, gregkh@linuxfoundation.org, jank@cadence.com,
	srinivas.kandagatla@linaro.org,
	Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>,
	Sanyog Kale <sanyog.r.kale@intel.com>
Subject: [PATCH v2 03/15] soundwire: add port-related definitions
Date: Wed, 22 May 2019 14:47:19 -0500	[thread overview]
Message-ID: <20190522194732.25704-4-pierre-louis.bossart@linux.intel.com> (raw)
In-Reply-To: <20190522194732.25704-1-pierre-louis.bossart@linux.intel.com>

Somehow previous header files did not include definition for
sink/source, flow and grouping.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
---
 include/linux/soundwire/sdw.h | 53 +++++++++++++++++++++++++++++++++++
 1 file changed, 53 insertions(+)

diff --git a/include/linux/soundwire/sdw.h b/include/linux/soundwire/sdw.h
index 35662d9c2c62..69ae680a5a21 100644
--- a/include/linux/soundwire/sdw.h
+++ b/include/linux/soundwire/sdw.h
@@ -41,6 +41,31 @@ struct sdw_slave;
 #define SDW_DAI_ID_RANGE_START		100
 #define SDW_DAI_ID_RANGE_END		200
 
+enum {
+	SDW_PORT_DIRN_SINK = 0,
+	SDW_PORT_DIRN_SOURCE,
+	SDW_PORT_DIRN_MAX,
+};
+
+/*
+ * constants for flow control, ports and transport
+ *
+ * these are bit masks as devices can have multiple capabilities
+ */
+
+/*
+ * flow modes for SDW port. These can be isochronous, tx controlled,
+ * rx controlled or async
+ */
+#define SDW_PORT_FLOW_MODE_ISOCH	0
+#define SDW_PORT_FLOW_MODE_TX_CNTRL	BIT(0)
+#define SDW_PORT_FLOW_MODE_RX_CNTRL	BIT(1)
+#define SDW_PORT_FLOW_MODE_ASYNC	GENMASK(1, 0)
+
+/* sample packaging for block. It can be per port or per channel */
+#define SDW_BLOCK_PACKG_PER_PORT	BIT(0)
+#define SDW_BLOCK_PACKG_PER_CH		BIT(1)
+
 /**
  * enum sdw_slave_status - Slave status
  * @SDW_SLAVE_UNATTACHED: Slave is not attached with the bus.
@@ -76,6 +101,14 @@ enum sdw_command_response {
 	SDW_CMD_FAIL_OTHER = 4,
 };
 
+/* block group count enum */
+enum sdw_dpn_grouping {
+	SDW_BLK_GRP_CNT_1 = 0,
+	SDW_BLK_GRP_CNT_2 = 1,
+	SDW_BLK_GRP_CNT_3 = 2,
+	SDW_BLK_GRP_CNT_4 = 3,
+};
+
 /**
  * enum sdw_stream_type: data stream type
  *
@@ -100,6 +133,26 @@ enum sdw_data_direction {
 	SDW_DATA_DIR_TX = 1,
 };
 
+/**
+ * enum sdw_port_data_mode: Data Port mode
+ *
+ * @SDW_PORT_DATA_MODE_NORMAL: Normal data mode where audio data is received
+ * and transmitted.
+ * @SDW_PORT_DATA_MODE_STATIC_1: Simple test mode which uses static value of
+ * logic 1. The encoding will result in signal transitions at every bitslot
+ * owned by this Port
+ * @SDW_PORT_DATA_MODE_STATIC_0: Simple test mode which uses static value of
+ * logic 0. The encoding will result in no signal transitions
+ * @SDW_PORT_DATA_MODE_PRBS: Test mode which uses a PRBS generator to produce
+ * a pseudo random data pattern that is transferred
+ */
+enum sdw_port_data_mode {
+	SDW_PORT_DATA_MODE_NORMAL = 0,
+	SDW_PORT_DATA_MODE_STATIC_1 = 1,
+	SDW_PORT_DATA_MODE_STATIC_0 = 2,
+	SDW_PORT_DATA_MODE_PRBS = 3,
+};
+
 /*
  * SDW properties, defined in MIPI DisCo spec v1.0
  */
-- 
2.20.1


  parent reply	other threads:[~2019-05-22 19:49 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-22 19:47 [PATCH v2 00/15] soundwire: corrections to ACPI/DisCo/Intel support Pierre-Louis Bossart
2019-05-22 19:47 ` [PATCH v2 01/15] soundwire: intel: filter SoundWire controller device search Pierre-Louis Bossart
2019-05-22 19:47 ` [PATCH v2 02/15] soundwire: mipi_disco: fix master/link error Pierre-Louis Bossart
2019-05-22 19:47 ` Pierre-Louis Bossart [this message]
2019-05-22 19:47 ` [PATCH v2 04/15] soundwire: remove master data port properties Pierre-Louis Bossart
2019-05-22 19:47 ` [PATCH v2 05/15] soundwire: mipi-disco: remove master_count property for masters Pierre-Louis Bossart
2019-05-22 19:47 ` [PATCH v2 06/15] soundwire: rename 'freq' fields Pierre-Louis Bossart
2019-05-22 19:47 ` [PATCH v2 07/15] soundwire: mipi-disco: fix clock stop modes Pierre-Louis Bossart
2019-05-22 19:47 ` [PATCH v2 08/15] soundwire: clarify comment Pierre-Louis Bossart
2019-05-22 19:47 ` [PATCH v2 09/15] soundwire: rename/clarify MIPI DisCo properties Pierre-Louis Bossart
2019-05-22 19:47 ` [PATCH v2 10/15] soundwire: cadence_master: use rate_limited dynamic debug Pierre-Louis Bossart
2019-05-22 19:47 ` [PATCH v2 11/15] soundwire: cadence_master: log Slave status mask on errors Pierre-Louis Bossart
2019-05-22 19:47 ` [PATCH v2 12/15] soundwire: cadence_master: check the number of bidir PDIs Pierre-Louis Bossart
2019-05-22 19:47 ` [PATCH v2 13/15] soundwire: Intel: add log for number of PCM and PDM PDIs Pierre-Louis Bossart
2019-05-22 19:47 ` [PATCH v2 14/15] soundwire: fix typo in comments Pierre-Louis Bossart
2019-05-22 19:47 ` [PATCH v2 15/15] soundwire: intel_init: add checks on link numbers Pierre-Louis Bossart
2019-05-27  5:23 ` [PATCH v2 00/15] soundwire: corrections to ACPI/DisCo/Intel support Vinod Koul

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190522194732.25704-4-pierre-louis.bossart@linux.intel.com \
    --to=pierre-louis.bossart@linux.intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jank@cadence.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sanyog.r.kale@intel.com \
    --cc=srinivas.kandagatla@linaro.org \
    --cc=tiwai@suse.de \
    --cc=vkoul@kernel.org \
    --subject='Re: [PATCH v2 03/15] soundwire: add port-related definitions' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).