diff options
author | Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> | 2020-09-20 22:32:05 +0300 |
---|---|---|
committer | Vinod Koul <vkoul@kernel.org> | 2020-09-23 12:59:29 +0300 |
commit | dd87a72ae968f70852cd7a2d939acd9693e76095 (patch) | |
tree | 8e10848c5a9ead6394c1368671028a2d56a7592e /drivers/soundwire/generic_bandwidth_allocation.c | |
parent | f067c9251797ab0ff13cb4c6d5f5a0e6dc2c65d3 (diff) | |
download | linux-dd87a72ae968f70852cd7a2d939acd9693e76095.tar.xz |
soundwire: enable Data Port test modes
Test modes are required for all SoundWire IP, and help debug
integration issues. In theory each port can be configured with a
different mode but to simplify this patch only offers separate
configurations for the Master and Slave ports - this covers 99% of the
intended cases during platform integration.
The test mode value is set via platform-specific ways.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20200920193207.31241-2-yung-chuan.liao@linux.intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/soundwire/generic_bandwidth_allocation.c')
-rw-r--r-- | drivers/soundwire/generic_bandwidth_allocation.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/soundwire/generic_bandwidth_allocation.c b/drivers/soundwire/generic_bandwidth_allocation.c index 6088775b67a5..058cb9cd8547 100644 --- a/drivers/soundwire/generic_bandwidth_allocation.c +++ b/drivers/soundwire/generic_bandwidth_allocation.c @@ -43,6 +43,7 @@ static void sdw_compute_slave_ports(struct sdw_master_runtime *m_rt, int port_bo, sample_int; unsigned int rate, bps, ch = 0; unsigned int slave_total_ch; + struct sdw_bus_params *b_params = &m_rt->bus->params; port_bo = t_data->block_offset; @@ -66,7 +67,7 @@ static void sdw_compute_slave_ports(struct sdw_master_runtime *m_rt, sdw_fill_port_params(&p_rt->port_params, p_rt->num, bps, SDW_PORT_FLOW_MODE_ISOCH, - SDW_PORT_DATA_MODE_NORMAL); + b_params->s_data_mode); port_bo += bps * ch; slave_total_ch += ch; @@ -92,6 +93,7 @@ static void sdw_compute_master_ports(struct sdw_master_runtime *m_rt, struct sdw_transport_data t_data = {0}; struct sdw_port_runtime *p_rt; struct sdw_bus *bus = m_rt->bus; + struct sdw_bus_params *b_params = &bus->params; int sample_int, hstart = 0; unsigned int rate, bps, ch, no_ch; @@ -118,7 +120,7 @@ static void sdw_compute_master_ports(struct sdw_master_runtime *m_rt, sdw_fill_port_params(&p_rt->port_params, p_rt->num, bps, SDW_PORT_FLOW_MODE_ISOCH, - SDW_PORT_DATA_MODE_NORMAL); + b_params->m_data_mode); /* Check for first entry */ if (!(p_rt == list_first_entry(&m_rt->port_list, |