24 Apr
2018
24 Apr
'18
11:25 a.m.
On Sat, Apr 21, 2018 at 09:47:56PM +0530, Vinod Koul wrote:
On Sat, Apr 21, 2018 at 06:02:52AM -0700, Pierre-Louis Bossart wrote:
On 4/18/18 3:58 AM, Vinod Koul wrote:
+static int sdw_config_stream(struct device *dev,
struct sdw_stream_runtime *stream,
struct sdw_stream_config *stream_config, bool is_slave)
+{
- /*
* Update the stream rate, channel and bps based on data
* source. For more than one data source (multilink),
* match the rate, bps, stream type and increment number of channels.
*/
- if ((stream->params.rate) &&
so if the rate is zero there is no error?
(stream->params.rate != stream_config->frame_rate)) {
dev_err(dev, "rate not matching, stream:%s", stream->name);
return -EINVAL;
- }
- if ((stream->params.bps) &&
same here, what is the intent behind the first test?
IIRC this was to check for valid values, but am not too sure, let me get back to you on these two..
So if the value previously is not set, we want to allow it be set and then compare. We are not checking for zero value or wrong values here, we are checking fir values to be matched
Since you have asked this second time, I am going to add a comment here to clarify..
--
~Vinod