Projects
openEuler:Mainline
alsa-lib
Sign Up
Log In
Username
Password
We truncated the diff of some files because they were too big. If you want to see the full diff for every file,
click here
.
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 9
View file
_service:tar_scm:alsa-lib.spec
Changed
@@ -1,7 +1,7 @@ %define version_alsa_ucm 1.2.7.1 %define version_alsa_tplg 1.2.5.1 Name: alsa-lib -Version: 1.2.8 +Version: 1.2.9 Release: 1 Summary: the user space library that developers compile ALSA applications against @@ -124,6 +124,9 @@ %{_datadir}/alsa/topology %changelog +* Fri July 21 2023 lijianglin <lijianglin2@huawei.com> - 1.2.9-1 +- Upgrade to 1.2.9 + * Thu Feb 9 2023 lijianglin <lijianglin2@huawei.com> - 1.2.8-1 - Upgrade to 1.2.8
View file
_service:tar_scm:alsa-lib-1.2.8.tar.bz2/configure -> _service:tar_scm:alsa-lib-1.2.9.tar.bz2/configure
Changed
@@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for alsa-lib 1.2.8. +# Generated by GNU Autoconf 2.69 for alsa-lib 1.2.9. # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. @@ -587,8 +587,8 @@ # Identity of this package. PACKAGE_NAME='alsa-lib' PACKAGE_TARNAME='alsa-lib' -PACKAGE_VERSION='1.2.8' -PACKAGE_STRING='alsa-lib 1.2.8' +PACKAGE_VERSION='1.2.9' +PACKAGE_STRING='alsa-lib 1.2.9' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1471,7 +1471,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures alsa-lib 1.2.8 to adapt to many kinds of systems. +\`configure' configures alsa-lib 1.2.9 to adapt to many kinds of systems. Usage: $0 OPTION... VAR=VALUE... @@ -1542,7 +1542,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of alsa-lib 1.2.8:";; + short | recursive ) echo "Configuration of alsa-lib 1.2.9:";; esac cat <<\_ACEOF @@ -1704,7 +1704,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -alsa-lib configure 1.2.8 +alsa-lib configure 1.2.9 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2115,7 +2115,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by alsa-lib $as_me 1.2.8, which was +It was created by alsa-lib $as_me 1.2.9, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3053,7 +3053,7 @@ # Define the identity of the package. PACKAGE='alsa-lib' - VERSION='1.2.8' + VERSION='1.2.9' cat >>confdefs.h <<_ACEOF @@ -13059,13 +13059,12 @@ HAVE_LIBDL= if test "$have_libdl" = "yes"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlsym in -ldl" >&5 -$as_echo_n "checking for dlsym in -ldl... " >&6; } -if ${ac_cv_lib_dl_dlsym+:} false; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlsym" >&5 +$as_echo_n "checking for library containing dlsym... " >&6; } +if ${ac_cv_search_dlsym+:} false; then : $as_echo_n "(cached) " >&6 else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" + ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -13084,23 +13083,39 @@ return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dl_dlsym=yes -else - ac_cv_lib_dl_dlsym=no +for ac_lib in '' dl; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_dlsym=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS + conftest$ac_exeext + if ${ac_cv_search_dlsym+:} false; then : + break +fi +done +if ${ac_cv_search_dlsym+:} false; then : + +else + ac_cv_search_dlsym=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlsym" >&5 -$as_echo "$ac_cv_lib_dl_dlsym" >&6; } -if test "x$ac_cv_lib_dl_dlsym" = xyes; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlsym" >&5 +$as_echo "$ac_cv_search_dlsym" >&6; } +ac_res=$ac_cv_search_dlsym +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" HAVE_LIBDL="yes" fi if test "$HAVE_LIBDL" = "yes" ; then - ALSA_DEPLIBS="$ALSA_DEPLIBS -ldl" $as_echo "#define HAVE_LIBDL 1" >>confdefs.h @@ -14978,7 +14993,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by alsa-lib $as_me 1.2.8, which was +This file was extended by alsa-lib $as_me 1.2.9, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -15044,7 +15059,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/\\""\`\$/\\\\&/g'`" ac_cs_version="\\ -alsa-lib config.status 1.2.8 +alsa-lib config.status 1.2.9 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\"
View file
_service:tar_scm:alsa-lib-1.2.8.tar.bz2/configure.ac -> _service:tar_scm:alsa-lib-1.2.9.tar.bz2/configure.ac
Changed
@@ -1,6 +1,6 @@ dnl Process this file with autoconf to produce a configure script. AC_PREREQ(2.59) -AC_INIT(alsa-lib, 1.2.8) +AC_INIT(alsa-lib, 1.2.9) AC_CONFIG_SRCDIR(src/control/control.c) AC_CONFIG_MACRO_DIR(m4) @@ -255,9 +255,8 @@ have_libdl="$withval" , have_libdl="yes" ) HAVE_LIBDL= if test "$have_libdl" = "yes"; then - AC_CHECK_LIB(dl, dlsym, HAVE_LIBDL="yes") + AC_SEARCH_LIBS(dlsym, dl, HAVE_LIBDL="yes") if test "$HAVE_LIBDL" = "yes" ; then - ALSA_DEPLIBS="$ALSA_DEPLIBS -ldl" AC_DEFINE(HAVE_LIBDL, 1, Have libdl) fi else
View file
_service:tar_scm:alsa-lib-1.2.8.tar.bz2/include/alsa-symbols.h -> _service:tar_scm:alsa-lib-1.2.9.tar.bz2/include/alsa-symbols.h
Changed
@@ -29,10 +29,17 @@ #define INTERNAL_CONCAT2_2(Pre, Post) Pre##Post #define INTERNAL(Name) INTERNAL_CONCAT2_2(__, Name) +#if __GNUC__ > 10 +#define symbol_version(real, name, version) \ + extern __typeof (real) real __attribute__((symver (#name "@" #version))) +#define default_symbol_version(real, name, version) \ + extern __typeof (real) real __attribute__((symver (#name "@@" #version))) +#else #define symbol_version(real, name, version) \ __asm__ (".symver " ASM_NAME(#real) "," ASM_NAME(#name) "@" #version) #define default_symbol_version(real, name, version) \ __asm__ (".symver " ASM_NAME(#real) "," ASM_NAME(#name) "@@" #version) +#endif #ifdef __clang__ #define EXPORT_SYMBOL __attribute__((visibility("default")))
View file
_service:tar_scm:alsa-lib-1.2.8.tar.bz2/include/control.h -> _service:tar_scm:alsa-lib-1.2.9.tar.bz2/include/control.h
Changed
@@ -356,6 +356,9 @@ /** Read only (flag for open mode) \hideinitializer */ #define SND_CTL_READONLY 0x0004 +/** Return EINTR instead blocking (flag for open mode) \hideinitializer */ +#define SND_CTL_EINTR 0x0080 + /** CTL handle */ typedef struct _snd_ctl snd_ctl_t;
View file
_service:tar_scm:alsa-lib-1.2.8.tar.bz2/include/pcm.h -> _service:tar_scm:alsa-lib-1.2.9.tar.bz2/include/pcm.h
Changed
@@ -393,6 +393,8 @@ #define SND_PCM_NONBLOCK 0x00000001 /** Async notification (flag for open mode) \hideinitializer */ #define SND_PCM_ASYNC 0x00000002 +/** Return EINTR instead blocking (wait operation) */ +#define SND_PCM_EINTR 0x00000080 /** In an abort state (internal, not allowed for open) */ #define SND_PCM_ABORT 0x00008000 /** Disable automatic (but not forced!) rate resamplinig */ @@ -498,6 +500,13 @@ unsigned int id324; } snd_pcm_sync_id_t; +/** Infinite wait for snd_pcm_wait() */ +#define SND_PCM_WAIT_INFINITE (-1) +/** Wait for next i/o in snd_pcm_wait() */ +#define SND_PCM_WAIT_IO (-10001) +/** Wait for drain in snd_pcm_wait() */ +#define SND_PCM_WAIT_DRAIN (-10002) + /** #SND_PCM_TYPE_METER scope handle */ typedef struct _snd_pcm_scope snd_pcm_scope_t; @@ -722,6 +731,7 @@ int snd_pcm_hw_params_is_joint_duplex(const snd_pcm_hw_params_t *params); int snd_pcm_hw_params_can_sync_start(const snd_pcm_hw_params_t *params); int snd_pcm_hw_params_can_disable_period_wakeup(const snd_pcm_hw_params_t *params); +int snd_pcm_hw_params_is_perfect_drain(const snd_pcm_hw_params_t *params); int snd_pcm_hw_params_supports_audio_wallclock_ts(const snd_pcm_hw_params_t *params); /* deprecated, use audio_ts_type */ int snd_pcm_hw_params_supports_audio_ts_type(const snd_pcm_hw_params_t *params, int type); int snd_pcm_hw_params_get_rate_numden(const snd_pcm_hw_params_t *params, @@ -821,6 +831,8 @@ int snd_pcm_hw_params_get_export_buffer(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val); int snd_pcm_hw_params_set_period_wakeup(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int val); int snd_pcm_hw_params_get_period_wakeup(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val); +int snd_pcm_hw_params_set_drain_silence(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int val); +int snd_pcm_hw_params_get_drain_silence(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val); int snd_pcm_hw_params_get_period_time(const snd_pcm_hw_params_t *params, unsigned int *val, int *dir); int snd_pcm_hw_params_get_period_time_min(const snd_pcm_hw_params_t *params, unsigned int *val, int *dir);
View file
_service:tar_scm:alsa-lib-1.2.8.tar.bz2/include/pcm_old.h -> _service:tar_scm:alsa-lib-1.2.9.tar.bz2/include/pcm_old.h
Changed
@@ -2,11 +2,14 @@ * Old ALSA 0.9.x API */ +#define ___symbol_version(name, version) \ + __asm__ (".symver " #name "," #name "@" version) + #ifdef ALSA_PCM_OLD_HW_PARAMS_API -asm(".symver snd_pcm_hw_params_get_access,snd_pcm_hw_params_get_access@ALSA_0.9"); -asm(".symver snd_pcm_hw_params_set_access_first,snd_pcm_hw_params_set_access_first@ALSA_0.9"); -asm(".symver snd_pcm_hw_params_set_access_last,snd_pcm_hw_params_set_access_last@ALSA_0.9"); +___symbol_version(snd_pcm_hw_params_get_access, "ALSA_0.9"); +___symbol_version(snd_pcm_hw_params_set_access_first, "ALSA_0.9"); +___symbol_version(snd_pcm_hw_params_set_access_last, "ALSA_0.9"); int snd_pcm_hw_params_get_access(const snd_pcm_hw_params_t *params); int snd_pcm_hw_params_test_access(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_access_t val); @@ -16,9 +19,9 @@ int snd_pcm_hw_params_set_access_mask(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_access_mask_t *mask); void snd_pcm_hw_params_get_access_mask(snd_pcm_hw_params_t *params, snd_pcm_access_mask_t *mask); -asm(".symver snd_pcm_hw_params_get_format,snd_pcm_hw_params_get_format@ALSA_0.9"); -asm(".symver snd_pcm_hw_params_set_format_first,snd_pcm_hw_params_set_format_first@ALSA_0.9"); -asm(".symver snd_pcm_hw_params_set_format_last,snd_pcm_hw_params_set_format_last@ALSA_0.9"); +___symbol_version(snd_pcm_hw_params_get_format, "ALSA_0.9"); +___symbol_version(snd_pcm_hw_params_set_format_first, "ALSA_0.9"); +___symbol_version(snd_pcm_hw_params_set_format_last, "ALSA_0.9"); int snd_pcm_hw_params_get_format(const snd_pcm_hw_params_t *params); int snd_pcm_hw_params_test_format(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_format_t val); @@ -28,9 +31,9 @@ int snd_pcm_hw_params_set_format_mask(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_format_mask_t *mask); void snd_pcm_hw_params_get_format_mask(snd_pcm_hw_params_t *params, snd_pcm_format_mask_t *mask); -asm(".symver snd_pcm_hw_params_get_subformat,snd_pcm_hw_params_get_subformat@ALSA_0.9"); -asm(".symver snd_pcm_hw_params_set_subformat_first,snd_pcm_hw_params_set_subformat_first@ALSA_0.9"); -asm(".symver snd_pcm_hw_params_set_subformat_last,snd_pcm_hw_params_set_subformat_last@ALSA_0.9"); +___symbol_version(snd_pcm_hw_params_get_subformat, "ALSA_0.9"); +___symbol_version(snd_pcm_hw_params_set_subformat_first, "ALSA_0.9"); +___symbol_version(snd_pcm_hw_params_set_subformat_last, "ALSA_0.9"); int snd_pcm_hw_params_test_subformat(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_subformat_t val); int snd_pcm_hw_params_get_subformat(const snd_pcm_hw_params_t *params); @@ -40,12 +43,12 @@ int snd_pcm_hw_params_set_subformat_mask(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_subformat_mask_t *mask); void snd_pcm_hw_params_get_subformat_mask(snd_pcm_hw_params_t *params, snd_pcm_subformat_mask_t *mask); -asm(".symver snd_pcm_hw_params_get_channels,snd_pcm_hw_params_get_channels@ALSA_0.9"); -asm(".symver snd_pcm_hw_params_get_channels_min,snd_pcm_hw_params_get_channels_min@ALSA_0.9"); -asm(".symver snd_pcm_hw_params_get_channels_max,snd_pcm_hw_params_get_channels_max@ALSA_0.9"); -asm(".symver snd_pcm_hw_params_set_channels_near,snd_pcm_hw_params_set_channels_near@ALSA_0.9"); -asm(".symver snd_pcm_hw_params_set_channels_first,snd_pcm_hw_params_set_channels_first@ALSA_0.9"); -asm(".symver snd_pcm_hw_params_set_channels_last,snd_pcm_hw_params_set_channels_last@ALSA_0.9"); +___symbol_version(snd_pcm_hw_params_get_channels, "ALSA_0.9"); +___symbol_version(snd_pcm_hw_params_get_channels_min, "ALSA_0.9"); +___symbol_version(snd_pcm_hw_params_get_channels_max, "ALSA_0.9"); +___symbol_version(snd_pcm_hw_params_set_channels_near, "ALSA_0.9"); +___symbol_version(snd_pcm_hw_params_set_channels_first, "ALSA_0.9"); +___symbol_version(snd_pcm_hw_params_set_channels_last, "ALSA_0.9"); int snd_pcm_hw_params_get_channels(const snd_pcm_hw_params_t *params); unsigned int snd_pcm_hw_params_get_channels_min(const snd_pcm_hw_params_t *params); @@ -59,12 +62,12 @@ unsigned int snd_pcm_hw_params_set_channels_first(snd_pcm_t *pcm, snd_pcm_hw_params_t *params); unsigned int snd_pcm_hw_params_set_channels_last(snd_pcm_t *pcm, snd_pcm_hw_params_t *params); -asm(".symver snd_pcm_hw_params_get_rate,snd_pcm_hw_params_get_rate@ALSA_0.9"); -asm(".symver snd_pcm_hw_params_get_rate_min,snd_pcm_hw_params_get_rate_min@ALSA_0.9"); -asm(".symver snd_pcm_hw_params_get_rate_max,snd_pcm_hw_params_get_rate_max@ALSA_0.9"); -asm(".symver snd_pcm_hw_params_set_rate_near,snd_pcm_hw_params_set_rate_near@ALSA_0.9"); -asm(".symver snd_pcm_hw_params_set_rate_first,snd_pcm_hw_params_set_rate_first@ALSA_0.9"); -asm(".symver snd_pcm_hw_params_set_rate_last,snd_pcm_hw_params_set_rate_last@ALSA_0.9"); +___symbol_version(snd_pcm_hw_params_get_rate, "ALSA_0.9"); +___symbol_version(snd_pcm_hw_params_get_rate_min, "ALSA_0.9"); +___symbol_version(snd_pcm_hw_params_get_rate_max, "ALSA_0.9"); +___symbol_version(snd_pcm_hw_params_set_rate_near, "ALSA_0.9"); +___symbol_version(snd_pcm_hw_params_set_rate_first, "ALSA_0.9"); +___symbol_version(snd_pcm_hw_params_set_rate_last, "ALSA_0.9"); int snd_pcm_hw_params_get_rate(const snd_pcm_hw_params_t *params, int *dir); unsigned int snd_pcm_hw_params_get_rate_min(const snd_pcm_hw_params_t *params, int *dir); @@ -80,12 +83,12 @@ int snd_pcm_hw_params_set_rate_resample(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int val); int snd_pcm_hw_params_get_rate_resample(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val); -asm(".symver snd_pcm_hw_params_get_period_time,snd_pcm_hw_params_get_period_time@ALSA_0.9"); -asm(".symver snd_pcm_hw_params_get_period_time_min,snd_pcm_hw_params_get_period_time_min@ALSA_0.9"); -asm(".symver snd_pcm_hw_params_get_period_time_max,snd_pcm_hw_params_get_period_time_max@ALSA_0.9"); -asm(".symver snd_pcm_hw_params_set_period_time_near,snd_pcm_hw_params_set_period_time_near@ALSA_0.9"); -asm(".symver snd_pcm_hw_params_set_period_time_first,snd_pcm_hw_params_set_period_time_first@ALSA_0.9"); -asm(".symver snd_pcm_hw_params_set_period_time_last,snd_pcm_hw_params_set_period_time_last@ALSA_0.9"); +___symbol_version(snd_pcm_hw_params_get_period_time, "ALSA_0.9"); +___symbol_version(snd_pcm_hw_params_get_period_time_min, "ALSA_0.9"); +___symbol_version(snd_pcm_hw_params_get_period_time_max, "ALSA_0.9"); +___symbol_version(snd_pcm_hw_params_set_period_time_near, "ALSA_0.9"); +___symbol_version(snd_pcm_hw_params_set_period_time_first, "ALSA_0.9"); +___symbol_version(snd_pcm_hw_params_set_period_time_last, "ALSA_0.9"); int snd_pcm_hw_params_get_period_time(const snd_pcm_hw_params_t *params, int *dir); unsigned int snd_pcm_hw_params_get_period_time_min(const snd_pcm_hw_params_t *params, int *dir); @@ -99,12 +102,12 @@ unsigned int snd_pcm_hw_params_set_period_time_first(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, int *dir); unsigned int snd_pcm_hw_params_set_period_time_last(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, int *dir); -asm(".symver snd_pcm_hw_params_get_period_size,snd_pcm_hw_params_get_period_size@ALSA_0.9"); -asm(".symver snd_pcm_hw_params_get_period_size_min,snd_pcm_hw_params_get_period_size_min@ALSA_0.9"); -asm(".symver snd_pcm_hw_params_get_period_size_max,snd_pcm_hw_params_get_period_size_max@ALSA_0.9"); -asm(".symver snd_pcm_hw_params_set_period_size_near,snd_pcm_hw_params_set_period_size_near@ALSA_0.9"); -asm(".symver snd_pcm_hw_params_set_period_size_first,snd_pcm_hw_params_set_period_size_first@ALSA_0.9"); -asm(".symver snd_pcm_hw_params_set_period_size_last,snd_pcm_hw_params_set_period_size_last@ALSA_0.9"); +___symbol_version(snd_pcm_hw_params_get_period_size, "ALSA_0.9"); +___symbol_version(snd_pcm_hw_params_get_period_size_min, "ALSA_0.9"); +___symbol_version(snd_pcm_hw_params_get_period_size_max, "ALSA_0.9"); +___symbol_version(snd_pcm_hw_params_set_period_size_near, "ALSA_0.9"); +___symbol_version(snd_pcm_hw_params_set_period_size_first, "ALSA_0.9"); +___symbol_version(snd_pcm_hw_params_set_period_size_last, "ALSA_0.9"); snd_pcm_sframes_t snd_pcm_hw_params_get_period_size(const snd_pcm_hw_params_t *params, int *dir); snd_pcm_uframes_t snd_pcm_hw_params_get_period_size_min(const snd_pcm_hw_params_t *params, int *dir); @@ -119,12 +122,12 @@ snd_pcm_uframes_t snd_pcm_hw_params_set_period_size_last(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, int *dir); int snd_pcm_hw_params_set_period_size_integer(snd_pcm_t *pcm, snd_pcm_hw_params_t *params); -asm(".symver snd_pcm_hw_params_get_periods,snd_pcm_hw_params_get_periods@ALSA_0.9"); -asm(".symver snd_pcm_hw_params_get_periods_min,snd_pcm_hw_params_get_periods_min@ALSA_0.9"); -asm(".symver snd_pcm_hw_params_get_periods_max,snd_pcm_hw_params_get_periods_max@ALSA_0.9"); -asm(".symver snd_pcm_hw_params_set_periods_near,snd_pcm_hw_params_set_periods_near@ALSA_0.9"); -asm(".symver snd_pcm_hw_params_set_periods_first,snd_pcm_hw_params_set_periods_first@ALSA_0.9"); -asm(".symver snd_pcm_hw_params_set_periods_last,snd_pcm_hw_params_set_periods_last@ALSA_0.9"); +___symbol_version(snd_pcm_hw_params_get_periods, "ALSA_0.9"); +___symbol_version(snd_pcm_hw_params_get_periods_min, "ALSA_0.9"); +___symbol_version(snd_pcm_hw_params_get_periods_max, "ALSA_0.9"); +___symbol_version(snd_pcm_hw_params_set_periods_near, "ALSA_0.9"); +___symbol_version(snd_pcm_hw_params_set_periods_first, "ALSA_0.9"); +___symbol_version(snd_pcm_hw_params_set_periods_last, "ALSA_0.9"); int snd_pcm_hw_params_get_periods(const snd_pcm_hw_params_t *params, int *dir); unsigned int snd_pcm_hw_params_get_periods_min(const snd_pcm_hw_params_t *params, int *dir); @@ -139,12 +142,12 @@ unsigned int snd_pcm_hw_params_set_periods_last(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, int *dir); int snd_pcm_hw_params_set_periods_integer(snd_pcm_t *pcm, snd_pcm_hw_params_t *params); -asm(".symver snd_pcm_hw_params_get_buffer_time,snd_pcm_hw_params_get_buffer_time@ALSA_0.9"); -asm(".symver snd_pcm_hw_params_get_buffer_time_min,snd_pcm_hw_params_get_buffer_time_min@ALSA_0.9"); -asm(".symver snd_pcm_hw_params_get_buffer_time_max,snd_pcm_hw_params_get_buffer_time_max@ALSA_0.9"); -asm(".symver snd_pcm_hw_params_set_buffer_time_near,snd_pcm_hw_params_set_buffer_time_near@ALSA_0.9"); -asm(".symver snd_pcm_hw_params_set_buffer_time_first,snd_pcm_hw_params_set_buffer_time_first@ALSA_0.9"); -asm(".symver snd_pcm_hw_params_set_buffer_time_last,snd_pcm_hw_params_set_buffer_time_last@ALSA_0.9"); +___symbol_version(snd_pcm_hw_params_get_buffer_time, "ALSA_0.9"); +___symbol_version(snd_pcm_hw_params_get_buffer_time_min, "ALSA_0.9"); +___symbol_version(snd_pcm_hw_params_get_buffer_time_max, "ALSA_0.9"); +___symbol_version(snd_pcm_hw_params_set_buffer_time_near, "ALSA_0.9"); +___symbol_version(snd_pcm_hw_params_set_buffer_time_first, "ALSA_0.9"); +___symbol_version(snd_pcm_hw_params_set_buffer_time_last, "ALSA_0.9"); int snd_pcm_hw_params_get_buffer_time(const snd_pcm_hw_params_t *params, int *dir); unsigned int snd_pcm_hw_params_get_buffer_time_min(const snd_pcm_hw_params_t *params, int *dir); @@ -158,12 +161,12 @@ unsigned int snd_pcm_hw_params_set_buffer_time_first(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, int *dir); unsigned int snd_pcm_hw_params_set_buffer_time_last(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, int *dir); -asm(".symver snd_pcm_hw_params_get_buffer_size,snd_pcm_hw_params_get_buffer_size@ALSA_0.9"); -asm(".symver snd_pcm_hw_params_get_buffer_size_min,snd_pcm_hw_params_get_buffer_size_min@ALSA_0.9"); -asm(".symver snd_pcm_hw_params_get_buffer_size_max,snd_pcm_hw_params_get_buffer_size_max@ALSA_0.9"); -asm(".symver snd_pcm_hw_params_set_buffer_size_near,snd_pcm_hw_params_set_buffer_size_near@ALSA_0.9"); -asm(".symver snd_pcm_hw_params_set_buffer_size_first,snd_pcm_hw_params_set_buffer_size_first@ALSA_0.9"); -asm(".symver snd_pcm_hw_params_set_buffer_size_last,snd_pcm_hw_params_set_buffer_size_last@ALSA_0.9"); +___symbol_version(snd_pcm_hw_params_get_buffer_size, "ALSA_0.9"); +___symbol_version(snd_pcm_hw_params_get_buffer_size_min, "ALSA_0.9"); +___symbol_version(snd_pcm_hw_params_get_buffer_size_max, "ALSA_0.9"); +___symbol_version(snd_pcm_hw_params_set_buffer_size_near, "ALSA_0.9"); +___symbol_version(snd_pcm_hw_params_set_buffer_size_first, "ALSA_0.9"); +___symbol_version(snd_pcm_hw_params_set_buffer_size_last, "ALSA_0.9"); snd_pcm_sframes_t snd_pcm_hw_params_get_buffer_size(const snd_pcm_hw_params_t *params); snd_pcm_uframes_t snd_pcm_hw_params_get_buffer_size_min(const snd_pcm_hw_params_t *params); @@ -177,12 +180,12 @@ snd_pcm_uframes_t snd_pcm_hw_params_set_buffer_size_first(snd_pcm_t *pcm, snd_pcm_hw_params_t *params); snd_pcm_uframes_t snd_pcm_hw_params_set_buffer_size_last(snd_pcm_t *pcm, snd_pcm_hw_params_t *params); -asm(".symver snd_pcm_hw_params_get_tick_time,snd_pcm_hw_params_get_tick_time@ALSA_0.9"); -asm(".symver snd_pcm_hw_params_get_tick_time_min,snd_pcm_hw_params_get_tick_time_min@ALSA_0.9"); -asm(".symver snd_pcm_hw_params_get_tick_time_max,snd_pcm_hw_params_get_tick_time_max@ALSA_0.9"); -asm(".symver snd_pcm_hw_params_set_tick_time_near,snd_pcm_hw_params_set_tick_time_near@ALSA_0.9"); -asm(".symver snd_pcm_hw_params_set_tick_time_first,snd_pcm_hw_params_set_tick_time_first@ALSA_0.9"); -asm(".symver snd_pcm_hw_params_set_tick_time_last,snd_pcm_hw_params_set_tick_time_last@ALSA_0.9"); +___symbol_version(snd_pcm_hw_params_get_tick_time, "ALSA_0.9"); +___symbol_version(snd_pcm_hw_params_get_tick_time_min, "ALSA_0.9"); +___symbol_version(snd_pcm_hw_params_get_tick_time_max, "ALSA_0.9"); +___symbol_version(snd_pcm_hw_params_set_tick_time_near, "ALSA_0.9"); +___symbol_version(snd_pcm_hw_params_set_tick_time_first, "ALSA_0.9"); +___symbol_version(snd_pcm_hw_params_set_tick_time_last, "ALSA_0.9"); int snd_pcm_hw_params_get_tick_time(const snd_pcm_hw_params_t *params, int *dir); unsigned int snd_pcm_hw_params_get_tick_time_min(const snd_pcm_hw_params_t *params, int *dir); @@ -201,14 +204,14 @@ #ifdef ALSA_PCM_OLD_SW_PARAMS_API
View file
_service:tar_scm:alsa-lib-1.2.8.tar.bz2/include/sound/uapi/asound.h -> _service:tar_scm:alsa-lib-1.2.9.tar.bz2/include/sound/uapi/asound.h
Changed
@@ -281,6 +281,7 @@ #define SNDRV_PCM_INFO_DOUBLE 0x00000004 /* Double buffering needed for PCM start/stop */ #define SNDRV_PCM_INFO_BATCH 0x00000010 /* double buffering */ #define SNDRV_PCM_INFO_SYNC_APPLPTR 0x00000020 /* need the explicit sync of appl_ptr update */ +#define SNDRV_PCM_INFO_PERFECT_DRAIN 0x00000040 /* silencing at the end of stream is not required */ #define SNDRV_PCM_INFO_INTERLEAVED 0x00000100 /* channels are interleaved */ #define SNDRV_PCM_INFO_NONINTERLEAVED 0x00000200 /* channels are not interleaved */ #define SNDRV_PCM_INFO_COMPLEX 0x00000400 /* complex frame organization (mmap only) */ @@ -389,6 +390,9 @@ #define SNDRV_PCM_HW_PARAMS_NORESAMPLE (1<<0) /* avoid rate resampling */ #define SNDRV_PCM_HW_PARAMS_EXPORT_BUFFER (1<<1) /* export buffer */ #define SNDRV_PCM_HW_PARAMS_NO_PERIOD_WAKEUP (1<<2) /* disable period wakeups */ +#define SNDRV_PCM_HW_PARAMS_NO_DRAIN_SILENCE (1<<3) /* suppress the silence fill + * for draining + */ struct snd_interval { unsigned int min, max;
View file
_service:tar_scm:alsa-lib-1.2.8.tar.bz2/include/type_compat.h -> _service:tar_scm:alsa-lib-1.2.9.tar.bz2/include/type_compat.h
Changed
@@ -26,7 +26,7 @@ #define EBADFD EBADF #endif #ifndef ESTRPIPE -#define ESTRPIPE EPIPE +#define ESTRPIPE ESPIPE #endif #ifndef __u16
View file
_service:tar_scm:alsa-lib-1.2.8.tar.bz2/include/version.h -> _service:tar_scm:alsa-lib-1.2.9.tar.bz2/include/version.h
Changed
@@ -4,11 +4,11 @@ #define SND_LIB_MAJOR 1 /**< major number of library version */ #define SND_LIB_MINOR 2 /**< minor number of library version */ -#define SND_LIB_SUBMINOR 8 /**< subminor number of library version */ +#define SND_LIB_SUBMINOR 9 /**< subminor number of library version */ #define SND_LIB_EXTRAVER 1000000 /**< extra version number, used mainly for betas */ /** library version */ #define SND_LIB_VER(maj, min, sub) (((maj)<<16)|((min)<<8)|(sub)) #define SND_LIB_VERSION SND_LIB_VER(SND_LIB_MAJOR, SND_LIB_MINOR, SND_LIB_SUBMINOR) /** library version (string) */ -#define SND_LIB_VERSION_STR "1.2.8" +#define SND_LIB_VERSION_STR "1.2.9"
View file
_service:tar_scm:alsa-lib-1.2.8.tar.bz2/libtool -> _service:tar_scm:alsa-lib-1.2.9.tar.bz2/libtool
Changed
@@ -1,5 +1,5 @@ #! /bin/sh -# Generated automatically by config.status (alsa-lib) 1.2.8 +# Generated automatically by config.status (alsa-lib) 1.2.9 # Libtool was configured on host f420bc43a183: # NOTE: Changes made to this file will be lost: look at ltmain.sh.
View file
_service:tar_scm:alsa-lib-1.2.8.tar.bz2/src/Versions -> _service:tar_scm:alsa-lib-1.2.9.tar.bz2/src/Versions
Changed
@@ -140,3 +140,11 @@ _snd_safe_strto*; } ALSA_1.1.6; + +ALSA_1.2.9 { + global: + + snd_pcm_hw_params_is_perfect_drain; + snd_pcm_hw_params_set_drain_silence; + snd_pcm_hw_params_get_drain_silence; +} ALSA_1.2.6;
View file
_service:tar_scm:alsa-lib-1.2.8.tar.bz2/src/Versions.in -> _service:tar_scm:alsa-lib-1.2.9.tar.bz2/src/Versions.in
Changed
@@ -140,3 +140,11 @@ @SYMBOL_PREFIX@_snd_safe_strto*; } ALSA_1.1.6; + +ALSA_1.2.9 { + global: + + @SYMBOL_PREFIX@snd_pcm_hw_params_is_perfect_drain; + @SYMBOL_PREFIX@snd_pcm_hw_params_set_drain_silence; + @SYMBOL_PREFIX@snd_pcm_hw_params_get_drain_silence; +} ALSA_1.2.6;
View file
_service:tar_scm:alsa-lib-1.2.8.tar.bz2/src/conf.c -> _service:tar_scm:alsa-lib-1.2.9.tar.bz2/src/conf.c
Changed
@@ -814,11 +814,12 @@ closedir(dirp); err = add_include_path(input->current, str); - free(str); if (err < 0) { SNDERR("Cannot add search dir %s", str); + free(str); return err; } + free(str); continue; } @@ -4115,7 +4116,7 @@ if (!S_ISDIR(st.st_mode)) return config_file_open(root, fn); #ifndef DOC_HIDDEN -#if defined(_GNU_SOURCE) && !defined(__NetBSD__) && !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__DragonFly__) && !defined(__sun) && !defined(ANDROID) +#if defined(_GNU_SOURCE) && !defined(__NetBSD__) && !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__DragonFly__) && !defined(__sun) && !defined(__ANDROID__) #define SORTFUNC versionsort64 #else #define SORTFUNC alphasort64
View file
_service:tar_scm:alsa-lib-1.2.8.tar.bz2/src/conf/cards/Audigy.conf -> _service:tar_scm:alsa-lib-1.2.9.tar.bz2/src/conf/cards/Audigy.conf
Changed
@@ -27,14 +27,6 @@ value 255 255 0 0 0 0 0 0 255 0 0 0 0 0 0 0 0 255 0 0 0 0 0 0 } { - # for compatibility with older drivers - name "EMU10K1 PCM Send Volume" - index { @func private_pcm_subdevice } - lock true - optional true - value 255 255 0 0 0 0 0 0 255 0 0 0 0 0 0 0 0 255 0 0 0 0 0 0 - } - { interface PCM name "EMU10K1 PCM Send Routing" index { @func private_pcm_subdevice } @@ -42,15 +34,6 @@ optional true value 8 9 0 0 0 0 0 0 8 9 0 0 0 0 0 0 8 9 0 0 0 0 0 0 } - { - # for compatibility with older drivers - name "EMU10K1 PCM Send Routing" - index { @func private_pcm_subdevice } - lock true - optional true - value 8 9 0 0 0 0 0 0 8 9 0 0 0 0 0 0 8 9 0 0 0 0 0 0 - } - } } @@ -79,14 +62,6 @@ optional true value 0 0 255 255 0 0 0 0 0 0 255 0 0 0 0 0 0 0 0 255 0 0 0 0 } - { - # for compatibility with older drivers - name "EMU10K1 PCM Send Volume" - index { @func private_pcm_subdevice } - lock true - optional true - value 0 0 255 255 0 0 0 0 0 0 255 0 0 0 0 0 0 0 0 255 0 0 0 0 - } } } @@ -116,14 +91,6 @@ value 255 255 0 0 0 0 0 0 255 0 0 0 0 0 0 0 0 255 0 0 0 0 0 0 } { - # for compatibility with older drivers - name "EMU10K1 PCM Send Volume" - index { @func private_pcm_subdevice } - lock true - optional true - value 255 255 0 0 0 0 0 0 255 0 0 0 0 0 0 0 0 255 0 0 0 0 0 0 - } - { interface PCM name "EMU10K1 PCM Send Routing" index { @func private_pcm_subdevice } @@ -131,14 +98,6 @@ optional true value 6 7 0 0 0 0 0 0 6 7 0 0 0 0 0 0 6 7 0 0 0 0 0 0 } - { - # for compatibility with older drivers - name "EMU10K1 PCM Send Routing" - index { @func private_pcm_subdevice } - lock true - optional true - value 6 7 0 0 0 0 0 0 6 7 0 0 0 0 0 0 6 7 0 0 0 0 0 0 - } } } @@ -266,14 +225,6 @@ value $AES0 $AES1 $AES2 $AES3 } { - # for compatibility with older drivers - name "IEC958 Playback Default" - lock true - preserve true - optional true - value $AES0 $AES1 $AES2 $AES3 - } - { name "IEC958 Optical Raw Playback Switch" lock true preserve true @@ -288,14 +239,6 @@ value 255 255 0 0 0 0 0 0 255 0 0 0 0 0 0 0 0 255 0 0 0 0 0 0 } { - # for compatibility with older drivers - name "EMU10K1 PCM Send Volume" - index { @func private_pcm_subdevice } - lock true - optional true - value 255 255 0 0 0 0 0 0 255 0 0 0 0 0 0 0 0 255 0 0 0 0 0 0 - } - { interface PCM name "EMU10K1 PCM Send Routing" index { @func private_pcm_subdevice } @@ -304,14 +247,6 @@ value 20 21 0 0 0 0 0 0 20 21 0 0 0 0 0 0 20 21 0 0 0 0 0 0 } { - # for compatibility with older drivers - name "EMU10K1 PCM Send Routing" - index { @func private_pcm_subdevice } - lock true - optional true - value 20 21 0 0 0 0 0 0 20 21 0 0 0 0 0 0 20 21 0 0 0 0 0 0 - } - { name "Audigy Analog/Digital Output Jack" lock true preserve true
View file
_service:tar_scm:alsa-lib-1.2.8.tar.bz2/src/conf/cards/Audigy2.conf -> _service:tar_scm:alsa-lib-1.2.9.tar.bz2/src/conf/cards/Audigy2.conf
Changed
@@ -27,14 +27,6 @@ value 255 255 0 0 0 0 0 0 255 0 0 0 0 0 0 0 0 255 0 0 0 0 0 0 } { - # for compatibility with older drivers - name "EMU10K1 PCM Send Volume" - index { @func private_pcm_subdevice } - lock true - optional true - value 255 255 0 0 0 0 0 0 255 0 0 0 0 0 0 0 0 255 0 0 0 0 0 0 - } - { interface PCM name "EMU10K1 PCM Send Routing" index { @func private_pcm_subdevice } @@ -42,14 +34,6 @@ optional true value 8 9 0 0 0 0 0 0 8 9 0 0 0 0 0 0 8 9 0 0 0 0 0 0 } - { - # for compatibility with older drivers - name "EMU10K1 PCM Send Routing" - index { @func private_pcm_subdevice } - lock true - optional true - value 8 9 0 0 0 0 0 0 8 9 0 0 0 0 0 0 8 9 0 0 0 0 0 0 - } } @@ -79,14 +63,6 @@ optional true value 0 0 255 255 0 0 0 0 0 0 255 0 0 0 0 0 0 0 0 255 0 0 0 0 } - { - # for compatibility with older drivers - name "EMU10K1 PCM Send Volume" - index { @func private_pcm_subdevice } - lock true - optional true - value 0 0 255 255 0 0 0 0 0 0 255 0 0 0 0 0 0 0 0 255 0 0 0 0 - } } } @@ -116,14 +92,6 @@ value 255 255 0 0 0 0 0 0 255 0 0 0 0 0 0 0 0 255 0 0 0 0 0 0 } { - # for compatibility with older drivers - name "EMU10K1 PCM Send Volume" - index { @func private_pcm_subdevice } - lock true - optional true - value 255 255 0 0 0 0 0 0 255 0 0 0 0 0 0 0 0 255 0 0 0 0 0 0 - } - { interface PCM name "EMU10K1 PCM Send Routing" index { @func private_pcm_subdevice } @@ -131,14 +99,6 @@ optional true value 6 7 0 0 0 0 0 0 6 7 0 0 0 0 0 0 6 7 0 0 0 0 0 0 } - { - # for compatibility with older drivers - name "EMU10K1 PCM Send Routing" - index { @func private_pcm_subdevice } - lock true - optional true - value 6 7 0 0 0 0 0 0 6 7 0 0 0 0 0 0 6 7 0 0 0 0 0 0 - } } } @@ -168,14 +128,6 @@ value 255 255 0 0 0 0 0 0 255 0 0 0 0 0 0 0 0 255 0 0 0 0 0 0 } { - # for compatibility with older drivers - name "EMU10K1 PCM Send Volume" - index { @func private_pcm_subdevice } - lock true - optional true - value 255 255 0 0 0 0 0 0 255 0 0 0 0 0 0 0 0 255 0 0 0 0 0 0 - } - { interface PCM name "EMU10K1 PCM Send Routing" index { @func private_pcm_subdevice } @@ -183,14 +135,6 @@ optional true value 14 15 0 0 0 0 0 0 14 15 0 0 0 0 0 0 14 15 0 0 0 0 0 0 } - { - # for compatibility with older drivers - name "EMU10K1 PCM Send Routing" - index { @func private_pcm_subdevice } - lock true - optional true - value 14 15 0 0 0 0 0 0 14 15 0 0 0 0 0 0 14 15 0 0 0 0 0 0 - } } } @@ -375,13 +319,6 @@ value $AES0 $AES1 $AES2 $AES3 } { - # for compatibility with older drivers - name "IEC958 Playback Default" - preserve true - optional true - value $AES0 $AES1 $AES2 $AES3 - } - { name "IEC958 Optical Raw Playback Switch" lock true preserve true @@ -396,14 +333,6 @@ value 255 255 0 0 0 0 0 0 255 0 0 0 0 0 0 0 0 255 0 0 0 0 0 0 } { - # for compatibility with older drivers - name "EMU10K1 PCM Send Volume" - index { @func private_pcm_subdevice } - lock true - optional true - value 255 255 0 0 0 0 0 0 255 0 0 0 0 0 0 0 0 255 0 0 0 0 0 0 - } - { interface PCM name "EMU10K1 PCM Send Routing" index { @func private_pcm_subdevice } @@ -412,14 +341,6 @@ value 20 21 0 0 0 0 0 0 20 21 0 0 0 0 0 0 20 21 0 0 0 0 0 0 } { - # for compatibility with older drivers - name "EMU10K1 PCM Send Routing" - index { @func private_pcm_subdevice } - lock true - optional true - value 20 21 0 0 0 0 0 0 20 21 0 0 0 0 0 0 20 21 0 0 0 0 0 0 - } - { name "Audigy Analog/Digital Output Jack" lock true preserve true
View file
_service:tar_scm:alsa-lib-1.2.8.tar.bz2/src/conf/cards/EMU10K1.conf -> _service:tar_scm:alsa-lib-1.2.9.tar.bz2/src/conf/cards/EMU10K1.conf
Changed
@@ -29,14 +29,6 @@ value 255 255 0 0 255 0 0 0 0 255 0 0 } { - # for compatibility with older drivers - name "EMU10K1 PCM Send Volume" - index { @func private_pcm_subdevice } - # lock true - optional true - value 255 255 0 0 255 0 0 0 0 255 0 0 - } - { interface PCM name "EMU10K1 PCM Send Routing" index { @func private_pcm_subdevice } @@ -44,14 +36,6 @@ optional true value 8 9 0 0 8 9 0 0 8 9 0 0 } - { - # for compatibility with older drivers - name "EMU10K1 PCM Send Routing" - index { @func private_pcm_subdevice } - # lock true - optional true - value 8 9 0 0 8 9 0 0 8 9 0 0 - } } } @@ -87,14 +71,6 @@ optional true value 0 0 255 255 0 0 255 0 0 0 0 255 } - { - # for compatibility with older drivers - name "EMU10K1 PCM Send Volume" - index { @func private_pcm_subdevice } - # lock true - optional true - value 0 0 255 255 0 0 255 0 0 0 0 255 - } } } @@ -153,14 +129,6 @@ value 255 255 0 0 255 0 0 0 0 255 0 0 } { - # for compatibility with older drivers - name "EMU10K1 PCM Send Volume" - index { @func private_pcm_subdevice } - # lock true - optional true - value 255 255 0 0 255 0 0 0 0 255 0 0 - } - { interface PCM name "EMU10K1 PCM Send Routing" index { @func private_pcm_subdevice } @@ -168,14 +136,6 @@ optional true value 6 7 0 0 6 7 0 0 6 7 0 0 } - { - # for compatibility with older drivers - name "EMU10K1 PCM Send Routing" - index { @func private_pcm_subdevice } - # lock true - optional true - value 6 7 0 0 6 7 0 0 6 7 0 0 - } } } @@ -305,14 +265,6 @@ value $AES0 $AES1 $AES2 $AES3 } { - # for compatibility with older drivers - name "IEC958 Playback Default" - lock true - preserve true - optional true - value $AES0 $AES1 $AES2 $AES3 - } - { name "IEC958 Optical Raw Playback Switch" lock true preserve true
View file
_service:tar_scm:alsa-lib-1.2.8.tar.bz2/src/control/control.c -> _service:tar_scm:alsa-lib-1.2.9.tar.bz2/src/control/control.c
Changed
@@ -265,13 +265,14 @@ } #ifndef DOC_HIDDEN -int snd_ctl_new(snd_ctl_t **ctlp, snd_ctl_type_t type, const char *name) +int snd_ctl_new(snd_ctl_t **ctlp, snd_ctl_type_t type, const char *name, int mode) { snd_ctl_t *ctl; ctl = calloc(1, sizeof(*ctl)); if (!ctl) return -ENOMEM; ctl->type = type; + ctl->mode = mode; if (name) ctl->name = strdup(name); INIT_LIST_HEAD(&ctl->async_handlers);
View file
_service:tar_scm:alsa-lib-1.2.8.tar.bz2/src/control/control_ext.c -> _service:tar_scm:alsa-lib-1.2.9.tar.bz2/src/control/control_ext.c
Changed
@@ -716,7 +716,7 @@ return -ENXIO; } - err = snd_ctl_new(&ctl, SND_CTL_TYPE_EXT, name); + err = snd_ctl_new(&ctl, SND_CTL_TYPE_EXT, name, mode); if (err < 0) return err;
View file
_service:tar_scm:alsa-lib-1.2.8.tar.bz2/src/control/control_hw.c -> _service:tar_scm:alsa-lib-1.2.9.tar.bz2/src/control/control_hw.c
Changed
@@ -444,7 +444,7 @@ hw->fd = fd; hw->protocol = ver; - err = snd_ctl_new(&ctl, SND_CTL_TYPE_HW, name); + err = snd_ctl_new(&ctl, SND_CTL_TYPE_HW, name, mode); if (err < 0) { close(fd); free(hw);
View file
_service:tar_scm:alsa-lib-1.2.8.tar.bz2/src/control/control_local.h -> _service:tar_scm:alsa-lib-1.2.9.tar.bz2/src/control/control_local.h
Changed
@@ -62,6 +62,7 @@ snd_ctl_type_t type; const snd_ctl_ops_t *ops; void *private_data; + int mode; int nonblock; int poll_fd; struct list_head async_handlers; @@ -93,7 +94,7 @@ /* make local functions really local */ #define snd_ctl_new snd1_ctl_new -int snd_ctl_new(snd_ctl_t **ctlp, snd_ctl_type_t type, const char *name); +int snd_ctl_new(snd_ctl_t **ctlp, snd_ctl_type_t type, const char *name, int mode); int _snd_ctl_poll_descriptor(snd_ctl_t *ctl); #define _snd_ctl_async_descriptor _snd_ctl_poll_descriptor int snd_ctl_hw_open(snd_ctl_t **handle, const char *name, int card, int mode);
View file
_service:tar_scm:alsa-lib-1.2.8.tar.bz2/src/control/control_remap.c -> _service:tar_scm:alsa-lib-1.2.9.tar.bz2/src/control/control_remap.c
Changed
@@ -1148,7 +1148,7 @@ * changed in future. */ int snd_ctl_remap_open(snd_ctl_t **handlep, const char *name, snd_config_t *remap, - snd_config_t *map, snd_ctl_t *child, int mode ATTRIBUTE_UNUSED) + snd_config_t *map, snd_ctl_t *child, int mode) { snd_ctl_remap_t *priv; snd_ctl_t *ctl; @@ -1195,7 +1195,7 @@ priv->numid_remap_active = priv->map_items > 0; priv->child = child; - err = snd_ctl_new(&ctl, SND_CTL_TYPE_REMAP, name); + err = snd_ctl_new(&ctl, SND_CTL_TYPE_REMAP, name, mode); if (err < 0) { result = err; goto _err;
View file
_service:tar_scm:alsa-lib-1.2.8.tar.bz2/src/control/control_shm.c -> _service:tar_scm:alsa-lib-1.2.9.tar.bz2/src/control/control_shm.c
Changed
@@ -502,7 +502,7 @@ shm->socket = sock; shm->ctrl = ctrl; - err = snd_ctl_new(&ctl, SND_CTL_TYPE_SHM, name); + err = snd_ctl_new(&ctl, SND_CTL_TYPE_SHM, name, mode); if (err < 0) { result = err; goto _err;
View file
_service:tar_scm:alsa-lib-1.2.8.tar.bz2/src/control/hcontrol.c -> _service:tar_scm:alsa-lib-1.2.9.tar.bz2/src/control/hcontrol.c
Changed
@@ -696,7 +696,7 @@ pollio = 0; err_poll = poll(pfd, npfds, timeout); if (err_poll < 0) { - if (errno == EINTR && !CTLINABORT(hctl->ctl)) + if (errno == EINTR && !CTLINABORT(hctl->ctl) && !(hctl->ctl->mode & SND_CTL_EINTR)) continue; return -errno; }
View file
_service:tar_scm:alsa-lib-1.2.8.tar.bz2/src/pcm/pcm.c -> _service:tar_scm:alsa-lib-1.2.9.tar.bz2/src/pcm/pcm.c
Changed
@@ -1705,7 +1705,7 @@ assert(pcm1); assert(pcm2); if (pcm1->fast_ops->link) - err = pcm1->fast_ops->link(pcm1, pcm2); + err = pcm1->fast_ops->link(pcm1->fast_op_arg, pcm2); else err = -ENOSYS; return err; @@ -1722,7 +1722,7 @@ assert(pcm); if (pcm->fast_ops->unlink) - err = pcm->fast_ops->unlink(pcm); + err = pcm->fast_ops->unlink(pcm->fast_op_arg); else err = -ENOSYS; return err; @@ -2834,7 +2834,8 @@ * \brief Wait for a PCM to become ready * \param pcm PCM handle * \param timeout maximum time in milliseconds to wait, - * a negative value means infinity + * a -1 value means infinity (SND_PCM_WAIT_INFINITE), + * see also SND_PCM_WAIT_IO and SND_PCM_WAIT_DRAIN * \return a positive value on success otherwise a negative error code * (-EPIPE for the xrun and -ESTRPIPE for the suspended status, * others for general errors) @@ -2869,6 +2870,37 @@ return snd_pcm_wait_nocheck(pcm, timeout); } +static int __snd_pcm_wait_io_timeout(snd_pcm_t *pcm) +{ + int timeout; + + /* period size is the time boundary */ + timeout = (pcm->period_size * 1000ULL) / pcm->rate; + /* should not happen */ + if (timeout < 0) + timeout = 0; + /* add extra time of 200 milliseconds */ + timeout += 200; + return timeout; +} + +static int __snd_pcm_wait_drain_timeout(snd_pcm_t *pcm) +{ + int timeout; + + /* for capture, there's no reason to wait, just one iteration */ + if (snd_pcm_stream(pcm) == SND_PCM_STREAM_CAPTURE) + return 0; + /* result is in milliseconds */ + timeout = (snd_pcm_mmap_playback_delay(pcm) * 1000LL) / pcm->rate; + /* should not happen */ + if (timeout < 0) + timeout = 0; + /* add extra time of 200 milliseconds */ + timeout += 200; + return timeout; +} + /* * like snd_pcm_wait() but doesn't check mmap_avail before calling poll() * @@ -2895,12 +2927,18 @@ SNDMSG("invalid poll descriptors %d\n", err); return -EIO; } + if (timeout == SND_PCM_WAIT_IO) + timeout = __snd_pcm_wait_io_timeout(pcm); + else if (timeout == SND_PCM_WAIT_DRAIN) + timeout = __snd_pcm_wait_drain_timeout(pcm); + else if (timeout < -1) + SNDMSG("invalid snd_pcm_wait timeout argument %d\n", timeout); do { __snd_pcm_unlock(pcm->fast_op_arg); err_poll = poll(pfd, npfds, timeout); __snd_pcm_lock(pcm->fast_op_arg); if (err_poll < 0) { - if (errno == EINTR && !PCMINABORT(pcm)) + if (errno == EINTR && !PCMINABORT(pcm) && !(pcm->mode & SND_PCM_EINTR)) continue; return -errno; } @@ -3708,6 +3746,29 @@ } /** + * \brief Check if hardware is capable of perfect drain + * \param params Configuration space + * \retval 0 Hardware doesn't do perfect drain + * \retval 1 Hardware does perfect drain + * + * This function should only be called when the configuration space + * contains a single configuration. Call #snd_pcm_hw_params to choose + * a single configuration from the configuration space. + * + * Perfect drain means that the hardware does not use samples + * beyond the stream application pointer. + */ +int snd_pcm_hw_params_is_perfect_drain(const snd_pcm_hw_params_t *params) +{ + assert(params); + if (CHECK_SANITY(params->info == ~0U)) { + SNDMSG("invalid PCM info field"); + return 0; /* FIXME: should be a negative error? */ + } + return !!(params->info & SNDRV_PCM_INFO_PERFECT_DRAIN); +} + +/** * \brief Check if hardware supports audio wallclock timestamps * \param params Configuration space * \retval 0 Hardware doesn't support audio wallclock timestamps @@ -4936,6 +4997,43 @@ } /** + * \brief Restrict a configuration space to fill the end of playback stream with silence when drain() is invoked + * \param pcm PCM handle + * \param params Configuration space + * \param val 0 = disabled, 1 = enabled (default) fill the end of the playback stream with silence when drain() is invoked + * \return Zero on success, otherwise a negative error code. + * + * When disabled, the application should handle the end of stream gracefully + * (fill the silent samples to align to the period size plus some extra + * samples for hardware / driver without perfect drain). Note that the rewind + * may be used for this purpose or the sw_params silencing mechanism. + */ +int snd_pcm_hw_params_set_drain_silence(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int val) +{ + assert(pcm && params); + if (val) + params->flags &= ~SND_PCM_HW_PARAMS_NO_DRAIN_SILENCE; + else + params->flags |= SND_PCM_HW_PARAMS_NO_DRAIN_SILENCE; + params->rmask = ~0; + return snd_pcm_hw_refine(pcm, params); +} + +/** + * \brief Extract drain with the filling of silence samples from a configuration space + * \param pcm PCM handle + * \param params Configuration space + * \param val 0 = disabled, 1 = enabled + * \return 0 otherwise a negative error code + */ +int snd_pcm_hw_params_get_drain_silence(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val) +{ + assert(pcm && params && val); + *val = params->flags & SND_PCM_HW_PARAMS_NO_DRAIN_SILENCE ? 0 : 1; + return 0; +} + +/** * \brief Extract period time from a configuration space * \param params Configuration space * \param val Returned approximate period duration in us @@ -6167,6 +6265,25 @@ return 0; } +#ifndef DOXYGEN +void snd_pcm_sw_params_current_no_lock(snd_pcm_t *pcm, snd_pcm_sw_params_t *params) +{ + params->proto = SNDRV_PCM_VERSION; + params->tstamp_mode = pcm->tstamp_mode; + params->tstamp_type = pcm->tstamp_type; + params->period_step = pcm->period_step; + params->sleep_min = 0; + params->avail_min = pcm->avail_min; + sw_set_period_event(params, pcm->period_event); + params->xfer_align = 1; + params->start_threshold = pcm->start_threshold; + params->stop_threshold = pcm->stop_threshold; + params->silence_threshold = pcm->silence_threshold; + params->silence_size = pcm->silence_size; + params->boundary = pcm->boundary; +} +#endif + /** * \brief Return current software configuration for a PCM * \param pcm PCM handle @@ -6183,19 +6300,7 @@ return -EIO; } __snd_pcm_lock(pcm); /* forced lock due to pcm field changes */ - params->proto = SNDRV_PCM_VERSION; - params->tstamp_mode = pcm->tstamp_mode; - params->tstamp_type = pcm->tstamp_type; - params->period_step = pcm->period_step; - params->sleep_min = 0; - params->avail_min = pcm->avail_min; - sw_set_period_event(params, pcm->period_event); - params->xfer_align = 1; - params->start_threshold = pcm->start_threshold; - params->stop_threshold = pcm->stop_threshold;
View file
_service:tar_scm:alsa-lib-1.2.8.tar.bz2/src/pcm/pcm_direct.c -> _service:tar_scm:alsa-lib-1.2.9.tar.bz2/src/pcm/pcm_direct.c
Changed
@@ -44,7 +44,7 @@ * */ -#if !defined(__OpenBSD__) && !defined(__DragonFly__) +#if !defined(__OpenBSD__) && !defined(__DragonFly__) && !defined(__ANDROID__) union semun { int val; /* Value for SETVAL */ struct semid_ds *buf; /* Buffer for IPC_STAT, IPC_SET */ @@ -688,7 +688,7 @@ * so don't increment but just update to actual counter */ direct->recoveries = direct->shmptr->s.recoveries; - pcm->fast_ops->drop(pcm); + pcm->fast_ops->drop(pcm->fast_op_arg); /* trigger_tstamp update is missing in drop callbacks */ gettimestamp(&direct->trigger_tstamp, pcm->tstamp_type); /* no timer clear:
View file
_service:tar_scm:alsa-lib-1.2.8.tar.bz2/src/pcm/pcm_dmix.c -> _service:tar_scm:alsa-lib-1.2.9.tar.bz2/src/pcm/pcm_dmix.c
Changed
@@ -623,7 +623,7 @@ if (dmix->state == SND_PCM_STATE_DRAINING) { snd_pcm_dmix_sync_area(pcm); if ((pcm->mode & SND_PCM_NONBLOCK) == 0) { - snd_pcm_wait_nocheck(pcm, -1); + snd_pcm_wait_nocheck(pcm, SND_PCM_WAIT_DRAIN); snd_pcm_direct_clear_timer_queue(dmix); /* force poll to wait */ }
View file
_service:tar_scm:alsa-lib-1.2.8.tar.bz2/src/pcm/pcm_dshare.c -> _service:tar_scm:alsa-lib-1.2.9.tar.bz2/src/pcm/pcm_dshare.c
Changed
@@ -400,7 +400,7 @@ } if (dshare->state == SND_PCM_STATE_DRAINING) { snd_pcm_dshare_sync_area(pcm); - snd_pcm_wait_nocheck(pcm, -1); + snd_pcm_wait_nocheck(pcm, SND_PCM_WAIT_DRAIN); snd_pcm_direct_clear_timer_queue(dshare); /* force poll to wait */ switch (snd_pcm_state(dshare->spcm)) {
View file
_service:tar_scm:alsa-lib-1.2.8.tar.bz2/src/pcm/pcm_dsnoop.c -> _service:tar_scm:alsa-lib-1.2.9.tar.bz2/src/pcm/pcm_dsnoop.c
Changed
@@ -301,7 +301,7 @@ break; if (pcm->mode & SND_PCM_NONBLOCK) return -EAGAIN; - __snd_pcm_wait_in_lock(pcm, -1); + __snd_pcm_wait_in_lock(pcm, SND_PCM_WAIT_DRAIN); } pcm->stop_threshold = stop_threshold; return snd_pcm_dsnoop_drop(pcm);
View file
_service:tar_scm:alsa-lib-1.2.8.tar.bz2/src/pcm/pcm_hw.c -> _service:tar_scm:alsa-lib-1.2.9.tar.bz2/src/pcm/pcm_hw.c
Changed
@@ -98,6 +98,9 @@ bool mmap_control_fallbacked; struct snd_pcm_sync_ptr *sync_ptr; + bool prepare_reset_sw_params; + bool perfect_drain; + int period_event; snd_timer_t *period_timer; struct pollfd period_timer_pfd; @@ -109,6 +112,7 @@ int max; } rates; int channels; + int drain_silence; /* for chmap */ unsigned int chmap_caps; snd_pcm_chmap_query_t **chmap_override; @@ -356,7 +360,7 @@ if (hw->rates.min > 0) { err = _snd_pcm_hw_param_set_minmax(params, SND_PCM_HW_PARAM_RATE, hw->rates.min, 0, hw->rates.max + 1, -1); - + if (err < 0) return err; } @@ -395,6 +399,8 @@ params->info &= ~0xf0000000; if (pcm->tstamp_type != SND_PCM_TSTAMP_TYPE_GETTIMEOFDAY) params->info |= SND_PCM_INFO_MONOTONIC; + hw->perfect_drain = !!(params->info & SND_PCM_INFO_PERFECT_DRAIN) || + !!(params->flags & SND_PCM_HW_PARAMS_NO_DRAIN_SILENCE); return query_status_data(hw); } @@ -534,6 +540,7 @@ SYSMSG("SNDRV_PCM_IOCTL_SW_PARAMS failed (%i)", err); goto out; } + hw->prepare_reset_sw_params = false; if ((snd_pcm_tstamp_type_t) params->tstamp_type != pcm->tstamp_type) { if (hw->version < SNDRV_PROTOCOL_VERSION(2, 0, 12)) { int on = (snd_pcm_tstamp_type_t) params->tstamp_type == @@ -660,7 +667,18 @@ static int snd_pcm_hw_prepare(snd_pcm_t *pcm) { snd_pcm_hw_t *hw = pcm->private_data; + snd_pcm_sw_params_t sw_params; int fd = hw->fd, err; + + if (hw->prepare_reset_sw_params) { + snd_pcm_sw_params_current_no_lock(pcm, &sw_params); + if (ioctl(hw->fd, SNDRV_PCM_IOCTL_SW_PARAMS, sw_params) < 0) { + err = -errno; + SYSMSG("SNDRV_PCM_IOCTL_SW_PARAMS failed (%i)", err); + return err; + } + hw->prepare_reset_sw_params = false; + } if (ioctl(fd, SNDRV_PCM_IOCTL_PREPARE) < 0) { err = -errno; SYSMSG("SNDRV_PCM_IOCTL_PREPARE failed (%i)", err); @@ -718,7 +736,49 @@ static int snd_pcm_hw_drain(snd_pcm_t *pcm) { snd_pcm_hw_t *hw = pcm->private_data; + snd_pcm_sw_params_t sw_params; + snd_pcm_uframes_t silence_size; int err; + + if (pcm->stream != SND_PCM_STREAM_PLAYBACK) + goto __skip_silence; + if (hw->drain_silence == 0 || hw->perfect_drain) + goto __skip_silence; + snd_pcm_sw_params_current_no_lock(pcm, &sw_params); + if (hw->drain_silence > 0) { + silence_size = (pcm->rate * hw->drain_silence) / 1000; + goto __manual_silence; + } + /* compute end silence size, align to period size + extra time */ + if ((pcm->boundary % pcm->period_size) == 0) { + silence_size = pcm->period_size - (*pcm->appl.ptr % pcm->period_size); + if (silence_size == pcm->period_size) + silence_size = 0; + } else { + /* it not not easy to compute the period crossing point + * in this case because the period is not aligned to the boundary + * - use the full range (one period) in this case + */ + silence_size = pcm->period_size; + } + silence_size += pcm->rate / 10; /* 1/10th of second */ +__manual_silence: + if (sw_params.silence_size < silence_size) { + /* fill the silence soon as possible (in the bellow ioctl + * or the next period wake up) + */ + sw_params.silence_threshold = pcm->buffer_size; + if (silence_size > pcm->buffer_size) + silence_size = pcm->buffer_size; + sw_params.silence_size = silence_size; + if (ioctl(hw->fd, SNDRV_PCM_IOCTL_SW_PARAMS, &sw_params) < 0) { + err = -errno; + SYSMSG("SNDRV_PCM_IOCTL_SW_PARAMS failed (%i)", err); + return err; + } + hw->prepare_reset_sw_params = true; + } +__skip_silence: if (ioctl(hw->fd, SNDRV_PCM_IOCTL_DRAIN) < 0) { err = -errno; SYSMSG("SNDRV_PCM_IOCTL_DRAIN failed (%i)", err); @@ -838,7 +898,7 @@ { if (pcm2->type != SND_PCM_TYPE_HW) { if (pcm2->fast_ops->link_slaves) - return pcm2->fast_ops->link_slaves(pcm2, pcm1); + return pcm2->fast_ops->link_slaves(pcm2->fast_op_arg, pcm1); return -ENOSYS; } return hw_link(pcm1, pcm2); @@ -1771,6 +1831,7 @@ rate INT # Restrict only to the given rate or rate INT INT # Restrict only to the given rate range (min max) chmap MAP # Override channel maps; MAP is a string array + drain_silence INT # Add silence in drain (-1 = auto /default/, 0 = off, > 0 milliseconds) } \endcode @@ -1803,7 +1864,7 @@ long card = -1, device = 0, subdevice = -1; const char *str; int err, sync_ptr_ioctl = 0; - int min_rate = 0, max_rate = 0, channels = 0; + int min_rate = 0, max_rate = 0, channels = 0, drain_silence = -1; snd_pcm_format_t format = SND_PCM_FORMAT_UNKNOWN; snd_config_t *n; int nonblock = 1; /* non-block per default */ @@ -1944,6 +2005,16 @@ } continue; } + if (strcmp(id, "drain_silence") == 0) { + long val; + err = snd_config_get_integer(n, &val); + if (err < 0) { + SNDERR("Invalid type for %s", id); + goto fail; + } + drain_silence = val; + continue; + } SNDERR("Unknown field %s", id); err = -EINVAL; goto fail; @@ -1986,6 +2057,7 @@ } if (chmap) hw->chmap_override = chmap; + hw->drain_silence = drain_silence; return 0;
View file
_service:tar_scm:alsa-lib-1.2.8.tar.bz2/src/pcm/pcm_ioplug.c -> _service:tar_scm:alsa-lib-1.2.9.tar.bz2/src/pcm/pcm_ioplug.c
Changed
@@ -522,7 +522,7 @@ /* in non-blocking mode, let application to poll() by itself */ if (io->data->nonblock) return -EAGAIN; - if (snd_pcm_wait_nocheck(pcm, -1) < 0) + if (snd_pcm_wait_nocheck(pcm, SND_PCM_WAIT_DRAIN) < 0) break; }
View file
_service:tar_scm:alsa-lib-1.2.8.tar.bz2/src/pcm/pcm_local.h -> _service:tar_scm:alsa-lib-1.2.9.tar.bz2/src/pcm/pcm_local.h
Changed
@@ -48,12 +48,9 @@ #include "mask.h" #define SND_PCM_HW_PARAM_ACCESS SNDRV_PCM_HW_PARAM_ACCESS -#define SND_PCM_HW_PARAM_FIRST_MASK SNDRV_PCM_HW_PARAM_FIRST_MASK #define SND_PCM_HW_PARAM_FORMAT SNDRV_PCM_HW_PARAM_FORMAT #define SND_PCM_HW_PARAM_SUBFORMAT SNDRV_PCM_HW_PARAM_SUBFORMAT -#define SND_PCM_HW_PARAM_LAST_MASK SNDRV_PCM_HW_PARAM_LAST_MASK #define SND_PCM_HW_PARAM_SAMPLE_BITS SNDRV_PCM_HW_PARAM_SAMPLE_BITS -#define SND_PCM_HW_PARAM_FIRST_INTERVAL SNDRV_PCM_HW_PARAM_FIRST_INTERVAL #define SND_PCM_HW_PARAM_FRAME_BITS SNDRV_PCM_HW_PARAM_FRAME_BITS #define SND_PCM_HW_PARAM_CHANNELS SNDRV_PCM_HW_PARAM_CHANNELS #define SND_PCM_HW_PARAM_RATE SNDRV_PCM_HW_PARAM_RATE @@ -65,7 +62,6 @@ #define SND_PCM_HW_PARAM_BUFFER_SIZE SNDRV_PCM_HW_PARAM_BUFFER_SIZE #define SND_PCM_HW_PARAM_BUFFER_BYTES SNDRV_PCM_HW_PARAM_BUFFER_BYTES #define SND_PCM_HW_PARAM_TICK_TIME SNDRV_PCM_HW_PARAM_TICK_TIME -#define SND_PCM_HW_PARAM_LAST_INTERVAL SNDRV_PCM_HW_PARAM_LAST_INTERVAL #define SND_PCM_HW_PARAM_LAST_MASK SNDRV_PCM_HW_PARAM_LAST_MASK #define SND_PCM_HW_PARAM_FIRST_MASK SNDRV_PCM_HW_PARAM_FIRST_MASK #define SND_PCM_HW_PARAM_LAST_INTERVAL SNDRV_PCM_HW_PARAM_LAST_INTERVAL @@ -79,6 +75,8 @@ #define SND_PCM_INFO_DOUBLE SNDRV_PCM_INFO_DOUBLE /** device transfers samples in batch */ #define SND_PCM_INFO_BATCH SNDRV_PCM_INFO_BATCH +/** device does perfect drain (silencing not required) */ +#define SND_PCM_INFO_PERFECT_DRAIN SNDRV_PCM_INFO_PERFECT_DRAIN /** device accepts interleaved samples */ #define SND_PCM_INFO_INTERLEAVED SNDRV_PCM_INFO_INTERLEAVED /** device accepts non-interleaved samples */ @@ -105,6 +103,7 @@ #define SND_PCM_HW_PARAMS_NORESAMPLE SNDRV_PCM_HW_PARAMS_NORESAMPLE #define SND_PCM_HW_PARAMS_EXPORT_BUFFER SNDRV_PCM_HW_PARAMS_EXPORT_BUFFER #define SND_PCM_HW_PARAMS_NO_PERIOD_WAKEUP SNDRV_PCM_HW_PARAMS_NO_PERIOD_WAKEUP +#define SND_PCM_HW_PARAMS_NO_DRAIN_SILENCE SNDRV_PCM_HW_PARAMS_NO_DRAIN_SILENCE #define SND_PCM_INFO_MONOTONIC 0x80000000 @@ -366,6 +365,8 @@ snd1_pcm_hw_param_get_max #define snd_pcm_hw_param_name \ snd1_pcm_hw_param_name +#define snd_pcm_sw_params_current_no_lock \ + snd1_pcm_sw_params_current_no_lock int snd_pcm_new(snd_pcm_t **pcmp, snd_pcm_type_t type, const char *name, snd_pcm_stream_t stream, int mode); @@ -390,6 +391,8 @@ void snd_pcm_mmap_hw_backward(snd_pcm_t *pcm, snd_pcm_uframes_t frames); void snd_pcm_mmap_hw_forward(snd_pcm_t *pcm, snd_pcm_uframes_t frames); +void snd_pcm_sw_params_current_no_lock(snd_pcm_t *pcm, snd_pcm_sw_params_t *params); + snd_pcm_sframes_t snd_pcm_mmap_writei(snd_pcm_t *pcm, const void *buffer, snd_pcm_uframes_t size); snd_pcm_sframes_t snd_pcm_mmap_readi(snd_pcm_t *pcm, void *buffer, snd_pcm_uframes_t size); snd_pcm_sframes_t snd_pcm_mmap_writen(snd_pcm_t *pcm, void **bufs, snd_pcm_uframes_t size); @@ -1144,7 +1147,7 @@ if (avail >= pcm->avail_min) return 0; if (pcm->fast_ops->may_wait_for_avail_min) - return pcm->fast_ops->may_wait_for_avail_min(pcm, avail); + return pcm->fast_ops->may_wait_for_avail_min(pcm->fast_op_arg, avail); return 1; }
View file
_service:tar_scm:alsa-lib-1.2.8.tar.bz2/src/pcm/pcm_multi.c -> _service:tar_scm:alsa-lib-1.2.9.tar.bz2/src/pcm/pcm_multi.c
Changed
@@ -759,8 +759,9 @@ static int snd_pcm_multi_link(snd_pcm_t *pcm1, snd_pcm_t *pcm2) { snd_pcm_multi_t *multi = pcm1->private_data; - if (multi->slaves0.pcm->fast_ops->link) - return multi->slaves0.pcm->fast_ops->link(multi->slaves0.pcm, pcm2); + snd_pcm_t *main_pcm = multi->slaves0.pcm; + if (main_pcm->fast_ops->link) + return main_pcm->fast_ops->link(main_pcm->fast_op_arg, pcm2); return -ENOSYS; }
View file
_service:tar_scm:alsa-lib-1.2.8.tar.bz2/src/pcm/pcm_params.c -> _service:tar_scm:alsa-lib-1.2.9.tar.bz2/src/pcm/pcm_params.c
Changed
@@ -2335,6 +2335,9 @@ params->silence_threshold = 0; params->silence_size = 0; params->boundary = pcm->buffer_size; + /* this should not happen (bad child?) */ + if (params->boundary == 0) + return -EINVAL; while (params->boundary * 2 <= LONG_MAX - pcm->buffer_size) params->boundary *= 2; return 0; @@ -2431,7 +2434,9 @@ /* Default sw params */ memset(&sw, 0, sizeof(sw)); - snd_pcm_sw_params_default(pcm, &sw); + err = snd_pcm_sw_params_default(pcm, &sw); + if (err < 0) + return err; err = snd_pcm_sw_params(pcm, &sw); if (err < 0) return err;
View file
_service:tar_scm:alsa-lib-1.2.8.tar.bz2/src/pcm/pcm_plugin.c -> _service:tar_scm:alsa-lib-1.2.9.tar.bz2/src/pcm/pcm_plugin.c
Changed
@@ -597,8 +597,12 @@ * a) the slave can provide contineous hw_ptr between periods * b) avail_min does not match one slave_period */ - snd_pcm_plugin_t *plugin = pcm->private_data; - snd_pcm_t *slave = plugin->gen.slave; + snd_pcm_generic_t *generic = pcm->private_data; + /* + * do not use snd_pcm_plugin_t pointer here + * this code is used from the generic plugins, too + */ + snd_pcm_t *slave = generic->slave; snd_pcm_uframes_t needed_slave_avail_min; snd_pcm_sframes_t available;
View file
_service:tar_scm:alsa-lib-1.2.8.tar.bz2/src/pcm/pcm_rate.c -> _service:tar_scm:alsa-lib-1.2.9.tar.bz2/src/pcm/pcm_rate.c
Changed
@@ -1018,7 +1018,7 @@ slave_size -= rate->gen.slave->period_size; rate->last_commit_ptr += pcm->period_size; if (rate->last_commit_ptr >= pcm->boundary) - rate->last_commit_ptr = 0; + rate->last_commit_ptr -= pcm->boundary; } return 0; } @@ -1146,7 +1146,7 @@ snd_pcm_uframes_t psize, spsize; int err; - err = __snd_pcm_wait_in_lock(rate->gen.slave, -1); + err = __snd_pcm_wait_in_lock(rate->gen.slave, SND_PCM_WAIT_DRAIN); if (err < 0) break; if (size > pcm->period_size) { @@ -1163,7 +1163,7 @@ if (commit_err == 1) { rate->last_commit_ptr += psize; if (rate->last_commit_ptr >= pcm->boundary) - rate->last_commit_ptr = 0; + rate->last_commit_ptr -= pcm->boundary; } else if (commit_err == 0) { if (pcm->mode & SND_PCM_NONBLOCK) { commit_err = -EAGAIN;
View file
_service:tar_scm:alsa-lib-1.2.8.tar.bz2/src/pcm/pcm_route.c -> _service:tar_scm:alsa-lib-1.2.9.tar.bz2/src/pcm/pcm_route.c
Changed
@@ -1182,15 +1182,10 @@ return -EINVAL; } - err = snd_config_get_real(jnode, &value); + err = snd_config_get_ireal(jnode, &value); if (err < 0) { - long v; - err = snd_config_get_integer(jnode, &v); - if (err < 0) { - SNDERR("Invalid type for %s", id); - return -EINVAL; - } - value = v; + SNDERR("Invalid type for %s", id); + return -EINVAL; } for (k = 0; (int) k < ss; k++) {
View file
_service:tar_scm:alsa-lib-1.2.8.tar.bz2/src/pcm/pcm_share.c -> _service:tar_scm:alsa-lib-1.2.9.tar.bz2/src/pcm/pcm_share.c
Changed
@@ -1194,7 +1194,7 @@ _snd_pcm_share_update(pcm); Pthread_mutex_unlock(&slave->mutex); if (!(pcm->mode & SND_PCM_NONBLOCK)) - snd_pcm_wait(pcm, -1); + snd_pcm_wait(pcm, SND_PCM_WAIT_DRAIN); return 0; default: assert(0);
View file
_service:tar_scm:alsa-lib-1.2.8.tar.bz2/src/pcm/pcm_shm.c -> _service:tar_scm:alsa-lib-1.2.9.tar.bz2/src/pcm/pcm_shm.c
Changed
@@ -495,7 +495,7 @@ if (err < 0) return err; if (!(pcm->mode & SND_PCM_NONBLOCK)) - snd_pcm_wait(pcm, -1); + snd_pcm_wait(pcm, SND_PCM_WAIT_DRAIN); return err; }
View file
_service:tar_scm:alsa-lib-1.2.8.tar.bz2/src/pcm/pcm_softvol.c -> _service:tar_scm:alsa-lib-1.2.9.tar.bz2/src/pcm/pcm_softvol.c
Changed
@@ -1190,7 +1190,7 @@ continue; } if (strcmp(id, "min_dB") == 0) { - err = snd_config_get_real(n, &min_dB); + err = snd_config_get_ireal(n, &min_dB); if (err < 0) { SNDERR("Invalid min_dB value"); return err; @@ -1198,7 +1198,7 @@ continue; } if (strcmp(id, "max_dB") == 0) { - err = snd_config_get_real(n, &max_dB); + err = snd_config_get_ireal(n, &max_dB); if (err < 0) { SNDERR("Invalid max_dB value"); return err;
View file
_service:tar_scm:alsa-lib-1.2.8.tar.bz2/src/topology/dapm.c -> _service:tar_scm:alsa-lib-1.2.9.tar.bz2/src/topology/dapm.c
Changed
@@ -605,6 +605,17 @@ continue; } + if (strcmp(id, "ignore_suspend") == 0) { + ival = snd_config_get_bool(n); + if (ival < 0) + return -EINVAL; + + widget->ignore_suspend = ival; + + tplg_dbg("\t%s: %s", id, val); + continue; + } + if (strcmp(id, "subseq") == 0) { if (tplg_get_integer(n, &ival, 0)) return -EINVAL; @@ -700,6 +711,9 @@ if (err >= 0 && widget->invert) err = tplg_save_printf(dst, pfx, "\tinvert %u\n", widget->invert); + if (err >= 0 && widget->ignore_suspend) + err = tplg_save_printf(dst, pfx, "\tignore_suspend %u\n", + widget->ignore_suspend); if (err >= 0 && widget->subseq) err = tplg_save_printf(dst, pfx, "\tsubseq %u\n", widget->subseq);
View file
_service:tar_scm:alsa-lib-1.2.8.tar.bz2/src/topology/pcm.c -> _service:tar_scm:alsa-lib-1.2.9.tar.bz2/src/topology/pcm.c
Changed
@@ -812,15 +812,17 @@ static int save_flags(unsigned int flags, unsigned int mask, struct tplg_buf *dst, const char *pfx) { - static unsigned int flag_masks3 = { + static unsigned int flag_masks4 = { SND_SOC_TPLG_LNK_FLGBIT_SYMMETRIC_RATES, SND_SOC_TPLG_LNK_FLGBIT_SYMMETRIC_CHANNELS, SND_SOC_TPLG_LNK_FLGBIT_SYMMETRIC_SAMPLEBITS, + SND_SOC_TPLG_LNK_FLGBIT_VOICE_WAKEUP, }; - static const char *flag_ids3 = { + static const char *flag_ids4 = { "symmetric_rates", "symmetric_channels", "symmetric_sample_bits", + "ignore_suspend", }; unsigned int i; int err = 0; @@ -929,6 +931,15 @@ continue; } + if (strcmp(id, "ignore_suspend") == 0) { + err = parse_flag(n, + SND_SOC_TPLG_LNK_FLGBIT_VOICE_WAKEUP, + &pcm->flag_mask, &pcm->flags); + if (err < 0) + return err; + continue; + } + /* private data */ if (strcmp(id, "data") == 0) { err = tplg_parse_refs(n, elem, SND_TPLG_TYPE_DATA); @@ -1066,6 +1077,15 @@ continue; } + if (strcmp(id, "ignore_suspend") == 0) { + err = parse_flag(n, + SND_SOC_TPLG_LNK_FLGBIT_VOICE_WAKEUP, + &dai->flag_mask, &dai->flags); + if (err < 0) + return err; + continue; + } + /* private data */ if (strcmp(id, "data") == 0) { err = tplg_parse_refs(n, elem, SND_TPLG_TYPE_DATA); @@ -1220,6 +1240,15 @@ continue; } + if (strcmp(id, "ignore_suspend") == 0) { + err = parse_flag(n, + SND_SOC_TPLG_LNK_FLGBIT_VOICE_WAKEUP, + &link->flag_mask, &link->flags); + if (err < 0) + return err; + continue; + } + /* private data */ if (strcmp(id, "data") == 0) { err = tplg_parse_refs(n, elem, SND_TPLG_TYPE_DATA);
View file
_service:tar_scm:alsa-lib-1.2.8.tar.bz2/src/ucm/main.c -> _service:tar_scm:alsa-lib-1.2.9.tar.bz2/src/ucm/main.c
Changed
@@ -572,16 +572,18 @@ wlen = write(fd, value, len); myerrno = errno; close(fd); - free(s); if (ignore_error) - return 0; + goto __end; if (wlen != (ssize_t)len) { uc_error("unable to write '%s' to '%s': %s", value, path, strerror(myerrno)); + free(s); return -EINVAL; } +__end: + free(s); return 0; } @@ -998,13 +1000,14 @@ /** * \brief execute default commands * \param uc_mgr Use case manager + * \param force Force run * \return zero on success, otherwise a negative error code */ -static int set_defaults(snd_use_case_mgr_t *uc_mgr) +static int set_defaults(snd_use_case_mgr_t *uc_mgr, bool force) { int err; - if (uc_mgr->default_list_executed) + if (!force && uc_mgr->default_list_executed) return 0; err = execute_sequence(uc_mgr, NULL, &uc_mgr->default_list, &uc_mgr->value_list, NULL, NULL); @@ -1351,7 +1354,7 @@ int err; if (enable) { - err = set_defaults(uc_mgr); + err = set_defaults(uc_mgr, false); if (err < 0) return err; seq = &verb->enable_list; @@ -1436,6 +1439,22 @@ } /** + * \brief Do the full reset + * \param uc_mgr Use case manager + * \return zero on success, otherwise a negative error code + */ +static int do_reset(snd_use_case_mgr_t *uc_mgr) +{ + int err; + + err = set_defaults(uc_mgr, true); + INIT_LIST_HEAD(&uc_mgr->active_modifiers); + INIT_LIST_HEAD(&uc_mgr->active_devices); + uc_mgr->active_verb = NULL; + return err; +} + +/** * \brief Parse open arguments * \param uc_mgr Use case manager * \param name name of card to open @@ -1569,6 +1588,8 @@ pthread_mutex_lock(&uc_mgr->mutex); + do_reset(uc_mgr); + uc_mgr_free_verb(uc_mgr); uc_mgr->default_list_executed = 0; @@ -1633,8 +1654,7 @@ } uc_mgr->active_verb = NULL; - err = execute_sequence(uc_mgr, NULL, &uc_mgr->default_list, - &uc_mgr->value_list, NULL, NULL); + err = set_defaults(uc_mgr, true); return err; } @@ -1649,11 +1669,7 @@ int err; pthread_mutex_lock(&uc_mgr->mutex); - err = execute_sequence(uc_mgr, NULL, &uc_mgr->default_list, - &uc_mgr->value_list, NULL, NULL); - INIT_LIST_HEAD(&uc_mgr->active_modifiers); - INIT_LIST_HEAD(&uc_mgr->active_devices); - uc_mgr->active_verb = NULL; + err = do_reset(uc_mgr); pthread_mutex_unlock(&uc_mgr->mutex); return err; } @@ -2399,19 +2415,37 @@ return err; } +/* + * a helper macro to obtain status and existence + */ +#define geti(uc_mgr, status, ifind, str, value) ({ \ + long val = -EINVAL; \ + if (str) { \ + val = (status)((uc_mgr), (str)); \ + if (val >= 0) { \ + if ((ifind)((uc_mgr), (uc_mgr)->active_verb, (str), 0)) { \ + *(value) = val; \ + val = 0; \ + } else { \ + val = -ENOENT; \ + } \ + } \ + } \ + ; val; /* return value */ \ +}) /** * \brief Get current - integer * \param uc_mgr Use case manager - * \param identifier - * \return Value if success, otherwise a negative error code + * \param identifier + * \return Value if success, otherwise a negative error code */ int snd_use_case_geti(snd_use_case_mgr_t *uc_mgr, const char *identifier, long *value) { char *str, *str1; - long err; + int err; pthread_mutex_lock(&uc_mgr->mutex); if (0) { @@ -2428,31 +2462,15 @@ str = NULL; } if (check_identifier(identifier, "_devstatus")) { - if (!str) { - err = -EINVAL; - goto __end; - } - err = device_status(uc_mgr, str); - if (err >= 0) { - *value = err; - err = 0; - } + err = geti(uc_mgr, device_status, find_device, str, value); } else if (check_identifier(identifier, "_modstatus")) { - if (!str) { - err = -EINVAL; - goto __end; - } - err = modifier_status(uc_mgr, str); - if (err >= 0) { - *value = err; - err = 0; - } + err = geti(uc_mgr, modifier_status, find_modifier, str, value); #if 0 /* * enable this block if the else clause below is expanded to query * user-supplied values */ - } else if (identifier0 == '_') + } else if (identifier0 == '_') { err = -ENOENT; #endif } else @@ -2512,7 +2530,7 @@ uc_error("error: wrong value for _defaults (%s)", value); return -EINVAL; } - return set_defaults(uc_mgr); + return set_defaults(uc_mgr, false); } static int handle_transition_verb(snd_use_case_mgr_t *uc_mgr, @@ -2793,7 +2811,7 @@ strcmp(ucm_id, "CaptureSwitch")) return -EINVAL; snd_ctl_elem_id_clear(dst); - if (strcasestr(ucm_id, "name=")) + if (strcasestr(value, "name=")) return __snd_ctl_ascii_elem_id_parse(dst, value, NULL); iface = SND_CTL_ELEM_IFACE_MIXER; if (jack_control)
View file
_service:tar_scm:alsa-lib-1.2.8.tar.bz2/src/ucm/parser.c -> _service:tar_scm:alsa-lib-1.2.9.tar.bz2/src/ucm/parser.c
Changed
@@ -2915,7 +2915,7 @@ snprintf(filename, sizeof(filename), "%s/ucm2/conf.virt.d", snd_config_topdir()); -#if defined(_GNU_SOURCE) && !defined(__NetBSD__) && !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__DragonFly__) && !defined(__sun) && !defined(ANDROID) +#if defined(_GNU_SOURCE) && !defined(__NetBSD__) && !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__DragonFly__) && !defined(__sun) && !defined(__ANDROID__) #define SORTFUNC versionsort64 #else #define SORTFUNC alphasort64
View file
_service:tar_scm:alsa-lib-1.2.8.tar.bz2/src/ucm/ucm_subs.c -> _service:tar_scm:alsa-lib-1.2.9.tar.bz2/src/ucm/ucm_subs.c
Changed
@@ -490,7 +490,13 @@ { char *e; - e = getenv(id); + if (*id == '-') { + e = getenv(id + 1); + if (e == NULL) + e = ""; + } else { + e = getenv(id); + } if (e) return strdup(e); return NULL;
View file
_service:tar_scm:alsa-lib-1.2.8.tar.bz2/test/audio_time.c -> _service:tar_scm:alsa-lib-1.2.9.tar.bz2/test/audio_time.c
Changed
@@ -4,8 +4,11 @@ * helpful to verify the information reported by drivers. */ +#include "../include/config.h" #include <stdio.h> +#if HAVE_MALLOC_H #include <malloc.h> +#endif #include <unistd.h> #include <stdlib.h> #include <string.h>
View file
_service:tar_scm:alsa-lib-1.2.8.tar.bz2/test/latency.c -> _service:tar_scm:alsa-lib-1.2.9.tar.bz2/test/latency.c
Changed
@@ -33,10 +33,23 @@ #include <sched.h> #include <errno.h> #include <getopt.h> +#include <time.h> #include "../include/asoundlib.h" #include <sys/time.h> #include <math.h> +#ifndef CLOCK_MONOTONIC_RAW +#define CLOCK_MONOTONIC_RAW CLOCK_MONOTONIC +#endif + +#if defined(__OpenBSD__) +#define sched_getparam(pid, parm) (-1) +#define sched_setscheduler(pid, policy, parm) (-1) +#endif + +typedef struct timespec timestamp_t; + +char *sched_policy = "rr"; char *pdevice = "hw:0,0"; char *cdevice = "hw:0,0"; snd_pcm_format_t format = SND_PCM_FORMAT_S16_LE; @@ -49,11 +62,42 @@ int loop_sec = 30; /* seconds */ int block = 0; /* block mode */ int use_poll = 0; +int usleep_val = 0; int resample = 1; +int sys_latency = 0; /* data I/O: use system timings instead driver wakeups */ +int pos_dump = 0; /* dump positions */ +int realtime_check = 0; unsigned long loop_limit; +snd_pcm_uframes_t playback_buffer_size; snd_output_t *output = NULL; +static inline long long frames_to_micro(size_t frames) +{ + return (long long)((frames * 1000000LL) + (rate / 2)) / rate; +} + +void timestamp_now(timestamp_t *tstamp) +{ + if (clock_gettime(CLOCK_MONOTONIC_RAW, tstamp)) + printf("clock_gettime() failed\n"); +} + +long long timestamp_diff_micro(timestamp_t *tstamp) +{ + timestamp_t now, diff; + timestamp_now(&now); + if (tstamp->tv_nsec > now.tv_nsec) { + diff.tv_sec = now.tv_sec - tstamp->tv_sec - 1; + diff.tv_nsec = (now.tv_nsec + 1000000000L) - tstamp->tv_nsec; + } else { + diff.tv_sec = now.tv_sec - tstamp->tv_sec; + diff.tv_nsec = now.tv_nsec - tstamp->tv_nsec; + } + /* microseconds */ + return (diff.tv_sec * 1000000) + ((diff.tv_nsec + 500L) / 1000L); +} + int setparams_stream(snd_pcm_t *handle, snd_pcm_hw_params_t *params, const char *id) @@ -96,6 +140,14 @@ printf("Rate doesn't match (requested %iHz, get %iHz)\n", rate, err); return -EINVAL; } + /* we do not want driver wakeups */ + if (sys_latency > 0 && snd_pcm_hw_params_can_disable_period_wakeup(params)) { + err = snd_pcm_hw_params_set_period_wakeup(handle, params, 0); + if (err < 0) { + printf("Cannot disable period wakeups for %s\n", id); + return err; + } + } return 0; } @@ -227,6 +279,7 @@ goto __again; snd_pcm_hw_params_get_buffer_size(p_params, &p_size); + playback_buffer_size = p_size; if (p_psize * 2 < p_size) { snd_pcm_hw_params_get_periods_min(p_params, &val, NULL); if (val > 2) { @@ -311,18 +364,27 @@ void setscheduler(void) { struct sched_param sched_param; + int policy = SCHED_RR; + const char *spolicy = "Round Robin"; + if (strcasecmp(sched_policy, "fifo") == 0) { + policy = SCHED_FIFO; + spolicy = "FIFO"; + } else if (strcasecmp(sched_policy, "other") == 0) { + policy = SCHED_OTHER; + spolicy = "OTHER"; + } if (sched_getparam(0, &sched_param) < 0) { printf("Scheduler getparam failed...\n"); return; } - sched_param.sched_priority = sched_get_priority_max(SCHED_RR); - if (!sched_setscheduler(0, SCHED_RR, &sched_param)) { - printf("Scheduler set to Round Robin with priority %i...\n", sched_param.sched_priority); + sched_param.sched_priority = sched_get_priority_max(policy); + if (!sched_setscheduler(0, policy, &sched_param)) { + printf("Scheduler set to %s with priority %i...\n", spolicy, sched_param.sched_priority); fflush(stdout); return; } - printf("!!!Scheduler set to Round Robin with priority %i FAILED!!!\n", sched_param.sched_priority); + printf("!!!Scheduler set to %s with priority %i FAILED!!!\n", spolicy, sched_param.sched_priority); } long timediff(snd_timestamp_t t1, snd_timestamp_t t2) @@ -354,7 +416,7 @@ } // printf("read = %li\n", r); } else { - int frame_bytes = (snd_pcm_format_width(format) / 8) * channels; + int frame_bytes = (snd_pcm_format_physical_width(format) / 8) * channels; do { r = snd_pcm_readi(handle, buf, len); if (r > 0) { @@ -374,7 +436,7 @@ long writebuf(snd_pcm_t *handle, char *buf, long len, size_t *frames) { long r; - int frame_bytes = (snd_pcm_format_width(format) / 8) * channels; + int frame_bytes = (snd_pcm_format_physical_width(format) / 8) * channels; while (len > 0) { r = snd_pcm_writei(handle, buf, len); @@ -390,7 +452,7 @@ } return 0; } - + #define FILTERSWEEP_LFO_CENTER 2000. #define FILTERSWEEP_LFO_DEPTH 1800. #define FILTERSWEEP_LFO_FREQ 0.2 @@ -434,6 +496,19 @@ } } +static ssize_t get_avail(snd_pcm_t *pcm) +{ + ssize_t avail; + + while (1) { + avail = snd_pcm_avail(pcm); + if (avail == -EAGAIN) + continue; + break; + } + return avail; +} + void help(void) { int k; @@ -444,6 +519,7 @@ "-C,--cdevice capture device\n" "-m,--min minimum latency in frames\n" "-M,--max maximum latency in frames\n" +"-U,--updates I/O updates in milliseconds (0 = off)\n" "-F,--frames frames to transfer\n" "-f,--format sample format\n" "-c,--channels channels\n" @@ -453,7 +529,12 @@ "-s,--seconds duration of test in seconds\n" "-b,--block block mode\n" "-p,--poll use poll (wait for event - reduces CPU usage)\n" +"-y,--usleep sleep for the specified amount of microseconds between\n" +" stream updates (default 0 - off)\n" "-e,--effect apply an effect (bandpass filter sweep)\n" +"-x,--posdump dump buffer positions\n" +"-X,--realtime do a realtime check (buffering)\n" +"-O,--policy set scheduler policy (RR, FIFO or OTHER)\n" ); printf("Recognized sample formats are:"); for (k = 0; k < SND_PCM_FORMAT_LAST; ++k) { @@ -480,6 +561,7 @@ {"cdevice", 1, NULL, 'C'}, {"min", 1, NULL, 'm'}, {"max", 1, NULL, 'M'}, + {"updates", 1, NULL, 'U'}, {"frames", 1, NULL, 'F'}, {"format", 1, NULL, 'f'}, {"channels", 1, NULL, 'c'}, @@ -489,7 +571,11 @@ {"seconds", 1, NULL, 's'},
View file
_service:tar_scm:alsa-lib-1.2.8.tar.bz2/test/midifile.c -> _service:tar_scm:alsa-lib-1.2.9.tar.bz2/test/midifile.c
Changed
@@ -71,7 +71,7 @@ #endif #include <stdio.h> -#include <values.h> +#include <limits.h> #include <string.h> /*void exit(), free();*/ @@ -148,7 +148,7 @@ static int msgleng (); static void msgadd (); static void biggermsg (); -static int eputc (unsigned char c); +static int eputc (); double mf_ticks2sec (unsigned long ticks, int division, unsigned long tempo); int mf_write_meta_event (); @@ -328,7 +328,7 @@ if (Mf_interactive) { - Mf_toberead = MAXINT; + Mf_toberead = INT_MAX; } else {
View file
_service:tar_scm:alsa-lib-1.2.8.tar.bz2/test/namehint.c -> _service:tar_scm:alsa-lib-1.2.9.tar.bz2/test/namehint.c
Changed
@@ -4,7 +4,8 @@ int main(int argc, char *argv) { const char *iface = "pcm"; - char **hints, **n; + void **hints; + char **n; int err; if (argc > 1) @@ -12,7 +13,7 @@ err = snd_device_name_hint(-1, iface, &hints); if (err < 0) errx(1, "snd_device_name_hint error: %s", snd_strerror(err)); - n = hints; + n = (char **)hints; while (*n != NULL) { printf("%s\n", *n); n++;
View file
_service:tar_scm:alsa-lib-1.2.8.tar.bz2/test/pcm-multi-thread.c -> _service:tar_scm:alsa-lib-1.2.9.tar.bz2/test/pcm-multi-thread.c
Changed
@@ -37,7 +37,7 @@ 'a', 's', 'h', 't', 'd', 'r' }; -static const char *devname = "default"; +static const char *pcmdev = "default"; static int stream = SND_PCM_STREAM_PLAYBACK; static int num_threads = 1; static int periodsize = 16 * 1024; @@ -127,7 +127,7 @@ while ((c = getopt(argc, argv, "D:r:f:p:b:s:t:m:vq")) >= 0) { switch (c) { case 'D': - devname = optarg; + pcmdev = optarg; break; case 'r': rate = atoi(optarg); @@ -213,9 +213,9 @@ if (parse_options(argc, argv)) return 1; - err = snd_pcm_open(&pcm, devname, stream, 0); + err = snd_pcm_open(&pcm, pcmdev, stream, 0); if (err < 0) { - fprintf(stderr, "cannot open pcm %s\n", devname); + fprintf(stderr, "cannot open pcm %s\n", pcmdev); return 1; }
View file
_service:tar_scm:alsa-lib-1.2.8.tar.bz2/test/pcm.c -> _service:tar_scm:alsa-lib-1.2.9.tar.bz2/test/pcm.c
Changed
@@ -12,6 +12,10 @@ #include <sys/time.h> #include <math.h> +#ifndef ESTRPIPE +#define ESTRPIPE ESPIPE +#endif + static char *device = "plughw:0,0"; /* playback device */ static snd_pcm_format_t format = SND_PCM_FORMAT_S16; /* sample format */ static unsigned int rate = 44100; /* stream rate */
View file
_service:tar_scm:alsa-lib-1.2.8.tar.bz2/test/queue_timer.c -> _service:tar_scm:alsa-lib-1.2.9.tar.bz2/test/queue_timer.c
Changed
@@ -100,9 +100,9 @@ prevdiff = diff; fprintf(stderr, " real time: %12ld sec %8ld usec\nqueue time: %12ld sec %8ld usec\n diff: %12ld sec %8ld usec\n diffdiff: %12ld sec %8ld usec\n", - tv.tv_sec, tv.tv_usec, + (long)tv.tv_sec, tv.tv_usec, (long)rtime->tv_sec, (long)rtime->tv_nsec / 1000, - diff.tv_sec, diff.tv_usec, + (long)diff.tv_sec, diff.tv_usec, (long)diffdiff.tv_sec, (long)diffdiff.tv_usec); if (diffdiff.tv_usec > 5000 ||
View file
_service:tar_scm:alsa-lib-1.2.8.tar.bz2/utils/alsa.m4 -> _service:tar_scm:alsa-lib-1.2.9.tar.bz2/utils/alsa.m4
Changed
@@ -85,6 +85,7 @@ AC_MSG_CHECKING(for libasound headers version >= $alsa_min_major_version.$alsa_min_minor_version.$alsa_min_micro_version ($min_alsa_version)) AC_COMPILE_IFELSE(AC_LANG_PROGRAM( #include <alsa/asoundlib.h> +#include <stdlib.h> , /* ensure backward compatibility */ #if !defined(SND_LIB_MAJOR) && defined(SOUNDLIB_VERSION_MAJOR) @@ -130,6 +131,7 @@ AC_COMPILE_IFELSE(AC_LANG_PROGRAM( #include <alsa/asoundlib.h> #include <alsa/topology.h> +#include <stdlib.h> , /* ensure backward compatibility */ #if !defined(SND_LIB_VERSION)
View file
_service:tar_scm:alsa-lib-1.2.8.tar.bz2/version -> _service:tar_scm:alsa-lib-1.2.9.tar.bz2/version
Changed
@@ -1,1 +1,1 @@ -1.2.8 +1.2.9
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2