From: Clemens Ladisch <clemens@ladisch.de>
To: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
Cc: alsa-devel@alsa-project.org
Subject: Re: Can DMA address, periods, buffer size, etc change after hw_params is called?
Date: Thu, 29 Jan 2009 09:11:40 +0100 [thread overview]
Message-ID: <498164BC.6080907@ladisch.de> (raw)
In-Reply-To: <20090129081825.241be9e4@hcegtvedt>
Hans-Christian Egtvedt wrote:
> I wonder if I must take care handling changes in DMA address, number of
> periods and period size in the prepare callback?
>
> Or are these locked after the first time prepare is called?
The hardware parameters like buffer/period size and sample format are
set by calling the hw_params callback; they are valid until a call to
hw_free (or another call to hw_params), which doesn't happen while the
stream is running.
The DMA address is selected by the driver in the hw_params callback, but
most drivers let the framework handle this by calling
snd_pcm_lib_malloc_pages().
The prepare and start/stop trigger callbacks are called only between
hw_params/hw_free, but they could be called multiple times, so you
should handle this stuff in the prepare callback only if your device
requires that this is done every time before a stream is started.
Best regards,
Clemens
next prev parent reply other threads:[~2009-01-29 8:11 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-29 7:18 Can DMA address, periods, buffer size, etc change after hw_params is called? Hans-Christian Egtvedt
2009-01-29 8:11 ` Clemens Ladisch [this message]
2009-01-29 8:43 ` Hans-Christian Egtvedt
2009-01-29 8:58 ` Clemens Ladisch
2009-01-29 9:35 ` Hans-Christian Egtvedt
2009-01-29 9:59 ` Clemens Ladisch
2009-01-29 10:10 ` Hans-Christian Egtvedt
2009-01-29 22:30 ` Timur Tabi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=498164BC.6080907@ladisch.de \
--to=clemens@ladisch.de \
--cc=alsa-devel@alsa-project.org \
--cc=hans-christian.egtvedt@atmel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.