[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-bugs-dist
Subject:    Bug#2197: Kscd/FreeBSD problems
From:       Simon Marlow <simonm () jaffacakes ! freeserve ! co ! uk>
Date:       1999-10-24 18:24:53
[Download RAW message or body]


Kscd failed to do anything reasonable on my FreeBSD system w/ an ATAPI
cdrom drive.  The patches below fix the immediate problems such that I
can now play CDs, but things still aren't perfect.  Also, I have no
idea how these patches will affect SCSI cdrom support.

    - kscd segfaults if it can't find or open the CD device
      (no patch for this one)

    - play didn't work at all (patch to gen_play below - it seems
      that the initial CDIOCSTART is bogus, at least on ATAPI
      cdroms).

    - pressing stop leaves kscd locked up.  (patch below - it
      seems that the ATAPI cdrom returns CD_AS_PLAY_COMPLETED
      after a CDIOCSTOP ioctl, which caused kscd to hang waiting
      for the next track).

    - kscd doesn't cope with errors on the CD medium very
      gracefully, notably it claims the CD is ejected and
      won't do anything until the CD is forcibly ejected and
      re-inserted (no patch for this one).

Cheers,
	Simon

*** plat_freebsd.c      Mon May 17 14:07:34 1999
--- /home/simonm/plat_freebsd.c Sun Oct 24 19:20:18 1999
***************
*** 248,258 ****
                break;

        case CD_AS_PLAY_COMPLETED:
!               *mode = TRACK_DONE; /* waiting for next track. */
                break;

        case CD_AS_NO_STATUS:
!       case 0:
                *mode = STOPPED;
                break;
        }
--- 248,259 ----
                break;

        case CD_AS_PLAY_COMPLETED:
!               *mode = STOPPED;
!               /* *mode = TRACK_DONE; /* waiting for next track. */
                break;

        case CD_AS_NO_STATUS:
!       case CD_AS_AUDIO_INVALID:
                *mode = STOPPED;
                break;
        }
***************
*** 368,378 ****
        msf.end_s       = (end % (60*75)) / 75;
        msf.end_f       = end % 75;

        if (ioctl(d->fd, CDIOCSTART))
                return (-1);

!       if (ioctl(d->fd, CDIOCPLAYMSF, &msf))
!               return (-2);

        return (0);
  }
--- 369,383 ----
        msf.end_s       = (end % (60*75)) / 75;
        msf.end_f       = end % 75;

+ #if 0
        if (ioctl(d->fd, CDIOCSTART))
                return (-1);
+ #endif

!       if (ioctl(d->fd, CDIOCPLAYMSF, &msf)) {
!         perror("ioctl(CDIOPLAYMSF)");
!         return (-2);
!       }

        return (0);
  }                   

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic