You must select HDMI Out as the Primary Output Port in the Audio Output Settings under the Screen and Sound option of PS4 Settings. You can switch between audio output devices from here.