summaryrefslogtreecommitdiff
path: root/drivers/soundwire/bus.h
diff options
context:
space:
mode:
authorSanyog Kale <sanyog.r.kale@intel.com>2018-04-26 16:08:13 +0300
committerVinod Koul <vkoul@kernel.org>2018-05-11 19:17:04 +0300
commitbbe7379d8040a88ea832fdcbe49a9d16e9b5755e (patch)
treeec8aa293c62c1f34fffd07e5150f262898729db1 /drivers/soundwire/bus.h
parent89e590535f32d4bc548bcf266f3b046e50942f6d (diff)
downloadlinux-bbe7379d8040a88ea832fdcbe49a9d16e9b5755e.tar.xz
soundwire: Add support for port management
Add Soundwire port data structures and APIS for initialization and release of ports. Signed-off-by: Sanyog Kale <sanyog.r.kale@intel.com> Signed-off-by: Shreyas NC <shreyas.nc@intel.com> Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/soundwire/bus.h')
-rw-r--r--drivers/soundwire/bus.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/drivers/soundwire/bus.h b/drivers/soundwire/bus.h
index 2e5043de9a4b..39e6811e435c 100644
--- a/drivers/soundwire/bus.h
+++ b/drivers/soundwire/bus.h
@@ -46,6 +46,27 @@ struct sdw_msg {
};
/**
+ * sdw_port_runtime: Runtime port parameters for Master or Slave
+ *
+ * @num: Port number. For audio streams, valid port number ranges from
+ * [1,14]
+ * @ch_mask: Channel mask
+ * @transport_params: Transport parameters
+ * @port_params: Port parameters
+ * @port_node: List node for Master or Slave port_list
+ *
+ * SoundWire spec has no mention of ports for Master interface but the
+ * concept is logically extended.
+ */
+struct sdw_port_runtime {
+ int num;
+ int ch_mask;
+ struct sdw_transport_params transport_params;
+ struct sdw_port_params port_params;
+ struct list_head port_node;
+};
+
+/**
* sdw_slave_runtime: Runtime Stream parameters for Slave
*
* @slave: Slave handle
@@ -53,12 +74,14 @@ struct sdw_msg {
* @ch_count: Number of channels handled by the Slave for
* this stream
* @m_rt_node: sdw_master_runtime list node
+ * @port_list: List of Slave Ports configured for this stream
*/
struct sdw_slave_runtime {
struct sdw_slave *slave;
enum sdw_data_direction direction;
unsigned int ch_count;
struct list_head m_rt_node;
+ struct list_head port_list;
};
/**
@@ -70,6 +93,7 @@ struct sdw_slave_runtime {
* @ch_count: Number of channels handled by the Master for
* this stream, can be zero.
* @slave_rt_list: Slave runtime list
+ * @port_list: List of Master Ports configured for this stream, can be zero.
* @bus_node: sdw_bus m_rt_list node
*/
struct sdw_master_runtime {
@@ -78,6 +102,7 @@ struct sdw_master_runtime {
enum sdw_data_direction direction;
unsigned int ch_count;
struct list_head slave_rt_list;
+ struct list_head port_list;
struct list_head bus_node;
};