Can't get audio working

This forum is for topics specific to the Raspberry Pi and Arch Linux ARM

Can't get audio working

Postby xenphor » Sun Feb 08, 2015 5:43 am

I'm trying to get audio working either through analog stereo through headphone port or hdmi throuh tv speaker but neither is working. I thought the simplest setup would be using headphones with the stereo analog port but even that doesn't want to work. I have pulseaudio installed and it only detects the one analog audio sink but no HDMI sinks for some reason. Even so, I can not hear anything from the analog port with headphones that work fine. I tried using the

$this->bbcode_second_pass_code('', 'amixer cset numid=3 1') command to force audio over headphones but I still get no audio.

As far as HDMI, as I said, pulseaudio detects no HDMI sinks which I don't understand. I was able to get audio working one time by using all the forceable options in the /boot/config file such as

#hdmi_drive=2
#hdmi_force_hotplug=1
#hdmi_force_edid_audio=1

This worked but only while I had headphones plugged in, trying to get the analog sound working, not the HDMI sound oddly enough. I don't understand why. Right now I'm mostly focused on just getting the analog working since it's actually detected in pulseaudio.
xenphor
 
Posts: 12
Joined: Wed Mar 26, 2014 1:19 pm

Re: Can't get audio working

Postby sdjf » Mon Feb 09, 2015 5:26 am

I don't know pulseaudio, just have used aplay and mplayer, but if pulseaudio accesses alsa sound, I would think it would need an .asoundrc file so it knows where you want to send the sound?

google for asoundrc and pulseaudio together - some of that may help you. I see .asoundrc is not required, but when we want to send sound somewhere specific that it is not going, it can help a lot.
sdjf
 
Posts: 178
Joined: Wed May 08, 2013 1:55 pm

Re: Can't get audio working

Postby xenphor » Mon Feb 09, 2015 8:21 am

I've just tried using HDMI sound again and it's working when enabling those 3 options in config.txt. The problem is that I have no real software volume control that I would normally have using pulseaudio. I'm guessing pulseaudio just doesn't work with raspberry pi? Is alsa just used normally? I don't usually use an .asoundrc with pulseaudio.
xenphor
 
Posts: 12
Joined: Wed Mar 26, 2014 1:19 pm

Re: Can't get audio working

Postby sdjf » Mon Feb 09, 2015 3:49 pm

I don't think there is a "normal" as everyone's needs and preferences are different.

I do think a lot of people prefer using alsamixer to set volume, but I prefer setting the volume as part of my aplay or mplayer commands. But have no HDMI monitor with sound, so cannot speak to issues with that.

You certainly could try running alsamixer before pulseaudio. If that does not work for you, I like the fine control that setting volume directly each time I call aplay or mplayer.

Nearly all my sound usage at this point is in scripts, where I have the volume set according to the time of day, much louder at noon than at midnight, for example. And I have totally switched to aplay as I don't need all the GUI bells and whistles of mplayer, which are more memory intense.
sdjf
 
Posts: 178
Joined: Wed May 08, 2013 1:55 pm


Return to Raspberry Pi

Who is online

Users browsing this forum: No registered users and 54 guests