aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/media/usb/em28xx/em28xx-audio.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/drivers/media/usb/em28xx/em28xx-audio.c b/drivers/media/usb/em28xx/em28xx-audio.c
index 6c7d34600294..f6fcee3d4fb9 100644
--- a/drivers/media/usb/em28xx/em28xx-audio.c
+++ b/drivers/media/usb/em28xx/em28xx-audio.c
@@ -52,6 +52,7 @@ MODULE_PARM_DESC(debug, "activates debug info");
52 52
53#define EM28XX_MAX_AUDIO_BUFS 5 53#define EM28XX_MAX_AUDIO_BUFS 5
54#define EM28XX_MIN_AUDIO_PACKETS 64 54#define EM28XX_MIN_AUDIO_PACKETS 64
55
55#define dprintk(fmt, arg...) do { \ 56#define dprintk(fmt, arg...) do { \
56 if (debug) \ 57 if (debug) \
57 printk(KERN_INFO "em28xx-audio %s: " fmt, \ 58 printk(KERN_INFO "em28xx-audio %s: " fmt, \
@@ -217,15 +218,26 @@ static struct snd_pcm_hardware snd_em28xx_hw_capture = {
217 218
218 .formats = SNDRV_PCM_FMTBIT_S16_LE, 219 .formats = SNDRV_PCM_FMTBIT_S16_LE,
219 220
220 .rates = SNDRV_PCM_RATE_CONTINUOUS | SNDRV_PCM_RATE_KNOT, 221 .rates = SNDRV_PCM_RATE_48000,
221 222
222 .rate_min = 48000, 223 .rate_min = 48000,
223 .rate_max = 48000, 224 .rate_max = 48000,
224 .channels_min = 2, 225 .channels_min = 2,
225 .channels_max = 2, 226 .channels_max = 2,
226 .buffer_bytes_max = 62720 * 8, /* just about the value in usbaudio.c */ 227 .buffer_bytes_max = 62720 * 8, /* just about the value in usbaudio.c */
227 .period_bytes_min = 64, /* 12544/2, */ 228
228 .period_bytes_max = 12544, 229
230 /*
231 * The period is 12.288 bytes. Allow a 10% of variation along its
232 * value, in order to avoid overruns/underruns due to some clock
233 * drift.
234 *
235 * FIXME: This period assumes 64 packets, and a 48000 PCM rate.
236 * Calculate it dynamically.
237 */
238 .period_bytes_min = 11059,
239 .period_bytes_max = 13516,
240
229 .periods_min = 2, 241 .periods_min = 2,
230 .periods_max = 98, /* 12544, */ 242 .periods_max = 98, /* 12544, */
231}; 243};