Deleted Added
full compact
es137x.c (84658) es137x.c (94767)
1/*
2 * Support the ENSONIQ AudioPCI board and Creative Labs SoundBlaster PCI
3 * boards based on the ES1370, ES1371 and ES1373 chips.
4 *
5 * Copyright (c) 1999 Russell Cattelan <cattelan@thebarn.com>
6 * Copyright (c) 1999 Cameron Grant <gandalf@vilnya.demon.co.uk>
7 * Copyright (c) 1998 by Joachim Kuebart. All rights reserved.
8 *

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

54
55#include <pci/pcireg.h>
56#include <pci/pcivar.h>
57
58#include <sys/sysctl.h>
59
60#include "mixer_if.h"
61
1/*
2 * Support the ENSONIQ AudioPCI board and Creative Labs SoundBlaster PCI
3 * boards based on the ES1370, ES1371 and ES1373 chips.
4 *
5 * Copyright (c) 1999 Russell Cattelan <cattelan@thebarn.com>
6 * Copyright (c) 1999 Cameron Grant <gandalf@vilnya.demon.co.uk>
7 * Copyright (c) 1998 by Joachim Kuebart. All rights reserved.
8 *

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

54
55#include <pci/pcireg.h>
56#include <pci/pcivar.h>
57
58#include <sys/sysctl.h>
59
60#include "mixer_if.h"
61
62SND_DECLARE_FILE("$FreeBSD: head/sys/dev/sound/pci/es137x.c 84658 2001-10-08 05:59:54Z cg $");
62SND_DECLARE_FILE("$FreeBSD: head/sys/dev/sound/pci/es137x.c 94767 2002-04-15 14:43:23Z roberto $");
63
64static int debug = 0;
65SYSCTL_INT(_debug, OID_AUTO, es_debug, CTLFLAG_RW, &debug, 0, "");
66
67#define MEM_MAP_REG 0x14
68
69/* PCI IDs of supported chips */
70#define ES1370_PCI_ID 0x50001274

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

590
591 return 0;
592}
593
594static int
595es1371_rdcd(kobj_t obj, void *s, int addr)
596{
597 int sl;
63
64static int debug = 0;
65SYSCTL_INT(_debug, OID_AUTO, es_debug, CTLFLAG_RW, &debug, 0, "");
66
67#define MEM_MAP_REG 0x14
68
69/* PCI IDs of supported chips */
70#define ES1370_PCI_ID 0x50001274

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

590
591 return 0;
592}
593
594static int
595es1371_rdcd(kobj_t obj, void *s, int addr)
596{
597 int sl;
598 unsigned t, x;
598 unsigned t, x = 0;
599 struct es_info *es = (struct es_info *)s;
600
601 if (debug > 0) printf("rdcodec addr 0x%x ... ", addr);
602
603 for (t = 0; t < 0x1000; t++)
604 if (!(x = bus_space_read_4(es->st, es->sh, ES1371_REG_CODEC) & CODEC_WIP))
605 break;
606 if (debug > 0) printf("loop 1 t 0x%x x 0x%x ", t, x);

--- 356 unchanged lines hidden ---
599 struct es_info *es = (struct es_info *)s;
600
601 if (debug > 0) printf("rdcodec addr 0x%x ... ", addr);
602
603 for (t = 0; t < 0x1000; t++)
604 if (!(x = bus_space_read_4(es->st, es->sh, ES1371_REG_CODEC) & CODEC_WIP))
605 break;
606 if (debug > 0) printf("loop 1 t 0x%x x 0x%x ", t, x);

--- 356 unchanged lines hidden ---