[alsa-devel] params_buffer_size() and params_period_bytes() are returning the same value

Timur Tabi timur at freescale.com
Wed Nov 14 22:53:33 CET 2007


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


More information about the Alsa-devel mailing list