ports/133414: [patch] sysctls/libcdio-0.78.2 is broken for CDROM's that don't support media-changed notification.

baileygeoff at telus.net baileygeoff at telus.net
Mon Apr 6 06:00:06 UTC 2009


>Number:         133414
>Category:       ports
>Synopsis:       [patch]  sysctls/libcdio-0.78.2 is broken for CDROM's that don't support media-changed notification.
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Apr 06 06:00:05 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator:     Geoff Bailey <baileygeoff at telus.net>
>Release:        FreeBSD 7.1-RELEASE i386
>Organization:
>Environment:
sysctls/libcdio-0.78.2_2 used by multimedia/audacious-1.5.1_3
System:         FreeBSD uzyod 7.1-RELEASE FreeBSD 7.1-RELEASE #0: Thu Jan 1 14:37:25 UTC 2009 root at logan.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386

>Description:
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.

>How-To-Repeat:

>Fix:
	please see atached patches:
		'patch-lib_driver_FreeBSD_freebsd.c'
		'patch-lib_driver_FreeBSD_freebsd_ioctl.c'
>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list