Commit graph portaudio/src/hostapi/alsa
Author SHA1 Message Date
aknudsen
ef2d8b6cd8 PA ALSA: define SND_PCM_TSTAMP_ENABLE as SND_PCM_TSTAMP_MMAP if the former is undefined 2011-05-26 20:19:19 +00:00
rossb
cbd24dc45c renamed PaUtil_GetBufferProcessorInputLatency to PaUtil_GetBufferProcessorInputLatencyFrames and PaUtil_GetBufferProcessorOutputLatency to PaUtil_GetBufferProcessorOutputLatencyFrames. see ticket #161 2011-05-02 17:07:11 +00:00
philburk
1ca032a561 Ass semicolon to fix "label at end of compound statement" error
caused by pthread_cleanup_pop(1) macro.
2011-03-01 00:49:52 +00:00
dmitrykos
9c4c92fef6 alsa:
- implemented dynamic ALSA loading, you shall define PA_ALSA_DYNAMIC when compiling PortAudio library, by default PortAudio will use compile time linkage;
- added PA_ALSA_PATHNAME define to redefine ALSA library path and filename to some other name and location, has effect only together with PA_ALSA_DYNAMIC;
- added extension function (PaAlsa_SetLibraryPathName) which allows to set ALSA library path and filename during application run-time overwriting default set by PA_ALSA_PATHNAME during compilation;
- added API compatibility with Android OS (although ALSA may not be available on your device and usually requires 'root' access rights to open an audio device), some missing ALSA functions are replaced with stubs (needs more input from interested parties), to compile on Android you need to add ALSA headers (get it from Android GIT source-code tree) to compiler's searchable path.
2011-02-11 00:15:51 +00:00
dmitrykos
4318a7556b alsa:
- fixed callback thread to exit normally if error condition was satisfied during stream processing (OnExit wasn't called), it was possible cause of crash if error happened inside the thread
- modified processing thread to timeout during poll() within around 2 seconds instead of 64 milliseconds, this will help to fix problems on systems with low processing power and possible CPU overloading, like portable ARM devices
- timeout of poll() will not cause stream to stop but will cause Alsa stream restart, poll timeout will now set 'xrun' event to 1
2011-02-09 08:53:50 +00:00
dmitrykos
96b86da500 alsa: fixed Segmentation fault due to dangling pointer left by snd_lib_error_set_handler() call which set callback pointer to ALSA during PaAlsa_Initialize call. Segmentation fault happens only if application dynamically unloaded PortAudio while still using ALSA through other means, then next ALSA error which causes invocation of ALSA error handling callbacks would cause Segmentation fault. Bug reported in: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=563192, and re-announced by Phil Burk on 15.10.2010. 2010-10-15 20:39:23 +00:00
dmitrykos
b6e9030f6f alsa: avoid SetApproximateSampleRate() excessive log messages when Pa_IsFormatSupported API method is used to test for supported sample rates and some of them are not supported by device 2010-09-20 16:23:30 +00:00
dmitrykos
2b8866cd3d alsa:
- trying to fix specific case of stream failing to open when min/max period is specifying fixed value with +/-1 difference, we try choosing middle then which seems to be aligned to 2
2010-08-02 10:37:18 +00:00
dmitrykos
d9d12f6b82 alsa:
- improved host buffer size calculation: taking into account obligatory double buffering utilising formula (userFrames + MAX( userFrames, SR * suggestedLatency)), aligning host buffer with user buffer size, additional testing of host buffer size to avoid failure on snd_pcm_hw_params_set_period_size_near, additional logging for more convenient debugging
2010-07-30 10:44:18 +00:00
dmitrykos
55ca7ea7d5 alsa:
- fixed seg.fault (caused by assertion) when using non-interleaved host i/o, now paNonInterleaved flag is provided to PaUtil_InitializeBufferProcessor to signal processor about host format being non-interleaved
2010-07-29 18:54:45 +00:00
dmitrykos
71e6e5f6a5 alsa: reverted broken specification (by me) according device latency being not dependent on user buffer size, now framesPerBuffer parameter and suggestedLatency set overall stream latency 2010-06-28 21:19:15 +00:00
dmitrykos
c8414a679e alsa:
- fixed latency setting dependence on user buffer size, now it is completely independent and user is able to set lowest possible/audible latency (approx. 3-4ms)
 - fixed fixed min. latency for non-MMAPed devices, they do behave similar to MMAPed devices now without a limitation
2010-06-03 20:09:33 +00:00
dmitrykos
d031474d95 alsa: - if polling loop is timed out (paTimedOut) PaAlsaStream_WaitForFrames will not report any frames available 2010-06-01 12:45:09 +00:00
dmitrykos
ddfac9891b alsa: - releasing memory of non-MMAPed buffer on stream closure by Pa_CloseStream 2010-05-31 06:00:16 +00:00
dmitrykos
770a597583 alsa:
- reverted buffer size (2048) hardcoding for non-MMAPed devices to avoid crash on wrong buffer size usage (whole area requires more work)
 - optimized non-MMAPed device operation to avoid malloc(memset)/free usage on every processing call avoiding significant performance penalty
2010-05-30 22:14:00 +00:00
dmitrykos
768ce2169e alsa:
- fixed deadlock in PaAlsaStream_WaitForFrames if device is paused, poll() results are now checked for 0 and if 64 times exceeded an error (paTimedOut) is returned
 - removed hardcoded low-limit of latency for non-MMAPed devices, it is an obligation for user to set an acceptable/desired latency value
 - tuned XRUN recovery sequence for MMAPed devices
2010-05-30 07:28:41 +00:00
aknudsen
a9238346fe Fix latency calculation in PA ALSA 2009-06-03 18:57:56 +00:00
aknudsen
822c292009 Add PA ALSA extension to allow setting number of retries when busy 2009-05-24 17:02:10 +00:00
aknudsen
85a522fc4a Apply Kevin Kofler's non-mmap patch 2009-05-24 16:54:22 +00:00
bjornroche
c1e1d067d2 moved trunk into place 2008-03-20 14:24:39 +00:00