Deleted Added
full compact
mcd.c (29677) mcd.c (31016)
1/*
2 * Copyright 1993 by Holger Veit (data part)
3 * Copyright 1993 by Brian Moore (audio part)
4 * Changes Copyright 1993 by Gary Clark II
5 * Changes Copyright (C) 1994-1995 by Andrey A. Chernov, Moscow, Russia
6 *
7 * Rewrote probe routine to work on newer Mitsumi drives.
8 * Additional changes (C) 1994 by Jordan K. Hubbard

--- 26 unchanged lines hidden (view full) ---

35 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
36 * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
37 * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
38 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
39 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
40 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
41 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
42 *
1/*
2 * Copyright 1993 by Holger Veit (data part)
3 * Copyright 1993 by Brian Moore (audio part)
4 * Changes Copyright 1993 by Gary Clark II
5 * Changes Copyright (C) 1994-1995 by Andrey A. Chernov, Moscow, Russia
6 *
7 * Rewrote probe routine to work on newer Mitsumi drives.
8 * Additional changes (C) 1994 by Jordan K. Hubbard

--- 26 unchanged lines hidden (view full) ---

35 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
36 * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
37 * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
38 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
39 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
40 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
41 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
42 *
43 * $Id: mcd.c,v 1.93 1997/07/20 14:10:06 bde Exp $
43 * $Id: mcd.c,v 1.94 1997/09/21 21:41:26 gibbs Exp $
44 */
45static const char COPYRIGHT[] = "mcd-driver (C)1993 by H.Veit & B.Moore";
46
47#include "mcd.h"
48#if NMCD > 0
49#include <sys/param.h>
50#include <sys/systm.h>
51#include <sys/conf.h>

--- 130 unchanged lines hidden (view full) ---

182static void mcd_soft_reset(int unit);
183static int mcd_hard_reset(int unit);
184static int mcd_setmode(int unit, int mode);
185static int mcd_getqchan(int unit, struct mcd_qchninfo *q);
186static int mcd_subchan(int unit, struct ioc_read_subchannel *sc);
187static int mcd_toc_header(int unit, struct ioc_toc_header *th);
188static int mcd_read_toc(int unit);
189static int mcd_toc_entrys(int unit, struct ioc_read_toc_entry *te);
44 */
45static const char COPYRIGHT[] = "mcd-driver (C)1993 by H.Veit & B.Moore";
46
47#include "mcd.h"
48#if NMCD > 0
49#include <sys/param.h>
50#include <sys/systm.h>
51#include <sys/conf.h>

--- 130 unchanged lines hidden (view full) ---

182static void mcd_soft_reset(int unit);
183static int mcd_hard_reset(int unit);
184static int mcd_setmode(int unit, int mode);
185static int mcd_getqchan(int unit, struct mcd_qchninfo *q);
186static int mcd_subchan(int unit, struct ioc_read_subchannel *sc);
187static int mcd_toc_header(int unit, struct ioc_toc_header *th);
188static int mcd_read_toc(int unit);
189static int mcd_toc_entrys(int unit, struct ioc_read_toc_entry *te);
190#if 0
190static int mcd_toc_entry(int unit, struct ioc_read_toc_single_entry *te);
191static int mcd_toc_entry(int unit, struct ioc_read_toc_single_entry *te);
192#endif
191static int mcd_stop(int unit);
192static int mcd_eject(int unit);
193static int mcd_inject(int unit);
194static int mcd_playtracks(int unit, struct ioc_play_track *pt);
195static int mcd_play(int unit, struct mcd_read2 *pb);
196static int mcd_playmsf(int unit, struct ioc_play_msf *pt);
197static int mcd_playblocks(int unit, struct ioc_play_blocks *);
198static int mcd_pause(int unit);

--- 1217 unchanged lines hidden (view full) ---

1416 bcd2bin(cd->toc[i].hd_pos_msf[2]));
1417 }
1418
1419 cd->flags |= MCDTOC;
1420
1421 return 0;
1422}
1423
193static int mcd_stop(int unit);
194static int mcd_eject(int unit);
195static int mcd_inject(int unit);
196static int mcd_playtracks(int unit, struct ioc_play_track *pt);
197static int mcd_play(int unit, struct mcd_read2 *pb);
198static int mcd_playmsf(int unit, struct ioc_play_msf *pt);
199static int mcd_playblocks(int unit, struct ioc_play_blocks *);
200static int mcd_pause(int unit);

--- 1217 unchanged lines hidden (view full) ---

1418 bcd2bin(cd->toc[i].hd_pos_msf[2]));
1419 }
1420
1421 cd->flags |= MCDTOC;
1422
1423 return 0;
1424}
1425
1426#if 0
1424static int
1425mcd_toc_entry(int unit, struct ioc_read_toc_single_entry *te)
1426{
1427 struct mcd_data *cd = mcd_data + unit;
1428 struct ioc_toc_header th;
1429 int rc, trk;
1430
1431 if (te->address_format != CD_MSF_FORMAT

--- 34 unchanged lines hidden (view full) ---

1466 te->entry.addr.msf.frame = bcd2bin(cd->toc[trk].hd_pos_msf[2]);
1467 break;
1468 case CD_LBA_FORMAT:
1469 te->entry.addr.lba = htonl(msf2hsg(cd->toc[trk].hd_pos_msf, 0));
1470 break;
1471 }
1472 return 0;
1473}
1427static int
1428mcd_toc_entry(int unit, struct ioc_read_toc_single_entry *te)
1429{
1430 struct mcd_data *cd = mcd_data + unit;
1431 struct ioc_toc_header th;
1432 int rc, trk;
1433
1434 if (te->address_format != CD_MSF_FORMAT

--- 34 unchanged lines hidden (view full) ---

1469 te->entry.addr.msf.frame = bcd2bin(cd->toc[trk].hd_pos_msf[2]);
1470 break;
1471 case CD_LBA_FORMAT:
1472 te->entry.addr.lba = htonl(msf2hsg(cd->toc[trk].hd_pos_msf, 0));
1473 break;
1474 }
1475 return 0;
1476}
1477#endif
1474
1475static int
1476mcd_toc_entrys(int unit, struct ioc_read_toc_entry *te)
1477{
1478 struct mcd_data *cd = mcd_data + unit;
1479 struct cd_toc_entry entries[MCD_MAXTOCS];
1480 struct ioc_toc_header th;
1481 int rc, n, trk, len;

--- 365 unchanged lines hidden ---
1478
1479static int
1480mcd_toc_entrys(int unit, struct ioc_read_toc_entry *te)
1481{
1482 struct mcd_data *cd = mcd_data + unit;
1483 struct cd_toc_entry entries[MCD_MAXTOCS];
1484 struct ioc_toc_header th;
1485 int rc, n, trk, len;

--- 365 unchanged lines hidden ---