Deleted Added
full compact
sb16.c (119853) sb16.c (126695)
1/*
2 * Copyright (c) 1999 Cameron Grant <cg@freebsd.org>
3 * Copyright 1997,1998 Luigi Rizzo.
4 *
5 * Derived from files in the Voxware 3.5 distribution,
6 * Copyright by Hannu Savolainen 1994, under the same copyright
7 * conditions.
8 * All rights reserved.

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

33
34#include <dev/sound/isa/sb.h>
35#include <dev/sound/chip.h>
36
37#include <isa/isavar.h>
38
39#include "mixer_if.h"
40
1/*
2 * Copyright (c) 1999 Cameron Grant <cg@freebsd.org>
3 * Copyright 1997,1998 Luigi Rizzo.
4 *
5 * Derived from files in the Voxware 3.5 distribution,
6 * Copyright by Hannu Savolainen 1994, under the same copyright
7 * conditions.
8 * All rights reserved.

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

33
34#include <dev/sound/isa/sb.h>
35#include <dev/sound/chip.h>
36
37#include <isa/isavar.h>
38
39#include "mixer_if.h"
40
41SND_DECLARE_FILE("$FreeBSD: head/sys/dev/sound/isa/sb16.c 119853 2003-09-07 16:28:03Z cg $");
41SND_DECLARE_FILE("$FreeBSD: head/sys/dev/sound/isa/sb16.c 126695 2004-03-06 15:52:42Z matk $");
42
43#define SB16_BUFFSIZE 4096
44#define PLAIN_SB16(x) ((((x)->bd_flags) & (BD_F_SB16|BD_F_SB16X)) == BD_F_SB16)
45
46static u_int32_t sb16_fmt8[] = {
47 AFMT_U8,
48 AFMT_STEREO | AFMT_U8,
49 0

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

819 goto no;
820 }
821
822 if (!(pcm_getflags(dev) & SD_F_SIMPLEX))
823 snprintf(status2, SND_STATUSLEN, ":%ld", rman_get_start(sb->drq2));
824 else
825 status2[0] = '\0';
826
42
43#define SB16_BUFFSIZE 4096
44#define PLAIN_SB16(x) ((((x)->bd_flags) & (BD_F_SB16|BD_F_SB16X)) == BD_F_SB16)
45
46static u_int32_t sb16_fmt8[] = {
47 AFMT_U8,
48 AFMT_STEREO | AFMT_U8,
49 0

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

819 goto no;
820 }
821
822 if (!(pcm_getflags(dev) & SD_F_SIMPLEX))
823 snprintf(status2, SND_STATUSLEN, ":%ld", rman_get_start(sb->drq2));
824 else
825 status2[0] = '\0';
826
827 snprintf(status, SND_STATUSLEN, "at io 0x%lx irq %ld drq %ld%s bufsz %ud",
827 snprintf(status, SND_STATUSLEN, "at io 0x%lx irq %ld drq %ld%s bufsz %ud %s",
828 rman_get_start(sb->io_base), rman_get_start(sb->irq),
828 rman_get_start(sb->io_base), rman_get_start(sb->irq),
829 rman_get_start(sb->drq1), status2, sb->bufsize);
829 rman_get_start(sb->drq1), status2, sb->bufsize,
830 PCM_KLDSTRING(snd_sb16));
830
831 if (pcm_register(dev, sb, 1, 1))
832 goto no;
833 pcm_addchan(dev, PCMDIR_REC, &sb16chan_class, sb);
834 pcm_addchan(dev, PCMDIR_PLAY, &sb16chan_class, sb);
835
836 pcm_setstatus(dev, status);
837

--- 41 unchanged lines hidden ---
831
832 if (pcm_register(dev, sb, 1, 1))
833 goto no;
834 pcm_addchan(dev, PCMDIR_REC, &sb16chan_class, sb);
835 pcm_addchan(dev, PCMDIR_PLAY, &sb16chan_class, sb);
836
837 pcm_setstatus(dev, status);
838

--- 41 unchanged lines hidden ---