the trick is that the module snd-hda-codec-nvhdmi has to be loaded BEFORE snd-hda-intel if it's not done in that way, it will not work! So, to solve this you must edit the file /etc/modprobe.d/alsa-base.conf and at end add this line:
alias snd-card-0 snd-hda-codec-nvhdmi
this solved my all my problems and now i get sound using hdmi out!!