Sound on Arch


19 posts
by extravagoose » Fri Jun 15, 2012 11:00 am
I understand there has been quite a few sound posts, but pretty much all of the advice seems to not yield any fruit for me. I've also had a look at the Arch Wiki, again no help.

I'm trying to get sound from my RPi running Arch Linux ARM.

I understand the sound is muted by default and that the sound drivers are very much experimental.

I've tried modprobe snd-bcm2835 as root. This seems to have little problems. However, when I then do lsmod I get only the following:

lsmod
Code: Select all
[root@Gimli ~]# lsmod
Module                  Size  Used by
ipv6                  221660  18
evdev                   6820  0

... no sign of the sound module.

However, I'm beginning to wonder if its down to the kernel version and incompatibility of the sound driver? doing uname -r gives me 3.1.9-15-ARCH+

However, when I then look at the sound module location:
cd lib/modules/3.1.9-10+/kernel/sound/arm
it shows: snd-bcm2835.ko

Is there an incompatibility? I feel I've exhausted all options, or have I missed something?

Its not really a huge deal anyway, it would just be nice to have a working sound card so as to be able to code stuff that makes use of sound. If there's no way of it working, I'll just live without it.
RPi 1: Hostname: Gimli, 500Gb USB HDD, ArchLinux | ARM.
Main Use: Bit of everything - but mainly web server, Network Storage and C programming.

RPi 2: Hostname tba, awaiting delivery.
User avatar
Posts: 59
Joined: Tue May 29, 2012 2:51 pm
Location: UK
by pepedog » Fri Jun 15, 2012 11:17 am
Normally I would be advising you to do updates (pacman -Syuf)(say n to upgrading pacman) but latest firmware wasn't built so hold fire.
It would have given linux-raspberrypi-3.1.9-21
A new rootfs is to be released soon
Posts: 962
Joined: Fri Oct 07, 2011 9:55 am
by extravagoose » Fri Jun 15, 2012 11:42 am
pepedog wrote:Normally I would be advising you to do updates (pacman -Syuf)(say n to upgrading pacman) but latest firmware wasn't built so hold fire.


I did do a pacman -Syu earlier this week...?

It would have given linux-raspberrypi-3.1.9-21
A new rootfs is to be released soon

interesting... any idea how soon?
I'll hold off doing anything more with the sound stuff for now.
RPi 1: Hostname: Gimli, 500Gb USB HDD, ArchLinux | ARM.
Main Use: Bit of everything - but mainly web server, Network Storage and C programming.

RPi 2: Hostname tba, awaiting delivery.
User avatar
Posts: 59
Joined: Tue May 29, 2012 2:51 pm
Location: UK
by pepedog » Fri Jun 15, 2012 12:11 pm
I PM'd you
Only last nights kernel has the prob
You did reboot after pacman -Syu ? Can't understand how uname shows old kernel
Posts: 962
Joined: Fri Oct 07, 2011 9:55 am
by extravagoose » Fri Jun 15, 2012 12:22 pm
ah no, no reboot... I'll reboot now though. :oops:

Indeed... uname -r now shows 3.1.9-20-ARCH+
RPi 1: Hostname: Gimli, 500Gb USB HDD, ArchLinux | ARM.
Main Use: Bit of everything - but mainly web server, Network Storage and C programming.

RPi 2: Hostname tba, awaiting delivery.
User avatar
Posts: 59
Joined: Tue May 29, 2012 2:51 pm
Location: UK
by extravagoose » Fri Jun 15, 2012 12:28 pm
Furthermore... now something has changed... modprobe snd-bcm2835 seems to have worked... as lsmod now shows the sound modules.

Code: Select all

[steve@Gimli ~]$ sudo modprobe snd-bcm2835
[steve@Gimli ~]$ lsmod
Module                  Size  Used by
snd_bcm2835            15404  0
snd_pcm                51232  1 snd_bcm2835
snd_page_alloc          2612  1 snd_pcm
snd_timer              14528  1 snd_pcm
snd                    32336  3 snd_timer,snd_pcm,snd_bcm2835
soundcore               3984  1 snd
ipv6                  221660  14
evdev                   6820  0
[steve@Gimli ~]$
RPi 1: Hostname: Gimli, 500Gb USB HDD, ArchLinux | ARM.
Main Use: Bit of everything - but mainly web server, Network Storage and C programming.

RPi 2: Hostname tba, awaiting delivery.
User avatar
Posts: 59
Joined: Tue May 29, 2012 2:51 pm
Location: UK
by extravagoose » Fri Jun 15, 2012 2:23 pm
After some more tinkering, it finally works :)
RPi 1: Hostname: Gimli, 500Gb USB HDD, ArchLinux | ARM.
Main Use: Bit of everything - but mainly web server, Network Storage and C programming.

RPi 2: Hostname tba, awaiting delivery.
User avatar
Posts: 59
Joined: Tue May 29, 2012 2:51 pm
Location: UK
by Trevor.Cushen » Mon Jun 25, 2012 12:15 pm
ahhh don't leave me hanging :(

"...after some tinkering...it works" please post what the tinkering was.

I have the modprobe etc running per your post but no sound out of audio jack. Any ideas on playing a wav file at command line over this port?

Thanks
Posts: 4
Joined: Wed Jun 13, 2012 1:10 pm
by nemrod » Mon Jun 25, 2012 10:16 pm
If I recall correctly you need to use "amixer cset numid=3 1" to switch to the analogue output (0 = auto, 1 = analogue, 2 = hdmi). The amixer command is in the alsa-utils package by the way.
Posts: 3
Joined: Sun Jun 24, 2012 1:45 am
by extravagoose » Tue Jun 26, 2012 8:57 am
Trevor.Cushen wrote:ahhh don't leave me hanging :(

"...after some tinkering...it works" please post what the tinkering was.

I have the modprobe etc running per your post but no sound out of audio jack. Any ideas on playing a wav file at command line over this port?

Thanks


Ahh, my bad, I didn't get sound on the Audio Jack, I'm using mine over HDMI for now. Monitor has a sound jack too - so I run a cable from that to the line in on my Windows PC so the sound works on my speakers.

The previous post offers a useful tip... I would also add that I did have to unmute the sound too - its muted by default. Also, installed mpg123 to playback an mp3 file.
RPi 1: Hostname: Gimli, 500Gb USB HDD, ArchLinux | ARM.
Main Use: Bit of everything - but mainly web server, Network Storage and C programming.

RPi 2: Hostname tba, awaiting delivery.
User avatar
Posts: 59
Joined: Tue May 29, 2012 2:51 pm
Location: UK
by duckinator » Thu Aug 16, 2012 11:07 pm
Using mpg123 was the tip that got it working for me -- doesn't work in vlc. :P

Thanks!
Posts: 1
Joined: Fri Sep 09, 2011 5:05 pm
by wikimig » Wed Sep 05, 2012 9:50 pm
Hello,

Had the same issue. "modprobe snd-bcm2835" would not work so I just rebooted and this time modprobe loads the module and then alsa/sound works as expected.

Thanks
Posts: 1
Joined: Wed Sep 05, 2012 9:45 pm
by jaycuse » Tue Oct 16, 2012 2:10 am
I'm getting an issue as well, but I'm getting a no sound card found error when I try to start alsa. (I have unmuted aswell)

Nothing I try seems to work :(
Posts: 7
Joined: Fri Oct 12, 2012 1:25 pm
by mckorr » Thu Oct 18, 2012 5:31 pm
1. Install software
sudo pacman -S alsa-firmware alsa-lib alsa-plugins alsa-utils

2. Turn sound device on
sudo modprobe snd-bcm2835

3. create /etc/modules-load.d/snd-bcm2835.conf
sudo echo "snd-bcm2835" >> /etc/modules-load.d/snd-bcm2835.conf

4. unmute and adjust volume with alsamixer (mine is already unmuted at this point)
sudo alsamixer

5. test sound
speaker-test -c 2

6. save adjustments
sudo alsactl store
Posts: 12
Joined: Fri Oct 05, 2012 5:01 pm
by grimpirate » Mon Nov 05, 2012 3:57 am
This expands on what mckorr has written up
Sound on an Arch Linux ARM Raspberry Pi
Posts: 38
Joined: Fri Oct 19, 2012 6:16 pm
by sdjf » Mon Nov 05, 2012 4:08 am
Thank you for this, it looks cool, will add it to the tutorial list I am working on posting at wordpress when my pi arrives.

Now, if only I had my Pi and some speakers to try it out with.....
FORUM TIP: To view just one person's posting history, sign in, click on their user name, then click on "Search User's Posts." || This Pi owner is running Arch on 512MB Model B.
Posts: 1291
Joined: Fri Mar 16, 2012 5:20 am
Location: California
by sdjf » Thu Jan 24, 2013 12:47 pm
Hey, after reading all the detailed explanations of what is needed to get sound running on the Pi, I was pleasantly surprised when my first effort to play a WAV file on the Pi with mplayer worked without any extra effort, other than having installed the various additional recommended alsa packages in addition to installing mplayer. No special config files or tweaks were needed!

Do not have speakers yet, was using the audio jack with an ear bud, but it worked without a hitch! this is with the 8 Jan image, now superceded by the latest and greatest image created by Pepedog.

Now, once I get USB speakers, may have some work to do, but using audio jack, it is working great.
FORUM TIP: To view just one person's posting history, sign in, click on their user name, then click on "Search User's Posts." || This Pi owner is running Arch on 512MB Model B.
Posts: 1291
Joined: Fri Mar 16, 2012 5:20 am
Location: California
by Spid » Thu Jan 24, 2013 1:11 pm
I will always assume you are running Raspbian for desktop and Raspbmc for XMBC !
Posts: 525
Joined: Sat Jan 19, 2013 12:47 pm
by f-3r » Mon Jun 23, 2014 11:04 pm
@nemrod
If I recall correctly you need to use "amixer cset numid=3 1" to switch to the analogue output (0 = auto, 1 = analogue, 2 = hdmi). The amixer command is in the alsa-utils package by the way.


A bit late perhaps, but thank you, man!! that last step would have cost me a sleepless night!
Posts: 1
Joined: Mon Jun 23, 2014 11:01 pm