1
0
mirror of https://github.com/DigitalDevices/dddvb.git synced 2023-10-10 13:37:43 +02:00

use packet loss function

This commit is contained in:
none 2021-02-24 20:25:27 +01:00
parent d259d69808
commit baf6a090b8

View File

@ -552,7 +552,8 @@ static void ddb_input_stop_unlocked(struct ddb_input *input)
dev_warn(input->port->dev->dev,
"DMA stalled %u times!\n",
input->dma->stall_count);
if (input->dma->packet_loss)
update_loss(input->dma);
if (input->dma->packet_loss > 1)
dev_warn(input->port->dev->dev,
"%u packets lost due to low DMA performance!\n",
input->dma->packet_loss);
@ -2333,16 +2334,7 @@ static void input_tasklet(unsigned long data)
}
dma->stat = ddbreadl(dev, DMA_BUFFER_CURRENT(dma));
dma->ctrl = ddbreadl(dev, DMA_BUFFER_CONTROL(dma));
{
u32 packet_loss = dma->packet_loss;
u32 cur_counter = ddbreadl(dev, TS_STAT(input)) & 0xffff;
if (cur_counter < (packet_loss & 0xffff))
packet_loss += 0x10000;
packet_loss = ((packet_loss & 0xffff0000) | cur_counter);
dma->packet_loss = packet_loss;
}
update_loss(dma);
if (4 & dma->ctrl)
dma->stall_count++;
if (input->redi)