14 Replies Latest reply on Aug 23, 2014 1:14 PM by victorlazzarini

    ALSA Soundcard Support

    rmm200

      Well, from the Maker hangout I understand Alex - or someone - is working on Galileo Alsa support for sound cards.

       

      This is a request for status, since I ordered a Syba SD-CM-UAUD USB Stereo Audio Adapter from Amazon after the presentation.

      I had no idea that usb sound cards even existed...

       

      modinfo soundcore shows my yocto image was compiled with sound support, and I have a /usr/share/alsa directory,

      but no alsamixer. I need more of the pieces...

       

      I am looking for pointers on what source I need to download and build, and anything else that might be useful.

        • 1. Re: ALSA Soundcard Support
          rmm200

          Well I found more pieces in my yocto build - alsaconf, alsactl, alsaucm, alsamixer, alsalocp,and alsa-lib, as well as a ton of info entries.

           

          I may have enough that it will just work when I get my sound card - which comes Monday.

          • 2. Re: ALSA Soundcard Support
            AlexT_Intel

            USB audio support depends on which image you're using. Vanilla 0.7.5-based image (the one you can download from this community as an official download) doesn't have that enabled.

             

            1.0.0-based vanilla image you can find on http://alexgalileo.altervista.org has kernel part enabled, but may not have necessary kernel modules (drivers) for specifically your sound card model. ALSA packages and some of the kernel modules are available on the same website, in the package repo, you can give it a try.

             

            There's also a 0.7.5-based image with the same kernel-side adjustments 1.0.0 has (and a lot more useful stuff packed in), see this thread: Collaborating to develop a "devtools" version of Linux which is Arduino IDE compatable

             

            If you determine which kernel module you need and if it's not already there, I can try to help you build one.

            You can determine the module name by just some general googling of "linux+<your card model name>" or by plugging the sound card into some computer with "usual" full-blown linux distro and looking at the dmesg output, which should show you which driver is being loaded.

            1 of 1 people found this helpful
            • 3. Re: ALSA Soundcard Support
              rmm200

              Thanks Alex - I will be back tomorrow - when my sound card arrives. Looking forward to watching the boot process.

               

              Funny thing about Galileo - I am more interested in trying Linux PC gadgets than my large stock of Arduino shields at the moment..

              • 4. Re: ALSA Soundcard Support
                rmm200

                Well this was a wasted topic - except that I confirmed my Linux image (image-dev) works correctly out of the box with Syba SD-CM-UAUD USB Stereo Audio Adapter from Amazon. Even alsamixer gives a really nice graphic display over ssh. One thing to note if you buy the right angle micro to usb connector from Amazon - the connector orientation is reversed from the Amazon picture, and the sound card neatly covers the main usb connector, the serial port, and the ethernet port. Fortunately, I normally run without wires, so I will keep it. Makes a really tidy package, with the sound card up against the Galileo case.

                 

                I got tired of .wav sound samples pretty quickly, so I found mpg123:

                mpg123 | Free software downloads at SourceForge.net

                 

                Build it from source (./configure, make, make install).

                Works great with this sound card, and now Carly Simon can keep me company while I look at 80387 generated assembler.

                 

                Note: mpg123 does use the 80387 fpu. Take that, you uClibc! (Well uClibc might also, I just don't know)

                • 5. Re: ALSA Soundcard Support
                  AlexT_Intel

                  Cool, nice it's working out of the box :-) I'd suggest you to mark your previous post as an answer so that those with similar problems could see it right away.

                  • 6. Re: ALSA Soundcard Support
                    Eliot

                    I purchased the same USB sound card as you but haven't been as lucky getting it to work out of the box. Can you link me to the image you are using?

                    • 7. Re: ALSA Soundcard Support
                      rmm200

                      I did nothing special. I built my own image from the 0.8.0 BSP, modified by Sergey's development image options:

                      Sergey's Blog - Malinov Family Web Presence

                       

                      Any more recent BSP should work the same. I would suggest at least 1.0.0.

                       

                      Reliableness:

                       

                      Using username "root".

                      root@clanton:~# uptime

                      16:07:05 up 63 days, 22:48,  1 user,  load average: 0.00, 0.01, 0.05

                      root@clanton:~#

                       

                      Note: real uptime is about four months. I occasionally recycle Galileo to check something... I don't think I have ever had an unplanned reboot.

                       

                      And from dmesg:

                       

                      [  179.930345] usb 1-1: new full-speed USB device number 4 using ohci_hcd

                      [  180.496705] input: C-Media USB Audio Device    as /devices/pci0000:00/0000:00:14.4/usb1/1-1/1-1:1.3/input/input2

                      [  180.602484] hid-generic 0003:0D8C:0008.0001: input: USB HID v1.00 Device [C-Media USB Audio Device   ] on usb-0000:00:14.4-1/input3

                      [  181.262502] usbcore: registered new interface driver snd-usb-audio

                       

                      Robert

                      • 8. Re: ALSA Soundcard Support
                        AlexT_Intel

                        The reason may be that you're using older 0.7.5-based Linux image. USB sound is not enabled there in the kernel. All the later BSPs and images, including the current 1.0.0-based one have it enabled. So update your firmware and download the latest 1.0.0 image, then try again - chances are it will work.

                         

                        If not - report back (preferably in a separate thread, to clearly distinguish the cases) and we'll see.

                        • 9. Re: ALSA Soundcard Support
                          ranthony

                          Hello Guys,

                           

                          let me see if I undertand: it means that there is a way to plug a sound card on galileo and it can make sounds. Is that?

                          • 10. Re: ALSA Soundcard Support
                            AlexT_Intel

                            Yep.

                            • 11. Re: ALSA Soundcard Support
                              victorlazzarini

                              Reading this, I actually have a question. In order to get the usb card to work, I have to

                               

                              $ modprobe snd-usb-audio

                               

                              should I place this in one of the /etc/init.d/ scripts so I don't need to do it all the time?

                              • 12. Re: ALSA Soundcard Support
                                victorlazzarini

                                or better, add snd-usb-audio to a file called /etc/modules-load.d/alsa.conf ?

                                • 13. Re: ALSA Soundcard Support
                                  AlexT_Intel

                                  yep, the latter one is the correct way to autoload the modules

                                  • 14. Re: ALSA Soundcard Support
                                    victorlazzarini

                                    That's great thanks.