1d5ac70f0Sopenharmony_ciOld versus new PCM API (values returned using indirect pointers) 2d5ac70f0Sopenharmony_ci================================================================ 3d5ac70f0Sopenharmony_ci 4d5ac70f0Sopenharmony_ciFrom the binary compatibility view, there is no change. For compilation, 5d5ac70f0Sopenharmony_ci1.0 ALSA applications do not need any change. The older applications must 6d5ac70f0Sopenharmony_ciuse this include sequence: 7d5ac70f0Sopenharmony_ci 8d5ac70f0Sopenharmony_ci#define ALSA_PCM_OLD_HW_PARAMS_API 9d5ac70f0Sopenharmony_ci#define ALSA_PCM_OLD_SW_PARAMS_API 10d5ac70f0Sopenharmony_ci#include <alsa/asoundlib.h> 11d5ac70f0Sopenharmony_ci 12d5ac70f0Sopenharmony_ciIf you use already the new API, you may remove old defines selecting 13d5ac70f0Sopenharmony_cithis API, because they are no longer used: 14d5ac70f0Sopenharmony_ci 15d5ac70f0Sopenharmony_ci#define ALSA_PCM_NEW_HW_PARAMS_API 16d5ac70f0Sopenharmony_ci#define ALSA_PCM_NEW_SW_PARAMS_API 17d5ac70f0Sopenharmony_ci 18d5ac70f0Sopenharmony_ci 19d5ac70f0Sopenharmony_ciVerbose Error Messages 20d5ac70f0Sopenharmony_ci====================== 21d5ac70f0Sopenharmony_ci 22d5ac70f0Sopenharmony_ciSince version 1.0.8, assert() for some non-fatal errors are removed 23d5ac70f0Sopenharmony_ciand error messages are no longer shown to stderr as default. Instead, 24d5ac70f0Sopenharmony_cithe error messages appear only when the environment variable 25d5ac70f0Sopenharmony_ciLIBASOUND_DEBUG is set (to a non-empty value). 26d5ac70f0Sopenharmony_ci 27d5ac70f0Sopenharmony_ciWhen LIBASOUND_DEBUG=1 is set, the errors in hw_params configuration 28d5ac70f0Sopenharmony_ciwill be dumped to stderr. Note that this will show even the non-fatal 29d5ac70f0Sopenharmony_cierrors of plug layer (trial-and-error of parameters). 30d5ac70f0Sopenharmony_ci 31d5ac70f0Sopenharmony_ciThis feature is disabled when --with-debug=no is passed to configure, 32d5ac70f0Sopenharmony_cii.e. no strict checking is done in alsa-lib. 33d5ac70f0Sopenharmony_ci 34d5ac70f0Sopenharmony_ciIn addition, when --enable-debug-assert configure option is given and 35d5ac70f0Sopenharmony_ciwhen LIBASOUND_DEBUG_ASSERT=1 is set, the default error message 36d5ac70f0Sopenharmony_cihandler can call assert() to catch with a debugger. This feature was 37d5ac70f0Sopenharmony_ciformerly activated via LIBASOUND_DEBUG=2. 38d5ac70f0Sopenharmony_ci 39d5ac70f0Sopenharmony_ci 40d5ac70f0Sopenharmony_ciBlocking Open Mode 41d5ac70f0Sopenharmony_ci================== 42d5ac70f0Sopenharmony_ci 43d5ac70f0Sopenharmony_ciThe default behavior of blocking at snd_pcm_open is changed to 44d5ac70f0Sopenharmony_cinon-blocking since version 1.0.11. That is, snd_pcm_open() returns 45d5ac70f0Sopenharmony_ci-EAGAIN immediately when the device is in use and cannot be opened, 46d5ac70f0Sopenharmony_ciwhile the function was blocked in the former version. This influences 47d5ac70f0Sopenharmony_cionly on the opening behavior. The behavior of the further access, 48d5ac70f0Sopenharmony_ciread/write, poll or commit, are not changed. They follow the extra 49d5ac70f0Sopenharmony_ciflag argument of snd_pcm_open() as well as the former version. 50d5ac70f0Sopenharmony_ci 51d5ac70f0Sopenharmony_ciFor taking back the compatible behavior of open blocking mode, set 52d5ac70f0Sopenharmony_ci 53d5ac70f0Sopenharmony_ci defaults.pcm.nonblock 0 54d5ac70f0Sopenharmony_ci 55d5ac70f0Sopenharmony_ciin /etc/asound.conf or ~/.asoundrc file. 56d5ac70f0Sopenharmony_ci 57