Problem sound with HDMI

I have a problem regarding the sound because the audio is not heard via HDMI cable while if I attach the jack directly to the computer it works, so it is a problem concerning the software I think. Is there anyone able to help me with some commands from the CMD or something. I would be very grateful.