All of lore.kernel.org
 help / color / mirror / Atom feed
* params_buffer_size() and params_period_bytes() are returning the same value
@ 2007-11-14 21:53 Timur Tabi
  2007-11-14 21:57 ` Timur Tabi
  0 siblings, 1 reply; 2+ messages in thread
From: Timur Tabi @ 2007-11-14 21:53 UTC (permalink / raw)
  To: alsa-devel

I have an ASOC v1 driver that I'm wrapping up.  I've noticed something weird in 
my hw_params() function.  I have this code:

size_t buffer_size = params_buffer_size(hw_params);
size_t period_size = params_period_bytes(hw_params);

printk(KERN_INFO "%s: buffer_size=%x period_size=%x\n", __FUNCTION__, 
buffer_size, period_size);
printk(KERN_INFO "%s: params_periods=%u\n", __FUNCTION__, 
params_periods(hw_params));

And it produces this output:

fsl_dma_hw_params: buffer_size=5dc0 period_size=5dc0
fsl_dma_hw_params: params_periods=4

Why am I getting the same value for buffer_size and period_size?  buffer_size 
should be four times period_size.

-- 
Timur Tabi
Linux kernel developer at Freescale

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: params_buffer_size() and params_period_bytes() are returning the same value
  2007-11-14 21:53 params_buffer_size() and params_period_bytes() are returning the same value Timur Tabi
@ 2007-11-14 21:57 ` Timur Tabi
  0 siblings, 0 replies; 2+ messages in thread
From: Timur Tabi @ 2007-11-14 21:57 UTC (permalink / raw)
  To: alsa-devel

Timur Tabi wrote:

> Why am I getting the same value for buffer_size and period_size?  buffer_size 
> should be four times period_size.

Never mind.  buffer_size is the size in frames, not bytes, and each frame is 4 
bytes.  Duh.


-- 
Timur Tabi
Linux kernel developer at Freescale

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-11-14 21:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-14 21:53 params_buffer_size() and params_period_bytes() are returning the same value Timur Tabi
2007-11-14 21:57 ` Timur Tabi

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.