I the same problem with my Casio AP470. Sound only from the headphones. So I solved the problem as recommended earlier in this thread.
1. I inserted a dry toothpick inside the headphone jack and moved it around in circles and towards the middle to remove particles if any.
That worked just fine BUT it only works until I insert the headphone jack. So I insert the toothpick again. Problem solved! Its inconvenient and I wonder what is happening