No audio from rp3 and amixer is broken

I can have audio using omxplayer, but other than that, my pi 3 is silent.
I tried to look up online and I think using sudo amixer cset numid=3 1 would solve my issue. However, when I used this command, amixer: Control default open error: No such file or directory showed up. I tried to look for a solution to this online but I couldn’t find one.
I constantly update and upgrade and also update the raspberry kernel so my distribution should be up to date. So what can be a solution to my problem, to let me play videos on youtube with audio? Also, I prefer using the audio jack but for now, neither audio jack nor hdmi outputs audio.

There is another problem: I saw that I can select OpenMax IL in VLC to enable hardware acceleration but I cannot see the option under the instructed Tools -> Preferences -> Video. Why is that?

Thank you!

I had some similar issues. Try the following, cleared up my issues.

sudo apt-get purge pulseaudio*

sudo apt-get install alsa-tools alsamixergui alsa-base
sudo modprobe snd_bcm2835
sudo amixer cset numid=3 1
(or sudo amixer cset numid=3 2 (for HDMI))

Thank you so much!
I tried to do what you say, it still isn’t working.
The same error message. Should I rebuild the system?

I haven’t gotten VLC to run smoothly, or at all on any Pi. I’ve been using the OMXplayer for video. I get the impression that VLC is there for some of its resources, but not actually as a functioning player.

As far as the audio, the amixer cset command worked for mine, there is also an audio select in OMXplayer that you may want to check. If that works you can change the config file to set what you want on startup.

Since OMXplayer is giving you audio, it most likely is in the startup config file. If you need help on changing the config startup settings, you can ask on this post, or check some other posts here. The info is in these forums, but is sometimes hard to find and put together.