All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* Test device for automated testing
@ 2015-09-16 12:32 Uli Franke
  2015-09-16 12:59 ` Clemens Ladisch
  0 siblings, 1 reply; 5+ messages in thread
From: Uli Franke @ 2015-09-16 12:32 UTC (permalink / raw
  To: alsa-devel

Hi everybody,

we're currently writing a lot of ALSA user space applications. In order
to test this code with our unit testing and other test environments we'd
like to know if there's a dummy PCM device which provides the
fundamental operations like reading/writing and setting the common
hardware parameters. It doesn't even have to supply some useful
functionality like loop back or similar.

Neither the docs nor the goo led us to something useful.

Thanks and regards
Uli

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Test device for automated testing
  2015-09-16 12:32 Test device for automated testing Uli Franke
@ 2015-09-16 12:59 ` Clemens Ladisch
  2015-09-16 13:15   ` Uli Franke
  0 siblings, 1 reply; 5+ messages in thread
From: Clemens Ladisch @ 2015-09-16 12:59 UTC (permalink / raw
  To: Uli Franke, alsa-devel

Uli Franke wrote:
> we're currently writing a lot of ALSA user space applications. In order
> to test this code with our unit testing and other test environments we'd
> like to know if there's a dummy PCM device which provides the
> fundamental operations like reading/writing and setting the common
> hardware parameters.

That would be the snd-dummy module.

If you cannot load kernel drivers, you could try the virtual "null"
device, but that one does not have realistic timing.


Regards,
Clemens

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Test device for automated testing
  2015-09-16 12:59 ` Clemens Ladisch
@ 2015-09-16 13:15   ` Uli Franke
  2015-09-16 14:30     ` Clemens Ladisch
  0 siblings, 1 reply; 5+ messages in thread
From: Uli Franke @ 2015-09-16 13:15 UTC (permalink / raw
  To: Clemens Ladisch, alsa-devel@alsa-project.org

On 16.09.2015 14:59, Clemens Ladisch wrote:
> Uli Franke wrote:
>> we're currently writing a lot of ALSA user space applications. In order
>> to test this code with our unit testing and other test environments we'd
>> like to know if there's a dummy PCM device which provides the
>> fundamental operations like reading/writing and setting the common
>> hardware parameters.
> 
> That would be the snd-dummy module.

Great - that's what we're looking for. I'll check it out.

> If you cannot load kernel drivers, you could try the virtual "null"
> device, but that one does not have realistic timing.

I tried the "null" but this fails when setting hw parameters with an
assertion.


Regards
Uli

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Test device for automated testing
  2015-09-16 13:15   ` Uli Franke
@ 2015-09-16 14:30     ` Clemens Ladisch
  2015-09-17  8:09       ` Uli Franke
  0 siblings, 1 reply; 5+ messages in thread
From: Clemens Ladisch @ 2015-09-16 14:30 UTC (permalink / raw
  To: Uli Franke, alsa-devel@alsa-project.org

Uli Franke wrote:
> I tried the "null" but this fails when setting hw parameters with an
> assertion.

In theory, the null device does not have any restrictions.  But an
assertion indicates a programming error (somewhere).  What is the
message, and what are the hw parameters?


Regards,
Clemens

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Test device for automated testing
  2015-09-16 14:30     ` Clemens Ladisch
@ 2015-09-17  8:09       ` Uli Franke
  0 siblings, 0 replies; 5+ messages in thread
From: Uli Franke @ 2015-09-17  8:09 UTC (permalink / raw
  To: Clemens Ladisch, alsa-devel@alsa-project.org

On 16.09.2015 16:30, Clemens Ladisch wrote:
> Uli Franke wrote:
>> I tried the "null" but this fails when setting hw parameters with an
>> assertion.
> 
> In theory, the null device does not have any restrictions.  But an
> assertion indicates a programming error (somewhere).  What is the
> message, and what are the hw parameters?

The assertion fails with

pcm_params.c:2360: _snd_pcm_hw_params_internal: Assertion `err >= 0' failed.

There's only a single result on google [1] which discusses this
assertion but the thread doesn't result in any meaningful conclusion.

I assembled a small test program which causes this very assertion to fail.

#include <alsa/asoundlib.h>

int main ()
{
	snd_pcm_hw_params_t *params;
	snd_pcm_t *pcm;

	snd_pcm_open(&pcm, "null", SND_PCM_STREAM_PLAYBACK, 0);
	snd_pcm_hw_params_malloc(&params);
	snd_pcm_hw_params_any(pcm, params);
	snd_pcm_hw_params(pcm, params);

	return 0;
}

I appended some system specs [2] (in case you should need more, just let
me know).

Regards
Uli

____
[1] http://sourceforge.net/p/cmus/mailman/message/32707782/
[2] System specs:

uli@ankerklause:~/.../dlna/wdmr$ uname -a
Linux ankerklause 3.16.0-46-generic #62~14.04.1-Ubuntu SMP Tue Aug 11
16:28:19 UTC 2015 i686 i686 i686 GNU/Linux

uli@ankerklause:~/.../dlna/wdmr$ aptitude show libasound2
Package: libasound2
State: installed
Automatically installed: yes
Multi-Arch: same
Version: 1.0.27.2-3ubuntu7
Priority: optional
Section: libs
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Architecture: i386
Uncompressed Size: 1'208 k
Depends: libc6 (>= 2.16), libasound2-data (>= 1.0.27.2-3ubuntu7)
PreDepends: multiarch-support
Suggests: libasound2-plugins (>= 1.0.24)
Breaks: bluez-alsa (<= 4.94-2), libasound2-plugin-equal (<= 0.6-1),
libasound2-plugins (< 1.0.24)
Provided by: liboss4-salsa-asound2
Description: shared library for ALSA applications
This package contains the ALSA library and its standard plugins, as well
as the required configuration files.

ALSA is the Advanced Linux Sound Architecture.
Homepage: http://www.alsa-project.org/

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-09-17  8:09 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-16 12:32 Test device for automated testing Uli Franke
2015-09-16 12:59 ` Clemens Ladisch
2015-09-16 13:15   ` Uli Franke
2015-09-16 14:30     ` Clemens Ladisch
2015-09-17  8:09       ` Uli Franke

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.