The Samsung Galaxy S II no longe features the great Wolfson chip of the S. Samsung went to a less good Yamaha DAC. It might be ok for many, but it's not a revelation. That said, even the great Wolfson (and its builtin headphone amp with no or very little hiss) isn't properly used by the old S. That's why there is the Voodoo project. It provides an app in the marked to access the Wolfson chips capabilities, but that requires either root on the phone, so the app can make the kernel load the necessariy drivers (which doesn't seem to work on all phones), or a custom kernel, with the driver already compiled in. Without that, the App can't do anything. But once you use the Wolfsons amping etc, soundquality is actually really good. That's why I suggest you might to look for a phone with the Wolfson chip. I bought myself an LG Optimus 2x for that purpose ... more modern, than the old S, with e Tegra 2, like the Galaxy II, but also with a Wolfson DAC.
Without the Wolfson support, the iPod will probably sound quite a bit better, since I only hear good things about the soundquality in recent apple products.
You might be able to improve the sound with apps like the PowerAmp player, the Nuetron player and the EQualizer app, though.