Bug 133413

Summary: [patch] sysutils/libcdio 0.78.2 is broken for CDROMs that don't support media-changed notification.
Product: Ports & Packages Reporter: baileygeoff <baileygeoff>
Component: Individual Port(s)Assignee: Tilman Keskinoz <arved>
Status: Closed FIXED    
Severity: Affects Only Me CC: mich
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
libcdio-0.82.patch none

Description baileygeoff 2009-04-06 07:00:05 UTC
1. The function get_media_changed_freebsd(), in lib/driver/FreeBSD/freebsd.c,
   returns DRIVER_OP_UNSUPPORTED for my NEC-28D CDROM device. The lshal program
   shows: 'storage.cdrom.support_media_changed = false' for this device.

   This causes the Audacious Media Player's cdaudio-ng plugin to only load the
   first track of a CD in the playlist.

   The problem is solved if this function returns 0 (not changed) for
   unsupported devices instead of DRIVER_OP_UNSUPPORTED. While the player
   may not be able to detect media changes under these circumstances, it
   at least remains functional for older drives.

   I have attached 'patch-lib_driver_FreeBSD_freebsd.c' which makes the 
   the requested change. It also adds a few lines to set access_mode='ioctl'
   if the atapi (/dev/acd0) driver is being used by the the application.

2. The  read_audio_sectors_freebsd_ioctl() function, in 
   lib/driver/FreeBSD/freebsd_ioctl.c, calls the CDIOCREADAUDIO ioctl, which
   has been deprecated for some time. However, this call can be easily replaced
   with a CDRIOCSETBLOCKSIZE ioctl call followed by a pread() call.

   Since the atapicd driver is in the generic kernel and the atapicam
   driver module must be explicitly loaded, this simple fix to the atapi
   ioctl interface will allow programs (such as Audacious) to function 
   'out of the box'.

   I have attached 'patch-lib_driver_FreeBSD_freebsd_ioctl.c' which makes
   the requested changes.

Fix: 

please see atached patches:
		'patch-lib_driver_FreeBSD_freebsd.c'
		'patch-lib_driver_FreeBSD_freebsd_ioctl.c'
Comment 1 Pav Lucistnik freebsd_committer freebsd_triage 2009-04-30 12:22:56 UTC
Responsible Changed
From-To: freebsd-ports-bugs->mich

Over to maintainer
Comment 2 Michael Landin freebsd_committer freebsd_triage 2009-10-20 17:55:32 UTC
Responsible Changed
From-To: mich->freebsd-ports-bugs

No longer maintaining this port
Comment 3 Tilman Keskinoz freebsd_committer freebsd_triage 2009-11-08 08:06:41 UTC
State Changed
From-To: open->feedback

Taking over, i am the new, old maintainer 

Geoff, 
The patches were not attached to the PR, can you send them to me? 
Did you report this issue upstream? 



Comment 4 Tilman Keskinoz freebsd_committer freebsd_triage 2009-11-08 08:06:41 UTC
Responsible Changed
From-To: freebsd-ports-bugs->arved

Taking over, i am the new, old maintainer 

Geoff, 
The patches were not attached to the PR, can you send them to me? 
Did you report this issue upstream?
Comment 5 Tilman Keskinoz freebsd_committer freebsd_triage 2009-11-08 08:17:53 UTC
arved@FreeBSD.org wrote:

> Geoff,
> The patches were not attached to the PR, can you send them to me?
> Did you report this issue upstream?

Never mind, i saw that you reported them to the libcdio Mailinglist.
Comment 6 Tilman Keskinoz freebsd_committer freebsd_triage 2009-11-08 08:55:36 UTC
Tilman Linneweh wrote:
>> Geoff,
>> The patches were not attached to the PR, can you send them to me?
>> Did you report this issue upstream?
> 
> Never mind, i saw that you reported them to the libcdio Mailinglist.

Here is an update to 0.82.Please test!

It will be committed after FreeBSD 8.0 Release.
Comment 7 Tilman Keskinoz freebsd_committer freebsd_triage 2009-11-28 10:35:21 UTC
State Changed
From-To: feedback->closed

libcdio was updated to the new version, which includes the patches. 
Thanks!