Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 295088
b: refs/heads/master
c: 6988111
h: refs/heads/master
v: v3
  • Loading branch information
Akihiro Tsukada authored and Mauro Carvalho Chehab committed Mar 19, 2012
1 parent 6407d3c commit a8d00fc
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 847e87659620890bfc80ce7bf682f2a5354543b2
refs/heads/master: 6988111098d643653eca04ebc6dabe9a7f354baa
14 changes: 14 additions & 0 deletions trunk/drivers/media/dvb/pt1/pt1.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#include <linux/pci.h>
#include <linux/kthread.h>
#include <linux/freezer.h>
#include <linux/ratelimit.h>

#include "dvbdev.h"
#include "dvb_demux.h"
Expand Down Expand Up @@ -92,6 +93,7 @@ struct pt1_adapter {
u8 *buf;
int upacket_count;
int packet_count;
int st_count;

struct dvb_adapter adap;
struct dvb_demux demux;
Expand Down Expand Up @@ -266,6 +268,7 @@ static int pt1_filter(struct pt1 *pt1, struct pt1_buffer_page *page)
struct pt1_adapter *adap;
int offset;
u8 *buf;
int sc;

if (!page->upackets[PT1_NR_UPACKETS - 1])
return 0;
Expand All @@ -282,6 +285,16 @@ static int pt1_filter(struct pt1 *pt1, struct pt1_buffer_page *page)
else if (!adap->upacket_count)
continue;

if (upacket >> 24 & 1)
printk_ratelimited(KERN_INFO "earth-pt1: device "
"buffer overflowing. table[%d] buf[%d]\n",
pt1->table_index, pt1->buf_index);
sc = upacket >> 26 & 0x7;
if (adap->st_count != -1 && sc != ((adap->st_count + 1) & 0x7))
printk_ratelimited(KERN_INFO "earth-pt1: data loss"
" in streamID(adapter)[%d]\n", index);
adap->st_count = sc;

buf = adap->buf;
offset = adap->packet_count * 188 + adap->upacket_count * 3;
buf[offset] = upacket >> 16;
Expand Down Expand Up @@ -652,6 +665,7 @@ pt1_alloc_adapter(struct pt1 *pt1)
adap->buf = buf;
adap->upacket_count = 0;
adap->packet_count = 0;
adap->st_count = -1;

dvb_adap = &adap->adap;
dvb_adap->priv = adap;
Expand Down

0 comments on commit a8d00fc

Please sign in to comment.