[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Libcdio-devel] OpenBSD vs libcdio vs Audacious
From: |
Thomas Schmitt |
Subject: |
Re: [Libcdio-devel] OpenBSD vs libcdio vs Audacious |
Date: |
Sat, 26 Jan 2019 18:43:58 +0100 |
Hi,
> ERROR cdaudio-ng.cc:502 [scan_cd]: Cannot set drive speed.
Message seems to come from audacious-plugins.
Error cause seems to come from libcdio-paranoia/lib/cdda_interface/interface.c
function cdio_cddap_speed_set().
In libcdio it's lib/driver/device.c cdio_set_speed() calling
p_cdio->op.set_speed().
lib/driver/gnu_linux.c has a .set_speed:
cdio_funcs_t _funcs = {
...
.run_mmc_cmd = run_mmc_cmd_linux,
.set_arg = set_arg_linux,
.set_blocksize = set_blocksize_mmc,
#if 1
.set_speed = set_speed_linux,
#else
.set_speed = set_speed_mmc,
#endif
};
(lib/driver/FreeBSD/freebsd.c too.)
In lib/driver/netbsd.c the initialization of cdio_funcs_t _funcs ends
after
.set_arg = set_arg_netbsd,
I would give set_speed_mmc() a try.
Alternatively one could try to find a set-CD-speed ioctly of NetBSD.
-------------------------------------------------------------------------
> read_audio_sectors_netbsd: SCIOCCOMMAND1 cmd 0xbe sts 0 lsn 0 nblocks 37
0xbe is SCSI command READ CD.
What riddles me is "sts 0" because
http://ftp.netbsd.org/pub/NetBSD/NetBSD-release-8/src/sys/sys/scsiio.h
https://github.com/openbsd/src/blob/master/sys/sys/scsiio.h
both say
#define SCCMD_OK 0x00
lib/driver/netbsd.c emits the message only if
if (req.retsts != SCCMD_OK) {
and then prints req.retsts as "sts %d".
So why does the message get printed at all if req.retsts == 0 ?
(Edd: Are the "lsn" and "nblocks" fields additions in your branch ?
I cannot find such messages in my local clone.)
> Fetching the first sector of a track always makes an SCSI error.
If this is a real error (despite "sts 0") then it would be interesting
to learn the Sense bytes and especially KEY, ASC, ASQ of the error.
They are supposed to be in
scsireq_t req.sense
with the number of the bytes in
scsireq_t req.senselen
if (req.retsts == SCCMD_SENSE).
If (req.sense[0] & 0x7f) is 0x72 or 0x73, then KEY, ASC, ASCQ are in
req.sense[1], req.sense[2], and req.sense[3] respectively. Such errors
cannot come from the drive but e.g. Linux emits them from its OS layers.
Else (0x70 or 0x71) KEY is in req.sense[2], ASC in req.sense[12],
ASCQ in req.sense[13]. This is the format specified by MMC for optical
drives.
(NetBSD knowledge taken from libburn which learned it from growisofs.
SCSI knowledge from SPC-3, MMC-5, SPC-1.)
Have a nice day :)
Thomas
- [Libcdio-devel] OpenBSD vs libcdio vs Audacious, Edd Barrett, 2019/01/26
- Re: [Libcdio-devel] OpenBSD vs libcdio vs Audacious,
Thomas Schmitt <=
- Re: [Libcdio-devel] OpenBSD vs libcdio vs Audacious, Edd Barrett, 2019/01/26
- Re: [Libcdio-devel] OpenBSD vs libcdio vs Audacious, Thomas Schmitt, 2019/01/26
- Re: [Libcdio-devel] OpenBSD vs libcdio vs Audacious, Edd Barrett, 2019/01/27
- Re: [Libcdio-devel] OpenBSD vs libcdio vs Audacious, Edd Barrett, 2019/01/27
- Re: [Libcdio-devel] OpenBSD vs libcdio vs Audacious, Thomas Schmitt, 2019/01/27
- Re: [Libcdio-devel] OpenBSD vs libcdio vs Audacious, Edd Barrett, 2019/01/27
- Re: [Libcdio-devel] OpenBSD vs libcdio vs Audacious, Thomas Schmitt, 2019/01/27
Re: [Libcdio-devel] OpenBSD vs libcdio vs Audacious, Thomas Schmitt, 2019/01/26
Re: [Libcdio-devel] OpenBSD vs libcdio vs Audacious, Rocky Bernstein, 2019/01/26