[alsa-devel] Plug In Creation - aplay can't find existing .so

Takashi Iwai tiwai at suse.de
Fri Jun 13 14:41:48 CEST 2014


At Tue, 10 Jun 2014 13:55:39 -0400,
Brandon Yates wrote:
> 
> Hello,
> 
> I am working on a new pcm plugin. At this point it is basically just a
> Hello World plugin, to make sure I have the tools working and understand
> the workflow.  I created a simple file which is just basically:
> 
> #include <alsa/asoundlib.h>
> #include <alsa/pcm_external.h>
> SND_PCM_PLUGIN_DEFINE_FUNC(my_mod)
> {	
>    printf("hello world\n");
>    return 0;
> }
> SND_PCM_PLUGIN_SYMBOL(my_mod);
> 
> 
> I compiled this as a shared lib named  'libasound_module_pcm_my_mod.so'
> and copied it to '/usr/lib/i386-linux-gnu/alsa-lib/'
> 
> I edited my ~/.asoundrc to create a new device that uses this plugin.
> Then I try to use it with `aplay --device=my_mod_test out.pcm`
> 
> I get the error message
> 
> ALSA lib dlmisc.c:254:(snd1_dlobj_cache_get) Cannot open shared library
> /usr/lib/i386-linux-gnu/alsa-lib/libasound_module_pcm_my_mod.so
> aplay: main:682: audio open error: No such device or address
> 
> 
> But this file actually does exist, I just copied it there.
> 
> 
> Any idea why this happens?

Try strace to see what happens.  If it fails in dlopen(), it's likely
because your shared object is invalid.


Takashi


More information about the Alsa-devel mailing list