Date: Tue, 2 Feb 1999 18:33:22 +1100 (EST) From: Gregory Bond <gnb@itga.com.au> To: FreeBSD-gnats-submit@FreeBSD.ORG Subject: kern/9878: [PATCH] clean up compiler warnings in pcm driver Message-ID: <199902020733.SAA12536@hellcat.itga.com.au>
index | next in thread | raw e-mail
>Number: 9878
>Category: kern
>Synopsis: Some patches to remove compiler warnings from the pcm driver
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Mon Feb 1 23:40:00 PST 1999
>Closed-Date:
>Last-Modified:
>Originator: Gregory Bond
>Release: FreeBSD 3.0-STABLE i386
>Organization:
ITG Australia Ltd
>Environment:
FreeBSD hellcat.itga.com.au 3.0-STABLE FreeBSD 3.0-STABLE #7: Tue Feb 2 09:08:02 EST 1999 toor@hellcat.itga.com.au:/usr/src/sys/compile/Hellcat i386
>Description:
A couple of compiler warnings from the pcm0 driver. Mainly, they
look to be cut-n-paste remnants from the old voxware drivers.
One did have the side-effect of adding an unused 256-byte static
object to the kernel...
>How-To-Repeat:
config & compile a kernel with "device pcm0"
>Fix:
sb16_recmasks_[LR] from snd/sbcard.h are not used anywhere
(only reference is in the sound/* code which has its own sbcard.h)
fix es1370 pci probe routine signature
enable ugly hack to avoid doubly including dsp_ulaw[] from ulaw.h
ad1480 isa_dev id_intr vs id_ointr cleanups
(no slur on luigi is intended!)
--- /sys/i386/isa/snd/sbcard.h Mon Dec 14 16:07:05 1998
+++ i386/isa/snd/sbcard.h Tue Feb 2 18:16:05 1999
@@ -260,8 +260,6 @@
#ifdef __SGNXPRO__
mixer_tab sgnxpro_mix;
#endif
-static u_char sb16_recmasks_L[SOUND_MIXER_NRDEVICES];
-static u_char sb16_recmasks_R[SOUND_MIXER_NRDEVICES];
#else /* __SB_MIXER_C__ defined */
mixer_tab sbpro_mix = {
PMIX_ENT(SOUND_MIXER_VOLUME, 0x22, 4, 4, 0x22, 0, 4),
@@ -354,42 +352,6 @@
0x4b4b, /* Input gain */
0x4b4b}; /* Output gain */
#endif /* SM_GAMES */
-
-static u_char sb16_recmasks_L[SOUND_MIXER_NRDEVICES] =
-{
- 0x00, /* SOUND_MIXER_VOLUME */
- 0x00, /* SOUND_MIXER_BASS */
- 0x00, /* SOUND_MIXER_TREBLE */
- 0x40, /* SOUND_MIXER_SYNTH */
- 0x00, /* SOUND_MIXER_PCM */
- 0x00, /* SOUND_MIXER_SPEAKER */
- 0x10, /* SOUND_MIXER_LINE */
- 0x01, /* SOUND_MIXER_MIC */
- 0x04, /* SOUND_MIXER_CD */
- 0x00, /* SOUND_MIXER_IMIX */
- 0x00, /* SOUND_MIXER_ALTPCM */
- 0x00, /* SOUND_MIXER_RECLEV */
- 0x00, /* SOUND_MIXER_IGAIN */
- 0x00 /* SOUND_MIXER_OGAIN */
-};
-
-static u_char sb16_recmasks_R[SOUND_MIXER_NRDEVICES] =
-{
- 0x00, /* SOUND_MIXER_VOLUME */
- 0x00, /* SOUND_MIXER_BASS */
- 0x00, /* SOUND_MIXER_TREBLE */
- 0x20, /* SOUND_MIXER_SYNTH */
- 0x00, /* SOUND_MIXER_PCM */
- 0x00, /* SOUND_MIXER_SPEAKER */
- 0x08, /* SOUND_MIXER_LINE */
- 0x01, /* SOUND_MIXER_MIC */
- 0x02, /* SOUND_MIXER_CD */
- 0x00, /* SOUND_MIXER_IMIX */
- 0x00, /* SOUND_MIXER_ALTPCM */
- 0x00, /* SOUND_MIXER_RECLEV */
- 0x00, /* SOUND_MIXER_IGAIN */
- 0x00 /* SOUND_MIXER_OGAIN */
-};
/*
* Recording sources (SB Pro)
--- /sys/pci/es1370.c Thu Dec 31 19:14:27 1998
+++ pci/es1370.c Tue Feb 2 18:22:49 1999
@@ -53,6 +53,7 @@
#include <pci/es1370_reg.h>
#include <i386/isa/snd/sound.h>
+#define DSP_ULAW_NOT_WANTED
#include <i386/isa/snd/ulaw.h>
#if NPCI != 0
@@ -130,7 +131,7 @@
static void es_rd_map(void *, bus_dma_segment_t *, int, int);
static int es_wrabort(snddev_info *);
static void es_wr_map(void *, bus_dma_segment_t *, int, int);
-static char *es_pci_probe __P((pcici_t, pcidi_t));
+static const char *es_pci_probe __P((pcici_t, pcidi_t));
static void es_pci_attach __P((pcici_t, int));
static int es_rd_dmaupdate(snddev_info *);
static d_select_t es_select;
@@ -1021,7 +1022,7 @@
return (0);
}
-static char *
+static const char *
es_pci_probe(pcici_t tag, pcidi_t type)
{
if (type == ES1370_PCI_ID)
--- /sys/i386/isa/snd/ad1848.c Tue Feb 2 18:14:48 1999
+++ i386/isa/snd/ad1848.c Tue Feb 2 18:10:56 1999
@@ -1584,7 +1584,7 @@
}
dev->id_drq = d.drq[0] ; /* primary dma */
dev->id_irq = (1 << d.irq[0] ) ;
- dev->id_intr = pcmintr ;
+ dev->id_ointr = pcmintr ;
dev->id_flags = DV_F_DUAL_DMA | (d.drq[1] ) ;
tmp_d.synth_base = d.port[1]; /* XXX check this for yamaha */
@@ -1687,7 +1687,7 @@
}
dev->id_drq = d.drq[0] ; /* primary dma */
dev->id_irq = (1 << d.irq[0] ) ;
- dev->id_intr = pcmintr ;
+ dev->id_ointr = pcmintr ;
pcmattach(dev);
}
@@ -1752,7 +1752,7 @@
dev->id_drq = d.drq[0] ; /* primary dma */
dev->id_irq = (1 << d.irq[0] ) ;
- dev->id_intr = pcmintr ;
+ dev->id_ointr = pcmintr ;
dev->id_flags = DV_F_DUAL_DMA | d.drq[1] ;
tmp_d.audio_fmt |= AFMT_FULLDUPLEX ;
@@ -1815,7 +1815,7 @@
dev->id_iobase = d.port[2] - 4 ; /* room for 4 mss registers */
dev->id_drq = d.drq[1] ; /* XXX PLAY dma */
dev->id_irq = (1 << d.irq[0] ) ;
- dev->id_intr = pcmintr ;
+ dev->id_ointr = pcmintr ;
dev->id_flags = DV_F_DUAL_DMA | d.drq[0] ; /* REC dma */
tmp_d.io_base = d.port[2] - 4;
>Release-Note:
>Audit-Trail:
>Unformatted:
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message
home |
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199902020733.SAA12536>
