[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Libcdio-devel] problems with libcdio on openbsd (and probably netbs

From: Rocky Bernstein
Subject: Re: [Libcdio-devel] problems with libcdio on openbsd (and probably netbsd too)
Date: Sun, 12 Aug 2018 13:00:09 -0400

On Tue, Aug 7, 2018 at 6:03 PM, Edd Barrett <address@hidden> wrote:

> Hi all,
> Sorry for the delay. Life gets in the way again.

Same here.

> On Tue, Jun 19, 2018 at 05:46:37PM -0400, Rocky Bernstein wrote:
> > I looked over the patches so far and all looks good. Thanks.
> >
> > cdda-player is weird in that it uses a CD-ROM in a way that isn't
> normally
> > done much nowadays: there is a command to the cd-rom to start playing in
> > some sort of audio mode and through a jack on the drive you listen. So
> > other than commands going from the computer to the drive and status
> coming
> > back in response to a command, the CD-ROM is working independently of the
> > computer.
> I picked up the OpenBSD port again. I'm noticing two test failures:
> ---8<---
> FAIL: mmc_read
> ==============
> Error: cdio_get_arg("scsi-tuple") returns NULL.
> FAIL mmc_read (exit status: 22)
> FAIL: mmc_write
> ===============
> Got READ_CD; Should get back MMC_RDWR_EXCL, the access mode requested.
> FAIL mmc_write (exit status: 17)
> --->8---
> These are both caused by a call to get_arg_netbsd() in netbsd.c, which
> does not
> define the access modes that exist in (e.g.) the linux and freebsd drivers.
> The tests are assuming these are implemented :\

In the git netbsd-mmc-rdwr-excl branch on savanah
<> I
think I have realigned the netbsd driver
more with what is currently expected.

My testing here is limited because I did this on a NetBSD 7 VM and that
doesn't have (and I can't seem to add) even a virtual CD
drive. When testing dectects there is not CD-ROM drive, the mmc_read and
mmc_write tests are skipped.

In the process of looking over the code, I perhaps see why cdda_player
might not working. Some of the
functions in the driver are not implemented. In particular something
corresponding to audio_get_volume_linux,
audio_pause_linux, audio_play_msf_linux, and so on.

In GNU/Linux there are re ioctl's to do these functions, See

I don't know what the equivalent is on netbsd/openbsd if there is such a

Lastly let me explain what's with this access mode stuff. When you open a
CD-ROM sometimes you will want write access.
But that's harder to get than simply read access. And sometimes you want
"exclusive write" access so that I think it blocks
even readers.

On non BSD systems there is additional funniness in specifying how you
should access the Drive. On GNU/Linux I think the default is to use
GNU/Linux ioctls over SCSI MMC commands. The READ10 CD stuff is probably
legacy. On MS Windows, there was a distionction also between some sort of
native ioctrl and a generic SCSI reading routine.

On BSD systems though, they use MMC and life is generally simpler.

> For comparison, look at the linux get_arg() and then the netbsd one:
>  *
> /netbsd.c#n370
>  *
> /gnu_linux.c#n373
> It's not as simple as copy and pasting the switch statement, as the
> netbsd _img_private_t doesn't have the access modes inside.
> It'd be great if someone who knows what they are doing (i.e. not me) could
> comment on this. Is there a reason the netbsd driver doesn't implement
> these?
> If so, then we should amend the test, otherwise should I try to implement
> these access modes?
> I reckon this affects NetBSD too.
> Many thanks!
> --
> Best Regards
> Edd Barrett

reply via email to

[Prev in Thread] Current Thread [Next in Thread]