﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	severity	resolution	keywords	cc	mlocked
1257	cdrom detection causing 10 second delay in mythplugin_init	russelb@…	Isaac Richards	"After installing mythmusic, I noticed that it was taking mythmusic about 10 seconds to intialize.  I inserted some time difference calculations throughout the code to track it down and found that it was CDWriterDevice() in globalsettings.cpp.

It is the execution of ""cdrecord --scanbus -dev=ATA"" that is blocking for me.  When executing it from the command line, I see the following output: (Note that /dev/hdb is one of my hard drives)

Warning: Using badly designed ATAPI via /dev/hd* interface.
Error trying to open /dev/hdb exclusively (Device or resource busy)... retrying in 1 second.
Error trying to open /dev/hdb exclusively (Device or resource busy)... retrying in 1 second.
Error trying to open /dev/hdb exclusively (Device or resource busy)... retrying in 1 second.
Error trying to open /dev/hdb exclusively (Device or resource busy)... retrying in 1 second.
Error trying to open /dev/hdb exclusively (Device or resource busy)... retrying in 1 second.
Error trying to open /dev/hdb exclusively (Device or resource busy)... retrying in 1 second.
Error trying to open /dev/hdb exclusively (Device or resource busy)... retrying in 1 second.
Error trying to open /dev/hdb exclusively (Device or resource busy)... retrying in 1 second.
Error trying to open /dev/hdb exclusively (Device or resource busy)... retrying in 1 second.
Error trying to open /dev/hdb exclusively (Device or resource busy)... retrying in 1 second.
cdrecord: Device or resource busy. Cannot open '/dev/hdb'. Cannot open SCSI driver.


Changing ""ATA"" to ""ATAPI"" in the arguments to cdrecord, as shown in the patch, gets rid of this problem for me.  Furthermore, this change allows my cdrw drive to be detected, while it was not detected before.

I do not have sufficient knowlege about the difference between ""-dev=ATA"" and ""-dev=ATAPI"" to know the whole story behind this change.  Hopefuly someone with more knowlege in the area can help shed some light on the topic.

I am also available on irc.freenode.net as ""drumkilla""."	patch	closed	minor	unknown	mythmusic	head	medium	wontfix			0
