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.