Commit graph

46 commits

Author SHA1 Message Date
Takashi Iwai
3e38164ee5 test: Add an example program to inquire UMP Endpoint and Block info
Provide an example program to inquire UMP Endpoint and Block info in
various APIs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-08-15 16:41:53 +02:00
Takashi Iwai
f784035a90 test: Add an example program to create a virtual UMP Endpoint
Provide an example program to demonstrate how to create a UMP Endpoint
and Blocks, i.e. a virtual UMP device.

It's a simple filtering application that just haves the incoming note
on/off velocity and sends out to the output.  The UMP Endpoint and
Block attributes can be adjusted via command-line options.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-06-19 17:24:50 +02:00
Jaroslav Kysela
956bc152e7 test: rename code to more approriate mixtest
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2018-10-24 12:07:33 +02:00
Takashi Sakamoto
42ff384a98 test: add linker flag with pthread for pcm-multi-thread stress test
This test program is a pthread application, while Makefile has no flags
for linker about pthread library. This can cause below error.

$ make pcm-multi-thread
  CCLD     pcm-multi-thread
/usr/bin/ld: pcm-multi-thread.o: undefined reference to symbol 'pthread_cancel@@GLIBC_2.2.5'
//lib/x86_64-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
Makefile:523: recipe for target 'pcm-multi-thread' failed
make: *** [pcm-multi-thread] Error 1

This commit fixes the bug by adding a corresponding flag.

Fixes: 147093ac5b8d('test: Add pcm-multi-thread program')
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-07-07 23:48:52 +02:00
Takashi Iwai
147093ac5b test: Add pcm-multi-thread program
A simple multi-thread stress test for PCM is added to test
subdirectory.  It can perform various PCM update function in the
worker threads while reading/writing the data in the main thread.
It can help catching the unexpected error or blockage.  For example,
running the capture test with a softvol plugin will lead to the assert
due to the races.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-07-07 16:30:54 +02:00
Takashi Sakamoto
5ba71a7b81 ctl: add test program for control element set
The feature of control element set has been abandoned for a long time since
firstly introduced in 2003. Furthermore, there's few applications to utilize
this feature. These situations bring a hard work to persons who need the
feature. Especially, a lack of test program make it harder to fix much bugs
in this feature.

This commit adds a test program as a sample of the feature. This program
adds element sets of each element type to 'hw:0' in this order; boolean,
integer, enumerated, bytes, IEC958 and integer64. Each iteration includes
below scheme:

1. add an element set with 900 elements. Each of them has maximum number
   of members allowed by ALSA ctl core.
2. check all of events generated by above operation.
3. retrieve information of each element, then validate it.
4. unlock each member of all elements because they're initially locked.
5. write to all of members in all elements and read.
6. check all of events generated by above operation.
7. write information for threshold level to the element set and read it.
8. check all of events generated by above operation.
9. remove the element set.
10.check all of events generated by above operation.

When any of these operations fail, it means regression occurs. Then, added
elements still remain in a certain sound card. In this case, unloading
drivers corresponding to the card is an easy way to recover.

Besides, this program doesn't perform below element operations of ALSA ctl
feature:
 - list
 - lock
 - replace

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-06-17 15:12:20 +02:00
Jordi Mallach
8bdec31570 Add -lm to test programs to fix build failure.
Add -lm to test programs that use sin(), to fix a build failure with recent
binutils.

Signed-off-by: Jordi Mallach <jordi@debian.org>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2014-06-13 18:46:12 +02:00
Patrick Welche
b669b50de2 autotools: update style
- rename configure.in to configure.ac
- replace INCLUDES with AM_CPPFLAGS
- modernize AM_INIT_AUTOMAKE invocation

Signed-off-by: Patrick Welche <prlw1@cam.ac.uk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-02-26 08:16:22 +01:00
Pierre-Louis Bossart
6429a450a3 test: add audio_time
Simple test to create playback and capture streams, and
check elapsed time vs. sample counts reported by driver.
This should be helpful for driver developers and anyone
interested in system/audio time drift.

tested only on HDAudio

[added Makefile.am change by tiwai]

TODO:
- make period configurable
- better output messages
- support for wall clock when it's in the mainline

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-09-22 09:39:07 +02:00
Takashi Iwai
3fc13d6f5b Add test/chmap program
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-09-11 11:34:50 +02:00
Clemens Ladisch
7f73f1bb15 add midi event tests
Add some tests for the snd_midi_event_* functions.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2009-07-06 12:00:04 +02:00
Aldrin Martoq
83c5a60778 add a test code for snd_seq_client_info_event_filter_*()
Added test code for
snd_seq_client_info_event_filter_{clear,add,del,check}

Signed-off-by: Aldrin Martoq <amartoq@dcc.uchile.cl>
2008-02-22 17:49:01 +01:00
Jaroslav Kysela
13fdc41785 add snd_device_name_hint() function and initial implementation
- add snd_device_name_hint() and snd_device_name_free_hint() functions
- add snd_ctl_iface_conf_name() functions
- do not accept parameters for the plugin definition without @args section
- add defaults.pcm.dmix.card/device and dsnoop.card/device definitions
- add hints for HDA-Intel.conf, pcm/dmix.conf, pcm/dsnoop.conf and alsa.conf
- add test/namehint test utility
- doxygen related cleanups
2006-10-11 13:18:57 +02:00
Jaroslav Kysela
bc9b4553b4 alsa-lib: test dir: make check: static building doesn't work on PIC architectures
Some architectures, such as AMD64, IA64 and Alpha cannot mix PIC and non-PIC
objects when creating a PIC output. Hardened compilers (which uses SSP and
PIE) creates PIC executables, passing -static in CFLAGS for tests in make
check in alsa-lib makes their linking to fail.

See bug#1541
2006-10-04 10:39:55 +02:00
Jaroslav Kysela
4e1452ac07 Added pcm_min test & example - minimalistic pcm output 2006-01-06 20:01:08 +00:00
Takashi Iwai
c2f446b0a4 Remove code from check_PROGRAMS
Remove code from check_PROGRAMS (bug#1579).
2005-11-23 16:35:56 +00:00
Takashi Iwai
84ebfe7c92 Fix compile errors/warnings
Fix compile errors/warnings.
omixer is removed since ordinary_mixer isn't supported any more.
2005-11-21 10:48:52 +00:00
Takashi Iwai
ebf1e77bb2 use AM_CFLAGS and AM_LDFLAGS for the recent automake. 2004-02-25 14:32:32 +00:00
Jaroslav Kysela
319c46a982 Added queue_timer.c by Chris Cannam <cannam@all-day-breakfast.com> 2003-12-18 12:14:17 +00:00
Jaroslav Kysela
d4af763f8a Switch from old to new PCM API retaining binary compatibility
Changed version to 1.0.0pre1
2003-11-05 10:38:37 +00:00
Takashi Iwai
0cfc9189dd moved iecset to alsa-utils 2003-10-23 16:53:11 +00:00
Takashi Iwai
2fb3e68e11 added iecset program (this could be to alsa-utils after more
enhancements).
2003-09-30 17:02:14 +00:00
Jaroslav Kysela
6ad93ac892 added snd_user_file() function
alisp extensions
  - added nth, include, path commands
  - added auto-exec functionality
  - added helpers for C<->lisp interoperability
2003-09-03 19:25:08 +00:00
Jaroslav Kysela
d13a14b79e Added special CFLAGS for code 2003-02-19 21:25:59 +00:00
Jaroslav Kysela
1da32fb069 Added code test utility 2003-02-19 21:18:53 +00:00
Jaroslav Kysela
27472b56a6 Changes for static build. 2001-10-24 14:14:11 +00:00
Jaroslav Kysela
0259e6877e Changed CFLAGS 2001-10-18 17:10:46 +00:00
Jaroslav Kysela
d08c2eb251 Removed obsolete test programs. 2001-09-07 09:33:20 +00:00
Jaroslav Kysela
79531a4eb0 The main header file is not dependant on asound.h from driver. 2001-08-20 13:15:30 +00:00
Jaroslav Kysela
232d703c23 Added snd_card_type_string_to_enum and snd_card_type_enum_to_string functions.
- the /usr/share/alsa/cards.conf file contains the translation table
Added snd_sctl_build and snd_sctl_free functions.
Recoded the surround plugin to use the surround.conf file.
 - the /usr/share/alsa/surround.conf file contains the surround configuration
2001-05-10 08:32:40 +00:00
Takashi Iwai
b000ebc270 Fix for compile with --with-kernel configure option. 2000-09-01 16:22:57 +00:00
Jaroslav Kysela
744c87fd12 Added midiloop utility.. 2000-03-04 15:50:15 +00:00
Jaroslav Kysela
a9197441e0 Added rawmidi.c from maarten de boer <maarten.deboer@iua.upf.es> 2000-02-04 14:23:19 +00:00
Jaroslav Kysela
8be913a112 Removed aconnect & aseqnet.. 2000-01-10 20:19:24 +00:00
Jaroslav Kysela
d117462cb9 Takashi Iwai <iwai@ww.uni-erlangen.de>
Mon, 03 Jan 2000 10:47:02 +0100
- bugfix: proper handling of exclusive subscription
- bugfix and update: alsa-lib/test/seq* stuff
- minor updates (long option support, etc) of aconnect and aseqnet
- man pages for aconnect and aseqnet are added
2000-01-03 10:25:56 +00:00
Jaroslav Kysela
600dc6ae32 Merged pcm-v2 branch into main CVS tree. 1999-11-06 23:47:07 +00:00
Jaroslav Kysela
33348ba6f4 Added aseqnet... 1999-08-23 19:39:14 +00:00
Jaroslav Kysela
a234679700 Added aconnect example.. 1999-08-20 20:27:07 +00:00
Jaroslav Kysela
452d7704e1 Added PCM timer selection for seq sender... 1999-07-07 08:42:12 +00:00
Jaroslav Kysela
3d5115b325 Added loopback, some fixes... 1999-06-02 08:20:04 +00:00
Jaroslav Kysela
c0e741dd8a Merged new-mixer branch... 1999-03-08 16:51:36 +00:00
Jaroslav Kysela
53cbbeee14 Added playmidi1... 1999-01-24 12:00:39 +00:00
Jaroslav Kysela
54c4a6c610 Fixed for fcntl calls (NONBLOCK)... 1999-01-06 15:25:15 +00:00
Jaroslav Kysela
6f5e7d4d00 Added sequencer test program.. 1998-12-27 01:02:59 +00:00
Jaroslav Kysela
3bb1db2e17 Added latency example... 1998-11-27 00:13:09 +00:00
Chris Cannam
96f35a05ef Switch to automake and libtool 1998-11-18 20:42:09 +00:00