Date: Tue, 1 Sep 2020 21:27:35 +0000 (UTC) From: Mateusz Guzik <mjg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r365085 - in head/sys/dev/sound: . isa macio midi pci pci/hda pcm usb Message-ID: <202009012127.081LRZwg025034@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mjg Date: Tue Sep 1 21:27:34 2020 New Revision: 365085 URL: https://svnweb.freebsd.org/changeset/base/365085 Log: sound: clean up empty lines in .c and .h files Modified: head/sys/dev/sound/clone.h head/sys/dev/sound/isa/ad1816.c head/sys/dev/sound/isa/ad1816.h head/sys/dev/sound/isa/ess.c head/sys/dev/sound/isa/gusc.c head/sys/dev/sound/isa/mss.c head/sys/dev/sound/isa/mss.h head/sys/dev/sound/isa/sb.h head/sys/dev/sound/isa/sb16.c head/sys/dev/sound/isa/sb8.c head/sys/dev/sound/macio/aoa.c head/sys/dev/sound/macio/aoa.h head/sys/dev/sound/macio/davbus.c head/sys/dev/sound/macio/davbusreg.h head/sys/dev/sound/macio/i2s.c head/sys/dev/sound/macio/snapper.c head/sys/dev/sound/macio/tumbler.c head/sys/dev/sound/midi/midi.c head/sys/dev/sound/midi/mpu401.c head/sys/dev/sound/midi/sequencer.c head/sys/dev/sound/midi/sequencer.h head/sys/dev/sound/pci/allegro_reg.h head/sys/dev/sound/pci/als4000.c head/sys/dev/sound/pci/atiixp.c head/sys/dev/sound/pci/atiixp.h head/sys/dev/sound/pci/aureal.c head/sys/dev/sound/pci/aureal.h head/sys/dev/sound/pci/cmi.c head/sys/dev/sound/pci/csa.c head/sys/dev/sound/pci/csareg.h head/sys/dev/sound/pci/ds1-fw.h head/sys/dev/sound/pci/ds1.c head/sys/dev/sound/pci/ds1.h head/sys/dev/sound/pci/emu10k1.c head/sys/dev/sound/pci/emu10kx-midi.c head/sys/dev/sound/pci/emu10kx-pcm.c head/sys/dev/sound/pci/emu10kx.c head/sys/dev/sound/pci/emu10kx.h head/sys/dev/sound/pci/emuxkireg.h head/sys/dev/sound/pci/envy24.c head/sys/dev/sound/pci/envy24.h head/sys/dev/sound/pci/envy24ht.c head/sys/dev/sound/pci/envy24ht.h head/sys/dev/sound/pci/es137x.c head/sys/dev/sound/pci/fm801.c head/sys/dev/sound/pci/hda/hda_reg.h head/sys/dev/sound/pci/hda/hdaa.c head/sys/dev/sound/pci/hda/hdac.c head/sys/dev/sound/pci/hdspe-pcm.c head/sys/dev/sound/pci/ich.c head/sys/dev/sound/pci/ich.h head/sys/dev/sound/pci/maestro.c head/sys/dev/sound/pci/maestro3.c head/sys/dev/sound/pci/maestro_reg.h head/sys/dev/sound/pci/neomagic-coeff.h head/sys/dev/sound/pci/neomagic.h head/sys/dev/sound/pci/solo.c head/sys/dev/sound/pci/t4dwave.c head/sys/dev/sound/pci/t4dwave.h head/sys/dev/sound/pci/via8233.c head/sys/dev/sound/pci/via82c686.c head/sys/dev/sound/pcm/channel.h head/sys/dev/sound/pcm/dsp.c head/sys/dev/sound/pcm/feeder.c head/sys/dev/sound/pcm/feeder_eq.c head/sys/dev/sound/pcm/feeder_matrix.c head/sys/dev/sound/pcm/feeder_rate.c head/sys/dev/sound/pcm/g711.h head/sys/dev/sound/pcm/intpcm.h head/sys/dev/sound/pcm/mixer.c head/sys/dev/sound/pcm/sndstat.c head/sys/dev/sound/pcm/sndstat.h head/sys/dev/sound/pcm/sound.c head/sys/dev/sound/pcm/sound.h head/sys/dev/sound/pcm/vchan.c head/sys/dev/sound/usb/uaudio.c head/sys/dev/sound/usb/uaudio_pcm.c head/sys/dev/sound/usb/uaudioreg.h Modified: head/sys/dev/sound/clone.h ============================================================================== --- head/sys/dev/sound/clone.h Tue Sep 1 21:26:44 2020 (r365084) +++ head/sys/dev/sound/clone.h Tue Sep 1 21:27:34 2020 (r365085) @@ -99,7 +99,6 @@ struct snd_clone; #define SND_CLONE_DEVMASK SND_CLONE_ALLOC - void snd_timestamp(struct timespec *); struct snd_clone *snd_clone_create(int, int, int, uint32_t); Modified: head/sys/dev/sound/isa/ad1816.c ============================================================================== --- head/sys/dev/sound/isa/ad1816.c Tue Sep 1 21:26:44 2020 (r365084) +++ head/sys/dev/sound/isa/ad1816.c Tue Sep 1 21:27:34 2020 (r365085) @@ -671,7 +671,6 @@ static device_method_t ad1816_methods[] = { DEVMETHOD(device_probe, ad1816_probe), DEVMETHOD(device_attach, ad1816_attach), DEVMETHOD(device_detach, ad1816_detach), - { 0, 0 } }; @@ -685,5 +684,3 @@ DRIVER_MODULE(snd_ad1816, isa, ad1816_driver, pcm_devc DRIVER_MODULE(snd_ad1816, acpi, ad1816_driver, pcm_devclass, 0, 0); MODULE_DEPEND(snd_ad1816, sound, SOUND_MINVER, SOUND_PREFVER, SOUND_MAXVER); MODULE_VERSION(snd_ad1816, 1); - - Modified: head/sys/dev/sound/isa/ad1816.h ============================================================================== --- head/sys/dev/sound/isa/ad1816.h Tue Sep 1 21:26:44 2020 (r365084) +++ head/sys/dev/sound/isa/ad1816.h Tue Sep 1 21:27:34 2020 (r365085) @@ -94,4 +94,3 @@ #define AD1816_MIXER_DEVICES \ (SOUND_MASK_VOLUME | SOUND_MASK_PCM | SOUND_MASK_SYNTH | \ SOUND_MASK_LINE | SOUND_MASK_MIC | SOUND_MASK_CD | SOUND_MASK_IGAIN) - Modified: head/sys/dev/sound/isa/ess.c ============================================================================== --- head/sys/dev/sound/isa/ess.c Tue Sep 1 21:26:44 2020 (r365084) +++ head/sys/dev/sound/isa/ess.c Tue Sep 1 21:27:34 2020 (r365085) @@ -143,13 +143,11 @@ static int ess_stop(struct ess_chinfo *ch); static void ess_lock(struct ess_info *sc) { - sbc_lock(device_get_softc(sc->parent_dev)); } static void ess_unlock(struct ess_info *sc) { - sbc_unlock(device_get_softc(sc->parent_dev)); } @@ -468,7 +466,6 @@ ess_setupch(struct ess_info *sc, int ch, int dir, int int unsign = (fmt == AFMT_U8 || fmt == AFMT_U16_LE)? 1 : 0; u_int8_t spdval, fmtval; - spdval = (sc->newspeed)? ess_calcspeed9(&spd) : ess_calcspeed8(&spd); len = -len; @@ -932,7 +929,6 @@ static device_method_t ess_methods[] = { DEVMETHOD(device_attach, ess_attach), DEVMETHOD(device_detach, ess_detach), DEVMETHOD(device_resume, ess_resume), - { 0, 0 } }; @@ -1004,7 +1000,6 @@ static device_method_t esscontrol_methods[] = { DEVMETHOD(device_probe, esscontrol_probe), DEVMETHOD(device_attach, esscontrol_attach), DEVMETHOD(device_detach, esscontrol_detach), - { 0, 0 } }; Modified: head/sys/dev/sound/isa/gusc.c ============================================================================== --- head/sys/dev/sound/isa/gusc.c Tue Sep 1 21:26:44 2020 (r365084) +++ head/sys/dev/sound/isa/gusc.c Tue Sep 1 21:27:34 2020 (r365085) @@ -290,7 +290,6 @@ gusisa_probe(device_t dev) device_set_desc(dev, "Gravis UltraSound MAX"); return 0; } else { - /* * TODO: Support even older GUS cards. MIDI should work on * all models. Modified: head/sys/dev/sound/isa/mss.c ============================================================================== --- head/sys/dev/sound/isa/mss.c Tue Sep 1 21:26:44 2020 (r365084) +++ head/sys/dev/sound/isa/mss.c Tue Sep 1 21:27:34 2020 (r365085) @@ -767,7 +767,6 @@ mss_init(struct mss_info *mss, device_t dev) return 0; } - /* * main irq handler for the CS423x. The OPTi931 code is * a separate one. @@ -1073,7 +1072,6 @@ mss_trigger(struct mss_chinfo *ch, int go) return 0; } - /* * the opti931 seems to miss interrupts when working in full * duplex, so we try some heuristics to catch them. @@ -1527,7 +1525,6 @@ mss_detect(device_t dev, struct mss_info *mss) * b2-b0 = chip id; */ switch (id) { - case 0xa0: name = "CS4231A"; mss->bd_id = MD_CS42XX; @@ -1882,7 +1879,6 @@ static device_method_t mss_methods[] = { DEVMETHOD(device_detach, mss_detach), DEVMETHOD(device_suspend, mss_suspend), DEVMETHOD(device_resume, mss_resume), - { 0, 0 } }; @@ -2099,7 +2095,6 @@ opti_init(device_t dev, struct mss_info *mss) return ENXIO; } - switch (mss->bd_id) { case MD_OPTI924: opti_write(mss, 1, 0x80 | basebits); /* MSS mode */ @@ -2194,7 +2189,6 @@ static device_method_t pnpmss_methods[] = { DEVMETHOD(device_detach, mss_detach), DEVMETHOD(device_suspend, mss_suspend), DEVMETHOD(device_resume, mss_resume), - { 0, 0 } }; @@ -2280,7 +2274,6 @@ static device_method_t guspcm_methods[] = { DEVMETHOD(device_probe, guspcm_probe), DEVMETHOD(device_attach, guspcm_attach), DEVMETHOD(device_detach, mss_detach), - { 0, 0 } }; Modified: head/sys/dev/sound/isa/mss.h ============================================================================== --- head/sys/dev/sound/isa/mss.h Tue Sep 1 21:26:44 2020 (r365084) +++ head/sys/dev/sound/isa/mss.h Tue Sep 1 21:27:34 2020 (r365085) @@ -193,7 +193,6 @@ typedef struct mixer_def mixer_tab[32][2]; #define MSS_REC_DEVICES \ (SOUND_MASK_LINE | SOUND_MASK_MIC | SOUND_MASK_CD|SOUND_MASK_IMIX) - /* * Table of mixer registers. There is a default table for the * AD1848/CS423x clones, one for the OPTI931 and one for the @@ -242,7 +241,6 @@ MIX_NONE(SOUND_MIXER_LINE3), (SOUND_MASK_SYNTH | SOUND_MASK_PCM | SOUND_MASK_MIC | \ SOUND_MASK_CD | SOUND_MASK_IMIX | SOUND_MASK_IGAIN ) - mixer_ent opti930_devices[32][2] = { MIX_ENT(SOUND_MIXER_VOLUME, 22, 1, 0, 4, 23, 1, 0, 4), MIX_NONE(SOUND_MIXER_BASS), @@ -411,5 +409,3 @@ MIX_NONE(SOUND_MIXER_LINE3), #define OPL3SAx_HWVOL 0x17 /* HW Volume IRQ Configuration (R/W) */ #define OPL3SAx_HWVOL_IRQA 0x10 /* HW Volume IRQ on IRQ-A */ #define OPL3SAx_HWVOL_IRQB 0x20 /* HW Volume IRQ on IRQ-B */ - - Modified: head/sys/dev/sound/isa/sb.h ============================================================================== --- head/sys/dev/sound/isa/sb.h Tue Sep 1 21:26:44 2020 (r365084) +++ head/sys/dev/sound/isa/sb.h Tue Sep 1 21:27:34 2020 (r365085) @@ -86,7 +86,6 @@ void sbc_unlock(struct sbc_softc *); #define DSP_CMD_DAC2S_AUTO 0x1f /* auto 2-bit adpcm dma out (start) */ - /* SB16 commands */ #define DSP_CMD_O16 0xb0 #define DSP_CMD_I16 0xb8 @@ -112,7 +111,6 @@ void sbc_unlock(struct sbc_softc *); #define DSP_CMD_GETVER 0xE1 #define DSP_CMD_GETID 0xE7 /* return id bytes */ - #define DSP_CMD_OUT16 0x41 /* send parms for dma out on sb16 */ #define DSP_CMD_IN16 0x42 /* send parms for dma in on sb16 */ Modified: head/sys/dev/sound/isa/sb16.c ============================================================================== --- head/sys/dev/sound/isa/sb16.c Tue Sep 1 21:26:44 2020 (r365084) +++ head/sys/dev/sound/isa/sb16.c Tue Sep 1 21:27:34 2020 (r365085) @@ -125,19 +125,16 @@ static void sb_intr(void *arg); static void sb_lock(struct sb_info *sb) { - sbc_lock(device_get_softc(sb->parent_dev)); } static void sb_lockassert(struct sb_info *sb) { - sbc_lockassert(device_get_softc(sb->parent_dev)); } static void sb_unlock(struct sb_info *sb) { - sbc_unlock(device_get_softc(sb->parent_dev)); } @@ -336,7 +333,7 @@ static int rel2abs_volume(int x, int max) { int temp; - + temp = ((x * max) + 50) / 100; if (temp > max) temp = max; @@ -899,7 +896,6 @@ static device_method_t sb16_methods[] = { DEVMETHOD(device_probe, sb16_probe), DEVMETHOD(device_attach, sb16_attach), DEVMETHOD(device_detach, sb16_detach), - { 0, 0 } }; Modified: head/sys/dev/sound/isa/sb8.c ============================================================================== --- head/sys/dev/sound/isa/sb8.c Tue Sep 1 21:26:44 2020 (r365084) +++ head/sys/dev/sound/isa/sb8.c Tue Sep 1 21:27:34 2020 (r365085) @@ -116,13 +116,11 @@ static int sb_stop(struct sb_chinfo *ch); static void sb_lock(struct sb_info *sb) { - sbc_lock(device_get_softc(sb->parent_dev)); } static void sb_unlock(struct sb_info *sb) { - sbc_unlock(device_get_softc(sb->parent_dev)); } @@ -789,7 +787,6 @@ static device_method_t sb_methods[] = { DEVMETHOD(device_probe, sb_probe), DEVMETHOD(device_attach, sb_attach), DEVMETHOD(device_detach, sb_detach), - { 0, 0 } }; @@ -803,7 +800,3 @@ DRIVER_MODULE(snd_sb8, sbc, sb_driver, pcm_devclass, 0 MODULE_DEPEND(snd_sb8, sound, SOUND_MINVER, SOUND_PREFVER, SOUND_MAXVER); MODULE_DEPEND(snd_sb8, snd_sbc, 1, 1, 1); MODULE_VERSION(snd_sb8, 1); - - - - Modified: head/sys/dev/sound/macio/aoa.c ============================================================================== --- head/sys/dev/sound/macio/aoa.c Tue Sep 1 21:26:44 2020 (r365084) +++ head/sys/dev/sound/macio/aoa.c Tue Sep 1 21:27:34 2020 (r365085) @@ -130,7 +130,7 @@ aoa_dma_create(struct aoa_softc *sc) dma->tag = tag; dma->bufsz = AOA_BUFFER_SIZE; dma->blksz = PAGE_SIZE; /* initial blocksize */ - + mtx_init(&dma->mutex, "AOA", NULL, MTX_DEF); sc->sc_intrp = dma; @@ -215,7 +215,7 @@ aoa_chan_getptr(kobj_t obj, void *data) if (!dma->running) return (0); - + return (dma->slot * dma->blksz); } @@ -327,7 +327,6 @@ aoa_interrupt(void *xsc) mtx_lock(&dma->mutex); while (dbdma_get_cmd_status(dma->channel, dma->slot)) { - dbdma_clear_cmd_status(dma->channel, dma->slot); dma->slot = (dma->slot + 1) % dma->slots; @@ -389,4 +388,3 @@ aoa_attach(void *xsc) return (0); } - Modified: head/sys/dev/sound/macio/aoa.h ============================================================================== --- head/sys/dev/sound/macio/aoa.h Tue Sep 1 21:26:44 2020 (r365084) +++ head/sys/dev/sound/macio/aoa.h Tue Sep 1 21:27:34 2020 (r365085) @@ -46,4 +46,3 @@ void aoa_interrupt(void *); int aoa_attach(void *xsc); #endif /* SOUND_AOA_H */ - Modified: head/sys/dev/sound/macio/davbus.c ============================================================================== --- head/sys/dev/sound/macio/davbus.c Tue Sep 1 21:26:44 2020 (r365084) +++ head/sys/dev/sound/macio/davbus.c Tue Sep 1 21:27:34 2020 (r365085) @@ -78,7 +78,6 @@ static device_method_t pcm_davbus_methods[] = { /* Device interface. */ DEVMETHOD(device_probe, davbus_probe), DEVMETHOD(device_attach, davbus_attach), - { 0, 0 } }; @@ -105,7 +104,7 @@ davbus_probe(device_t self) if (strcmp(name, "davbus") != 0) return (ENXIO); - + device_set_desc(self, "Apple DAVBus Audio Controller"); return (0); @@ -159,7 +158,7 @@ burgundy_init(struct snd_mixer *m) mtx_lock(&d->mutex); burgundy_write_locked(d, 0x16700, 0x40); - + burgundy_write_locked(d, BURGUNDY_MIX0_REG, 0); burgundy_write_locked(d, BURGUNDY_MIX1_REG, 0); burgundy_write_locked(d, BURGUNDY_MIX2_REG, BURGUNDY_MIX_ISA); @@ -374,7 +373,6 @@ screamer_reinit(struct snd_mixer *m) return (0); } - static void screamer_write_locked(struct davbus_softc *d, u_int reg, u_int val) { @@ -529,7 +527,7 @@ davbus_attach(device_t self) return (ENXIO); oirq = rman_get_start(dbdma_irq); - + DPRINTF(("interrupting at irq %d\n", oirq)); err = powerpc_config_intr(oirq, INTR_TRIGGER_EDGE, INTR_POLARITY_LOW); @@ -556,7 +554,7 @@ davbus_attach(device_t self) if (cintr != NULL) bus_setup_intr(self, cintr, INTR_TYPE_MISC | INTR_MPSAFE, NULL, davbus_cint, sc, &cookie); - + /* Initialize controller registers. */ bus_write_4(sc->reg, DAVBUS_SOUND_CTRL, DAVBUS_INPUT_SUBFRAME0 | DAVBUS_OUTPUT_SUBFRAME0 | DAVBUS_RATE_44100 | DAVBUS_INTR_PORTCHG); @@ -589,7 +587,6 @@ davbus_cint(void *ptr) status = bus_read_4(d->reg, DAVBUS_CODEC_STATUS); if (d->read_status && d->set_outputs) { - mask = (*d->read_status)(d, status); (*d->set_outputs)(d, mask); } @@ -600,4 +597,3 @@ davbus_cint(void *ptr) mtx_unlock(&d->mutex); } - Modified: head/sys/dev/sound/macio/davbusreg.h ============================================================================== --- head/sys/dev/sound/macio/davbusreg.h Tue Sep 1 21:26:44 2020 (r365084) +++ head/sys/dev/sound/macio/davbusreg.h Tue Sep 1 21:27:34 2020 (r365085) @@ -78,7 +78,6 @@ /* DAVBUS_CODEC_CTRL bit definitions. */ #define DAVBUS_CODEC_BUSY 0x01000000 - /* * Burgundy Codec Control Bits */ @@ -235,7 +234,6 @@ #define SCREAMER_CODEC_EMSEL2 0x00800000 #define SCREAMER_CODEC_EMSEL4 0x00c00000 - /* cc0 */ /* * Bits 7-4 specify the left ADC input gain; @@ -284,4 +282,3 @@ #define SCREAMER_STATUS_REVSHFT 12 #endif /* _SOUND_DAVBUS_H */ - Modified: head/sys/dev/sound/macio/i2s.c ============================================================================== --- head/sys/dev/sound/macio/i2s.c Tue Sep 1 21:26:44 2020 (r365084) +++ head/sys/dev/sound/macio/i2s.c Tue Sep 1 21:27:34 2020 (r365085) @@ -111,7 +111,6 @@ static device_method_t pcm_i2s_methods[] = { /* Device interface. */ DEVMETHOD(device_probe, i2s_probe), DEVMETHOD(device_attach, i2s_attach), - { 0, 0 } }; @@ -131,7 +130,6 @@ static device_method_t aoagpio_methods[] = { /* Device interface. */ DEVMETHOD(device_probe, aoagpio_probe), DEVMETHOD(device_attach, aoagpio_attach), - { 0, 0 } }; @@ -152,7 +150,6 @@ static devclass_t aoagpio_devclass; DRIVER_MODULE(aoagpio, macgpio, aoagpio_driver, aoagpio_devclass, 0, 0); - /***************************************************************************** Probe and attachment routines. *****************************************************************************/ @@ -179,7 +176,7 @@ i2s_probe(device_t self) if (subchild != 0 && OF_getprop(subchild, "name", subchildname, sizeof(subchildname)) > 0 && strcmp(subchildname, "lightshow") == 0) return (ENXIO); - + device_set_desc(self, "Apple I2S Audio Controller"); return (0); @@ -195,7 +192,7 @@ i2s_attach(device_t self) void *dbdma_ih; int rid, oirq, err; phandle_t port; - + sc = malloc(sizeof(*sc), M_DEVBUF, M_WAITOK | M_ZERO); sc->aoa.sc_dev = self; @@ -207,7 +204,7 @@ i2s_attach(device_t self) sc->soundnode = of_find_firstchild_byname(port, "sound"); if (sc->soundnode == -1) return (ENXIO); - + mtx_init(&sc->port_mtx, "port_mtx", NULL, MTX_DEF); /* Map the controller register space. */ @@ -305,7 +302,7 @@ aoagpio_int(void *cookie) struct aoagpio_softc *sc; sc = device_get_softc(self); - + if (macgpio_read(self) & GPIO_LEVEL_RO) sc->level = sc->detect_active; else @@ -460,7 +457,7 @@ i2s_setup(struct i2s_softc *sc, u_int rate, u_int word if (sclk_fs != 32 && sclk_fs != 64) return (EINVAL); - + /* * Find a clock source to derive the master clock (MCLK) * and the I2S bit block (SCLK) and set the divisors as @@ -478,7 +475,7 @@ i2s_setup(struct i2s_softc *sc, u_int rate, u_int word } if (reg == 0) return (EINVAL); - + switch (mdiv) { /* exception cases */ case 1: @@ -514,7 +511,7 @@ i2s_setup(struct i2s_softc *sc, u_int rate, u_int word * revisited if we want to add recording from SPDIF some day. */ reg |= SCLK_MASTER; - + switch (sclk_fs) { case 64: reg |= SERIAL_64x; @@ -582,7 +579,6 @@ i2s_setup(struct i2s_softc *sc, u_int rate, u_int word return (0); } - /* XXX this does not belong here. */ static phandle_t of_find_firstchild_byname(phandle_t node, const char *req_name) @@ -601,7 +597,6 @@ of_find_firstchild_byname(phandle_t node, const char * return (-1); } - static u_int gpio_read(enum gpio_ctrl ctrl) { @@ -669,7 +664,7 @@ i2s_audio_hw_reset(struct i2s_softc *sc) gpio_write(AUDIO_HW_RESET, !reset_active); /* Negate RESET */ DELAY(RESET_RELEASE_TIME); - + } else { DPRINTF(("no audio_hw_reset\n")); } @@ -762,4 +757,3 @@ i2s_postattach(void *xsc) config_intrhook_disestablish(i2s_delayed_attach); free(i2s_delayed_attach, M_TEMP); } - Modified: head/sys/dev/sound/macio/snapper.c ============================================================================== --- head/sys/dev/sound/macio/snapper.c Tue Sep 1 21:26:44 2020 (r365084) +++ head/sys/dev/sound/macio/snapper.c Tue Sep 1 21:27:34 2020 (r365085) @@ -108,7 +108,6 @@ static device_method_t snapper_methods[] = { /* Device interface. */ DEVMETHOD(device_probe, snapper_probe), DEVMETHOD(device_attach, snapper_attach), - { 0, 0 } }; @@ -190,7 +189,6 @@ MIXER_DECLARE(snapper_mixer); #define SNAPPER_ACR_INP_B 0x02 /* B */ #define SNAPPER_ACR_APD 0x01 /* Analog power down */ - struct snapper_reg { u_char MCR1[1]; u_char DRC[6]; @@ -491,4 +489,3 @@ snapper_setrecsrc(struct snd_mixer *m, u_int32_t src) { return (0); } - Modified: head/sys/dev/sound/macio/tumbler.c ============================================================================== --- head/sys/dev/sound/macio/tumbler.c Tue Sep 1 21:26:44 2020 (r365084) +++ head/sys/dev/sound/macio/tumbler.c Tue Sep 1 21:27:34 2020 (r365085) @@ -108,7 +108,6 @@ static device_method_t tumbler_methods[] = { /* Device interface. */ DEVMETHOD(device_probe, tumbler_probe), DEVMETHOD(device_attach, tumbler_attach), - { 0, 0 } }; @@ -437,4 +436,3 @@ tumbler_setrecsrc(struct snd_mixer *m, u_int32_t src) { return (0); } - Modified: head/sys/dev/sound/midi/midi.c ============================================================================== --- head/sys/dev/sound/midi/midi.c Tue Sep 1 21:26:44 2020 (r365084) +++ head/sys/dev/sound/midi/midi.c Tue Sep 1 21:27:34 2020 (r365085) @@ -142,7 +142,6 @@ static synth_alloc_t midisynth_alloc; static synth_controller_t midisynth_controller; static synth_bender_t midisynth_bender; - static kobj_method_t midisynth_methods[] = { KOBJMETHOD(synth_open, midisynth_open), KOBJMETHOD(synth_close, midisynth_close), @@ -175,7 +174,6 @@ DEFINE_CLASS(midisynth, midisynth_methods, 0); * */ - /* * midi_devs tailq, holder of all rmidi instances protected by midistat_lock */ @@ -207,7 +205,6 @@ static struct cdevsw midistat_cdevsw = { .d_name = "midistat", }; - /* * /dev/rmidi dev_t declarations, struct variable access is protected by * locks contained within the structure. @@ -452,7 +449,6 @@ static int midi_lengths[] = {2, 2, 2, 2, 1, 1, 2, 0}; #define MIDI_SYSEX_START 0xF0 #define MIDI_SYSEX_END 0xF7 - int midi_in(struct snd_midi *m, MIDI_TYPE *buf, int size) { @@ -481,7 +477,6 @@ midi_in(struct snd_midi *m, MIDI_TYPE *buf, int size) return size; for (i = sig = 0; i < size; i++) { - data = buf[i]; enq = 0; if (data == MIDI_ACK) @@ -621,7 +616,6 @@ midi_out(struct snd_midi *m, MIDI_TYPE *buf, int size) return used; } - /* * /dev/rmidi#.# device access functions */ @@ -816,7 +810,6 @@ midi_write(struct cdev *i_dev, struct uio *uio, int io int used; char buf[MIDI_WSIZE]; - MIDI_DEBUG(4, printf("midi_write\n")); retval = 0; if (m == NULL) @@ -865,7 +858,6 @@ midi_write(struct cdev *i_dev, struct uio *uio, int io uio->uio_resid, (intmax_t)MIDIQ_LEN(m->outq), (intmax_t)MIDIQ_AVAIL(m->outq))); - MIDI_DEBUG(5, printf("midi_write: uiomove cc=%d\n", used)); retval = uiomove(buf, used, uio); if (retval) @@ -1074,7 +1066,6 @@ midi_cmdname(int cmd) * midisynth */ - int midisynth_open(void *n, void *arg, int flags) { @@ -1132,7 +1123,6 @@ midisynth_open(void *n, void *arg, int flags) MPU_CALLBACK(m, m->cookie, m->flags); - err: mtx_unlock(&m->qlock); mtx_unlock(&m->lock); MIDI_DEBUG(2, printf("midisynth_open: return %d.\n", retval)); @@ -1279,7 +1269,6 @@ midisynth_killnote(void *n, uint8_t chn, uint8_t note, { u_char c[3]; - if (note > 127 || chn > 15) return (EINVAL); @@ -1354,7 +1343,6 @@ static int midisynth_bender(void *n, uint8_t chn, uint16_t val) { u_char c[3]; - if (val > 16383 || chn > 15) return EINVAL; Modified: head/sys/dev/sound/midi/mpu401.c ============================================================================== --- head/sys/dev/sound/midi/mpu401.c Tue Sep 1 21:26:44 2020 (r365084) +++ head/sys/dev/sound/midi/mpu401.c Tue Sep 1 21:27:34 2020 (r365085) @@ -241,7 +241,6 @@ mpu401_minit(struct snd_midi *sm, void *arg) return 1; } - int mpu401_muninit(struct snd_midi *sm, void *arg) { Modified: head/sys/dev/sound/midi/sequencer.c ============================================================================== --- head/sys/dev/sound/midi/sequencer.c Tue Sep 1 21:26:44 2020 (r365084) +++ head/sys/dev/sound/midi/sequencer.c Tue Sep 1 21:27:34 2020 (r365085) @@ -310,7 +310,6 @@ static void timer_setvals(struct seq_softc *t, int tem static void timer_wait(struct seq_softc *t, int ticks, int wait_abs); static int timer_now(struct seq_softc *t); - static void timer_start(struct seq_softc *t) { @@ -1011,7 +1010,6 @@ mseq_write(struct cdev *i_dev, struct uio *uio, int io /* Have a look at the event code. */ if (ev_code == SEQ_FULLSIZE) { - /* * TODO: restore code for SEQ_FULLSIZE */ @@ -1044,7 +1042,6 @@ mseq_write(struct cdev *i_dev, struct uio *uio, int io mtx_lock(&scp->seq_lock); if (retval) goto err0; - } retval = 0; goto err0; @@ -1111,7 +1108,6 @@ mseq_write(struct cdev *i_dev, struct uio *uio, int io goto err0; #endif } - } scp->playing = 1; @@ -1837,7 +1833,6 @@ seq_chncommon(struct seq_softc *scp, kobj_t md, u_char printf("seq_chncommon event type %d not handled.\n", event[1])); break; - } mtx_lock(&scp->seq_lock); return ret; @@ -2028,7 +2023,6 @@ seq_sync(struct seq_softc *scp) * the queue is moving along. If it isn't just abort. */ while (!MIDIQ_EMPTY(scp->out_q)) { - if (!scp->playing) { scp->playing = 1; cv_broadcast(&scp->state_cv); Modified: head/sys/dev/sound/midi/sequencer.h ============================================================================== --- head/sys/dev/sound/midi/sequencer.h Tue Sep 1 21:26:44 2020 (r365084) +++ head/sys/dev/sound/midi/sequencer.h Tue Sep 1 21:27:34 2020 (r365085) @@ -36,7 +36,6 @@ #ifndef _SEQUENCER_H_ #define _SEQUENCER_H_ - #define NSEQ_MAX 16 /* Modified: head/sys/dev/sound/pci/allegro_reg.h ============================================================================== --- head/sys/dev/sound/pci/allegro_reg.h Tue Sep 1 21:26:44 2020 (r365084) +++ head/sys/dev/sound/pci/allegro_reg.h Tue Sep 1 21:27:34 2020 (r365085) @@ -148,7 +148,6 @@ #define PCI_DDMA_CTRL 0x60 #define DDMA_ENABLE 0x00000001 - /* Allegro registers */ #define HOST_INT_CTRL 0x18 #define SB_INT_ENABLE 0x0001 @@ -446,7 +445,6 @@ #error Data memory map length too short. #endif - /* * Kernel code memory definition */ @@ -455,7 +453,6 @@ #define KCODE_VECTORS_END 0x002F #define KCODE_VECTORS_UNIT_LENGTH 0x0002 #define KCODE_VECTORS_LENGTH (KCODE_VECTORS_END - KCODE_VECTORS_BEGIN + 1) - /* * Kernel data memory definition Modified: head/sys/dev/sound/pci/als4000.c ============================================================================== --- head/sys/dev/sound/pci/als4000.c Tue Sep 1 21:26:44 2020 (r365084) +++ head/sys/dev/sound/pci/als4000.c Tue Sep 1 21:27:34 2020 (r365085) @@ -312,7 +312,6 @@ als_set_speed(struct sc_chinfo *ch) /* ------------------------------------------------------------------------- */ /* Playback channel implementation */ - #define ALS_8BIT_CMD(x, y) { (x), (y), DSP_DMA8, DSP_CMD_DMAPAUSE_8 } #define ALS_16BIT_CMD(x, y) { (x), (y), DSP_DMA16, DSP_CMD_DMAPAUSE_16 } @@ -895,7 +894,6 @@ static int als_pci_resume(device_t dev) { struct sc_info *sc = pcm_getdevinfo(dev); - snd_mtxlock(sc->lock); if (als_init(sc) != 0) { Modified: head/sys/dev/sound/pci/atiixp.c ============================================================================== --- head/sys/dev/sound/pci/atiixp.c Tue Sep 1 21:26:44 2020 (r365084) +++ head/sys/dev/sound/pci/atiixp.c Tue Sep 1 21:27:34 2020 (r365085) @@ -1291,7 +1291,6 @@ atiixp_pci_attach(device_t dev) sizeof(struct atiixp_dma_op), atiixp_dma_cb, sc, 0)) goto bad; - atiixp_chip_pre_init(sc); sc->delayed_attach.ich_func = atiixp_chip_post_init; Modified: head/sys/dev/sound/pci/atiixp.h ============================================================================== --- head/sys/dev/sound/pci/atiixp.h Tue Sep 1 21:26:44 2020 (r365084) +++ head/sys/dev/sound/pci/atiixp.h Tue Sep 1 21:27:34 2020 (r365085) @@ -34,7 +34,7 @@ /* * Constants, pretty much FreeBSD specific. */ - + /* Number of playback / recording channel */ #define ATI_IXP_NPCHAN 1 #define ATI_IXP_NRCHAN 1 Modified: head/sys/dev/sound/pci/aureal.c ============================================================================== --- head/sys/dev/sound/pci/aureal.c Tue Sep 1 21:26:44 2020 (r365084) +++ head/sys/dev/sound/pci/aureal.c Tue Sep 1 21:27:34 2020 (r365085) @@ -434,7 +434,6 @@ au_intr (void *p) au_rd(au, 0, AU_REG_IRQSRC, 4); } - /* -------------------------------------------------------------------- */ /* Probe and attach the card */ @@ -673,7 +672,6 @@ static device_method_t au_methods[] = { /* Device interface */ DEVMETHOD(device_probe, au_pci_probe), DEVMETHOD(device_attach, au_pci_attach), - { 0, 0 } }; Modified: head/sys/dev/sound/pci/aureal.h ============================================================================== --- head/sys/dev/sound/pci/aureal.h Tue Sep 1 21:26:44 2020 (r365084) +++ head/sys/dev/sound/pci/aureal.h Tue Sep 1 21:27:34 2020 (r365085) @@ -97,5 +97,4 @@ #define AC97_REG_ID1 0x7c #define AC97_REG_ID2 0x7e - #endif Modified: head/sys/dev/sound/pci/cmi.c ============================================================================== --- head/sys/dev/sound/pci/cmi.c Tue Sep 1 21:26:44 2020 (r365084) +++ head/sys/dev/sound/pci/cmi.c Tue Sep 1 21:27:34 2020 (r365085) @@ -269,7 +269,6 @@ cmi_dma_prog(struct sc_info *sc, struct sc_chinfo *ch, cmi_wr(sc, base + 6, i, 2); } - static void cmi_ch0_start(struct sc_info *sc, struct sc_chinfo *ch) { @@ -544,7 +543,6 @@ cmi_intr(void *data) snd_mtxlock(sc->lock); intrstat = cmi_rd(sc, CMPCI_REG_INTR_STATUS, 4); if ((intrstat & CMPCI_REG_ANY_INTR) != 0) { - toclear = 0; if (intrstat & CMPCI_REG_CH0_INTR) { toclear |= CMPCI_REG_CH0_INTR_ENABLE; @@ -571,7 +569,6 @@ cmi_intr(void *data) snd_mtxlock(sc->lock); cmi_set4(sc, CMPCI_REG_INTR_CTRL, toclear); - } } if(sc->mpu_intr) { @@ -843,8 +840,6 @@ cmi_midiattach(struct sc_info *sc) { cmi_set4(sc, CMPCI_REG_FUNC_1, CMPCI_REG_UART_ENABLE); sc->mpu = mpu401_init(&cmi_mpu_class, sc, cmi_intr, &sc->mpu_intr); } - - /* ------------------------------------------------------------------------- */ /* Power and reset */ Modified: head/sys/dev/sound/pci/csa.c ============================================================================== --- head/sys/dev/sound/pci/csa.c Tue Sep 1 21:26:44 2020 (r365084) +++ head/sys/dev/sound/pci/csa.c Tue Sep 1 21:27:34 2020 (r365085) @@ -876,7 +876,7 @@ static int csa_transferimage(csa_res *resp, u_int32_t *src, u_long dest, u_long len) { u_long ul; - + /* * We do not allow DMAs from host memory to host memory (although the DMA * can do it) and we do not allow DMAs which are not a multiple of 4 bytes Modified: head/sys/dev/sound/pci/csareg.h ============================================================================== --- head/sys/dev/sound/pci/csareg.h Tue Sep 1 21:26:44 2020 (r365084) +++ head/sys/dev/sound/pci/csareg.h Tue Sep 1 21:27:34 2020 (r365085) @@ -1971,5 +1971,4 @@ struct cs461x_firmware_struct u_int32_t BA1Array[INKY_BA1_DWORD_SIZE]; }; - #endif /* _CSA_REG_H */ Modified: head/sys/dev/sound/pci/ds1-fw.h ============================================================================== --- head/sys/dev/sound/pci/ds1-fw.h Tue Sep 1 21:26:44 2020 (r365084) +++ head/sys/dev/sound/pci/ds1-fw.h Tue Sep 1 21:27:34 2020 (r365085) @@ -1601,4 +1601,3 @@ static u_int32_t CntrlInst1E[] = { }; #endif - Modified: head/sys/dev/sound/pci/ds1.c ============================================================================== --- head/sys/dev/sound/pci/ds1.c Tue Sep 1 21:26:44 2020 (r365084) +++ head/sys/dev/sound/pci/ds1.c Tue Sep 1 21:27:34 2020 (r365085) @@ -765,7 +765,6 @@ ds_intr(void *p) i = ds_rd(sc, YDSXGR_MODE, 4); if (x) ds_wr(sc, YDSXGR_MODE, i | 0x00000002, 4); - } snd_mtxunlock(sc->lock); } Modified: head/sys/dev/sound/pci/ds1.h ============================================================================== --- head/sys/dev/sound/pci/ds1.h Tue Sep 1 21:26:44 2020 (r365084) +++ head/sys/dev/sound/pci/ds1.h Tue Sep 1 21:27:34 2020 (r365085) @@ -8,7 +8,6 @@ * $FreeBSD$ */ - /* ----- YAMAHA DS-XG Devices -------------------------------------------- */ #define YAMAHA 0x1073 #define YMF724 0x0004 @@ -23,34 +22,28 @@ #define YMF738_TEG 0x0006 #define DEVICE4CH(x) ((x == YMF738) || (x == YMF744) || (x == YMF754)) - #define PCIR_DSXGCTRL 0x48 /* ----- interrupt flag -------------------------------------------------- */ #define YDSXG_DEFINT 0x01 #define YDSXG_TIMERINT 0x02 - /* ----- AC97 ------------------------------------------------------------ */ #define YDSXG_AC97TIMEOUT 1000 #define YDSXG_AC97READCMD 0x8000 #define YDSXG_AC97WRITECMD 0x0000 #define YDSXG_AC97READFALSE 0xFFFF - /* ----- AC97 register map _---------------------------------------------- */ #define AC97R_GPIOSTATUS 0x54 - /* ----- work buffer ----------------------------------------------------- */ #define DEF_WORKBUFFLENGTH 0x0400 - /* ----- register size --------------------------------------------------- */ #define YDSXG_MAPLENGTH 0x8000 #define YDSXG_DSPLENGTH 0x0080 #define YDSXG_CTRLLENGTH 0x3000 - /* ----- register map ---------------------------------------------------- */ #define YDSXGR_INTFLAG 0x0004 #define YDSXGR_ACTIVITY 0x0006 @@ -150,7 +143,5 @@ #define YDSXGR_DSPINSTRAM 0x1000 #define YDSXGR_CTRLINSTRAM 0x4000 - /* ----- time out -------------------------------------------------------- */ #define YDSXG_WORKBITTIMEOUT 250000 - Modified: head/sys/dev/sound/pci/emu10k1.c ============================================================================== --- head/sys/dev/sound/pci/emu10k1.c Tue Sep 1 21:26:44 2020 (r365084) +++ head/sys/dev/sound/pci/emu10k1.c Tue Sep 1 21:27:34 2020 (r365085) @@ -1284,7 +1284,6 @@ emu_intr(void *data) emu_enatimer(sc, 0); } - if (ack & (EMU_IPR_ADCBUFFULL | EMU_IPR_ADCBUFHALFFULL)) { if (sc->rch[0].channel) chn_intr(sc->rch[0].channel); Modified: head/sys/dev/sound/pci/emu10kx-midi.c ============================================================================== --- head/sys/dev/sound/pci/emu10kx-midi.c Tue Sep 1 21:26:44 2020 (r365084) +++ head/sys/dev/sound/pci/emu10kx-midi.c Tue Sep 1 21:27:34 2020 (r365085) @@ -223,7 +223,6 @@ emu_midi_attach(device_t dev) return (0); } - static int emu_midi_detach(device_t dev) { Modified: head/sys/dev/sound/pci/emu10kx-pcm.c ============================================================================== --- head/sys/dev/sound/pci/emu10kx-pcm.c Tue Sep 1 21:26:44 2020 (r365084) +++ head/sys/dev/sound/pci/emu10kx-pcm.c Tue Sep 1 21:27:34 2020 (r365085) @@ -116,7 +116,6 @@ struct emu_pcm_info { unsigned int emu10k1_volcache[2][2]; }; - static uint32_t emu_rfmt_adc[] = { SND_FORMAT(AFMT_S16_LE, 1, 0), SND_FORMAT(AFMT_S16_LE, 2, 0), @@ -404,7 +403,7 @@ emu_dspmixer_setrecsrc(struct snd_mixer *m, u_int32_t recmask = 0; for (i=0; i < 8; i++) input[i]=0; - + if (sc->sm != NULL) if ((src & sc->ac97_recdevs) !=0) if (mix_setrecsrc(sc->sm, src & sc->ac97_recdevs) == 0) { @@ -456,7 +455,7 @@ emu_dspmixer_setrecsrc(struct snd_mixer *m, u_int32_t emumix_set_volume(sc->card, M_IN6_REC_L, input[6] == 1 ? 100 : 0); emumix_set_volume(sc->card, M_IN6_REC_R, input[6] == 1 ? 100 : 0); - + /* XXX check for K1/k2 differences? */ if ((src & (1 << SOUND_MIXER_PCM)) == (1 << SOUND_MIXER_PCM)) { emumix_set_volume(sc->card, M_FX0_REC_L, emumix_get_volume(sc->card, M_FX0_FRONT_L)); @@ -684,7 +683,6 @@ static kobj_method_t emu_ac97_methods[] = { }; AC97_DECLARE(emu_ac97); - static int emu_k1_recval(int speed) { @@ -717,7 +715,6 @@ emupchan_init(kobj_t obj __unused, void *devinfo, stru KASSERT(dir == PCMDIR_PLAY, ("emupchan_init: bad direction")); KASSERT(sc->card != NULL, ("empchan_init: no soundcard")); - if (sc->pnum >= MAX_CHANNELS) return (NULL); ch = &(sc->pch[sc->pnum++]); @@ -1229,7 +1226,6 @@ static kobj_method_t emufxrchan_methods[] = { }; CHANNEL_DECLARE(emufxrchan); - static uint32_t emu_pcm_intr(void *pcm, uint32_t stat) { @@ -1240,7 +1236,7 @@ emu_pcm_intr(void *pcm, uint32_t stat) ack = 0; snd_mtxlock(sc->lock); *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202009012127.081LRZwg025034>