The audio from a Raspberry Pi can be output to a HDMI TV / monitor or to a headphones / speaker that is plugged into the headphone jack.
On a Pi running Raspbian, you can switch between these two output methods using the raspi-config
tool. As the raspi-config tool is not available in Pidora, you can manually change these settings as below:
1. Verify hdmi_drive setting in /boot/config.txt file
Raspberry Pi supports two types of video connectors - HDMI and DVI. DVI does not support audio while HDMI can send both video and audio. The hdmi_drive parameter in /boot/config.txt
file chooses between HDMI and DVI. If you want the audio output on HDMI TV or monitor this parameter should be set 2 which will send the audio over HDMI cable.
hdmi_drive=2
In case of DVI, this parameter should set to 1
2. Switch audio output
To switch to HDMI enter the following command:
amixer cset numid=3 1
To switch to headphone jack enter the following command:
amixer cset numid=3 2
Note: The last parameter in the above commands corresponds to the audio output mode, which is 0 for auto (default), 1 for HDMI and 2 for Headphones (analogue).
To verify the settings have changed, run the following command:
amixer cget numid=3