Skip to content

Commit

Permalink
eq_fir: use comp_get_copy_limits_with_lock
Browse files Browse the repository at this point in the history
Simplifies the code and fixes single-flags issue.

Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
  • Loading branch information
Marcin Maka authored and lgirdwood committed Apr 7, 2020
1 parent 3c7e16b commit bd75123
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions src/audio/eq_fir/eq_fir.c
Original file line number Diff line number Diff line change
Expand Up @@ -715,7 +715,6 @@ static int eq_fir_copy(struct comp_dev *dev)
struct comp_data *cd = comp_get_drvdata(dev);
int ret;
int n;
uint32_t flags = 0;

comp_dbg(dev, "eq_fir_copy()");

Expand All @@ -737,14 +736,8 @@ static int eq_fir_copy(struct comp_dev *dev)
sinkb = list_first_item(&dev->bsink_list, struct comp_buffer,
source_list);

buffer_lock(sourceb, &flags);
buffer_lock(sinkb, &flags);

/* Get source, sink, number of frames etc. to process. */
comp_get_copy_limits(sourceb, sinkb, &cl);

buffer_unlock(sinkb, flags);
buffer_unlock(sourceb, flags);
comp_get_copy_limits_with_lock(sourceb, sinkb, &cl);

/*
* Process only even number of frames with the FIR function. The
Expand Down

0 comments on commit bd75123

Please sign in to comment.