diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/media/dvb/firewire/firedtv-1394.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/drivers/media/dvb/firewire/firedtv-1394.c b/drivers/media/dvb/firewire/firedtv-1394.c index 22ea4c90f5c9..82b576a4774d 100644 --- a/drivers/media/dvb/firewire/firedtv-1394.c +++ b/drivers/media/dvb/firewire/firedtv-1394.c | |||
@@ -26,13 +26,16 @@ | |||
26 | #include <iso.h> | 26 | #include <iso.h> |
27 | #include <nodemgr.h> | 27 | #include <nodemgr.h> |
28 | 28 | ||
29 | #include <dvb_demux.h> | ||
30 | |||
29 | #include "firedtv.h" | 31 | #include "firedtv.h" |
30 | 32 | ||
31 | static LIST_HEAD(node_list); | 33 | static LIST_HEAD(node_list); |
32 | static DEFINE_SPINLOCK(node_list_lock); | 34 | static DEFINE_SPINLOCK(node_list_lock); |
33 | 35 | ||
34 | #define FIREWIRE_HEADER_SIZE 4 | 36 | #define CIP_HEADER_SIZE 8 |
35 | #define CIP_HEADER_SIZE 8 | 37 | #define MPEG2_TS_HEADER_SIZE 4 |
38 | #define MPEG2_TS_SOURCE_PACKET_SIZE (4 + 188) | ||
36 | 39 | ||
37 | static void rawiso_activity_cb(struct hpsb_iso *iso) | 40 | static void rawiso_activity_cb(struct hpsb_iso *iso) |
38 | { | 41 | { |
@@ -62,20 +65,20 @@ static void rawiso_activity_cb(struct hpsb_iso *iso) | |||
62 | buf = dma_region_i(&iso->data_buf, unsigned char, | 65 | buf = dma_region_i(&iso->data_buf, unsigned char, |
63 | iso->infos[packet].offset + CIP_HEADER_SIZE); | 66 | iso->infos[packet].offset + CIP_HEADER_SIZE); |
64 | count = (iso->infos[packet].len - CIP_HEADER_SIZE) / | 67 | count = (iso->infos[packet].len - CIP_HEADER_SIZE) / |
65 | (188 + FIREWIRE_HEADER_SIZE); | 68 | MPEG2_TS_SOURCE_PACKET_SIZE; |
66 | 69 | ||
67 | /* ignore empty packet */ | 70 | /* ignore empty packet */ |
68 | if (iso->infos[packet].len <= CIP_HEADER_SIZE) | 71 | if (iso->infos[packet].len <= CIP_HEADER_SIZE) |
69 | continue; | 72 | continue; |
70 | 73 | ||
71 | while (count--) { | 74 | while (count--) { |
72 | if (buf[FIREWIRE_HEADER_SIZE] == 0x47) | 75 | if (buf[MPEG2_TS_HEADER_SIZE] == 0x47) |
73 | dvb_dmx_swfilter_packets(&fdtv->demux, | 76 | dvb_dmx_swfilter_packets(&fdtv->demux, |
74 | &buf[FIREWIRE_HEADER_SIZE], 1); | 77 | &buf[MPEG2_TS_HEADER_SIZE], 1); |
75 | else | 78 | else |
76 | dev_err(fdtv->device, | 79 | dev_err(fdtv->device, |
77 | "skipping invalid packet\n"); | 80 | "skipping invalid packet\n"); |
78 | buf += 188 + FIREWIRE_HEADER_SIZE; | 81 | buf += MPEG2_TS_SOURCE_PACKET_SIZE; |
79 | } | 82 | } |
80 | } | 83 | } |
81 | out: | 84 | out: |