I had the same problem in my 95 SSEi. It'* plagued me for five years, and got worse over time to where it would get stuck for up to an hour. I was ready to buy an aftermarket, but then, after reading some of these reponses, decided to take it apart and see what could be wrong. I was able to fix the problem. :o There is two little switches on a little circuit board on top of the CD unit, inside the receiver box. They were dirty, so I cleaned them with a Q-tip and some methanol. Now the CD plays and ejects just like it was new.
For those with some patience, and some tools, this is not so bad. To do the job, you need some tiny sockets, (I think down to 4mm or so), and some jewelers screwdrivers.
Here'* the steps I took:
1) Remove the complete unit from the car.
2) Pull the face plate off, held on by clip pressure. Use a small screwdriver to lift the plastic edges, and work your way around. There will be several ribbon cables attached, but just leave attached.
3) Now, remove the CD unit, held in back by two large screws with either a torx wrench, or small socket. There are two more very small goldish colored screws, one on the top, and one on the side, near the face plate end of the box. Now the CD unit should come right out. Disconnect the ribbon cable at the CD unit end carefully.
4) On the top of the CD unit, you will see a circuit board about 3/4 inch by 2 to 3 inches long. This has two small switches on it. The switches face down, so to clean them, you need to remove the board. To do that, the top plate needs to come off, and several tiny screws need to be removed, two holding the circuit board on the top,and two or three holding the top plate to the CD body. Once the top plate is lifted up, there is one more screw holding the circuit board from the back. Once that is removed, the circuit board should come off, and you will see the two tiny switches which control the solenoid that engages the eject mechanism. While you're removing the top plate, watch for springs on the sides, and make a note of where they were so they can be put back. Also, watch out for the microstrip that the board is attached to, so as not to tear it.
To test the switches, take an Ohm meter across the switches, and push down on the plunger. It should read close to 0 ohms when the plunger is pushed in. If it'* not, it'* dirty. To clean, I took a Q-tip soaked in methanol, and with the switch in a vertical position, plunger facing up, pushed up and down several times with the Q-tip, to allow the methanol to get into the switch, then I exercised up and down several times, and wiped off the excess, until it was dry. Once done, I could get a consistent 0 ohms with the plunger depressed.
I don't know how long this fix will last, but at least for now, my CD player works like new. The best fix would be to replace the little switches, but I think they may be hard to find. An interesting side note, there'* alot of Sony chips in the box. :P