Skip to content

Commit

Permalink
audio: dai-zephyr: update channel verification logic
Browse files Browse the repository at this point in the history
This commit updates the channel verification logic in dai-zephyr.c.
The previous condition checked for an exact match between
hw_params.channels and params->channels.

The new condition allows for hw_params.channels to be greater than
or equal to params->channels, providing more flexibility in channel
configuration.

Signed-off-by: Damian Nikodem <damian.nikodem@intel.com>
  • Loading branch information
dnikodem committed Jan 19, 2024
1 parent 16b53b4 commit 76aa374
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/audio/dai-zephyr.c
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,7 @@ static int dai_verify_params(struct dai_data *dd, struct comp_dev *dev,
return -EINVAL;
}

if (hw_params.channels && hw_params.channels != params->channels) {
if (hw_params.channels && (hw_params.channels < params->channels)) {
comp_err(dev, "dai_verify_params(): pcm channels parameter %d does not match hardware channels %d",
params->channels, hw_params.channels);
return -EINVAL;
Expand Down

0 comments on commit 76aa374

Please sign in to comment.