Comment 41 for bug 66254

Revision history for this message
Ulrich Büchsel (buechsel) wrote :

Hello!

I have the same problem with my Lite-on LTR-12101B CD burner since the upgrade from ubuntu 6.06 to 6.10.

Interestingly hal under 6.06 didn't recognize inserted media either. So my first supposition was that a change in the code of nautilus-cd-burner was responsible for the error. I found out that nautilus-cd-burner under 6.06 contained a non-hal-fallback-code which missed under 6.10 and 7.04. I compared the source code of hal and nautilus-cd-burner (6.06) which detects the disc type of the inserted media which gave me a hint how a possible solution of this problem might work:

Under nautilus-cd-burner (ubuntu 6.06) I found the function nautilus_burn_drive_get_medi_type_from_path_full which calls the subfuction get_mmc_profile which can be found in the source code file dvd_plus_rw_utils.c up from line 159. As far as I understand the code an the comments this function at first calls a certain SCSI function which is called GET CONFIGURATION. The comments say that "some older drives support MMC-1 but don't support the GET CONFIGURATION command (which is part of the MMC-2 spec)". Therefore there is a fallback routine up from line 240 which tries to determine the disc type from the information if the disc is blank and/or erasable. The comment says: "if the profile has not yet been set, we're dealing with an older CD-R or CD-RW burner (which doesn't know the GET CONFIGURATION command. Do some digging into the disc type to figure out what's in the drive".

In the hal code (version 0.5.8.1) the source code file hald/linux/probing/probe_volume.c seems to be interesting. In "main" it calls the function get_disc_type to determine the disc type. This function is coded in the file hald/linux/probing/linux_dvd_rw_utils.c up from line 743. In this function apparantly only the SCSI function GET CONFIGURATION is called. It doesn't seem to contain any code for older cd drives which do not support this command. For me this seems to be the probable reason why hal cannot detect the disc type in my cd burner. My burner is quite old (about 6 or 7 years).

So my idea is to incorporate the fallback code of nautilus-cd-burner into hal. Perhaps this would solve the problem. Has anyone in this forum contact to the hal developers and could suggest this to them?