behaviour of the trigger operation
Hi,
I am trying to understand how the trigger operation behaves.
The behaviour that I am observing is that when ALSA starts up, it seems to be going through a few cycles of prepare, trigger_start and trigger_stop before it starts to streams data through to the codec. Is this normal behaviour?
On the ear, at the start the stream, this manifest into some corruptions before it appears to play the normal sound.
Any ideas why ALSA might want to trigger_start and trigger_stop a number of times at the start?
thanks,
tyc
Quoted 6 lines · Tehn Yit Chin
I am trying to understand how the trigger operation behaves.
The behaviour that I am observing is that when ALSA starts up, it seems to be going through a few cycles of prepare,
trigger_startandtrigger_stopbefore it starts to streams data through to the codec. Is this normal behaviour?
No. Which hardware and software are you using?
Regards,
Clemens
-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42" plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 26 lines · Tehn Yit Chin
Quoted 8 lines · Clemens Ladisch
Quoted 3 lines · Tehn Yit Chin
I am trying to understand how the trigger operation behaves.
The behaviour that I am observing is that when ALSA starts up, it
seems to
Quoted 1 line
be going through a few cycles of prepare,
trigger_startand
trigger_stopQuoted 9 lines
Quoted 2 lines
before it starts to streams data through to the codec. Is this normal behaviour?
No. Which hardware and software are you using?
Regards,
ClemensWe are using ALSA on an ARM platform with a CS43L43 codec. The kernel is 2.6.11 cross-compiled for ARM. The driver code for the CS43L43 is written by us, and probably require some improvements. Apart from a couple of small problems, the codec code is pretty stable.
Quoted 8 lines
Looking through the ALSA code further, I noticed that in the function
snd_pcm_lib_write1()incore/pcm_lib.c, it could potentially start the trigger sequences ifstart_thresholdis not set correctly as it is in awhile()loop.What is the purpose of
start_threshold?thanks,
Tracing the code further, the trigger stop event was triggerred by the function snd_pcm_update_hw_ptr_post() as it found that amount of available frames is the same runtime->stop_threshold and proceed to call xrun().
I don't quite understand what stop_threshold is suppose to do. Is it suppose to be a method of stopping the stream automatically?
thanks,