[alsa-devel] [RFC PATCH 21/40] soundwire: export helpers to find row and column values
Pierre-Louis Bossart
pierre-louis.bossart at linux.intel.com
Fri Jul 26 17:26:01 CEST 2019
On 7/26/19 9:43 AM, Guennadi Liakhovetski wrote:
> On Thu, Jul 25, 2019 at 06:40:13PM -0500, Pierre-Louis Bossart wrote:
>> Add a prefix for common tables and export 2 helpers to set the frame
>> shapes based on row/col values.
>>
>> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart at linux.intel.com>
>> ---
>> drivers/soundwire/bus.h | 7 +++++--
>> drivers/soundwire/stream.c | 14 ++++++++------
>> 2 files changed, 13 insertions(+), 8 deletions(-)
>>
>> diff --git a/drivers/soundwire/bus.h b/drivers/soundwire/bus.h
>> index 06ac4adb0074..c57c9c23f6ca 100644
>> --- a/drivers/soundwire/bus.h
>> +++ b/drivers/soundwire/bus.h
>> @@ -73,8 +73,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];
>
> So these arrays actually have to be exported? In the current (5.2) sources they
> seem to only be used in stream.c, maybe make them static there?
>
>> +
>> +int sdw_find_row_index(int row);
>> +int sdw_find_col_index(int col);
yes, they need to be exported, they are used by the allocation algorithm
(in Patch 27).
Others will need this for non-Intel solutions, it's really a part of the
standard definition and should be shared.
I can improve the commit message to make this explicit.
More information about the Alsa-devel
mailing list