summaryrefslogtreecommitdiff
path: root/drivers/soundwire/bus.h
diff options
context:
space:
mode:
authorPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>2019-08-05 19:55:10 -0500
committerVinod Koul <vkoul@kernel.org>2019-08-21 14:36:01 +0530
commitfe4b70f2ce27e961198605ac5ddc288f066f7150 (patch)
treebe3752b7ce1b9748376495127beb6804ab17f563 /drivers/soundwire/bus.h
parent6e0ac6a663b834b9ea16b2340e66aa3717c465b2 (diff)
soundwire: export helpers to find row and column values
Add a prefix for common tables and export 2 helpers to set the frame shapes based on row/col values. These changes simplify bandwidth allocation algorithms as well as the Cadence parts which all need to convert from frame shape to indices used by the standard. These helpers are used in the following patch. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20190806005522.22642-6-pierre-louis.bossart@linux.intel.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/soundwire/bus.h')
-rw-r--r--drivers/soundwire/bus.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/soundwire/bus.h b/drivers/soundwire/bus.h
index 3048ca153f22..4429c51c5f86 100644
--- a/drivers/soundwire/bus.h
+++ b/drivers/soundwire/bus.h
@@ -49,8 +49,11 @@ struct sdw_msg {
#define SDW_DOUBLE_RATE_FACTOR 2
-extern int rows[SDW_FRAME_ROWS];
-extern int cols[SDW_FRAME_COLS];
+extern int sdw_rows[SDW_FRAME_ROWS];
+extern int sdw_cols[SDW_FRAME_COLS];
+
+int sdw_find_row_index(int row);
+int sdw_find_col_index(int col);
/**
* sdw_port_runtime: Runtime port parameters for Master or Slave