Deleted Added
full compact
sb16.c (193640) sb16.c (274035)
1/*-
2 * Copyright (c) 1999 Cameron Grant <cg@freebsd.org>
3 * Copyright (c) 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.

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

37
38#include <dev/sound/isa/sb.h>
39#include <dev/sound/chip.h>
40
41#include <isa/isavar.h>
42
43#include "mixer_if.h"
44
1/*-
2 * Copyright (c) 1999 Cameron Grant <cg@freebsd.org>
3 * Copyright (c) 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.

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

37
38#include <dev/sound/isa/sb.h>
39#include <dev/sound/chip.h>
40
41#include <isa/isavar.h>
42
43#include "mixer_if.h"
44
45SND_DECLARE_FILE("$FreeBSD: head/sys/dev/sound/isa/sb16.c 193640 2009-06-07 19:12:08Z ariff $");
45SND_DECLARE_FILE("$FreeBSD: head/sys/dev/sound/isa/sb16.c 274035 2014-11-03 11:11:45Z bapt $");
46
47#define SB16_BUFFSIZE 4096
48#define PLAIN_SB16(x) ((((x)->bd_flags) & (BD_F_SB16|BD_F_SB16X)) == BD_F_SB16)
49
50static u_int32_t sb16_fmt8[] = {
51 SND_FORMAT(AFMT_U8, 1, 0),
52 SND_FORMAT(AFMT_U8, 2, 0),
53 0

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

171 for (i = 0; i < 1000; i++) {
172 if ((sb_rd(sb, SBDSP_STATUS) & 0x80))
173 DELAY((i > 100)? 1000 : 10);
174 else {
175 sb_wr(sb, SBDSP_CMD, val);
176 return 1;
177 }
178 }
46
47#define SB16_BUFFSIZE 4096
48#define PLAIN_SB16(x) ((((x)->bd_flags) & (BD_F_SB16|BD_F_SB16X)) == BD_F_SB16)
49
50static u_int32_t sb16_fmt8[] = {
51 SND_FORMAT(AFMT_U8, 1, 0),
52 SND_FORMAT(AFMT_U8, 2, 0),
53 0

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

171 for (i = 0; i < 1000; i++) {
172 if ((sb_rd(sb, SBDSP_STATUS) & 0x80))
173 DELAY((i > 100)? 1000 : 10);
174 else {
175 sb_wr(sb, SBDSP_CMD, val);
176 return 1;
177 }
178 }
179#if __FreeBSD_version > 500000
180 if (curthread->td_intr_nesting_level == 0)
181 printf("sb_dspwr(0x%02x) timed out.\n", val);
179 if (curthread->td_intr_nesting_level == 0)
180 printf("sb_dspwr(0x%02x) timed out.\n", val);
182#endif
183 return 0;
184}
185
186static int
187sb_cmd(struct sb_info *sb, u_char val)
188{
189#if 0
190 printf("sb_cmd: %x\n", val);

--- 725 unchanged lines hidden ---
181 return 0;
182}
183
184static int
185sb_cmd(struct sb_info *sb, u_char val)
186{
187#if 0
188 printf("sb_cmd: %x\n", val);

--- 725 unchanged lines hidden ---