amadeus84
Posts: 18
Joined: Sun Jun 22, 2014 5:55 pm

sound on Pidora 2014

Wed Mar 04, 2015 5:18 am

I'm trying to get sound out of my RPi model B with Pidora 2014 running on it, using ALSA and the 3.5mm jack. I searched long and hard on how to do this and I saw that I needed to modprobe snd_bcm2835. So, to my surprise I don't even have this anywhere on the system. I download the kernel source rpm (on the RPi), do a

rpmbuild -bp SPECS/raspberrypi-kernel.spec

which should only do a prep, that is unpack the source and apply patches, but instead it starts to actually compile the entire kernel with the default config.

So then I remember I can do

cat /proc/config.gz | gunzip | grep -i snd_bcm

CONFIG_SND_BCM2835=y
CONFIG_SND_BCM2708_SOC_I2S=y
# CONFIG_SND_BCM2708_SOC_HIFIBERRY_DAC is not set
# CONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUS is not set
# CONFIG_SND_BCM2708_SOC_HIFIBERRY_DIGI is not set
CONFIG_SND_BCM2708_SOC_RPI_DAC=m
# CONFIG_SND_BCM2708_SOC_IQAUDIO_DAC is not set


so lo and behold, for reasons that I don't understand, snd_bcm2835 is compiled straight into the kernel, not as a module, so no wonder I couldn't find it. Therefore I should have sound, right?

echo "hello" | espeak # produces nothing

aplay foobar.wav
ALSA lib pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Connection refused

aplay: main:722: audio open error: Connection refused


Similarly

speaker-test

speaker-test 1.0.27.2

Playback device is default
Stream parameters are 48000Hz, S16_LE, 1 channels
Using 16 octaves of pink noise
ALSA lib pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Connection refused

Playback open error: -111,Connection refused

So I guess pulseaudio is not running, so I do

pulseaudio -k ; pulseaudio -D --log-target=syslog # as per http://www.kernelhardware.org/pulseaudi ... n-refused/

Now pulseaudio is running:

ps auxfwww | grep -i pulseaudio
amadeus 5528 0.0 0.1 5852 852 pts/1 S+ 23:55 0:00 | \_ grep --color=auto -i pulseaudio
amadeus 5513 0.1 0.7 91352 3572 ? Sl 23:53 0:00 pulseaudio -D --log-target=syslog

but the problem persists:

amixer
ALSA lib pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Connection refused

amixer: Mixer attach default error: Connection refused

Is this because I'm connected via ssh?

Oh, and I have hdmi_drive=2 in /boot/config.txt and I'm running in graphical mode (i.e. not headless), but I'm connected to the Pi via ssh (although this exact problem occurs at the console as well).

What else do I need to do?

I've found these instructions to be pretty useful:

http://blog.scphillips.com/2013/01/soun ... with-alsa/

but I don't even get to run amixer because of the connection refused error. Anybody got this working? Please help!

Thanks!

Return to “Pidora / Fedora”