Skip to contentSkip to conversation

it913x driver with USB1.1

PATCH In review Antti Palosaari 2 participants 5 messages Nov 7, 2012 – Nov 9, 2012 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

Malcolm,
Have you newer tested it with USB1.1 port? Stream is totally broken.

regards
Antti

Signature · 1 line
http://palosaari.fi/
#1 lore raw
Quoted 3 lines · Antti Palosaari

Malcolm,
Have you newer tested it with USB1.1 port? Stream is totally broken.

Hi Antti

Hmm, yes it is a bit choppy on dvb-usb-v2.

I will have a look at it.

Regards

Malcolm

Quoted 3 lines

regards
Antti

#2 lore raw
Quoted 10 lines · Malcolm Priestley
Quoted 3 lines · Antti Palosaari

Malcolm,
Have you newer tested it with USB1.1 port? Stream is totally broken.

Hi Antti

Hmm, yes it is a bit choppy on dvb-usb-v2.

I will have a look at it.

Fedora's stock 3.6.5-1.fc17.x86_64 is even more worse - no picture at all when using vlc. Clearly visible difference is pid filter count. dvb-usb says 5 filters whilst dvb-usb-v2 says 32 pid filters.

dvb_usb_v2: will use the device's hardware PID filter (table count: 32)
dvb-usb: will use the device's hardware PID filter (table count: 5).

regards
Antti

Signature · 1 line
http://palosaari.fi/
#3 lore raw

PATCH 1/1 it913x: [BUG] fix correct endpoint size when pid filter on.

Quoted 10 lines · Antti Palosaari
Quoted 9 lines · Malcolm Priestley
Quoted 3 lines · Antti Palosaari

Malcolm,
Have you newer tested it with USB1.1 port? Stream is totally broken.

Hi Antti

Hmm, yes it is a bit choppy on dvb-usb-v2.

Quoted 10 lines
Quoted 1 line

I will have a look at it.

Fedora's stock 3.6.5-1.fc17.x86_64 is even more worse - no picture at all when using vlc. Clearly visible difference is pid filter count. dvb-usb says 5 filters whilst dvb-usb-v2 says 32 pid filters.

dvb_usb_v2: will use the device's hardware PID filter (table count: 32)
dvb-usb: will use the device's hardware PID filter (table count: 5).

I kept the count as the hardware default with dvb-usb-v2, with 5, users can still run in to trouble with Video PIDs.

I have traced it to an incorrect endpoint size when the PID filter is enabled. It also affected USB 2.0 with the filter on.

---
 drivers/media/usb/dvb-usb-v2/it913x.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/media/usb/dvb-usb-v2/it913x.c +2 -1
index 695f910..29300e3 100644
@@ -643,7 +643,8 @@ static int it913x_frontend_attach(struct dvb_usb_adapter *adap)
 	struct it913x_state *st = d->priv;
 	int ret = 0;
 	u8 adap_addr = I2C_BASE_ADDR + (adap->id << 5);
-	u16 ep_size = adap->stream.buf_size / 4;
+	u16 ep_size = (adap->pid_filtering) ? TS_BUFFER_SIZE_PID / 4 :
+		TS_BUFFER_SIZE_MAX / 4;
 	u8 pkt_size = 0x80;
 
 	if (d->udev->speed != USB_SPEED_HIGH)
Signature · 1 line
1.7.10.4
author Tested-by on v1 1/1
#4 lore raw

Re: [PATCH] it913x: [BUG] fix correct endpoint size when pid filter on.

Quoted 21 lines · Malcolm Priestley
Quoted 10 lines · Antti Palosaari
Quoted 9 lines · Malcolm Priestley
Quoted 3 lines · Antti Palosaari

Malcolm,
Have you newer tested it with USB1.1 port? Stream is totally broken.

Hi Antti

Hmm, yes it is a bit choppy on dvb-usb-v2.

Quoted 10 lines
Quoted 1 line

I will have a look at it.

Fedora's stock 3.6.5-1.fc17.x86_64 is even more worse - no picture at all when using vlc. Clearly visible difference is pid filter count. dvb-usb says 5 filters whilst dvb-usb-v2 says 32 pid filters.

dvb_usb_v2: will use the device's hardware PID filter (table count: 32)
dvb-usb: will use the device's hardware PID filter (table count: 5).

Quoted 5 lines

I kept the count as the hardware default with dvb-usb-v2, with 5, users can still run in to trouble with Video PIDs.

I have traced it to an incorrect endpoint size when the PID filter is enabled. It also affected USB 2.0 with the filter on.

Bug fixed. Lets add proper tags. Happy weekend!

Quoted 22 lines
---
  drivers/media/usb/dvb-usb-v2/it913x.c |    3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
drivers/media/usb/dvb-usb-v2/it913x.c +2 -1
index 695f910..29300e3 100644
@@ -643,7 +643,8 @@ static int it913x_frontend_attach(struct dvb_usb_adapter *adap)
  	struct it913x_state *st = d->priv;
  	int ret = 0;
  	u8 adap_addr = I2C_BASE_ADDR + (adap->id << 5);
-	u16 ep_size = adap->stream.buf_size / 4;
+	u16 ep_size = (adap->pid_filtering) ? TS_BUFFER_SIZE_PID / 4 :
+		TS_BUFFER_SIZE_MAX / 4;
  	u8 pkt_size = 0x80;
 
  	if (d->udev->speed != USB_SPEED_HIGH)
Signature · 1 line
http://palosaari.fi/