On 7/19/10, John Simpson john@swajime.com wrote:
On 7/19/10, Jaroslav Kysela perex@perex.cz wrote:
You must force compilation in test directory, for example:
cd alsa-lib/test make pcm
Jaroslav
Ok ... I'm learning :o) (i think)
On my n810 that gives me this: [user@nokia ~/src/dsp-alsa/trunk/alsa-lib/test]$ make pcm cc pcm.c -o pcm pcm.c: In function `help': pcm.c:719: warning: use of cast expressions as lvalues is deprecated /var/tmp/ccQOAYhr.o: In function `generate_sine':pcm.c:(.text+0x140): undefined reference to `snd_pcm_format_width' :pcm.c:(.text+0x160): undefined reference to `snd_pcm_format_width' :pcm.c:(.text+0x378): undefined reference to `sin' /var/tmp/ccQOAYhr.o: In function `set_hwparams':pcm.c:(.text+0x5ac): undefined reference to `snd_pcm_hw_params_any' :pcm.c:(.text+0x5c4): undefined reference to `snd_strerror'
On my ubuntu system: john@system76-pc:~/alsa-lib-1.0.23/test$ make pcm if gcc -DHAVE_CONFIG_H -I. -I. -I../include -I../include -Wall -pipe -g -D_GNU_SOURCE -MT pcm.o -MD -MP -MF ".deps/pcm.Tpo" -c -o pcm.o pcm.c; \ then mv -f ".deps/pcm.Tpo" ".deps/pcm.Po"; else rm -f ".deps/pcm.Tpo"; exit 1; fi make: *** No rule to make target `../src/libasound.la', needed by `pcm'. Stop.
It works on the ubuntu system only if I run 'make check' first, as mentioned by Clemens Ladisch in another post.
I copied the file .deps/pcm.Tpo from the ubunutu system to the n810, and pasted the output from the ubuntu command "make pcm" in directly: [user@nokia ~/src/dsp-alsa/trunk/alsa-lib/test]$ if gcc -DHAVE_CONFIG_H -I. -I. -I../include -I../include -Wall -pipe -g -D_GNU_SOURCE -MT pcm.o -MD -MP -MF ".deps/pcm.Tpo" -c -o pcm.o pcm.c; then mv -f ".deps/pcm.Tpo" ".deps/pcm.Po"; else rm -f ".deps/pcm.Tpo"; exit 1; fi pcm.c: In function `help': pcm.c:719: warning: use of cast expressions as lvalues is deprecated
Now it looks to me like that generated pcm.o on both machines. What do I do with pcm.o now?
Trying again ... This time, checking out https://vcs.maemo.org/svn/dsp-alsa and trying to compile pcm.c without 'building' first:
$ cd ~/src $ svn checkout https://vcs.maemo.org/svn/dsp-alsa $ cd dsp-alsa/trunk/alsa-lib #### cvscompile does not succeed $ cd ~/src/dsp-alsa/trunk/alsa-lib/test
$ gcc -DHAVE_CONFIG_H -I. -I. -I../include -I../include -Wall -pipe -g -D_GNU_SOURCE -MT control.o -MD -MP -c -o control.o control.c $ gcc -Wall -pipe -g -D_GNU_SOURCE -o .libs/control control.o /usr/lib/libasound.so -lm -ldl -lpthread -lrt $ .libs/control ALSA lib control.c:909:(snd_ctl_open_noupdate) Invalid CTL hw:CARD=0 Open error: No such file or directory
$ gcc -DHAVE_CONFIG_H -I. -I. -I../include -I../include -Wall -pipe -g -D_GNU_SOURCE -MT pcm.o -MD -MP -c -o pcm.o pcm.c pcm.c: In function `help': pcm.c:719: warning: use of cast expressions as lvalues is deprecated $ gcc -Wall -pipe -g -D_GNU_SOURCE -o .libs/pcm pcm.o /usr/lib/libasound.so -lm -ldl -lpthread -lrt $ .libs/pcm -D 'default' -vf 440 Playback device is default Stream parameters are 44100Hz, S16_LE, 1 channels Sine wave rate is 440.0000Hz Using transfer method: write
====
Still no sound :-(
j