I thought the following was closely related without starting a new thread - hope you agree!
So I'm currently trying to use a USB soundcard with the BELA-equipped Beaglebone Black and have run into an issue (I believe with the ALSA installation).
I know the soundcard works as I can aplay -vv somewavfile.wav and configure the card via alsamixer.
But when I tried to compile an application that required /usr/include/alsa/pcm.h it found an issue...
It seems that the version on BELA (apparently 1.0.27.2) requires a 4th parameter 'type' for both functions 'snd_pcm_mmap_writei' and 'snd_pcm_mmap_writei' that are not part of the standard ALSA implementation AFAIK (certainly not the same as the official 1.0.27).
So I edited the /usr/include/alsa/pcm.h file removing those "extra" parameters from being required an the application compiled without issue. However when I go to use it I get an error...
alsa_card_write: snd_pcm_writei() failed:Invalid argument.
So I'm guessing it's because the implementation on BELA requires the 4th, 'type' parameter.
I couldn't find any reference to either 'snd_pcm_mmap_writei' or 'snd_pcm_mmap_writei' in the BELA source, so can't figure out why/whether this customisation(?) is necessary.
Any ideas?
EDIT: BTW it seems apt-get install libasound2-dev resolves the incompatibility, but I'm not yet sure if that will break any BELA capabilities