STR-DG510 was out in about 2007~2008. At that point a lot of budget AV amps did HDMI as pass-thru only. The HDMI sockets were little more than a HDMI switch. The amp didn't process sound- or even accept LPCM via HDMI. You'll get sound on the TV speakers from HDMI going in and out of the amp, but the surround speakers won't do a thing unless you connect a coax/optical/analog input. That's the situation with the STR-DG510. 
The best sound you'll get from a PS3 with that particular Sony amp is by connecting an optical cable. It will be proper surround. The PS3 can send out Dolby Digital and DTS. It does this for games and for DVDs and for Blu-rays. With Blu-rays they have better quality sound (Dolby True-HD and DTS Master Audio) but the PS3 can be set to convert them down to DD and DTS respectfully. 
If you have the PS3 set up correctly then the Sony's front panel display will confirm when it is receiving Dolby Digital or DTS. You might want to chech the Sony's audio menus though just to be sure that the Decode Priority is set to DEC.AUTO 
If you see the front panel light up with PL (Pro-Logic) or PLII (Pro-Logic II) then the amp is receiving a stereo signal from the PS3. That might be okay if your playing some music, but if you get it when playing a movie or a game that you know has better audio then check the disc menu. Make sure you selected the better audio off the disc if it defaults to basic stereo. 
There's a guide to setting the PS3 audio menus 
here
The rest of your sources will need to connect with coax or optical for audio if they have them. 
As a footnote for those interested, when the 1st gen PS3 consoles camae out they couldn't do HD audio over HDMI. The best you could get was Dolby True-HD and DTS-MA decoded to LPCM multichannel over HDMI. The AV amp had to be compatible with that.