[alsa-devel] mapping externally allocated Scatter Gather DMA buffers
perex at perex.cz
Tue Nov 9 13:51:06 CET 2010
On Tue, 9 Nov 2010, Manu Abraham wrote:
> On Tue, Nov 9, 2010 at 5:31 PM, Jaroslav Kysela <perex at perex.cz> wrote:
>> On Tue, 9 Nov 2010, Manu Abraham wrote:
>>> testbox ~ # arecord -Dhw:2,0
>>> Recording WAVE 'stdin' : Unsigned 8 bit, Rate 8000 Hz, Mono
>>> Any idea, why saa7231_hw_params is not getting invoked ?
>> Your hw probably does not support directly 8-bit sample at 8000Hz, one
>> channel. Use 'plughw:2,0' device instead 'hw:2,0' to let alsa-lib do all
>> stream format conversions.
> That didn't make any difference at all.
Check your code. You probably created wrong hw_ops, looking to your code:
.buffer_bytes_max = 512 * 4096,
.period_bytes_min = 8192,
.period_bytes_max = 8192,
.periods_min = 8192,
.periods_max = 8192,
It's definitely an empty configuration space.
You have buffer_bytes_max 2097152, but restricted number of periods to
8192 and period_bytes to 8192.
8192 * 8192 = 67108864 which is not less than 2097152 (and I'm not
counting the bytes for channels and formats). Bingo, the ALSA PCM
code does not know what to configure.
Decrease periods_min and probably also periods_max.
Jaroslav Kysela <perex at perex.cz>
More information about the Alsa-devel