mirror of https://github.com/thesofproject/sof.git
component: remove min_bytes argument from comp_xrun methods
Removes min_bytes argument from comp_underrun and comp_overrun methods. With the current way of copying as much data as possible min_bytes doesn't say anything Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
This commit is contained in:
parent
cc7bff9e61
commit
917e64b8c5
|
@ -560,12 +560,12 @@ static int dai_check_for_xrun(struct comp_dev *dev, uint32_t copy_bytes)
|
|||
trace_dai_error_with_ids(dev, "dai_check_for_xrun() "
|
||||
"error: underrun due to no data "
|
||||
"available");
|
||||
comp_underrun(dev, dd->dma_buffer, copy_bytes, 0);
|
||||
comp_underrun(dev, dd->dma_buffer, copy_bytes);
|
||||
} else {
|
||||
trace_dai_error_with_ids(dev, "dai_check_for_xrun() "
|
||||
"error: overrun due to no data "
|
||||
"available");
|
||||
comp_overrun(dev, dd->dma_buffer, copy_bytes, 0);
|
||||
comp_overrun(dev, dd->dma_buffer, copy_bytes);
|
||||
}
|
||||
|
||||
return -ENODATA;
|
||||
|
|
|
@ -722,16 +722,14 @@ static inline int comp_get_endpoint_type(struct comp_dev *dev)
|
|||
* @param dev Component device.
|
||||
* @param source Source buffer.
|
||||
* @param copy_bytes Requested size of data to be available.
|
||||
* @param min_bytes
|
||||
*/
|
||||
static inline void comp_underrun(struct comp_dev *dev,
|
||||
struct comp_buffer *source,
|
||||
uint32_t copy_bytes, uint32_t min_bytes)
|
||||
uint32_t copy_bytes)
|
||||
{
|
||||
trace_comp("comp_underrun(), ((dev->comp.id << 16) | source->avail) ="
|
||||
" %u, ((min_bytes << 16) | copy_bytes) = %u",
|
||||
(dev->comp.id << 16) | source->avail,
|
||||
(min_bytes << 16) | copy_bytes);
|
||||
trace_comp_error("comp_underrun() error: dev->comp.id = %u, "
|
||||
"source->avail = %u, copy_bytes = %u", dev->comp.id,
|
||||
source->avail, copy_bytes);
|
||||
|
||||
pipeline_xrun(dev->pipeline, dev, (int32_t)source->avail - copy_bytes);
|
||||
}
|
||||
|
@ -741,15 +739,13 @@ static inline void comp_underrun(struct comp_dev *dev,
|
|||
* @param dev Component device.
|
||||
* @param sink Sink buffer.
|
||||
* @param copy_bytes Requested size of free space to be available.
|
||||
* @param min_bytes
|
||||
*/
|
||||
static inline void comp_overrun(struct comp_dev *dev, struct comp_buffer *sink,
|
||||
uint32_t copy_bytes, uint32_t min_bytes)
|
||||
uint32_t copy_bytes)
|
||||
{
|
||||
trace_comp("comp_overrun(), ((dev->comp.id << 16) | sink->free) = %u, "
|
||||
"((min_bytes << 16) | copy_bytes) = %u",
|
||||
(dev->comp.id << 16) | sink->free,
|
||||
(min_bytes << 16) | copy_bytes);
|
||||
trace_comp_error("comp_overrun() error: dev->comp.id = %u, sink->free "
|
||||
"= %u, copy_bytes = %u", dev->comp.id, sink->free,
|
||||
copy_bytes);
|
||||
|
||||
pipeline_xrun(dev->pipeline, dev, (int32_t)copy_bytes - sink->free);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue