diff options
author | Devin Heitmueller <dheitmueller@kernellabs.com> | 2009-05-16 16:09:28 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-06-16 17:21:08 -0400 |
commit | d18e2fda7133287bf8a81809816e646cf17c332e (patch) | |
tree | d42b038af4ed02b31add846f6731dfabb5d78123 /drivers/media/video/em28xx/em28xx-dvb.c | |
parent | 027aa2c771d9fb8dc6aae95c80b50e40e3c97dc5 (diff) |
V4L/DVB (11810): em28xx: properly set packet size based on the device's eeprom configuration.
The em28xx actually has a register that tells the driver what the maximum
packet size is (based on a value programmed into the eeprom). Make use of
that register instead of assuming a hardcoded value of 564 (since 564 is not
correct for devices that do QAM such as the KWorld 340u).
Note that for now the em2874 code isn't there, falling back to the 564 value,
however this is not a problem since there are not any em2874 based devices in
the current v4l-dvb tree).
Thanks to Jarod Wilson for detecting the initial problem and figuring out that
the isoc configuration was wrong for his device.
Cc: Jarod Wilson <jarod@wilsonet.com>
Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/em28xx/em28xx-dvb.c')
-rw-r--r-- | drivers/media/video/em28xx/em28xx-dvb.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/media/video/em28xx/em28xx-dvb.c b/drivers/media/video/em28xx/em28xx-dvb.c index c8188dc2b4b5..e0438acf1224 100644 --- a/drivers/media/video/em28xx/em28xx-dvb.c +++ b/drivers/media/video/em28xx/em28xx-dvb.c | |||
@@ -46,7 +46,6 @@ if (debug >= level) \ | |||
46 | } while (0) | 46 | } while (0) |
47 | 47 | ||
48 | #define EM28XX_DVB_NUM_BUFS 5 | 48 | #define EM28XX_DVB_NUM_BUFS 5 |
49 | #define EM28XX_DVB_MAX_PACKETSIZE 564 | ||
50 | #define EM28XX_DVB_MAX_PACKETS 64 | 49 | #define EM28XX_DVB_MAX_PACKETS 64 |
51 | 50 | ||
52 | struct em28xx_dvb { | 51 | struct em28xx_dvb { |
@@ -142,14 +141,17 @@ static int start_streaming(struct em28xx_dvb *dvb) | |||
142 | { | 141 | { |
143 | int rc; | 142 | int rc; |
144 | struct em28xx *dev = dvb->adapter.priv; | 143 | struct em28xx *dev = dvb->adapter.priv; |
144 | int max_dvb_packet_size; | ||
145 | 145 | ||
146 | usb_set_interface(dev->udev, 0, 1); | 146 | usb_set_interface(dev->udev, 0, 1); |
147 | rc = em28xx_set_mode(dev, EM28XX_DIGITAL_MODE); | 147 | rc = em28xx_set_mode(dev, EM28XX_DIGITAL_MODE); |
148 | if (rc < 0) | 148 | if (rc < 0) |
149 | return rc; | 149 | return rc; |
150 | 150 | ||
151 | max_dvb_packet_size = em28xx_isoc_dvb_max_packetsize(dev); | ||
152 | |||
151 | return em28xx_init_isoc(dev, EM28XX_DVB_MAX_PACKETS, | 153 | return em28xx_init_isoc(dev, EM28XX_DVB_MAX_PACKETS, |
152 | EM28XX_DVB_NUM_BUFS, EM28XX_DVB_MAX_PACKETSIZE, | 154 | EM28XX_DVB_NUM_BUFS, max_dvb_packet_size, |
153 | dvb_isoc_copy); | 155 | dvb_isoc_copy); |
154 | } | 156 | } |
155 | 157 | ||