Using ALSA on i.MX6

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Using ALSA on i.MX6

Jump to solution
912 Views
Kampi
Contributor I

Hi,

I tried to use ALSA in a C program with the "imx-image-full-imx6qpdlsolox" image on my i.MX6 Sabre with an example from the Internet but the compiler tells me that "#include <alsa/asoundlib.h>" is not found.

How can I add it to the system?

0 Kudos
Reply
1 Solution
841 Views
Chavira
NXP TechSupport
NXP TechSupport

Hi @Kampi!

Yes, you can install the SDK on your host using Yocto Project.

You have to compile your own SDK.

Downloading our source following the Yocto Project User Guide.

You have to compile the SDK using the next command

$ bitbake imx-image-full -c populate_sdk

And the output is a .sh, you only have to run the script and then the SDK is instaling automatically

https://www.nxp.com/docs/en/user-guide/IMX_YOCTO_PROJECT_USERS_GUIDE.pdf

Best Regards!

Chavira

View solution in original post

3 Replies
866 Views
Kampi
Contributor I

Hi,

thank you for the help. I guess I wasn´t specific enough, because I don´t need the SDK for my host. I need it for the Sabre board because I´m using VS Code for remote development. I run the command with img-image-full, because I´ve downloaded the full image from NXP.

The resulting SDK is for a x86_64 host:

$ /mnt/fsl-imx-wayland-glibc-x86_64-imx-image-full-cortexa9t2hf-neon-imx6qsabresd-toolchain-6.1-mickledore.sh
Error: Incompatible SDK installer! Your host is armv7l and this SDK was built for x86_64 hosts.

Is there a way to install the SDK on the host?

0 Kudos
Reply
842 Views
Chavira
NXP TechSupport
NXP TechSupport

Hi @Kampi!

Yes, you can install the SDK on your host using Yocto Project.

You have to compile your own SDK.

Downloading our source following the Yocto Project User Guide.

You have to compile the SDK using the next command

$ bitbake imx-image-full -c populate_sdk

And the output is a .sh, you only have to run the script and then the SDK is instaling automatically

https://www.nxp.com/docs/en/user-guide/IMX_YOCTO_PROJECT_USERS_GUIDE.pdf

Best Regards!

Chavira

886 Views
Chavira
NXP TechSupport
NXP TechSupport

Hi @Kampi!

If you have extracted the toolchain from Yocto it should be correct. You can generate a .sh to install the toolchain using Yocto with the following command:

$ bitbake imx-image-multimedia -c populate_sdk

The default path for installing the toolchain is /opt, your toolchain should have the asound header on a couple of paths. If this is not available there may be a problem with the toolchain.

/opt/<DISTRO>/<BSP>/sysroots/armv8a-poky-linux/usr/include/sys/asoundlib.h
/opt/<DISTRO>/<BSP>/sysroots/armv8a-poky-linux/usr/include/asoundlib.h
/opt/<DISTRO>/<BSP>/sysroots/armv8a-poky-linux/usr/include/alsa/asoundlib.h

Best Regards!

Chavira

0 Kudos
Reply