Where is asoundlib.h?

439 views
Skip to first unread message

mbelg...@gmail.com

unread,
Apr 16, 2014, 2:08:24 PM4/16/14
to beagl...@googlegroups.com
I am trying to compile an ALSA application on my BeagleBone Black running Angstrom. There is no alsa/asoundlib.h file under /usr/include. Package manager shows that alsa-dev, libasound2 and alsa-lib-dev are all installed. I did not find any Angstrom packages containing the ALSA headers. Has anybody else came across this problem?

John Syn

unread,
Apr 16, 2014, 6:06:58 PM4/16/14
to beagl...@googlegroups.com

From: <mbelg...@gmail.com>
Reply-To: <beagl...@googlegroups.com>
Date: Wednesday, April 16, 2014 at 11:08 AM
To: <beagl...@googlegroups.com>
Subject: [beagleboard] Where is asoundlib.h?

I am trying to compile an ALSA application on my BeagleBone Black running Angstrom. There is no alsa/asoundlib.h file under /usr/include. Package manager shows that alsa-dev, libasound2 and alsa-lib-dev are all installed. I did not find any Angstrom packages containing the ALSA headers. Has anybody else came across this problem?
I believe libasound2 provides alsa-lib. 

I think what you need is libasound2-dev

Regards,
John

--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

KurtE

unread,
Apr 16, 2014, 8:45:29 PM4/16/14
to beagl...@googlegroups.com
I could be wrong, but when I was trying to do this awhile ago on Angstrom, I did not find it.  I ended up downloading and building the stuff on the BBBk.  Now with Debian, I can now do like I did on the Raspberry Pi and and do the apt-get install libasound2-dev

More details on what I do is up on my Readme file of my github Raspberry Pi project(Bad name, but was first linux box): https://github.com/KurtE/Raspberry_Pi

From that readme:

I did not find any valid packages to install the ALSA, so I did it manually:

    wget ftp://ftp.alsa-project.org/pub/lib/a...1.0.25.tar.bz2
    tar jxf alsa-lib-1.0.25.tar.bz2
    cd alsa-lib-1.0.25
    ./configure
    make install

This did not set the USB device to be default sound device, I used the command: aplay -L to list the nodes. From which I created the configuration file: /etc/asound.conf pcm.!default sysdefault:Device


Again there may be easier ways, but that is what I did.  Note: I am using a USB sound adapter...

John Syn

unread,
Apr 16, 2014, 11:41:24 PM4/16/14
to beagl...@googlegroups.com

From: KurtE <ku...@rockisland.com>
Reply-To: <beagl...@googlegroups.com>
Date: Wednesday, April 16, 2014 at 5:45 PM
To: <beagl...@googlegroups.com>
Subject: Re: [beagleboard] Where is asoundlib.h?

I could be wrong, but when I was trying to do this awhile ago on Angstrom, I did not find it.  I ended up downloading and building the stuff on the BBBk.  Now with Debian, I can now do like I did on the Raspberry Pi and and do the apt-get install libasound2-dev

More details on what I do is up on my Readme file of my github Raspberry Pi project(Bad name, but was first linux box): https://github.com/KurtE/Raspberry_Pi

From that readme:

I did not find any valid packages to install the ALSA, so I did it manually:

    wget ftp://ftp.alsa-project.org/pub/lib/a...1.0.25.tar.bz2
    tar jxf alsa-lib-1.0.25.tar.bz2
    cd alsa-lib-1.0.25
    ./configure
    make install

Try this instead,

apt-get source libasound2
cd alsa-lib-1.0.25
// if you want debug symbols
export DEB_BUILD_OPTION=nostrip noopt debug
dpkg-buildpackage -rfakeroot -uc -us -j8 -aarmhf

// The dpkg-buildpackage uses the settings a patches in the debian folder and builds the library as intended
// This commands creates Debian packages in the parent folder.

cd ..
sudo dpkg -i libasound2* deb

Regards,
John


This did not set the USB device to be default sound device, I used the command: aplay -L to list the nodes. From which I created the configuration file: /etc/asound.conf pcm.!default sysdefault:Device


Again there may be easier ways, but that is what I did.  Note: I am using a USB sound adapter...

--

KurtE

unread,
Apr 17, 2014, 9:29:05 AM4/17/14
to beagl...@googlegroups.com
Thanks, that does look cleaner.  I hope this works for mbelg...  

Personally I am happy that I moved my BBBk to Debian, but locally I have updated my readme with the information, in case I need to do this again (will update on my github soon).   Also looks like good general purpose advice so again thanks.

mbelg...@gmail.com

unread,
Apr 17, 2014, 10:32:31 AM4/17/14
to beagl...@googlegroups.com
John: The instructions you provided are for debian. It does not work on Angstrom.

I solved this issue by uninstalling and re-installing alsa-dev package:

# opkg install alsa-dev

Then I got the alsa headers under /usr/include/alsa directory as expected. 

Murat
Reply all
Reply to author
Forward
0 new messages