* Will ALSA ever call _prepare or _hw_params while it's playing?
@ 2008-05-21 15:45 Timur Tabi
2008-05-21 15:53 ` Clemens Ladisch
0 siblings, 1 reply; 3+ messages in thread
From: Timur Tabi @ 2008-05-21 15:45 UTC (permalink / raw)
To: ALSA development
I have an ASoC driver with a _hw_params, _prepare, and _trigger functions. I've
recently discovered that I need to keep one of my devices disabled until
playback starts.
So I would like to know if ALSA will ever call _hw_params, _prepare, or _startup
if playback or capture is currently in process, or will ALSA first call the
_trigger to stop/pause the driver.
If ALSA does stop/pause the driver before changing parameters, then I can safely
assume the device is always disabled during those functions.
--
Timur Tabi
Linux kernel developer at Freescale
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Will ALSA ever call _prepare or _hw_params while it's playing?
2008-05-21 15:45 Will ALSA ever call _prepare or _hw_params while it's playing? Timur Tabi
@ 2008-05-21 15:53 ` Clemens Ladisch
2008-05-21 15:56 ` Timur Tabi
0 siblings, 1 reply; 3+ messages in thread
From: Clemens Ladisch @ 2008-05-21 15:53 UTC (permalink / raw)
To: Timur Tabi; +Cc: ALSA development
Timur Tabi wrote:
> I have an ASoC driver with a _hw_params, _prepare, and _trigger functions. I've
> recently discovered that I need to keep one of my devices disabled until
> playback starts.
>
> So I would like to know if ALSA will ever call _hw_params, _prepare, or _trigger
> if playback or capture is currently in process, or will ALSA first call the
> _trigger to stop/pause the driver.
While a stream is running (after trigger with START), ALSA will only
call the pointer or the trigger (STOP/PAUSE/SUSPEND) callbacks.
Different streams are not synchronized in any way. (This also applies to
the playback/capture streams of one card.)
Regards,
Clemens
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Will ALSA ever call _prepare or _hw_params while it's playing?
2008-05-21 15:53 ` Clemens Ladisch
@ 2008-05-21 15:56 ` Timur Tabi
0 siblings, 0 replies; 3+ messages in thread
From: Timur Tabi @ 2008-05-21 15:56 UTC (permalink / raw)
To: Clemens Ladisch; +Cc: ALSA development
Clemens Ladisch wrote:
> Timur Tabi wrote:
>> I have an ASoC driver with a _hw_params, _prepare, and _trigger functions. I've
>> recently discovered that I need to keep one of my devices disabled until
>> playback starts.
>>
>> So I would like to know if ALSA will ever call _hw_params, _prepare, or _trigger
>> if playback or capture is currently in process, or will ALSA first call the
>> _trigger to stop/pause the driver.
>
> While a stream is running (after trigger with START), ALSA will only
> call the pointer or the trigger (STOP/PAUSE/SUSPEND) callbacks.
That's good.
> Different streams are not synchronized in any way. (This also applies to
> the playback/capture streams of one card.)
Ah, I hadn't thought about that. If I'm doing simultaneous capture and playback
through the same device, then I can't guarantee that it's disabled. Argh.
Thanks.
--
Timur Tabi
Linux kernel developer at Freescale
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-05-21 15:56 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-21 15:45 Will ALSA ever call _prepare or _hw_params while it's playing? Timur Tabi
2008-05-21 15:53 ` Clemens Ladisch
2008-05-21 15:56 ` 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.