1 2 Previous Next 21 Replies Latest reply on Dec 20, 2014 2:30 PM by AlexT_Intel

    Alsa on edison


      Is the yocto on edison supports for  ALSA and midi to capture and play audio.?

        • 1. Re: Alsa on edison

          Hi ksam917.


          In here you can see the products that are supported for Alsa. Alsa is part of the Yocto image in Edison, but a lot of users have problems working with it. There is supposed to be a soon answer for this issue from Intel/Alsa kernel developers as you can see in this thread. Now, you could create your own image with the Alsa packages using this guide.

          Take a look at this thread; victorlazzarini used in this case the Galileo board but he used MIDI and Alsa, I think this could give you a good direction.




          • 2. Re: Alsa on edison

            I think most people don't use i2s for sound creation, they simply want to connect a usb soundcard. This won't work because the current version of the kernel misses the 'snd-usb-audio' module at least.

            • 3. Re: Alsa on edison

              I have used ALSA just fine on Edison to both play and record. The official image indeed doesn't include necessary packages and kernel modules, however you can install those from my repo.


              See this blog post for instructions on installing the kernel and modules: http://alextgalileo.altervista.org/blog/install-kernel-from-repo-onto-edison-official-image/


              And this page for instructions about configuring the package repo, from which you will be able to install ALSA packages (you'll configure it anyway while following the above, but just in case): Edison Package Repo Configuration Instructions

              1 of 1 people found this helpful
              • 4. Re: Alsa on edison

                When you played something with Alsa, what hardware did you use? usb-soundcard??

                Very helpful would be to see your kernel configuration (.config). Install of Alsa software doesn't make much sense if the necessary device is missed.

                • 5. Re: Alsa on edison

                  Hi AlexT,

                  You've mentioned above that you were able to play and record sound using Edison.  I would greatly appreciate if you could let us know how you hook up the speaker and microphone to the Edison.

                  I have a Edison breakout board (the non-arduino shield one), and although I can follow your instructions above on how to install ALSA and the kernel and modules, I can't really visualize the basic wiring hookup of the speakers and microphone and which pins to use on the Edison breakout board.


                  I'd appreciate your guidance.



                  • 6. Re: Alsa on edison

                    You need to use the USB sound card or equivalent device (I used a USB headset, for example, it can be e.g. an external DAC) - that is the approach I had in mind, it's probably the cheapest and most straightforward one.


                    You probably can buy or create a sound card using i2c or SPI buses too, but that would be noticeably more advanced stuff.

                    • 7. Re: Alsa on edison

                      Hello Alex,


                      i have an USB soundcard working fine on other Linux systems but the kernel needs the "usb-sound-audio" module to recognize the usb soundcard. It's simple to check, "lsusb" shows the usb device.


                      For the current Yocto kernel release this module seems not to be activated. "lsusb" shows nothing. I'm a little bit wondering about your working usb headset without this module. May i ask you what manufacturer and type it is and what does "lsusb" show?


                      O fcourse an alternative solution is to use i2s but i think the simplest way is usb.


                      Thanks and regards,


                      • 8. Re: Alsa on edison

                        If you're talking about the official OS image, then yes, it doesn't have the usb-snd-audio module. But I do have it in my package repository and you can install it from there using opkg, check out this piece of the repo thread: https://communities.intel.com/message/261851#261851


                        I don't have the headset at hand right now, but I'll post the lsusb output when I get to that. Generally speaking, lsusb should show the USB ID of the device even without the module, at least that's what I've experienced with several devices of various types (webcams, the headset, mice)

                        • 9. Re: Alsa on edison

                          Many thanks Alex, you have built the kernel with some of the features i have looked for. As i'm not using opkg in Debian i simply extracted the kernel and the modules into the boot and lib/modules directories overwriting the old stuff. Finally a "depmod" and all works fine.


                          I'm also wondering why my soundcard (Terratec Aureon Dual) was not shown with lsusb before but whatever, now it works excellent. After connecting it the usb-snd-audio module is loaded and for Alsa it immediately comes up as card 1. It's not necessary anymore to know the data of your headset.


                          Thanks again and i'll keep watching your repo!


                          Regards, Manfred

                          • 10. Re: Alsa on edison

                            Great to read that, glad to help

                            • 11. Re: Alsa on edison

                              Hi all, thank you for ur wonderful support. As I was not able to check the responses I got. Now I will check and integrate into my app. Thank you for ur support.:)

                              • 12. Re: Alsa on edison

                                Hi Alex,

                                Pardon my stupidity.  but here is my question based on your reply:


                                1) When you say "use a USB sound card", does that mean I would need an Edison Arduino breakout board which has a standard USB port?  Currently I only have Edison Mini breakout board, which has the two mini-usb ports... I can't seem to find sound cards, or headsets, etc that use mini-usbs male adaptor.


                                2) For those like me that have only the edison mini-breakout board, and who have downloaded and configured Alsa, MPG123, and a few other audio libraries, what would you recommend in order to be able to play/record audio?  Could I just buy an USB sound card just like you advised, then cut the wires and try to figure out which Edison GPIO pins I should connect them to?? Is this a crazy idea?


                                3) I have for example a prototyping sound card from Mikro Elektronica (here is the link: EasyMP3 - VS1011e MP3 Codec Development Board )  - I believe it can be connected to boards such as Edison by using 4 general IO pins.... but I have no idea how to tell Edison or Yocto or my python code, how to use this sound board as the sound card.  Would you happen to know?


                                Any guidance is welcomed !!

                                Thank you Alex, and everyone else in this community!



                                • 13. Re: Alsa on edison

                                  Hi Flavio,


                                  1) On mini breakoutboard you can use the otg port (usb). But then you need an external power supply. And you need an adapter to micro usb to connect the soundcard which normally has a standard usb plug.


                                  2) see 1), you don't need the gpio's if using a usb soundcard


                                  3) can't say anything to this soundcard. Maybe not each usb soundcard will work, it depends on the chipset and it must be supported by Linux. I use a Terratec Aureon Dual usb and it works fine.


                                  But remember, the kernel needs the snd-usb-audio module which is not activated in the standard yocto image. Look into the repository of AlexT (mentioned in another thread) and install the module(s) from there.


                                  Regards, mmi

                                  • 14. Re: Alsa on edison

                                    Orto, ditto @mmi. You need a simple converter cable to use it with mini-breakout and you'll need to supply external power.

                                    As far as the dev board is concerned, I think that's an  overkill and too much hassle, just pick a USB sound card supported by Linux and  that should be cheaper and faster in enabling.


                                    As far as software is concerned - that would depend on which formats you're going to playback/record + what your project is in general. I used aplay/arecord for my tests and I don't have any bigger project related to audio right now, so I haven't looked any further into this.

                                    1 2 Previous Next