alistair23-linux/drivers/media/usb/em28xx
Mauro Carvalho Chehab 1b3fd2d342 [media] em28xx-audio: don't hardcode audio URB calculus
The current code hardcodes the number of audio URBs, the number
of packets per URB and the maximum URB size.

This is not a good idea, as it:

- wastes more bandwidth than necessary, by using a very
  large number of packets;

- those constants are bound to an specific scenario, with
  a bandwidth of 48 kHz;

- don't take the maximum endpoint size into account;

- with urb->interval = 1 on xHCI, those constraints cause a "funny"
  setup: URBs with 64 packets inside, with only 24 bytes total. E. g.
  a complete waste of space.

Change the code to do dynamic URB audio calculus and allocation.

For now, use the same constraints as used before this patch, to
avoid regressions.

A good scenario (tested) seems to use those defines, instead:

	#define EM28XX_MAX_AUDIO_BUFS          8
	#define EM28XX_MIN_AUDIO_PACKETS       2

But let's not do such change here, letting the optimization to
happen on latter patches, after more tests.

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-01-12 11:56:59 -02:00
..
em28xx-audio.c [media] em28xx-audio: don't hardcode audio URB calculus 2014-01-12 11:56:59 -02:00
em28xx-camera.c [media] em28xx: make em28xx-video to be a separate module 2014-01-07 05:09:26 -02:00
em28xx-cards.c [media] export em28xx_release_resources() symbol 2014-01-07 08:05:01 -02:00
em28xx-core.c [media] em28xx: properly implement AC97 wait code 2014-01-10 06:06:20 -02:00
em28xx-dvb.c [media] em28xx: prevent registering wrong interfaces for audio-only 2014-01-07 05:14:50 -02:00
em28xx-i2c.c [media] em28xx-i2c: add timeout debug information if i2c_debug enabled 2014-01-12 11:56:46 -02:00
em28xx-input.c [media] media: Remove OOM message after input_allocate_device 2014-01-07 08:01:42 -02:00
em28xx-reg.h [media] em28xx: fix I2S audio sample rate definitions and info output 2014-01-07 08:33:29 -02:00
em28xx-v4l.h [media] em28xx: make em28xx-video to be a separate module 2014-01-07 05:09:26 -02:00
em28xx-vbi.c [media] em28xx: make em28xx-video to be a separate module 2014-01-07 05:09:26 -02:00
em28xx-video.c [media] em28xx: prevent registering wrong interfaces for audio-only 2014-01-07 05:14:50 -02:00
em28xx.h [media] em28xx-audio: don't hardcode audio URB calculus 2014-01-12 11:56:59 -02:00
Kconfig [media] em28xx: make em28xx-video to be a separate module 2014-01-07 05:09:26 -02:00
Makefile [media] em28xx: make em28xx-video to be a separate module 2014-01-07 05:09:26 -02:00