PS3: No sound during gameplay (but has sound in XMB menu, mp3 playback, etc.)

Your PS3 is fine. It has some trouble switching between audio output modes when you move it from one tv/setup to another. Here are the directions:

Here is how I resolved this issue, ymmv.

From the PS3 main menu:

1. Settings->Sound Settings->Audio Output Settings
2. Change it from HDMI to Digital Out (Optical). I do NOT have optical hooked up on my PS3, so if you have it hooked up, you may want to unhook it.. probably shouldn't matter.
3. I left what was defaulted: "Linear PCM 2 Ch. 44.1 kHz" and 48kHz
4. Right on the D pad (X selects/unselects options) to move to the next screen.
5. A confirmation page, hit X to Enter, saving the changes.
6. Start up a game, you shouldn't hear any sound (as expected)
7. Exit the game, then go back to Audio Output Settings and switch back to HDMI. I selected "Automatic" for "method for setting the output format."
8. A confirmation page, hit X to Enter, saving the changes.
9. Start up a game, you should now hear audio with your game (once again).

My issue I believe was caused because I had been using a different TV for a while. Somehow, when I switched back to my original TV, the settings did not automatically reset back.

Good Luck!

[Source: Answerbag]