How to use audio jack with 5" Raspberry pi Touchscreen?

I've been building a portable pi recently and have finally gotten the touchscreen working... The only problem is that the audio is forced through HDMI instead of the audio jack, (my touchscreen doesn't have audio). I was wondering how I could edit the /boot/config.txt file to use the audio jack without messing with the display. 

               /boot/config.txt code
  GNU nano 2.2.6            File: /boot/config.txt                             



# --- added by elecrow-pitft-setup Mon 18 Sep 16:41:00 CDT 2017 ---
hdmi_force_hotplug=1
max_usb_current=1
hdmi_drive=1
hdmi_group=2
hdmi_mode=2
hdmi_mode=87
hdmi_cvt 800 480 60 6 0 0 0
dtoverlay=ads7846,cs=1,penirq=25,penirq_pull=2,speed=50000,keep_vref_on=0,swapx$
display_rotate=0
# --- end elecrow-pitft-setup Mon 18 Sep 16:41:00 CDT 2017 ---


Thank you.

Simplest way to do this is to explicitly tell the Pi that the HDMI device does not support audio, it will then default audio output to the 3.5mm jack. Do this by adding the following line to your config.txt file:

hdmi_ignore_edid_audio=1

Another way is to modify the ALSA config (assuming you're using it), but note that some things override the ALSA config meaning it doesn't always work.

mderton (author)  ThirdEarthDesign29 days ago

Thanks!