Unlock dvd tray

I have a dvd burner with the tray locked.
I know the unit is working otherwise, I can "pin" open the tray and burn a cd or dvd and it will eject the tray when finished.
But within a little bit the tray is locked again.
I've tried to force the tray to eject and to reset the unit. The light on the unit blinks but no joy.
burncd -f /dev/acd1 eject
camcontrol eject 1:1:0
cdrdao scanbus
Using libscg version 'schily-0.8'
1,0,0 : HL-DT-ST, CD-ROM GCR-8483B, 1.05
1,1,0 : DVDRW , IDE1008 , 0054

Any ideas what to try next??
Reading your post again, I would think that it's a mechanical problem and not what I was thinking about.
Maybe the gears the lead the tray aren't working well?
Does pressing the button on the unit always eject the tray? It's just a problem using commands from the OS?
Using growisofs will eject the tray when a cd or dvd is complete, and the button will work. But after a few minutes the tray is locked, the button will not open the tray. If it would not open after the burn program completes, I'd say yes it's hardware. Even if the button/switch was bad the camcontrol command should open it. If the button was jammed, tray gears, I would think growisofs would be unable to open the tray.
If the CD is mounted the tray will be locked. Watch out for automount as nautilus (gnome) does.
I found the commands.
To prevent removal:
camcontrol cmd cd1 -v -c "1e 0 0 0 1 0"
To allow removal:
camcontrol cmd cd1 -v -c "1e 0 0 0 0 0"