[alsa-devel] alsa/asoundlib.h file not found

Appalayagari Sreedhar sreecha01 at gmail.com
Tue Sep 6 12:17:31 CEST 2011


Hi,

I have integrated the codec driver and the kernel log shows the sound
card is detected.
now i want to test the codec. i tried the sample test code for capture
and playback.

i am getting a compilation errors due to the asoundlib.h.
please find the error log for my application.

main.c:2:23: error: asoundlib.h: No such file or directory
main.c: In function 'main':
main.c:7: error: 'snd_pcm_t' undeclared (first use in this function)
main.c:7: error: (Each undeclared identifier is reported only once
main.c:7: error: for each function it appears in.)
main.c:7: error: 'pcm_handle' undeclared (first use in this function)
main.c:10: error: 'snd_pcm_stream_t' undeclared (first use in this function)
main.c:10: error: expected ';' before 'stream'
main.c:15: error: 'snd_pcm_hw_params_t' undeclared (first use in this function)
main.c:15: error: 'hwparams' undeclared (first use in this function)
main.c:22: warning: 'return' with a value, in function returning void
main.c:34: error: 'snd_pcm_uframes_t' undeclared (first use in this function)
main.c:34: error: expected ';' before 'periodsize'
main.c:46: error: 'SND_PCM_ACCESS_RW_INTERLEAVED' undeclared (first
use in this function)
main.c:48: warning: 'return' with a value, in function returning void
main.c:52: error: 'SND_PCM_FORMAT_S16_LE' undeclared (first use in
this function)
main.c:54: warning: 'return' with a value, in function returning void
main.c:62: warning: 'return' with a value, in function returning void
main.c:65:19: warning: missing terminating " character
main.c:65: error: missing terminating " character
main.c:66: error: expected expression before '==' token
main.c:66: error: stray '\' in program
main.c:66:31: warning: missing terminating " character
main.c:66: error: missing terminating " character
main.c:67: error: expected ';' before '}' token
main.c:72: warning: 'return' with a value, in function returning void
main.c:78: warning: 'return' with a value, in function returning void
main.c:86: error: 'periodsize' undeclared (first use in this function)
main.c:88: warning: 'return' with a value, in function returning void
main.c:99: warning: 'return' with a value, in function returning void
main.c:112: warning: incompatible implicit declaration of built-in
function 'malloc'
main.c:115: error: 'num_frames' undeclared (first use in this function)
main.c:5: warning: return type of 'main' is not 'int'

please suggest what needs to be done to resolve this issue asap.

Thank you,
Sreedhar.


More information about the Alsa-devel mailing list