Message ID | 1433009409-5622-2-git-send-email-jdenson@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On 05/30/2015 09:10 PM, Jemma Denson wrote: > The flexcop bridge chip has two banks of hardware pid filters - > an initial 6, and on some chip revisions an additional bank of 32. > > A bug is present on the initial 6 - when changing transponders > one of two PAT packets from the old transponder would be included > in the initial packets from the new transponder. This usually > transpired with userspace programs complaining about services > missing, because they are seeing a PAT that they would not be > expecting. Running in full TS mode does not exhibit this problem, > neither does using just the additional 32. > > This patch adds in an option to not use the inital 6 and solely use > just the additional 32, and enables this option for the SkystarS2 > card. Other cards can be added as required if they also have > this bug. Why not to use strategy where 32 pid filter is used as a priority and that buggy 6 pid filter is used only when 32 pid filter is not available (or it is already 100% in use)? regards Antti
Hi Antti, On 01/06/15 07:14, Antti Palosaari wrote: > On 05/30/2015 09:10 PM, Jemma Denson wrote: >> The flexcop bridge chip has two banks of hardware pid filters - >> an initial 6, and on some chip revisions an additional bank of 32. >> >> A bug is present on the initial 6 - when changing transponders >> one of two PAT packets from the old transponder would be included >> in the initial packets from the new transponder. This usually >> transpired with userspace programs complaining about services >> missing, because they are seeing a PAT that they would not be >> expecting. Running in full TS mode does not exhibit this problem, >> neither does using just the additional 32. >> >> This patch adds in an option to not use the inital 6 and solely use >> just the additional 32, and enables this option for the SkystarS2 >> card. Other cards can be added as required if they also have >> this bug. > > Why not to use strategy where 32 pid filter is used as a priority and > that buggy 6 pid filter is used only when 32 pid filter is not > available (or it is already 100% in use)? > Yes, that might work, I hadn't though of just swapping them around - thanks. It would however assume that the 0x0000 PAT feed is requested early on enough that it always sits within the bank of 32 and nothing else is too bothered by the odd out of order packet. The only concern I have got is if there is any other oddness in the first 6 - this card is the only flexcop based card with dvb-s2 and there is a lack of stream with high bitrate transponders (>approx. 45Mbps), which we think might due to the hardware pid filter. The card apparently works fine under the windows driver so it's a case of trying to work out what that might be doing differently. It's quite speculative at the moment but I'm hoping this patch might help with that and I'm waiting for some feedback on that - I'm stuck with 28.2E which doesn't hold anything interesting. At the moment it doesn't really matter too much having only 32 filters rather than the full 38 - it does switch to full-TS once it runs out of hardware filters, and the only issue with full-TS is that the flexcop can't pass a TS with more than 45Mbps (but they aren't working at the moment anyway) Jemma. -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi all, On Mon, 01 Jun 2015 09:08:03 +0100 Jemma Denson <jdenson@gmail.com> wrote: > Yes, that might work, I hadn't though of just swapping them around - > thanks. It would however assume that the 0x0000 PAT feed is requested > early on enough that it always sits within the bank of 32 and nothing > else is too bothered by the odd out of order packet. > > The only concern I have got is if there is any other oddness in the > first 6 - this card is the only flexcop based card with dvb-s2 and there > is a lack of stream with high bitrate transponders (>approx. 45Mbps), > which we think might due to the hardware pid filter. The card apparently > works fine under the windows driver so it's a case of trying to work out > what that might be doing differently. It's quite speculative at the > moment but I'm hoping this patch might help with that and I'm waiting > for some feedback on that - I'm stuck with 28.2E which doesn't hold > anything interesting. > > At the moment it doesn't really matter too much having only 32 filters > rather than the full 38 - it does switch to full-TS once it runs out of > hardware filters, and the only issue with full-TS is that the flexcop > can't pass a TS with more than 45Mbps (but they aren't working at the > moment anyway) I agree, if the 6 PID-filters are not working they should be used. The worth is receiving PSI of a transponder/channel which is in fact from the one previously tuned. I think it is better to leave it as you suggested. -- Patrick. -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/media/common/b2c2/flexcop-common.h b/drivers/media/common/b2c2/flexcop-common.h index 437912e..2b2460e 100644 --- a/drivers/media/common/b2c2/flexcop-common.h +++ b/drivers/media/common/b2c2/flexcop-common.h @@ -91,6 +91,7 @@ struct flexcop_device { int feedcount; int pid_filtering; int fullts_streaming_state; + int skip_6_hw_pid_filter; /* bus specific callbacks */ flexcop_ibi_value(*read_ibi_reg) (struct flexcop_device *, diff --git a/drivers/media/common/b2c2/flexcop-fe-tuner.c b/drivers/media/common/b2c2/flexcop-fe-tuner.c index 2426062..31ebf1e 100644 --- a/drivers/media/common/b2c2/flexcop-fe-tuner.c +++ b/drivers/media/common/b2c2/flexcop-fe-tuner.c @@ -651,6 +651,9 @@ static int skystarS2_rev33_attach(struct flexcop_device *fc, } info("ISL6421 successfully attached."); + if (fc->has_32_hw_pid_filter) + fc->skip_6_hw_pid_filter = 1; + return 1; } #else diff --git a/drivers/media/common/b2c2/flexcop-hw-filter.c b/drivers/media/common/b2c2/flexcop-hw-filter.c index 77e4547..8220257 100644 --- a/drivers/media/common/b2c2/flexcop-hw-filter.c +++ b/drivers/media/common/b2c2/flexcop-hw-filter.c @@ -117,6 +117,10 @@ static void flexcop_pid_control(struct flexcop_device *fc, deb_ts("setting pid: %5d %04x at index %d '%s'\n", pid, pid, index, onoff ? "on" : "off"); + /* First 6 can be buggy - skip over them if option set */ + if (fc->skip_6_hw_pid_filter) + index += 6; + /* We could use bit magic here to reduce source code size. * I decided against it, but to use the real register names */ switch (index) { @@ -170,7 +174,10 @@ static int flexcop_toggle_fullts_streaming(struct flexcop_device *fc, int onoff) int flexcop_pid_feed_control(struct flexcop_device *fc, struct dvb_demux_feed *dvbdmxfeed, int onoff) { - int max_pid_filter = 6 + fc->has_32_hw_pid_filter*32; + int max_pid_filter = 6; + + max_pid_filter -= 6 * fc->skip_6_hw_pid_filter; + max_pid_filter += 32 * fc->has_32_hw_pid_filter; fc->feedcount += onoff ? 1 : -1; /* the number of PIDs/Feed currently requested */ if (dvbdmxfeed->index >= max_pid_filter) @@ -217,7 +224,12 @@ void flexcop_hw_filter_init(struct flexcop_device *fc) { int i; flexcop_ibi_value v; - for (i = 0; i < 6 + 32*fc->has_32_hw_pid_filter; i++) + int max_pid_filter = 6; + + max_pid_filter -= 6 * fc->skip_6_hw_pid_filter; + max_pid_filter += 32 * fc->has_32_hw_pid_filter; + + for (i = 0; i < max_pid_filter; i++) flexcop_pid_control(fc, i, 0x1fff, 0); flexcop_pid_group_filter(fc, 0, 0x1fe0);
The flexcop bridge chip has two banks of hardware pid filters - an initial 6, and on some chip revisions an additional bank of 32. A bug is present on the initial 6 - when changing transponders one of two PAT packets from the old transponder would be included in the initial packets from the new transponder. This usually transpired with userspace programs complaining about services missing, because they are seeing a PAT that they would not be expecting. Running in full TS mode does not exhibit this problem, neither does using just the additional 32. This patch adds in an option to not use the inital 6 and solely use just the additional 32, and enables this option for the SkystarS2 card. Other cards can be added as required if they also have this bug. Signed-off-by: Jemma Denson <jdenson@gmail.com> --- drivers/media/common/b2c2/flexcop-common.h | 1 + drivers/media/common/b2c2/flexcop-fe-tuner.c | 3 +++ drivers/media/common/b2c2/flexcop-hw-filter.c | 16 ++++++++++++++-- 3 files changed, 18 insertions(+), 2 deletions(-)