[mythtv] CD/DVD always mounted so eject fails

Robin Gilks g8ecj at gilks.org
Wed Jul 2 09:56:37 UTC 2008


>> Manually unmounting doesn't stop anything from working on the
>> frontend and
>> it allows the eject button to work again (much better WAF then!!)
>> so the
>> question is, why does the media monitor, when it has sussed there is a
>> disk in the drive but its not being used (eg sitting at the main menu)
>> still keep it mounted?
>
>
>
> OK. There is a patch here which might* fix it for you
> (for DVD/VCD only - other disk types are harder to fix)
>
> http://svn.mythtv.org/trac/attachment/ticket/4877/umount-eject.patch
>
> Index: libs/libmyth/mythcdrom.cpp
> ===================================================================
> --- libs/libmyth/mythcdrom.cpp       (revision 17685)
> +++ libs/libmyth/mythcdrom.cpp       (working copy)
> @@ -119,7 +119,14 @@
>       if (MEDIATYPE_DATA == m_MediaType)
>           MythMediaDevice::onDeviceMounted();
>
> +
> +    // Unlock the door, and if appropriate unmount the media,
> +    // so the user can press the manual eject button
>       if (m_AllowEject)
> +    {
>           unlock();
> +        if (m_MediaType == MEDIATYPE_DVD || m_MediaType ==
> MEDIATYPE_VCD)
> +            unmount();
> +    }
>   }
>
> Please provide -v media if it fails.
>
>
>
>
> (*) I say "might," 'cause this sort of stuff is very drive and
> kernel driver dependent. On two of my three test machines,
> I can eject the tray while the volume is mounted!
> The drive just magically disappears from df or /proc/mounts.
>
> (There is no kernel message saying what's going on.
>   They are newish kernels - 2.6.18 and 2.6.23)
>
> The third machine does exhibit the problem, but it is
> currently SVN trunk, which has a broken MediaMonitor.

That works really well for DVD and VCD so we must be on the same page
after all - probably because I'm in New Zealand :-)

As expected, picture CDs are still a problem trying to eject with the
drive button and using the MythVideo eject menu option results in the
occasional grabbing back of the tray again - something which I think is
probably specific to my diskless slow CPU setup showing up a race
condition.

With DVDs and audio CDs now interchangable the WAF will improve somewhat.
I have the system set up with a 2 line LCD and a line of 6 buttons on the
lcdproc interface (up/down/left/right/esc/select) so that the missus can
now eject a DVD that happens to be in the tray, put in an audio CD and it
will play without turning on the TV or trying to find the remote - good
result.


-- 
Robin Gilks





More information about the mythtv-dev mailing list