* periods_max initialization in snd_usb_hardware
@ 2012-06-27 5:54 Amit Nagal
2012-06-27 19:29 ` Clemens Ladisch
0 siblings, 1 reply; 2+ messages in thread
From: Amit Nagal @ 2012-06-27 5:54 UTC (permalink / raw)
To: alsa-devel, alsa-user
Hi ,
snd_usb_hardware is defined in sound/usb/pcm.c as :
static struct snd_pcm_hardware snd_usb_hardware =
{
.....
.buffer_bytes_max = 1024 * 1024,
.period_bytes_min = 64,
.period_bytes_max = 512 * 1024,
.periods_min = 2,
.periods_max = 1024,
};
here periods_max is intialized with value = 1024 .
but going by buffer_bytes_max and period_bytes_min value defined above ,
periods_max = ( buffer_bytes_max / period_bytes_min ) = 16384 .
why this upper cap of 1024 is maintained for periods_max even though from
calculation it comes as 16384 ?
Thanx & Regards
Amit Nagal
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: periods_max initialization in snd_usb_hardware
2012-06-27 5:54 periods_max initialization in snd_usb_hardware Amit Nagal
@ 2012-06-27 19:29 ` Clemens Ladisch
0 siblings, 0 replies; 2+ messages in thread
From: Clemens Ladisch @ 2012-06-27 19:29 UTC (permalink / raw)
To: Amit Nagal; +Cc: alsa-devel
Amit Nagal wrote:
> snd_usb_hardware is defined in sound/usb/pcm.c as ...
> periods_max is intialized with value = 1024 .
>
> but going by buffer_bytes_max and period_bytes_min value defined above ,
> periods_max = ( buffer_bytes_max / period_bytes_min ) = 16384 .
>
> why this upper cap of 1024 is maintained for periods_max even though from
> calculation it comes as 16384 ?
The buffer is entirely handled by software; these limits are pretty much
arbitrary.
If there is a reason to change these limits, just send a patch. :)
Regards,
Clemens
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-06-27 19:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-27 5:54 periods_max initialization in snd_usb_hardware Amit Nagal
2012-06-27 19:29 ` Clemens Ladisch
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.