[alsa-devel] How to cross compile the alsa ?

Dámaso López dlopezsk at gmail.com
Wed Mar 28 13:08:19 CEST 2012


Hi Clemens and friends,

I've some problem referents with alsa and get volume from mircophone:

1.- When to compile the file ,returned these lines.Could be problem to keep?

arm-gp2x-linux-gcc -o micro micro.c -lasound -static -lpthread -ldl -lm -lrt
/usr/lib/gcc/arm-gp2x-linux/4.1.2/../../../../arm-gp2x-linux/lib/libasound.a(dlmisc.o):
In function `snd_dlopen':
/home/dam/alsa-lib-1.0.17/src/dlmisc.c:64: warning: Using 'dlopen' in
statically linked applications requires at runtime the shared
libraries from the glibc version used for linking

2.- The previous to say, despite being a warning can create executable
file. But when return:

ALSA lib conf.c:3009:(snd_config_update_r) Cannot access file
/usr/share/alsa/alsa.conf
ALSA lib control.c:909:(snd_ctl_open_noupdate) Invalid CTL default
Ret -2
Mic volume is -1

I'm sorpress because not exist this file, but the route /usr/share/
has others folders differents of alsa, Does it change the route?

2012/3/27 Dámaso López <dlopezsk at gmail.com>:
> Hi again,
>
> Another question, how I can get the volume of the microphone real=
> dynamic? I like getting volume of the micro, to change volume of
> speakers.
>
> I don't know if I will explain .
>
> 2012/3/27 Dámaso López <dlopezsk at gmail.com>:
>> Hi Clemens,
>>
>> I added 2 parameters and return:
>>
>> # arm-gp2x-linux-gcc -o microphone microphone.c -lasound -static -ldl -lpthread
>>
>> /usr/lib/gcc/arm-gp2x-linux/4.1.2/../../../../arm-gp2x-linux/lib/libasound.a(dlmisc.o):
>> In function `snd_dlopen':
>>
>> /home/dam/alsa-lib-1.0.17/src/dlmisc.c:64: warning: Using 'dlopen' in
>> statically linked applications requires at runtime the shared
>> libraries from the glibc version used for linking
>>
>>
>>
>>
>> 2012/3/27 Clemens Ladisch <clemens at ladisch.de>:
>>> Dámaso López wrote:
>>>> # arm-gp2x-linux-gcc -o micro micro.c -lasound -static
>>>
>>> You still do not have -ldl and -lpthread.
>>>
>>>
>>> Regards,
>>> Clemens


More information about the Alsa-devel mailing list