diff options
| author | Christos Margiolis <christos@FreeBSD.org> | 2026-07-23 21:05:42 +0000 |
|---|---|---|
| committer | Christos Margiolis <christos@FreeBSD.org> | 2026-07-26 22:16:47 +0000 |
| commit | 95439b803fce86958e1db1927a8405bf939edda4 (patch) | |
| tree | 819c41c4069191dd06ac0a82bcae74d7569a2556 | |
| parent | 34ae0f7834d1bd6bb765d1c12e57e01e32b3e060 (diff) | |
sound: Stop using legacy u_int types
No functional change intended.
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
44 files changed, 1016 insertions, 1016 deletions
diff --git a/sys/dev/sound/macio/aoa.c b/sys/dev/sound/macio/aoa.c index e0a6206c19a6..ff8f17224384 100644 --- a/sys/dev/sound/macio/aoa.c +++ b/sys/dev/sound/macio/aoa.c @@ -60,20 +60,20 @@ struct aoa_dma { bus_dma_tag_t tag; /* bus_dma tag */ struct pcm_channel *pcm; /* PCM channel */ struct snd_dbuf *buf; /* PCM buffer */ - u_int slots; /* # of slots */ - u_int slot; /* current slot */ - u_int bufsz; /* buffer size */ - u_int blksz; /* block size */ + unsigned int slots; /* # of slots */ + unsigned int slot; /* current slot */ + unsigned int bufsz; /* buffer size */ + unsigned int blksz; /* block size */ int running; }; static void aoa_dma_set_program(struct aoa_dma *dma) { - u_int32_t addr; + uint32_t addr; int i; - addr = (u_int32_t)dma->buf->buf_addr; + addr = (uint32_t)dma->buf->buf_addr; KASSERT(dma->bufsz == dma->buf->bufsize, ("bad size")); dma->slots = dma->bufsz / dma->blksz; @@ -144,8 +144,8 @@ aoa_dma_delete(struct aoa_dma *dma) free(dma, M_DEVBUF); } -static u_int32_t -aoa_chan_setblocksize(kobj_t obj, void *data, u_int32_t blocksz) +static uint32_t +aoa_chan_setblocksize(kobj_t obj, void *data, uint32_t blocksz) { struct aoa_dma *dma = data; int err, lz; @@ -188,7 +188,7 @@ aoa_chan_setblocksize(kobj_t obj, void *data, u_int32_t blocksz) } static int -aoa_chan_setformat(kobj_t obj, void *data, u_int32_t format) +aoa_chan_setformat(kobj_t obj, void *data, uint32_t format) { DPRINTF(("aoa_chan_setformat: format = %u\n", format)); @@ -198,15 +198,15 @@ aoa_chan_setformat(kobj_t obj, void *data, u_int32_t format) return (0); } -static u_int32_t -aoa_chan_setspeed(kobj_t obj, void *data, u_int32_t speed) +static uint32_t +aoa_chan_setspeed(kobj_t obj, void *data, uint32_t speed) { DPRINTF(("aoa_chan_setspeed: speed = %u\n", speed)); return (44100); } -static u_int32_t +static uint32_t aoa_chan_getptr(kobj_t obj, void *data) { struct aoa_dma *dma = data; @@ -336,7 +336,7 @@ aoa_interrupt(void *xsc) mtx_unlock(&dma->mutex); } -static u_int32_t sc_fmt[] = { +static uint32_t sc_fmt[] = { SND_FORMAT(AFMT_S16_BE, 2, 0), 0 }; diff --git a/sys/dev/sound/macio/davbus.c b/sys/dev/sound/macio/davbus.c index 8e9fe78317cb..de15806e6d5c 100644 --- a/sys/dev/sound/macio/davbus.c +++ b/sys/dev/sound/macio/davbus.c @@ -63,9 +63,9 @@ struct davbus_softc { struct resource *reg; struct mtx mutex; int device_id; - u_int output_mask; - u_int (*read_status)(struct davbus_softc *, u_int); - void (*set_outputs)(struct davbus_softc *, u_int); + unsigned int output_mask; + unsigned int (*read_status)(struct davbus_softc *, unsigned int); + void (*set_outputs)(struct davbus_softc *, unsigned int); }; static int davbus_probe(device_t); @@ -115,12 +115,12 @@ davbus_probe(device_t self) static int burgundy_init(struct snd_mixer *m); static int burgundy_uninit(struct snd_mixer *m); static int burgundy_reinit(struct snd_mixer *m); -static void burgundy_write_locked(struct davbus_softc *, u_int, u_int); -static void burgundy_set_outputs(struct davbus_softc *d, u_int mask); -static u_int burgundy_read_status(struct davbus_softc *d, u_int status); +static void burgundy_write_locked(struct davbus_softc *, unsigned int, unsigned int); +static void burgundy_set_outputs(struct davbus_softc *d, unsigned int mask); +static unsigned int burgundy_read_status(struct davbus_softc *d, unsigned int status); static int burgundy_set(struct snd_mixer *m, unsigned dev, unsigned left, unsigned right); -static u_int32_t burgundy_setrecsrc(struct snd_mixer *m, u_int32_t src); +static uint32_t burgundy_setrecsrc(struct snd_mixer *m, uint32_t src); static kobj_method_t burgundy_mixer_methods[] = { KOBJMETHOD(mixer_init, burgundy_init), @@ -200,9 +200,9 @@ burgundy_reinit(struct snd_mixer *m) } static void -burgundy_write_locked(struct davbus_softc *d, u_int reg, u_int val) +burgundy_write_locked(struct davbus_softc *d, unsigned int reg, unsigned int val) { - u_int size, addr, offset, data, i; + unsigned int size, addr, offset, data, i; size = (reg & 0x00FF0000) >> 16; addr = (reg & 0x0000FF00) >> 8; @@ -226,9 +226,9 @@ burgundy_write_locked(struct davbus_softc *d, u_int reg, u_int val) /* Must be called with d->mutex held. */ static void -burgundy_set_outputs(struct davbus_softc *d, u_int mask) +burgundy_set_outputs(struct davbus_softc *d, unsigned int mask) { - u_int x = 0; + unsigned int x = 0; if (mask == d->output_mask) return; @@ -259,8 +259,8 @@ burgundy_set_outputs(struct davbus_softc *d, u_int mask) d->output_mask = mask; } -static u_int -burgundy_read_status(struct davbus_softc *d, u_int status) +static unsigned int +burgundy_read_status(struct davbus_softc *d, unsigned int status) { if (status & 0x4) return (1 << 1); @@ -298,8 +298,8 @@ burgundy_set(struct snd_mixer *m, unsigned dev, unsigned left, unsigned right) return (0); } -static u_int32_t -burgundy_setrecsrc(struct snd_mixer *m, u_int32_t src) +static uint32_t +burgundy_setrecsrc(struct snd_mixer *m, uint32_t src) { return (0); } @@ -311,12 +311,12 @@ burgundy_setrecsrc(struct snd_mixer *m, u_int32_t src) static int screamer_init(struct snd_mixer *m); static int screamer_uninit(struct snd_mixer *m); static int screamer_reinit(struct snd_mixer *m); -static void screamer_write_locked(struct davbus_softc *, u_int, u_int); -static void screamer_set_outputs(struct davbus_softc *d, u_int mask); -static u_int screamer_read_status(struct davbus_softc *d, u_int status); +static void screamer_write_locked(struct davbus_softc *, unsigned int, unsigned int); +static void screamer_set_outputs(struct davbus_softc *d, unsigned int mask); +static unsigned int screamer_read_status(struct davbus_softc *d, unsigned int status); static int screamer_set(struct snd_mixer *m, unsigned dev, unsigned left, unsigned right); -static u_int32_t screamer_setrecsrc(struct snd_mixer *m, u_int32_t src); +static uint32_t screamer_setrecsrc(struct snd_mixer *m, uint32_t src); static kobj_method_t screamer_mixer_methods[] = { KOBJMETHOD(mixer_init, screamer_init), @@ -372,9 +372,9 @@ screamer_reinit(struct snd_mixer *m) } static void -screamer_write_locked(struct davbus_softc *d, u_int reg, u_int val) +screamer_write_locked(struct davbus_softc *d, unsigned int reg, unsigned int val) { - u_int x; + unsigned int x; KASSERT(val == (val & 0xfff), ("bad val")); @@ -392,9 +392,9 @@ screamer_write_locked(struct davbus_softc *d, u_int reg, u_int val) /* Must be called with d->mutex held. */ static void -screamer_set_outputs(struct davbus_softc *d, u_int mask) +screamer_set_outputs(struct davbus_softc *d, unsigned int mask) { - u_int x; + unsigned int x; if (mask == d->output_mask) { return; @@ -430,8 +430,8 @@ screamer_set_outputs(struct davbus_softc *d, u_int mask) d->output_mask = mask; } -static u_int -screamer_read_status(struct davbus_softc *d, u_int status) +static unsigned int +screamer_read_status(struct davbus_softc *d, unsigned int status) { int headphones; @@ -483,8 +483,8 @@ screamer_set(struct snd_mixer *m, unsigned dev, unsigned left, unsigned right) return (0); } -static u_int32_t -screamer_setrecsrc(struct snd_mixer *m, u_int32_t src) +static uint32_t +screamer_setrecsrc(struct snd_mixer *m, uint32_t src) { return (0); } @@ -539,7 +539,7 @@ davbus_attach(device_t self) bzero(compat, sizeof(compat)); OF_getprop(sc->soundnode, "compatible", compat, sizeof(compat)); - OF_getprop(sc->soundnode, "device-id", &sc->device_id, sizeof(u_int)); + OF_getprop(sc->soundnode, "device-id", &sc->device_id, sizeof(unsigned int)); mtx_init(&sc->mutex, "DAVbus", NULL, MTX_DEF); @@ -575,7 +575,7 @@ static void davbus_cint(void *ptr) { struct davbus_softc *d = ptr; - u_int reg, status, mask; + unsigned int reg, status, mask; mtx_lock(&d->mutex); diff --git a/sys/dev/sound/macio/i2s.c b/sys/dev/sound/macio/i2s.c index 2c134f8f97fe..327fbe5fc0bd 100644 --- a/sys/dev/sound/macio/i2s.c +++ b/sys/dev/sound/macio/i2s.c @@ -87,18 +87,18 @@ struct i2s_softc { phandle_t node; phandle_t soundnode; struct resource *reg; - u_int output_mask; + unsigned int output_mask; struct mtx port_mtx; }; static int i2s_probe(device_t); static int i2s_attach(device_t); static void i2s_postattach(void *); -static int i2s_setup(struct i2s_softc *, u_int, u_int, u_int); +static int i2s_setup(struct i2s_softc *, unsigned int, unsigned int, unsigned int); static void i2s_mute_headphone (struct i2s_softc *, int); static void i2s_mute_lineout (struct i2s_softc *, int); static void i2s_mute_speaker (struct i2s_softc *, int); -static void i2s_set_outputs(void *, u_int); +static void i2s_set_outputs(void *, unsigned int); static struct intr_config_hook *i2s_delayed_attach = NULL; @@ -425,8 +425,8 @@ aoagpio_attach(device_t gpio) /* Number of clock sources we can use. */ #define NCLKS 3 static const struct i2s_clksrc { - u_int cs_clock; - u_int cs_reg; + unsigned int cs_clock; + unsigned int cs_reg; } clksrc[NCLKS] = { {49152000, CLKSRC_49MHz}, {45158400, CLKSRC_45MHz}, @@ -440,11 +440,11 @@ static const struct i2s_clksrc { or greater to the number of bits per frame. */ static int -i2s_setup(struct i2s_softc *sc, u_int rate, u_int wordsize, u_int sclk_fs) +i2s_setup(struct i2s_softc *sc, unsigned int rate, unsigned int wordsize, unsigned int sclk_fs) { - u_int mclk, mdiv, sdiv; - u_int reg = 0, x, wordformat; - u_int i; + unsigned int mclk, mdiv, sdiv; + unsigned int reg = 0, x, wordformat; + unsigned int i; /* Make sure the settings are consistent... */ if ((wordsize * 2) > sclk_fs) @@ -592,7 +592,7 @@ of_find_firstchild_byname(phandle_t node, const char *req_name) return (-1); } -static u_int +static unsigned int gpio_read(enum gpio_ctrl ctrl) { struct aoagpio_softc *sc; @@ -604,10 +604,10 @@ gpio_read(enum gpio_ctrl ctrl) } static void -gpio_write(enum gpio_ctrl ctrl, u_int x) +gpio_write(enum gpio_ctrl ctrl, unsigned int x) { struct aoagpio_softc *sc; - u_int reg; + unsigned int reg; if ((sc = gpio_ctrls[ctrl]) == NULL) return; @@ -622,7 +622,7 @@ gpio_write(enum gpio_ctrl ctrl, u_int x) static void i2s_cint(struct i2s_softc *sc) { - u_int mask = 0; + unsigned int mask = 0; if (gpio_ctrls[HEADPHONE_DETECT] && gpio_ctrls[HEADPHONE_DETECT]->level) @@ -691,7 +691,7 @@ MUTE_CONTROL(headphone, HEADPHONE) MUTE_CONTROL(lineout, LINEOUT) static void -i2s_set_outputs(void *ptr, u_int mask) +i2s_set_outputs(void *ptr, unsigned int mask) { struct i2s_softc *sc = ptr; diff --git a/sys/dev/sound/macio/onyx.c b/sys/dev/sound/macio/onyx.c index 5ba22dd7c495..745f861790db 100644 --- a/sys/dev/sound/macio/onyx.c +++ b/sys/dev/sound/macio/onyx.c @@ -74,7 +74,7 @@ static int onyx_uninit(struct snd_mixer *m); static int onyx_reinit(struct snd_mixer *m); static int onyx_set(struct snd_mixer *m, unsigned dev, unsigned left, unsigned right); -static u_int32_t onyx_setrecsrc(struct snd_mixer *m, u_int32_t src); +static uint32_t onyx_setrecsrc(struct snd_mixer *m, uint32_t src); static device_method_t onyx_methods[] = { /* Device interface. */ @@ -168,7 +168,7 @@ static const struct onyx_reg onyx_initdata = { static int onyx_write(struct onyx_softc *sc, uint8_t reg, const uint8_t value) { - u_int size; + unsigned int size; uint8_t buf[16]; struct iic_msg msg[] = { @@ -226,7 +226,7 @@ static int onyx_init(struct snd_mixer *m) { struct onyx_softc *sc; - u_int x = 0; + unsigned int x = 0; sc = device_get_softc(mix_getdevinfo(m)); @@ -289,8 +289,8 @@ onyx_set(struct snd_mixer *m, unsigned dev, unsigned left, unsigned right) return (0); } -static u_int32_t -onyx_setrecsrc(struct snd_mixer *m, u_int32_t src) +static uint32_t +onyx_setrecsrc(struct snd_mixer *m, uint32_t src) { return (0); } diff --git a/sys/dev/sound/macio/snapper.c b/sys/dev/sound/macio/snapper.c index ed83990d563b..c68ce20ee0b6 100644 --- a/sys/dev/sound/macio/snapper.c +++ b/sys/dev/sound/macio/snapper.c @@ -100,7 +100,7 @@ static int snapper_uninit(struct snd_mixer *m); static int snapper_reinit(struct snd_mixer *m); static int snapper_set(struct snd_mixer *m, unsigned dev, unsigned left, unsigned right); -static u_int32_t snapper_setrecsrc(struct snd_mixer *m, u_int32_t src); +static uint32_t snapper_setrecsrc(struct snd_mixer *m, uint32_t src); static device_method_t snapper_methods[] = { /* Device interface. */ @@ -289,7 +289,7 @@ static const char snapper_regsize[] = { }; /* dB = 20 * log (x) table. */ -static u_int snapper_volume_table[100] = { +static unsigned int snapper_volume_table[100] = { 0x00000148, 0x0000015C, 0x00000171, 0x00000186, // -46.0, -45.5, -45.0, -44.5, 0x0000019E, 0x000001B6, 0x000001D0, 0x000001EB, // -44.0, -43.5, -43.0, -42.5, 0x00000209, 0x00000227, 0x00000248, 0x0000026B, // -42.0, -41.5, -41.0, -40.5, @@ -320,7 +320,7 @@ static u_int snapper_volume_table[100] = { static int snapper_write(struct snapper_softc *sc, uint8_t reg, const void *data) { - u_int size; + unsigned int size; uint8_t buf[16]; struct iic_msg msg[] = { @@ -381,7 +381,7 @@ static int snapper_init(struct snd_mixer *m) { struct snapper_softc *sc; - u_int x = 0; + unsigned int x = 0; sc = device_get_softc(mix_getdevinfo(m)); @@ -436,7 +436,7 @@ static int snapper_set(struct snd_mixer *m, unsigned dev, unsigned left, unsigned right) { struct snapper_softc *sc; - u_int l, r; + unsigned int l, r; u_char reg[6]; sc = device_get_softc(mix_getdevinfo(m)); @@ -464,8 +464,8 @@ snapper_set(struct snd_mixer *m, unsigned dev, unsigned left, unsigned right) return (0); } -static u_int32_t -snapper_setrecsrc(struct snd_mixer *m, u_int32_t src) +static uint32_t +snapper_setrecsrc(struct snd_mixer *m, uint32_t src) { return (0); } diff --git a/sys/dev/sound/macio/tumbler.c b/sys/dev/sound/macio/tumbler.c index 89af4434e7fe..0bb619f2fd90 100644 --- a/sys/dev/sound/macio/tumbler.c +++ b/sys/dev/sound/macio/tumbler.c @@ -100,7 +100,7 @@ static int tumbler_uninit(struct snd_mixer *m); static int tumbler_reinit(struct snd_mixer *m); static int tumbler_set(struct snd_mixer *m, unsigned dev, unsigned left, unsigned right); -static u_int32_t tumbler_setrecsrc(struct snd_mixer *m, u_int32_t src); +static uint32_t tumbler_setrecsrc(struct snd_mixer *m, uint32_t src); static device_method_t tumbler_methods[] = { /* Device interface. */ @@ -250,7 +250,7 @@ const char tumbler_regsize[] = { }; /* dB = 20 * log (x) table. */ -static u_int tumbler_volume_table[100] = { +static unsigned int tumbler_volume_table[100] = { 0x00000148, 0x0000015C, 0x00000171, 0x00000186, // -46.0, -45.5, -45.0, -44.5, 0x0000019E, 0x000001B6, 0x000001D0, 0x000001EB, // -44.0, -43.5, -43.0, -42.5, 0x00000209, 0x00000227, 0x00000248, 0x0000026B, // -42.0, -41.5, -41.0, -40.5, @@ -281,7 +281,7 @@ static u_int tumbler_volume_table[100] = { static int tumbler_write(struct tumbler_softc *sc, uint8_t reg, const void *data) { - u_int size; + unsigned int size; uint8_t buf[16]; struct iic_msg msg[] = { @@ -336,7 +336,7 @@ static int tumbler_init(struct snd_mixer *m) { struct tumbler_softc *sc; - u_int x = 0; + unsigned int x = 0; sc = device_get_softc(mix_getdevinfo(m)); @@ -383,7 +383,7 @@ static int tumbler_set(struct snd_mixer *m, unsigned dev, unsigned left, unsigned right) { struct tumbler_softc *sc; - u_int l, r; + unsigned int l, r; u_char reg[6]; sc = device_get_softc(mix_getdevinfo(m)); @@ -411,8 +411,8 @@ tumbler_set(struct snd_mixer *m, unsigned dev, unsigned left, unsigned right) return (0); } -static u_int32_t -tumbler_setrecsrc(struct snd_mixer *m, u_int32_t src) +static uint32_t +tumbler_setrecsrc(struct snd_mixer *m, uint32_t src) { return (0); } diff --git a/sys/dev/sound/pci/als4000.c b/sys/dev/sound/pci/als4000.c index c6cbd61c927c..0613f3ec2b97 100644 --- a/sys/dev/sound/pci/als4000.c +++ b/sys/dev/sound/pci/als4000.c @@ -65,9 +65,9 @@ struct sc_chinfo { struct sc_info *parent; struct pcm_channel *channel; struct snd_dbuf *buffer; - u_int32_t format, speed, phys_buf, bps; - u_int32_t dma_active:1, dma_was_active:1; - u_int8_t gcr_fifo_status; + uint32_t format, speed, phys_buf, bps; + uint32_t dma_active:1, dma_was_active:1; + uint8_t gcr_fifo_status; int dir; }; @@ -87,7 +87,7 @@ struct sc_info { /* Channel caps */ -static u_int32_t als_format[] = { +static uint32_t als_format[] = { SND_FORMAT(AFMT_U8, 1, 0), SND_FORMAT(AFMT_U8, 2, 0), SND_FORMAT(AFMT_S16_LE, 1, 0), @@ -104,7 +104,7 @@ static struct pcmchan_caps als_caps = { 4000, 44100, als_format, 0 }; /* ------------------------------------------------------------------------- */ /* Register Utilities */ -static u_int32_t +static uint32_t als_gcr_rd(struct sc_info *sc, int index) { bus_space_write_1(sc->st, sc->sh, ALS_GCR_INDEX, index); @@ -118,36 +118,36 @@ als_gcr_wr(struct sc_info *sc, int index, int data) bus_space_write_4(sc->st, sc->sh, ALS_GCR_DATA, data); } -static u_int8_t +static uint8_t als_intr_rd(struct sc_info *sc) { return bus_space_read_1(sc->st, sc->sh, ALS_SB_MPU_IRQ); } static void -als_intr_wr(struct sc_info *sc, u_int8_t data) +als_intr_wr(struct sc_info *sc, uint8_t data) { bus_space_write_1(sc->st, sc->sh, ALS_SB_MPU_IRQ, data); } -static u_int8_t -als_mix_rd(struct sc_info *sc, u_int8_t index) +static uint8_t +als_mix_rd(struct sc_info *sc, uint8_t index) { bus_space_write_1(sc->st, sc->sh, ALS_MIXER_INDEX, index); return bus_space_read_1(sc->st, sc->sh, ALS_MIXER_DATA); } static void -als_mix_wr(struct sc_info *sc, u_int8_t index, u_int8_t data) +als_mix_wr(struct sc_info *sc, uint8_t index, uint8_t data) { bus_space_write_1(sc->st, sc->sh, ALS_MIXER_INDEX, index); bus_space_write_1(sc->st, sc->sh, ALS_MIXER_DATA, data); } static void -als_esp_wr(struct sc_info *sc, u_int8_t data) +als_esp_wr(struct sc_info *sc, uint8_t data) { - u_int32_t tries, v; + uint32_t tries, v; tries = 1000; do { @@ -166,7 +166,7 @@ als_esp_wr(struct sc_info *sc, u_int8_t data) static int als_esp_reset(struct sc_info *sc) { - u_int32_t tries, u, v; + uint32_t tries, u, v; bus_space_write_1(sc->st, sc->sh, ALS_ESP_RST, 1); DELAY(10); @@ -191,10 +191,10 @@ als_esp_reset(struct sc_info *sc) return 1; } -static u_int8_t -als_ack_read(struct sc_info *sc, u_int8_t addr) +static uint8_t +als_ack_read(struct sc_info *sc, uint8_t addr) { - u_int8_t r = bus_space_read_1(sc->st, sc->sh, addr); + uint8_t r = bus_space_read_1(sc->st, sc->sh, addr); return r; } @@ -232,7 +232,7 @@ alschan_init(kobj_t obj, void *devinfo, } static int -alschan_setformat(kobj_t obj, void *data, u_int32_t format) +alschan_setformat(kobj_t obj, void *data, uint32_t format) { struct sc_chinfo *ch = data; @@ -240,8 +240,8 @@ alschan_setformat(kobj_t obj, void *data, u_int32_t format) return 0; } -static u_int32_t -alschan_setspeed(kobj_t obj, void *data, u_int32_t speed) +static uint32_t +alschan_setspeed(kobj_t obj, void *data, uint32_t speed) { struct sc_chinfo *ch = data, *other; struct sc_info *sc = ch->parent; @@ -258,8 +258,8 @@ alschan_setspeed(kobj_t obj, void *data, u_int32_t speed) return speed; } -static u_int32_t -alschan_setblocksize(kobj_t obj, void *data, u_int32_t blocksize) +static uint32_t +alschan_setblocksize(kobj_t obj, void *data, uint32_t blocksize) { struct sc_chinfo *ch = data; struct sc_info *sc = ch->parent; @@ -271,7 +271,7 @@ alschan_setblocksize(kobj_t obj, void *data, u_int32_t blocksize) return blocksize; } -static u_int32_t +static uint32_t alschan_getptr(kobj_t obj, void *data) { struct sc_chinfo *ch = data; @@ -314,10 +314,10 @@ als_set_speed(struct sc_chinfo *ch) #define ALS_16BIT_CMD(x, y) { (x), (y), DSP_DMA16, DSP_CMD_DMAPAUSE_16 } struct playback_command { - u_int32_t pcm_format; /* newpcm format */ - u_int8_t format_val; /* sb16 format value */ - u_int8_t dma_prog; /* sb16 dma program */ - u_int8_t dma_stop; /* sb16 stop register */ + uint32_t pcm_format; /* newpcm format */ + uint8_t format_val; /* sb16 format value */ + uint8_t dma_prog; /* sb16 dma program */ + uint8_t dma_stop; /* sb16 stop register */ } static const playback_cmds[] = { ALS_8BIT_CMD(SND_FORMAT(AFMT_U8, 1, 0), DSP_MODE_U8MONO), ALS_8BIT_CMD(SND_FORMAT(AFMT_U8, 2, 0), DSP_MODE_U8STEREO), @@ -326,9 +326,9 @@ struct playback_command { }; static const struct playback_command* -als_get_playback_command(u_int32_t format) +als_get_playback_command(uint32_t format) { - u_int32_t i, n; + uint32_t i, n; n = sizeof(playback_cmds) / sizeof(playback_cmds[0]); for (i = 0; i < n; i++) { @@ -346,7 +346,7 @@ als_playback_start(struct sc_chinfo *ch) { const struct playback_command *p; struct sc_info *sc = ch->parent; - u_int32_t buf, bufsz, count, dma_prog; + uint32_t buf, bufsz, count, dma_prog; buf = ch->buffer->buf_addr; bufsz = ch->buffer->bufsize; @@ -377,7 +377,7 @@ als_playback_stop(struct sc_chinfo *ch) { const struct playback_command *p; struct sc_info *sc = ch->parent; - u_int32_t active; + uint32_t active; active = ch->dma_active; if (active) { @@ -428,8 +428,8 @@ CHANNEL_DECLARE(alspchan); /* ------------------------------------------------------------------------- */ /* Capture channel implementation */ -static u_int8_t -als_get_fifo_format(struct sc_info *sc, u_int32_t format) +static uint8_t +als_get_fifo_format(struct sc_info *sc, uint32_t format) { switch (format) { case SND_FORMAT(AFMT_U8, 1, 0): @@ -449,7 +449,7 @@ static void als_capture_start(struct sc_chinfo *ch) { struct sc_info *sc = ch->parent; - u_int32_t buf, bufsz, count, dma_prog; + uint32_t buf, bufsz, count, dma_prog; buf = ch->buffer->buf_addr; bufsz = ch->buffer->bufsize; @@ -477,7 +477,7 @@ static int als_capture_stop(struct sc_chinfo *ch) { struct sc_info *sc = ch->parent; - u_int32_t active; + uint32_t active; active = ch->dma_active; if (active) { @@ -528,11 +528,11 @@ CHANNEL_DECLARE(alsrchan); */ struct sb16props { - u_int8_t lreg; - u_int8_t rreg; - u_int8_t bits; - u_int8_t oselect; - u_int8_t iselect; /* left input mask */ + uint8_t lreg; + uint8_t rreg; + uint8_t bits; + uint8_t oselect; + uint8_t iselect; /* left input mask */ } static const amt[SOUND_MIXER_NRDEVICES] = { [SOUND_MIXER_VOLUME] = { 0x30, 0x31, 5, 0x00, 0x00 }, [SOUND_MIXER_PCM] = { 0x32, 0x33, 5, 0x00, 0x00 }, @@ -551,7 +551,7 @@ struct sb16props { static int alsmix_init(struct snd_mixer *m) { - u_int32_t i, v; + uint32_t i, v; for (i = v = 0; i < SOUND_MIXER_NRDEVICES; i++) { if (amt[i].bits) v |= 1 << i; @@ -569,7 +569,7 @@ static int alsmix_set(struct snd_mixer *m, unsigned dev, unsigned left, unsigned right) { struct sc_info *sc = mix_getdevinfo(m); - u_int32_t r, l, v, mask; + uint32_t r, l, v, mask; /* Fill upper n bits in mask with 1's */ mask = ((1 << amt[dev].bits) - 1) << (8 - amt[dev].bits); @@ -597,11 +597,11 @@ alsmix_set(struct snd_mixer *m, unsigned dev, unsigned left, unsigned right) return 0; } -static u_int32_t -alsmix_setrecsrc(struct snd_mixer *m, u_int32_t src) +static uint32_t +alsmix_setrecsrc(struct snd_mixer *m, uint32_t src) { struct sc_info *sc = mix_getdevinfo(m); - u_int32_t i, l, r; + uint32_t i, l, r; for (i = l = r = 0; i < SOUND_MIXER_NRDEVICES; i++) { if (src & (1 << i)) { @@ -635,7 +635,7 @@ static void als_intr(void *p) { struct sc_info *sc = (struct sc_info *)p; - u_int8_t intr, sb_status; + uint8_t intr, sb_status; mtx_lock(&sc->lock); intr = als_intr_rd(sc); @@ -677,7 +677,7 @@ als_intr(void *p) static int als_init(struct sc_info *sc) { - u_int32_t i, v; + uint32_t i, v; /* Reset Chip */ if (als_esp_reset(sc)) { diff --git a/sys/dev/sound/pci/cmi.c b/sys/dev/sound/pci/cmi.c index 4ff58cb04b8e..58ab961b74e1 100644 --- a/sys/dev/sound/pci/cmi.c +++ b/sys/dev/sound/pci/cmi.c @@ -102,8 +102,8 @@ struct sc_chinfo { struct sc_info *parent; struct pcm_channel *channel; struct snd_dbuf *buffer; - u_int32_t fmt, spd, phys_buf, bps; - u_int32_t dma_active:1, dma_was_active:1; + uint32_t fmt, spd, phys_buf, bps; + uint32_t dma_active:1, dma_was_active:1; int dir; }; @@ -132,7 +132,7 @@ struct sc_info { /* Channel caps */ -static u_int32_t cmi_fmt[] = { +static uint32_t cmi_fmt[] = { SND_FORMAT(AFMT_U8, 1, 0), SND_FORMAT(AFMT_U8, 2, 0), SND_FORMAT(AFMT_S16_LE, 1, 0), @@ -145,7 +145,7 @@ static struct pcmchan_caps cmi_caps = {5512, 48000, cmi_fmt, 0}; /* ------------------------------------------------------------------------- */ /* Register Utilities */ -static u_int32_t +static uint32_t cmi_rd(struct sc_info *sc, int regno, int size) { switch (size) { @@ -162,7 +162,7 @@ cmi_rd(struct sc_info *sc, int regno, int size) } static void -cmi_wr(struct sc_info *sc, int regno, u_int32_t data, int size) +cmi_wr(struct sc_info *sc, int regno, uint32_t data, int size) { switch (size) { case 1: @@ -179,9 +179,9 @@ cmi_wr(struct sc_info *sc, int regno, u_int32_t data, int size) static void cmi_partial_wr4(struct sc_info *sc, - int reg, int shift, u_int32_t mask, u_int32_t val) + int reg, int shift, uint32_t mask, uint32_t val) { - u_int32_t r; + uint32_t r; r = cmi_rd(sc, reg, 4); r &= ~(mask << shift); @@ -190,9 +190,9 @@ cmi_partial_wr4(struct sc_info *sc, } static void -cmi_clr4(struct sc_info *sc, int reg, u_int32_t mask) +cmi_clr4(struct sc_info *sc, int reg, uint32_t mask) { - u_int32_t r; + uint32_t r; r = cmi_rd(sc, reg, 4); r &= ~mask; @@ -200,9 +200,9 @@ cmi_clr4(struct sc_info *sc, int reg, u_int32_t mask) } static void -cmi_set4(struct sc_info *sc, int reg, u_int32_t mask) +cmi_set4(struct sc_info *sc, int reg, uint32_t mask) { - u_int32_t r; + uint32_t r; r = cmi_rd(sc, reg, 4); r |= mask; @@ -219,7 +219,7 @@ static int cmi_rates[] = {5512, 8000, 11025, 16000, /* cmpci_rate_to_regvalue returns sampling freq selector for FCR1 * register - reg order is 5k,11k,22k,44k,8k,16k,32k,48k */ -static u_int32_t +static uint32_t cmpci_rate_to_regvalue(int rate) { int i, r; @@ -237,7 +237,7 @@ cmpci_rate_to_regvalue(int rate) } static int -cmpci_regvalue_to_rate(u_int32_t r) +cmpci_regvalue_to_rate(uint32_t r) { int i; @@ -251,14 +251,14 @@ cmpci_regvalue_to_rate(u_int32_t r) * playback or capture. We use ch0 for playback and ch1 for capture. */ static void -cmi_dma_prog(struct sc_info *sc, struct sc_chinfo *ch, u_int32_t base) +cmi_dma_prog(struct sc_info *sc, struct sc_chinfo *ch, uint32_t base) { - u_int32_t s, i, sz; + uint32_t s, i, sz; ch->phys_buf = ch->buffer->buf_addr; cmi_wr(sc, base, ch->phys_buf, 4); - sz = (u_int32_t)ch->buffer->bufsize; + sz = (uint32_t)ch->buffer->bufsize; s = sz / ch->bps - 1; cmi_wr(sc, base + 4, s, 2); @@ -279,10 +279,10 @@ cmi_ch0_start(struct sc_info *sc, struct sc_chinfo *ch) ch->dma_active = 1; } -static u_int32_t +static uint32_t cmi_ch0_stop(struct sc_info *sc, struct sc_chinfo *ch) { - u_int32_t r = ch->dma_active; + uint32_t r = ch->dma_active; cmi_clr4(sc, CMPCI_REG_INTR_CTRL, CMPCI_REG_CH0_INTR_ENABLE); cmi_clr4(sc, CMPCI_REG_FUNC_0, CMPCI_REG_CH0_ENABLE); @@ -304,10 +304,10 @@ cmi_ch1_start(struct sc_info *sc, struct sc_chinfo *ch) ch->dma_active = 1; } -static u_int32_t +static uint32_t cmi_ch1_stop(struct sc_info *sc, struct sc_chinfo *ch) { - u_int32_t r = ch->dma_active; + uint32_t r = ch->dma_active; cmi_clr4(sc, CMPCI_REG_INTR_CTRL, CMPCI_REG_CH1_INTR_ENABLE); cmi_clr4(sc, CMPCI_REG_FUNC_0, CMPCI_REG_CH1_ENABLE); @@ -319,7 +319,7 @@ cmi_ch1_stop(struct sc_info *sc, struct sc_chinfo *ch) static void cmi_spdif_speed(struct sc_info *sc, int speed) { - u_int32_t fcr1, lcr, mcr; + uint32_t fcr1, lcr, mcr; if (speed >= 44100) { fcr1 = CMPCI_REG_SPDIF0_ENABLE; @@ -373,11 +373,11 @@ cmichan_init(kobj_t obj, void *devinfo, } static int -cmichan_setformat(kobj_t obj, void *data, u_int32_t format) +cmichan_setformat(kobj_t obj, void *data, uint32_t format) { struct sc_chinfo *ch = data; struct sc_info *sc = ch->parent; - u_int32_t f; + uint32_t f; if (format & AFMT_S16_LE) { f = CMPCI_REG_FORMAT_16BIT; @@ -414,12 +414,12 @@ cmichan_setformat(kobj_t obj, void *data, u_int32_t format) return 0; } -static u_int32_t -cmichan_setspeed(kobj_t obj, void *data, u_int32_t speed) +static uint32_t +cmichan_setspeed(kobj_t obj, void *data, uint32_t speed) { struct sc_chinfo *ch = data; struct sc_info *sc = ch->parent; - u_int32_t r, rsp __unused; + uint32_t r, rsp __unused; r = cmpci_rate_to_regvalue(speed); mtx_lock(&sc->lock); @@ -460,8 +460,8 @@ cmichan_setspeed(kobj_t obj, void *data, u_int32_t speed) return ch->spd; } -static u_int32_t -cmichan_setblocksize(kobj_t obj, void *data, u_int32_t blocksize) +static uint32_t +cmichan_setblocksize(kobj_t obj, void *data, uint32_t blocksize) { struct sc_chinfo *ch = data; struct sc_info *sc = ch->parent; @@ -510,12 +510,12 @@ cmichan_trigger(kobj_t obj, void *data, int go) return 0; } -static u_int32_t +static uint32_t cmichan_getptr(kobj_t obj, void *data) { struct sc_chinfo *ch = data; struct sc_info *sc = ch->parent; - u_int32_t physptr, bufptr, sz; + uint32_t physptr, bufptr, sz; mtx_lock(&sc->lock); if (ch->dir == PCMDIR_PLAY) { @@ -535,8 +535,8 @@ static void cmi_intr(void *data) { struct sc_info *sc = data; - u_int32_t intrstat; - u_int32_t toclear; + uint32_t intrstat; + uint32_t toclear; mtx_lock(&sc->lock); intrstat = cmi_rd(sc, CMPCI_REG_INTR_STATUS, 4); @@ -598,26 +598,26 @@ CHANNEL_DECLARE(cmichan); /* Mixer - sb16 with kinks */ static void -cmimix_wr(struct sc_info *sc, u_int8_t port, u_int8_t val) +cmimix_wr(struct sc_info *sc, uint8_t port, uint8_t val) { cmi_wr(sc, CMPCI_REG_SBADDR, port, 1); cmi_wr(sc, CMPCI_REG_SBDATA, val, 1); } -static u_int8_t -cmimix_rd(struct sc_info *sc, u_int8_t port) +static uint8_t +cmimix_rd(struct sc_info *sc, uint8_t port) { cmi_wr(sc, CMPCI_REG_SBADDR, port, 1); - return (u_int8_t)cmi_rd(sc, CMPCI_REG_SBDATA, 1); + return (uint8_t)cmi_rd(sc, CMPCI_REG_SBDATA, 1); } struct sb16props { - u_int8_t rreg; /* right reg chan register */ - u_int8_t stereo:1; /* (no explanation needed, honest) */ - u_int8_t rec:1; /* recording source */ - u_int8_t bits:3; /* num bits to represent maximum gain rep */ - u_int8_t oselect; /* output select mask */ - u_int8_t iselect; /* right input select mask */ + uint8_t rreg; /* right reg chan register */ + uint8_t stereo:1; /* (no explanation needed, honest) */ + uint8_t rec:1; /* recording source */ + uint8_t bits:3; /* num bits to represent maximum gain rep */ + uint8_t oselect; /* output select mask */ + uint8_t iselect; /* right input select mask */ } static const cmt[SOUND_MIXER_NRDEVICES] = { [SOUND_MIXER_SYNTH] = {CMPCI_SB16_MIXER_FM_R, 1, 1, 5, CMPCI_SB16_SW_FM, CMPCI_SB16_MIXER_FM_SRC_R}, @@ -649,7 +649,7 @@ static int cmimix_init(struct snd_mixer *m) { struct sc_info *sc = mix_getdevinfo(m); - u_int32_t i,v; + uint32_t i,v; for(i = v = 0; i < SOUND_MIXER_NRDEVICES; i++) { if (cmt[i].bits) v |= 1 << i; @@ -673,8 +673,8 @@ static int cmimix_set(struct snd_mixer *m, unsigned dev, unsigned left, unsigned right) { struct sc_info *sc = mix_getdevinfo(m); - u_int32_t r, l, max; - u_int8_t v; + uint32_t r, l, max; + uint8_t v; max = (1 << cmt[dev].bits) - 1; @@ -717,11 +717,11 @@ cmimix_set(struct snd_mixer *m, unsigned dev, unsigned left, unsigned right) return 0; } -static u_int32_t -cmimix_setrecsrc(struct snd_mixer *m, u_int32_t src) +static uint32_t +cmimix_setrecsrc(struct snd_mixer *m, uint32_t src) { struct sc_info *sc = mix_getdevinfo(m); - u_int32_t i, ml, sl; + uint32_t i, ml, sl; ml = sl = 0; for(i = 0; i < SOUND_MIXER_NRDEVICES; i++) { diff --git a/sys/dev/sound/pci/cs4281.c b/sys/dev/sound/pci/cs4281.c index 9899e7409212..ef5183331331 100644 --- a/sys/dev/sound/pci/cs4281.c +++ b/sys/dev/sound/pci/cs4281.c @@ -74,7 +74,7 @@ struct sc_chinfo { struct snd_dbuf *buffer; struct pcm_channel *channel; - u_int32_t spd, fmt, bps, blksz; + uint32_t spd, fmt, bps, blksz; int dma_setup, dma_active, dma_chan; }; @@ -82,7 +82,7 @@ struct sc_chinfo { /* device private data */ struct sc_info { device_t dev; - u_int32_t type; + uint32_t type; bus_space_tag_t st; bus_space_handle_t sh; @@ -102,7 +102,7 @@ struct sc_info { /* prototypes */ /* ADC/DAC control */ -static u_int32_t adcdac_go(struct sc_chinfo *ch, u_int32_t go); +static uint32_t adcdac_go(struct sc_chinfo *ch, uint32_t go); static void adcdac_prog(struct sc_chinfo *ch); /* power management and interrupt control */ @@ -111,18 +111,18 @@ static int cs4281_power(struct sc_info *, int); static int cs4281_init(struct sc_info *); /* talk to the card */ -static u_int32_t cs4281_rd(struct sc_info *, int); -static void cs4281_wr(struct sc_info *, int, u_int32_t); +static uint32_t cs4281_rd(struct sc_info *, int); +static void cs4281_wr(struct sc_info *, int, uint32_t); /* misc */ -static u_int8_t cs4281_rate_to_rv(u_int32_t); -static u_int32_t cs4281_format_to_dmr(u_int32_t); -static u_int32_t cs4281_format_to_bps(u_int32_t); +static uint8_t cs4281_rate_to_rv(uint32_t); +static uint32_t cs4281_format_to_dmr(uint32_t); +static uint32_t cs4281_format_to_bps(uint32_t); /* -------------------------------------------------------------------- */ /* formats (do not add formats without editing cs_fmt_tab) */ -static u_int32_t cs4281_fmts[] = { +static uint32_t cs4281_fmts[] = { SND_FORMAT(AFMT_U8, 1, 0), SND_FORMAT(AFMT_U8, 2, 0), SND_FORMAT(AFMT_S8, 1, 0), @@ -143,39 +143,39 @@ static struct pcmchan_caps cs4281_caps = {6024, 48000, cs4281_fmts, 0}; /* -------------------------------------------------------------------- */ /* Hardware */ -static inline u_int32_t +static inline uint32_t cs4281_rd(struct sc_info *sc, int regno) { return bus_space_read_4(sc->st, sc->sh, regno); } static inline void -cs4281_wr(struct sc_info *sc, int regno, u_int32_t data) +cs4281_wr(struct sc_info *sc, int regno, uint32_t data) { bus_space_write_4(sc->st, sc->sh, regno, data); DELAY(100); } static inline void -cs4281_clr4(struct sc_info *sc, int regno, u_int32_t mask) +cs4281_clr4(struct sc_info *sc, int regno, uint32_t mask) { - u_int32_t r; + uint32_t r; r = cs4281_rd(sc, regno); cs4281_wr(sc, regno, r & ~mask); } static inline void -cs4281_set4(struct sc_info *sc, int regno, u_int32_t mask) +cs4281_set4(struct sc_info *sc, int regno, uint32_t mask) { - u_int32_t v; + uint32_t v; v = cs4281_rd(sc, regno); cs4281_wr(sc, regno, v | mask); } static int -cs4281_waitset(struct sc_info *sc, int regno, u_int32_t mask, int tries) +cs4281_waitset(struct sc_info *sc, int regno, uint32_t mask, int tries) { - u_int32_t v; + uint32_t v; while (tries > 0) { DELAY(100); @@ -187,9 +187,9 @@ cs4281_waitset(struct sc_info *sc, int regno, u_int32_t mask, int tries) } static int -cs4281_waitclr(struct sc_info *sc, int regno, u_int32_t mask, int tries) +cs4281_waitclr(struct sc_info *sc, int regno, uint32_t mask, int tries) { - u_int32_t v; + uint32_t v; while (tries > 0) { DELAY(100); @@ -203,13 +203,13 @@ cs4281_waitclr(struct sc_info *sc, int regno, u_int32_t mask, int tries) /* ------------------------------------------------------------------------- */ /* Register value mapping functions */ -static u_int32_t cs4281_rates[] = {48000, 44100, 22050, 16000, 11025, 8000}; +static uint32_t cs4281_rates[] = {48000, 44100, 22050, 16000, 11025, 8000}; #define CS4281_NUM_RATES sizeof(cs4281_rates)/sizeof(cs4281_rates[0]) -static u_int8_t -cs4281_rate_to_rv(u_int32_t rate) +static uint8_t +cs4281_rate_to_rv(uint32_t rate) { - u_int32_t v; + uint32_t v; for (v = 0; v < CS4281_NUM_RATES; v++) { if (rate == cs4281_rates[v]) return v; @@ -220,20 +220,20 @@ cs4281_rate_to_rv(u_int32_t rate) return v; } -static u_int32_t -cs4281_rv_to_rate(u_int8_t rv) +static uint32_t +cs4281_rv_to_rate(uint8_t rv) { - u_int32_t r; + uint32_t r; if (rv < CS4281_NUM_RATES) return cs4281_rates[rv]; r = 1536000 / rv; return r; } -static inline u_int32_t -cs4281_format_to_dmr(u_int32_t format) +static inline uint32_t +cs4281_format_to_dmr(uint32_t format) { - u_int32_t dmr = 0; + uint32_t dmr = 0; if (AFMT_8BIT & format) dmr |= CS4281PCI_DMR_SIZE8; if (AFMT_CHANNEL(format) < 2) dmr |= CS4281PCI_DMR_MONO; if (AFMT_BIGENDIAN & format) dmr |= CS4281PCI_DMR_BEND; @@ -241,8 +241,8 @@ cs4281_format_to_dmr(u_int32_t format) return dmr; } -static inline u_int32_t -cs4281_format_to_bps(u_int32_t format) +static inline uint32_t +cs4281_format_to_bps(uint32_t format) { return ((AFMT_8BIT & format) ? 1 : 2) * ((AFMT_CHANNEL(format) > 1) ? 2 : 1); @@ -284,7 +284,7 @@ cs4281_rdcd(kobj_t obj, void *devinfo, int regno) } static int -cs4281_wrcd(kobj_t obj, void *devinfo, int regno, u_int32_t data) +cs4281_wrcd(kobj_t obj, void *devinfo, int regno, uint32_t data) { struct sc_info *sc = (struct sc_info *)devinfo; @@ -339,12 +339,12 @@ cs4281chan_init(kobj_t obj, void *devinfo, struct snd_dbuf *b, struct pcm_channe return ch; } -static u_int32_t -cs4281chan_setblocksize(kobj_t obj, void *data, u_int32_t blocksize) +static uint32_t +cs4281chan_setblocksize(kobj_t obj, void *data, uint32_t blocksize) { struct sc_chinfo *ch = data; struct sc_info *sc = ch->parent; - u_int32_t go; + uint32_t go; go = adcdac_go(ch, 0); @@ -361,12 +361,12 @@ cs4281chan_setblocksize(kobj_t obj, void *data, u_int32_t blocksize) return ch->blksz; } -static u_int32_t -cs4281chan_setspeed(kobj_t obj, void *data, u_int32_t speed) +static uint32_t +cs4281chan_setspeed(kobj_t obj, void *data, uint32_t speed) { struct sc_chinfo *ch = data; struct sc_info *sc = ch->parent; - u_int32_t go, v, r; + uint32_t go, v, r; go = adcdac_go(ch, 0); /* pause */ r = (ch->dma_chan == CS4281_DMA_PLAY) ? CS4281PCI_DACSR : CS4281PCI_ADCSR; @@ -379,11 +379,11 @@ cs4281chan_setspeed(kobj_t obj, void *data, u_int32_t speed) } static int -cs4281chan_setformat(kobj_t obj, void *data, u_int32_t format) +cs4281chan_setformat(kobj_t obj, void *data, uint32_t format) { struct sc_chinfo *ch = data; struct sc_info *sc = ch->parent; - u_int32_t v, go; + uint32_t v, go; go = adcdac_go(ch, 0); /* pause */ @@ -404,12 +404,12 @@ cs4281chan_setformat(kobj_t obj, void *data, u_int32_t format) return 0; } -static u_int32_t +static uint32_t cs4281chan_getptr(kobj_t obj, void *data) { struct sc_chinfo *ch = data; struct sc_info *sc = ch->parent; - u_int32_t dba, dca, ptr; + uint32_t dba, dca, ptr; int sz; sz = ch->buffer->bufsize; @@ -466,11 +466,11 @@ CHANNEL_DECLARE(cs4281chan); /* adcdac_go enables/disable DMA channel, returns non-zero if DMA was * active before call */ -static u_int32_t -adcdac_go(struct sc_chinfo *ch, u_int32_t go) +static uint32_t +adcdac_go(struct sc_chinfo *ch, uint32_t go) { struct sc_info *sc = ch->parent; - u_int32_t going; + uint32_t going; going = !(cs4281_rd(sc, CS4281PCI_DCR(ch->dma_chan)) & CS4281PCI_DCR_MSK); @@ -488,7 +488,7 @@ static void adcdac_prog(struct sc_chinfo *ch) { struct sc_info *sc = ch->parent; - u_int32_t go; + uint32_t go; if (!ch->dma_setup) { go = adcdac_go(ch, 0); @@ -508,7 +508,7 @@ static void cs4281_intr(void *p) { struct sc_info *sc = (struct sc_info *)p; - u_int32_t hisr; + uint32_t hisr; hisr = cs4281_rd(sc, CS4281PCI_HISR); @@ -558,7 +558,7 @@ cs4281_power(struct sc_info *sc, int state) static int cs4281_init(struct sc_info *sc) { - u_int32_t i, v; + uint32_t i, v; /* (0) Blast clock register and serial port */ cs4281_wr(sc, CS4281PCI_CLKCR1, 0); diff --git a/sys/dev/sound/pci/csa.c b/sys/dev/sound/pci/csa.c index 836a6f4599e5..085b3cffcdcb 100644 --- a/sys/dev/sound/pci/csa.c +++ b/sys/dev/sound/pci/csa.c @@ -81,7 +81,7 @@ static int csa_probe(device_t dev); static int csa_attach(device_t dev); static struct resource *csa_alloc_resource(device_t bus, device_t child, int type, int rid, rman_res_t start, rman_res_t end, - rman_res_t count, u_int flags); + rman_res_t count, unsigned int flags); static int csa_release_resource(device_t bus, device_t child, struct resource *r); static int csa_setup_intr(device_t bus, device_t child, struct resource *irq, int flags, @@ -92,7 +92,7 @@ static int csa_teardown_intr(device_t bus, device_t child, static driver_intr_t csa_intr; static int csa_initialize(sc_p scp); static int csa_downloadimage(csa_res *resp); -static int csa_transferimage(csa_res *resp, u_int32_t *src, u_long dest, u_long len); +static int csa_transferimage(csa_res *resp, uint32_t *src, u_long dest, u_long len); static void amp_none(void) @@ -110,7 +110,7 @@ clkrun_hack(int run) #ifdef __i386__ device_t child; int port; - u_int16_t control; + uint16_t control; bus_space_tag_t btag; child = pci_find_device(0x8086, 0x7113); @@ -153,7 +153,7 @@ static struct csa_card cards_4615[] = { static struct csa_card nocard = {0, 0, "unknown", NULL, NULL, NULL, 0}; struct card_type { - u_int32_t devid; + uint32_t devid; char *name; struct csa_card *cards; }; @@ -354,7 +354,7 @@ csa_resume(device_t dev) static struct resource * csa_alloc_resource(device_t bus, device_t child, int type, int rid, - rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) + rman_res_t start, rman_res_t end, rman_res_t count, unsigned int flags) { sc_p scp; csa_res *resp; @@ -491,7 +491,7 @@ csa_intr(void *arg) { sc_p scp = arg; csa_res *resp; - u_int32_t hisr; + uint32_t hisr; resp = &scp->res; @@ -527,7 +527,7 @@ static int csa_initialize(sc_p scp) { int i; - u_int32_t acsts, acisv; + uint32_t acsts, acisv; csa_res *resp; resp = &scp->res; @@ -726,7 +726,7 @@ void csa_clearserialfifos(csa_res *resp) { int i, j, pwr; - u_int8_t clkcr1, serbst; + uint8_t clkcr1, serbst; /* * See if the devices are powered down. If so, we must power them up first @@ -826,7 +826,7 @@ csa_downloadimage(csa_res *resp) } static int -csa_transferimage(csa_res *resp, u_int32_t *src, u_long dest, u_long len) +csa_transferimage(csa_res *resp, uint32_t *src, u_long dest, u_long len) { u_long ul; @@ -850,10 +850,10 @@ csa_transferimage(csa_res *resp, u_int32_t *src, u_long dest, u_long len) } int -csa_readcodec(csa_res *resp, u_long offset, u_int32_t *data) +csa_readcodec(csa_res *resp, u_long offset, uint32_t *data) { int i; - u_int32_t acctl, acsts; + uint32_t acctl, acsts; /* * Make sure that there is not data sitting around from a previous @@ -944,10 +944,10 @@ csa_readcodec(csa_res *resp, u_long offset, u_int32_t *data) } int -csa_writecodec(csa_res *resp, u_long offset, u_int32_t data) +csa_writecodec(csa_res *resp, u_long offset, uint32_t data) { int i; - u_int32_t acctl; + uint32_t acctl; /* * Setup the AC97 control registers on the CS461x to send the @@ -996,10 +996,10 @@ csa_writecodec(csa_res *resp, u_long offset, u_int32_t data) return (0); } -u_int32_t +uint32_t csa_readio(csa_res *resp, u_long offset) { - u_int32_t ul; + uint32_t ul; if (offset < BA0_AC97_RESET) return bus_space_read_4(rman_get_bustag(resp->io), rman_get_bushandle(resp->io), offset) & 0xffffffff; @@ -1011,7 +1011,7 @@ csa_readio(csa_res *resp, u_long offset) } void -csa_writeio(csa_res *resp, u_long offset, u_int32_t data) +csa_writeio(csa_res *resp, u_long offset, uint32_t data) { if (offset < BA0_AC97_RESET) bus_space_write_4(rman_get_bustag(resp->io), rman_get_bushandle(resp->io), offset, data); @@ -1019,14 +1019,14 @@ csa_writeio(csa_res *resp, u_long offset, u_int32_t data) csa_writecodec(resp, offset, data); } -u_int32_t +uint32_t csa_readmem(csa_res *resp, u_long offset) { return bus_space_read_4(rman_get_bustag(resp->mem), rman_get_bushandle(resp->mem), offset); } void -csa_writemem(csa_res *resp, u_long offset, u_int32_t data) +csa_writemem(csa_res *resp, u_long offset, uint32_t data) { bus_space_write_4(rman_get_bustag(resp->mem), rman_get_bushandle(resp->mem), offset, data); } diff --git a/sys/dev/sound/pci/csamidi.c b/sys/dev/sound/pci/csamidi.c index 29d5548b0954..f28bd0eea164 100644 --- a/sys/dev/sound/pci/csamidi.c +++ b/sys/dev/sound/pci/csamidi.c @@ -79,7 +79,7 @@ struct csa_midi_softc { static struct kobj_class csamidi_mpu_class; -static u_int32_t +static uint32_t csamidi_readio(struct csa_midi_softc *scp, u_long offset) { if (offset < BA0_AC97_RESET) @@ -89,7 +89,7 @@ csamidi_readio(struct csa_midi_softc *scp, u_long offset) } static void -csamidi_writeio(struct csa_midi_softc *scp, u_long offset, u_int32_t data) +csamidi_writeio(struct csa_midi_softc *scp, u_long offset, uint32_t data) { if (offset < BA0_AC97_RESET) bus_space_write_4(rman_get_bustag(scp->io), rman_get_bushandle(scp->io), offset, data); diff --git a/sys/dev/sound/pci/csapcm.c b/sys/dev/sound/pci/csapcm.c index 32c0603f78a2..318b37667a18 100644 --- a/sys/dev/sound/pci/csapcm.c +++ b/sys/dev/sound/pci/csapcm.c @@ -55,7 +55,7 @@ struct csa_chinfo { struct pcm_channel *channel; struct snd_dbuf *buffer; int dir; - u_int32_t fmt, spd; + uint32_t fmt, spd; int dma; }; @@ -72,9 +72,9 @@ struct csa_info { u_long pctl; u_long cctl; struct csa_chinfo pch, rch; - u_int32_t ac97[CS461x_AC97_NUMBER_RESTORE_REGS]; - u_int32_t ac97_powerdown; - u_int32_t ac97_general_purpose; + uint32_t ac97[CS461x_AC97_NUMBER_RESTORE_REGS]; + uint32_t ac97_powerdown; + uint32_t ac97_general_purpose; }; /* -------------------------------------------------------------------- */ @@ -95,7 +95,7 @@ static void csa_releaseres(struct csa_info *scp, device_t dev); static void csa_ac97_suspend(struct csa_info *csa); static void csa_ac97_resume(struct csa_info *csa); -static u_int32_t csa_playfmt[] = { +static uint32_t csa_playfmt[] = { SND_FORMAT(AFMT_U8, 1, 0), SND_FORMAT(AFMT_U8, 2, 0), SND_FORMAT(AFMT_S8, 1, 0), @@ -108,7 +108,7 @@ static u_int32_t csa_playfmt[] = { }; static struct pcmchan_caps csa_playcaps = {8000, 48000, csa_playfmt, 0}; -static u_int32_t csa_recfmt[] = { +static uint32_t csa_recfmt[] = { SND_FORMAT(AFMT_S16_LE, 1, 0), SND_FORMAT(AFMT_S16_LE, 2, 0), 0 @@ -139,7 +139,7 @@ csa_active(struct csa_info *csa, int run) static int csa_rdcd(kobj_t obj, void *devinfo, int regno) { - u_int32_t data; + uint32_t data; struct csa_info *csa = (struct csa_info *)devinfo; csa_active(csa, 1); @@ -151,7 +151,7 @@ csa_rdcd(kobj_t obj, void *devinfo, int regno) } static int -csa_wrcd(kobj_t obj, void *devinfo, int regno, u_int32_t data) +csa_wrcd(kobj_t obj, void *devinfo, int regno, uint32_t data) { struct csa_info *csa = (struct csa_info *)devinfo; @@ -542,7 +542,7 @@ csachan_init(kobj_t obj, void *devinfo, struct snd_dbuf *b, struct pcm_channel * } static int -csachan_setformat(kobj_t obj, void *data, u_int32_t format) +csachan_setformat(kobj_t obj, void *data, uint32_t format) { struct csa_chinfo *ch = data; @@ -550,8 +550,8 @@ csachan_setformat(kobj_t obj, void *data, u_int32_t format) return 0; } -static u_int32_t -csachan_setspeed(kobj_t obj, void *data, u_int32_t speed) +static uint32_t +csachan_setspeed(kobj_t obj, void *data, uint32_t speed) { struct csa_chinfo *ch = data; @@ -559,8 +559,8 @@ csachan_setspeed(kobj_t obj, void *data, u_int32_t speed) return ch->spd; /* XXX calc real speed */ } -static u_int32_t -csachan_setblocksize(kobj_t obj, void *data, u_int32_t blocksize) +static uint32_t +csachan_setblocksize(kobj_t obj, void *data, uint32_t blocksize) { return CS461x_BUFFSIZE / 2; } @@ -591,13 +591,13 @@ csachan_trigger(kobj_t obj, void *data, int go) return 0; } -static u_int32_t +static uint32_t csachan_getptr(kobj_t obj, void *data) { struct csa_chinfo *ch = data; struct csa_info *csa = ch->parent; csa_res *resp; - u_int32_t ptr; + uint32_t ptr; resp = &csa->res; diff --git a/sys/dev/sound/pci/csareg.h b/sys/dev/sound/pci/csareg.h index 3341390f618b..88f49fd32540 100644 --- a/sys/dev/sound/pci/csareg.h +++ b/sys/dev/sound/pci/csareg.h @@ -1963,10 +1963,10 @@ struct cs461x_firmware_struct { struct { - u_int32_t ulDestAddr, ulSourceSize; + uint32_t ulDestAddr, ulSourceSize; } MemoryStat[INKY_MEMORY_COUNT]; - u_int32_t BA1Array[INKY_BA1_DWORD_SIZE]; + uint32_t BA1Array[INKY_BA1_DWORD_SIZE]; }; #endif /* _CSA_REG_H */ diff --git a/sys/dev/sound/pci/csavar.h b/sys/dev/sound/pci/csavar.h index 3bd76e5b3d62..5ff9e3e4cda1 100644 --- a/sys/dev/sound/pci/csavar.h +++ b/sys/dev/sound/pci/csavar.h @@ -29,7 +29,7 @@ #ifndef _CSA_VAR_H #define _CSA_VAR_H struct csa_card { - u_int16_t subvendor, subdevice; + uint16_t subvendor, subdevice; char *name; void *amp; void *amp_init; @@ -50,7 +50,7 @@ typedef struct csa_res csa_res; /* State of the bridge. */ struct csa_bridgeinfo { - u_int32_t hisr; /* The value of HISR on this interrupt. */ + uint32_t hisr; /* The value of HISR on this interrupt. */ struct csa_card *card; }; @@ -58,13 +58,13 @@ void csa_clearserialfifos(csa_res *resp); /* Common functions for csa. */ struct csa_card *csa_findsubcard(device_t dev); -int csa_readcodec(csa_res *resp, u_long offset, u_int32_t *data); -int csa_writecodec(csa_res *resp, u_long offset, u_int32_t data); +int csa_readcodec(csa_res *resp, u_long offset, uint32_t *data); +int csa_writecodec(csa_res *resp, u_long offset, uint32_t data); -u_int32_t csa_readio(csa_res *resp, u_long offset); -void csa_writeio(csa_res *resp, u_long offset, u_int32_t data); -u_int32_t csa_readmem(csa_res *resp, u_long offset); -void csa_writemem(csa_res *resp, u_long offset, u_int32_t data); +uint32_t csa_readio(csa_res *resp, u_long offset); +void csa_writeio(csa_res *resp, u_long offset, uint32_t data); +uint32_t csa_readmem(csa_res *resp, u_long offset); +void csa_writemem(csa_res *resp, u_long offset, uint32_t data); void csa_resetdsp(csa_res *resp); #endif /* _CSA_VAR_H */ diff --git a/sys/dev/sound/pci/emu10k1.c b/sys/dev/sound/pci/emu10k1.c index da2ddc99f5a1..d3afa8d4fe43 100644 --- a/sys/dev/sound/pci/emu10k1.c +++ b/sys/dev/sound/pci/emu10k1.c @@ -159,13 +159,13 @@ struct emu_memblk { SLIST_ENTRY(emu_memblk) link; void *buf; bus_addr_t buf_addr; - u_int32_t pte_start, pte_size; + uint32_t pte_start, pte_size; bus_dmamap_t buf_map; }; struct emu_mem { - u_int8_t bmap[EMUMAXPAGES / 8]; - u_int32_t *ptb_pages; + uint8_t bmap[EMUMAXPAGES / 8]; + uint32_t *ptb_pages; void *silent_page; bus_addr_t silent_page_addr; bus_addr_t ptb_pages_addr; @@ -181,7 +181,7 @@ struct emu_voice { int start, end, vol; int fxrt1; /* FX routing */ int fxrt2; /* FX routing (only for audigy) */ - u_int32_t buf; + uint32_t buf; struct emu_voice *slave; struct pcm_channel *channel; }; @@ -199,7 +199,7 @@ struct sc_pchinfo { struct sc_rchinfo { int spd, fmt, run, blksz, num; - u_int32_t idxreg, basereg, sizereg, setupreg, irqmask; + uint32_t idxreg, basereg, sizereg, setupreg, irqmask; struct snd_dbuf *buffer; struct pcm_channel *channel; struct sc_info *parent; @@ -208,9 +208,9 @@ struct sc_rchinfo { /* device private data */ struct sc_info { device_t dev; - u_int32_t type, rev; - u_int32_t tos_link:1, APS:1, audigy:1, audigy2:1; - u_int32_t addrmask; /* wider if audigy */ + uint32_t type, rev; + uint32_t tos_link:1, APS:1, audigy:1, audigy2:1; + uint32_t addrmask; /* wider if audigy */ bus_space_tag_t st; bus_space_handle_t sh; @@ -242,8 +242,8 @@ struct sc_info { /* stuff */ static int emu_init(struct sc_info *); static void emu_intr(void *); -static void *emu_malloc(struct sc_info *sc, u_int32_t sz, bus_addr_t *addr, bus_dmamap_t *map); -static void *emu_memalloc(struct sc_info *sc, u_int32_t sz, bus_addr_t *addr); +static void *emu_malloc(struct sc_info *sc, uint32_t sz, bus_addr_t *addr, bus_dmamap_t *map); +static void *emu_memalloc(struct sc_info *sc, uint32_t sz, bus_addr_t *addr); static int emu_memfree(struct sc_info *sc, void *buf); static int emu_memstart(struct sc_info *sc, void *buf); #ifdef EMUDEBUG @@ -251,23 +251,23 @@ static void emu_vdump(struct sc_info *sc, struct emu_voice *v); #endif /* talk to the card */ -static u_int32_t emu_rd(struct sc_info *, int, int); -static void emu_wr(struct sc_info *, int, u_int32_t, int); +static uint32_t emu_rd(struct sc_info *, int, int); +static void emu_wr(struct sc_info *, int, uint32_t, int); /* -------------------------------------------------------------------- */ -static u_int32_t emu_rfmt_ac97[] = { +static uint32_t emu_rfmt_ac97[] = { SND_FORMAT(AFMT_S16_LE, 1, 0), SND_FORMAT(AFMT_S16_LE, 2, 0), 0 }; -static u_int32_t emu_rfmt_mic[] = { +static uint32_t emu_rfmt_mic[] = { SND_FORMAT(AFMT_U8, 1, 0), 0 }; -static u_int32_t emu_rfmt_efx[] = { +static uint32_t emu_rfmt_efx[] = { SND_FORMAT(AFMT_S16_LE, 2, 0), 0 }; @@ -278,7 +278,7 @@ static struct pcmchan_caps emu_reccaps[3] = { {48000, 48000, emu_rfmt_efx, 0}, }; -static u_int32_t emu_pfmt[] = { +static uint32_t emu_pfmt[] = { SND_FORMAT(AFMT_U8, 1, 0), SND_FORMAT(AFMT_U8, 2, 0), SND_FORMAT(AFMT_S16_LE, 1, 0), @@ -296,7 +296,7 @@ static int audigy_adcspeed[9] = { /* -------------------------------------------------------------------- */ /* Hardware */ -static u_int32_t +static uint32_t emu_rd(struct sc_info *sc, int regno, int size) { switch (size) { @@ -312,7 +312,7 @@ emu_rd(struct sc_info *sc, int regno, int size) } static void -emu_wr(struct sc_info *sc, int regno, u_int32_t data, int size) +emu_wr(struct sc_info *sc, int regno, uint32_t data, int size) { switch (size) { case 1: @@ -327,10 +327,10 @@ emu_wr(struct sc_info *sc, int regno, u_int32_t data, int size) } } -static u_int32_t +static uint32_t emu_rdptr(struct sc_info *sc, int chn, int reg) { - u_int32_t ptr, val, mask, size, offset; + uint32_t ptr, val, mask, size, offset; ptr = ((reg << 16) & sc->addrmask) | (chn & EMU_PTR_CHNO_MASK); emu_wr(sc, EMU_PTR, ptr, 4); @@ -346,9 +346,9 @@ emu_rdptr(struct sc_info *sc, int chn, int reg) } static void -emu_wrptr(struct sc_info *sc, int chn, int reg, u_int32_t data) +emu_wrptr(struct sc_info *sc, int chn, int reg, uint32_t data) { - u_int32_t ptr, mask, size, offset; + uint32_t ptr, mask, size, offset; ptr = ((reg << 16) & sc->addrmask) | (chn & EMU_PTR_CHNO_MASK); emu_wr(sc, EMU_PTR, ptr, 4); @@ -384,7 +384,7 @@ emu_rdcd(kobj_t obj, void *devinfo, int regno) } static int -emu_wrcd(kobj_t obj, void *devinfo, int regno, u_int32_t data) +emu_wrcd(kobj_t obj, void *devinfo, int regno, uint32_t data) { struct sc_info *sc = (struct sc_info *)devinfo; @@ -439,7 +439,7 @@ emu_settimer(struct sc_info *sc) static int emu_enatimer(struct sc_info *sc, int go) { - u_int32_t x; + uint32_t x; if (go) { if (sc->timer++ == 0) { x = emu_rd(sc, EMU_INTE, 4); @@ -485,10 +485,10 @@ audigy_recval(int speed) { return val; } -static u_int32_t -emu_rate_to_pitch(u_int32_t rate) +static uint32_t +emu_rate_to_pitch(uint32_t rate) { - static u_int32_t logMagTable[128] = { + static uint32_t logMagTable[128] = { 0x00000, 0x02dfc, 0x05b9e, 0x088e6, 0x0b5d6, 0x0e26f, 0x10eb3, 0x13aa2, 0x1663f, 0x1918a, 0x1bc84, 0x1e72e, 0x2118b, 0x23b9a, 0x2655d, 0x28ed5, 0x2b803, 0x2e0e8, 0x30985, 0x331db, 0x359eb, 0x381b6, 0x3a93d, 0x3d081, @@ -531,7 +531,7 @@ emu_rate_to_pitch(u_int32_t rate) rate *= 11185; /* Scale 48000 to 0x20002380 */ for (i = 31; i > 0; i--) { if (rate & 0x80000000) { /* Detect leading "1" */ - return (((u_int32_t) (i - 15) << 20) + + return (((uint32_t) (i - 15) << 20) + logMagTable[0x7f & (rate >> 24)] + (0x7f & (rate >> 17)) * logSlopeTable[0x7f & (rate >> 24)]); @@ -542,8 +542,8 @@ emu_rate_to_pitch(u_int32_t rate) return 0; /* Should never reach this point */ } -static u_int32_t -emu_rate_to_linearpitch(u_int32_t rate) +static uint32_t +emu_rate_to_linearpitch(uint32_t rate) { rate = (rate << 8) / 375; return (rate >> 1) + (rate & 1); @@ -566,7 +566,7 @@ emu_valloc(struct sc_info *sc) static int emu_vinit(struct sc_info *sc, struct emu_voice *m, struct emu_voice *s, - u_int32_t sz, struct snd_dbuf *b) + uint32_t sz, struct snd_dbuf *b) { void *buf; bus_addr_t tmp_addr; @@ -640,7 +640,7 @@ emu_vwrite(struct sc_info *sc, struct emu_voice *v) { int s; int l, r, x, y; - u_int32_t sa, ea, start, val, silent_page; + uint32_t sa, ea, start, val, silent_page; s = (v->stereo ? 1 : 0) + (v->b16 ? 1 : 0); @@ -674,7 +674,7 @@ emu_vwrite(struct sc_info *sc, struct emu_voice *v) emu_wrptr(sc, v->vnum, EMU_CHAN_Z1, 0); emu_wrptr(sc, v->vnum, EMU_CHAN_Z2, 0); - silent_page = ((u_int32_t)(sc->mem.silent_page_addr) << 1) + silent_page = ((uint32_t)(sc->mem.silent_page_addr) << 1) | EMU_CHAN_MAP_PTI_MASK; emu_wrptr(sc, v->vnum, EMU_CHAN_MAPA, silent_page); emu_wrptr(sc, v->vnum, EMU_CHAN_MAPB, silent_page); @@ -704,9 +704,9 @@ emu_vwrite(struct sc_info *sc, struct emu_voice *v) static void emu_vtrigger(struct sc_info *sc, struct emu_voice *v, int go) { - u_int32_t pitch_target, initial_pitch; - u_int32_t cra, cs, ccis; - u_int32_t sample, i; + uint32_t pitch_target, initial_pitch; + uint32_t cra, cs, ccis; + uint32_t sample, i; if (go) { cra = 64; @@ -845,7 +845,7 @@ emupchan_free(kobj_t obj, void *data) } static int -emupchan_setformat(kobj_t obj, void *data, u_int32_t format) +emupchan_setformat(kobj_t obj, void *data, uint32_t format) { struct sc_pchinfo *ch = data; @@ -853,8 +853,8 @@ emupchan_setformat(kobj_t obj, void *data, u_int32_t format) return 0; } -static u_int32_t -emupchan_setspeed(kobj_t obj, void *data, u_int32_t speed) +static uint32_t +emupchan_setspeed(kobj_t obj, void *data, uint32_t speed) { struct sc_pchinfo *ch = data; @@ -862,8 +862,8 @@ emupchan_setspeed(kobj_t obj, void *data, u_int32_t speed) return ch->spd; } -static u_int32_t -emupchan_setblocksize(kobj_t obj, void *data, u_int32_t blocksize) +static uint32_t +emupchan_setblocksize(kobj_t obj, void *data, uint32_t blocksize) { struct sc_pchinfo *ch = data; struct sc_info *sc = ch->parent; @@ -905,7 +905,7 @@ emupchan_trigger(kobj_t obj, void *data, int go) return 0; } -static u_int32_t +static uint32_t emupchan_getptr(kobj_t obj, void *data) { struct sc_pchinfo *ch = data; @@ -993,7 +993,7 @@ emurchan_init(kobj_t obj, void *devinfo, struct snd_dbuf *b, } static int -emurchan_setformat(kobj_t obj, void *data, u_int32_t format) +emurchan_setformat(kobj_t obj, void *data, uint32_t format) { struct sc_rchinfo *ch = data; @@ -1001,8 +1001,8 @@ emurchan_setformat(kobj_t obj, void *data, u_int32_t format) return 0; } -static u_int32_t -emurchan_setspeed(kobj_t obj, void *data, u_int32_t speed) +static uint32_t +emurchan_setspeed(kobj_t obj, void *data, uint32_t speed) { struct sc_rchinfo *ch = data; @@ -1020,8 +1020,8 @@ emurchan_setspeed(kobj_t obj, void *data, u_int32_t speed) return ch->spd; } -static u_int32_t -emurchan_setblocksize(kobj_t obj, void *data, u_int32_t blocksize) +static uint32_t +emurchan_setblocksize(kobj_t obj, void *data, uint32_t blocksize) { struct sc_rchinfo *ch = data; struct sc_info *sc = ch->parent; @@ -1039,7 +1039,7 @@ emurchan_trigger(kobj_t obj, void *data, int go) { struct sc_rchinfo *ch = data; struct sc_info *sc = ch->parent; - u_int32_t val, sz; + uint32_t val, sz; if (!PCMTRIG_COMMON(go)) return 0; @@ -1116,7 +1116,7 @@ emurchan_trigger(kobj_t obj, void *data, int go) return 0; } -static u_int32_t +static uint32_t emurchan_getptr(kobj_t obj, void *data) { struct sc_rchinfo *ch = data; @@ -1214,7 +1214,7 @@ static void emu_intr(void *data) { struct sc_info *sc = data; - u_int32_t stat, ack, i, x; + uint32_t stat, ack, i, x; mtx_lock(&sc->lock); while (1) { @@ -1312,7 +1312,7 @@ emu_setmap(void *arg, bus_dma_segment_t *segs, int nseg, int error) } static void * -emu_malloc(struct sc_info *sc, u_int32_t sz, bus_addr_t *addr, +emu_malloc(struct sc_info *sc, uint32_t sz, bus_addr_t *addr, bus_dmamap_t *map) { void *buf; @@ -1336,9 +1336,9 @@ emu_free(struct sc_info *sc, void *buf, bus_dmamap_t map) } static void * -emu_memalloc(struct sc_info *sc, u_int32_t sz, bus_addr_t *addr) +emu_memalloc(struct sc_info *sc, uint32_t sz, bus_addr_t *addr) { - u_int32_t blksz, start, idx, ofs, tmp, found; + uint32_t blksz, start, idx, ofs, tmp, found; struct emu_mem *mem = &sc->mem; struct emu_memblk *blk; void *buf; @@ -1381,7 +1381,7 @@ emu_memalloc(struct sc_info *sc, u_int32_t sz, bus_addr_t *addr) tmp = (uint32_t)(blk->buf_addr + ofs); #ifdef EMUDEBUG printf("pte[%d] -> %x phys, %x virt\n", idx, tmp, - ((u_int32_t)buf) + ofs); + ((uint32_t)buf) + ofs); #endif mem->ptb_pages[idx] = (tmp << 1) | idx; ofs += EMUPAGESIZE; @@ -1393,7 +1393,7 @@ emu_memalloc(struct sc_info *sc, u_int32_t sz, bus_addr_t *addr) static int emu_memfree(struct sc_info *sc, void *buf) { - u_int32_t idx, tmp; + uint32_t idx, tmp; struct emu_mem *mem = &sc->mem; struct emu_memblk *blk, *i; @@ -1406,7 +1406,7 @@ emu_memfree(struct sc_info *sc, void *buf) return EINVAL; SLIST_REMOVE(&mem->blocks, blk, emu_memblk, link); emu_free(sc, buf, blk->buf_map); - tmp = (u_int32_t)(sc->mem.silent_page_addr) << 1; + tmp = (uint32_t)(sc->mem.silent_page_addr) << 1; for (idx = blk->pte_start; idx < blk->pte_start + blk->pte_size; idx++) { mem->bmap[idx >> 3] &= ~(1 << (idx & 7)); mem->ptb_pages[idx] = tmp | idx; @@ -1433,7 +1433,7 @@ emu_memstart(struct sc_info *sc, void *buf) static void emu_addefxop(struct sc_info *sc, int op, int z, int w, int x, int y, - u_int32_t *pc) + uint32_t *pc) { emu_wrefx(sc, (*pc) * 2, (x << 10) | y); emu_wrefx(sc, (*pc) * 2 + 1, (op << 20) | (z << 10) | w); @@ -1442,7 +1442,7 @@ emu_addefxop(struct sc_info *sc, int op, int z, int w, int x, int y, static void audigy_addefxop(struct sc_info *sc, int op, int z, int w, int x, int y, - u_int32_t *pc) + uint32_t *pc) { emu_wrefx(sc, (*pc) * 2, (x << 12) | y); emu_wrefx(sc, (*pc) * 2 + 1, (op << 24) | (z << 12) | w); @@ -1453,7 +1453,7 @@ static void audigy_initefx(struct sc_info *sc) { int i; - u_int32_t pc = 0; + uint32_t pc = 0; /* skip 0, 0, -1, 0 - NOPs */ for (i = 0; i < 512; i++) @@ -1607,7 +1607,7 @@ static void emu_initefx(struct sc_info *sc) { int i; - u_int32_t pc = 16; + uint32_t pc = 16; /* acc3 0,0,0,0 - NOPs */ for (i = 0; i < 512; i++) { @@ -1743,7 +1743,7 @@ emu_initefx(struct sc_info *sc) static int emu_init(struct sc_info *sc) { - u_int32_t spcs, ch, tmp, i; + uint32_t spcs, ch, tmp, i; if (sc->audigy) { /* enable additional AC97 slots */ @@ -1865,7 +1865,7 @@ emu_init(struct sc_info *sc) /* from ALSA initialization code: */ /* Hack for Alice3 to work independent of haP16V driver */ - u_int32_t tmp; + uint32_t tmp; /* Setup SRCMulti_I2S SamplingRate */ tmp = emu_rdptr(sc, 0, EMU_A_SPDIF_SAMPLERATE) & 0xfffff1ff; @@ -1881,7 +1881,7 @@ emu_init(struct sc_info *sc) } SLIST_INIT(&sc->mem.blocks); - sc->mem.ptb_pages = emu_malloc(sc, EMUMAXPAGES * sizeof(u_int32_t), + sc->mem.ptb_pages = emu_malloc(sc, EMUMAXPAGES * sizeof(uint32_t), &sc->mem.ptb_pages_addr, &sc->mem.ptb_map); if (sc->mem.ptb_pages == NULL) return -1; @@ -1894,7 +1894,7 @@ emu_init(struct sc_info *sc) } /* Clear page with silence & setup all pointers to this page */ bzero(sc->mem.silent_page, EMUPAGESIZE); - tmp = (u_int32_t)(sc->mem.silent_page_addr) << 1; + tmp = (uint32_t)(sc->mem.silent_page_addr) << 1; for (i = 0; i < EMUMAXPAGES; i++) sc->mem.ptb_pages[i] = tmp | i; @@ -1983,7 +1983,7 @@ emu_init(struct sc_info *sc) static int emu_uninit(struct sc_info *sc) { - u_int32_t ch; + uint32_t ch; emu_wr(sc, EMU_INTE, 0, 4); for (ch = 0; ch < NUM_G; ch++) diff --git a/sys/dev/sound/pci/emu10kx-pcm.c b/sys/dev/sound/pci/emu10kx-pcm.c index 25b0006e4122..b9c8e4291eeb 100644 --- a/sys/dev/sound/pci/emu10kx-pcm.c +++ b/sys/dev/sound/pci/emu10kx-pcm.c @@ -388,12 +388,12 @@ emu_dspmixer_set(struct snd_mixer *m, unsigned dev, unsigned left, unsigned righ return (0); } -static u_int32_t -emu_dspmixer_setrecsrc(struct snd_mixer *m, u_int32_t src) +static uint32_t +emu_dspmixer_setrecsrc(struct snd_mixer *m, uint32_t src) { struct emu_pcm_info *sc; int i; - u_int32_t recmask; + uint32_t recmask; int input[8]; sc = mix_getdevinfo(m); @@ -489,8 +489,8 @@ emu_efxmixer_set(struct snd_mixer *m, unsigned dev, unsigned left, unsigned righ return (0); } -static u_int32_t -emu_efxmixer_setrecsrc(struct snd_mixer *m __unused, u_int32_t src __unused) +static uint32_t +emu_efxmixer_setrecsrc(struct snd_mixer *m __unused, uint32_t src __unused) { return (SOUND_MASK_MONITOR); } diff --git a/sys/dev/sound/pci/envy24.c b/sys/dev/sound/pci/envy24.c index 5b74c5646a1c..df9c680b9414 100644 --- a/sys/dev/sound/pci/envy24.c +++ b/sys/dev/sound/pci/envy24.c @@ -63,7 +63,7 @@ struct sc_info; #define SCL_GPIO 0x20 struct envy24_sample { - volatile u_int32_t buffer; + volatile uint32_t buffer; }; typedef struct envy24_sample sample32_t; @@ -77,12 +77,12 @@ struct sc_chinfo { unsigned num; /* hw channel number */ /* channel information */ - u_int32_t format; - u_int32_t speed; - u_int32_t blk; /* hw block size(dword) */ + uint32_t format; + uint32_t speed; + uint32_t blk; /* hw block size(dword) */ /* format conversion structure */ - u_int8_t *data; + uint8_t *data; unsigned int size; /* data buffer size(byte) */ int unit; /* sample size(byte) */ unsigned int offset; /* samples number offset */ @@ -105,11 +105,11 @@ struct codec_entry { /* system configuration information */ struct cfg_info { char *name; - u_int16_t subvendor, subdevice; - u_int8_t scfg, acl, i2s, spdif; - u_int8_t gpiomask, gpiostate, gpiodir; - u_int8_t cdti, cclk, cs, cif, type; - u_int8_t free; + uint16_t subvendor, subdevice; + uint8_t scfg, acl, i2s, spdif; + uint8_t gpiomask, gpiostate, gpiodir; + uint8_t cdti, cclk, cs, cif, type; + uint8_t free; struct codec_entry *codec; }; @@ -153,22 +153,22 @@ struct sc_info { void *adc[4], *dac[4]; /* mixer control data */ - u_int32_t src; - u_int8_t left[ENVY24_CHAN_NUM]; - u_int8_t right[ENVY24_CHAN_NUM]; + uint32_t src; + uint8_t left[ENVY24_CHAN_NUM]; + uint8_t right[ENVY24_CHAN_NUM]; /* Play/Record DMA fifo */ sample32_t *pbuf; sample32_t *rbuf; - u_int32_t psize, rsize; /* DMA buffer size(byte) */ - u_int16_t blk[2]; /* transfer check blocksize(dword) */ + uint32_t psize, rsize; /* DMA buffer size(byte) */ + uint16_t blk[2]; /* transfer check blocksize(dword) */ bus_dmamap_t pmap, rmap; bus_addr_t paddr, raddr; /* current status */ - u_int32_t speed; + uint32_t speed; int run[2]; - u_int16_t intr[2]; + uint16_t intr[2]; struct pcmchan_caps caps[2]; /* channel info table */ @@ -191,11 +191,11 @@ static void envy24_r32sl(struct sc_chinfo *); /* channel interface */ static void *envy24chan_init(kobj_t, void *, struct snd_dbuf *, struct pcm_channel *, int); -static int envy24chan_setformat(kobj_t, void *, u_int32_t); -static u_int32_t envy24chan_setspeed(kobj_t, void *, u_int32_t); -static u_int32_t envy24chan_setblocksize(kobj_t, void *, u_int32_t); +static int envy24chan_setformat(kobj_t, void *, uint32_t); +static uint32_t envy24chan_setspeed(kobj_t, void *, uint32_t); +static uint32_t envy24chan_setblocksize(kobj_t, void *, uint32_t); static int envy24chan_trigger(kobj_t, void *, int); -static u_int32_t envy24chan_getptr(kobj_t, void *); +static uint32_t envy24chan_getptr(kobj_t, void *); static struct pcmchan_caps *envy24chan_getcaps(kobj_t, void *); /* mixer interface */ @@ -203,7 +203,7 @@ static int envy24mixer_init(struct snd_mixer *); static int envy24mixer_reinit(struct snd_mixer *); static int envy24mixer_uninit(struct snd_mixer *); static int envy24mixer_set(struct snd_mixer *, unsigned, unsigned, unsigned); -static u_int32_t envy24mixer_setrecsrc(struct snd_mixer *, u_int32_t); +static uint32_t envy24mixer_setrecsrc(struct snd_mixer *, uint32_t); /* M-Audio Delta series AK4524 access interface */ static void *envy24_delta_ak4524_create(device_t, void *, int, int); @@ -263,7 +263,7 @@ static int envy24_mixmap[] = { }; /* variable rate audio */ -static u_int32_t envy24_speed[] = { +static uint32_t envy24_speed[] = { 96000, 88200, 64000, 48000, 44100, 32000, 24000, 22050, 16000, 12000, 11025, 9600, 8000, 0 }; @@ -362,14 +362,14 @@ static struct cfg_info cfg_table[] = { } }; -static u_int32_t envy24_recfmt[] = { +static uint32_t envy24_recfmt[] = { SND_FORMAT(AFMT_S16_LE, 2, 0), SND_FORMAT(AFMT_S32_LE, 2, 0), 0 }; static struct pcmchan_caps envy24_reccaps = {8000, 96000, envy24_recfmt, 0}; -static u_int32_t envy24_playfmt[] = { +static uint32_t envy24_playfmt[] = { SND_FORMAT(AFMT_U8, 2, 0), SND_FORMAT(AFMT_S16_LE, 2, 0), SND_FORMAT(AFMT_S32_LE, 2, 0), @@ -379,7 +379,7 @@ static u_int32_t envy24_playfmt[] = { static struct pcmchan_caps envy24_playcaps = {8000, 96000, envy24_playfmt, 0}; struct envy24_emldma { - u_int32_t format; + uint32_t format; void (*emldma)(struct sc_chinfo *); int unit; }; @@ -400,7 +400,7 @@ static struct envy24_emldma envy24_remltab[] = { /* -------------------------------------------------------------------- */ /* common routines */ -static u_int32_t +static uint32_t envy24_rdcs(struct sc_info *sc, int regno, int size) { switch (size) { @@ -416,7 +416,7 @@ envy24_rdcs(struct sc_info *sc, int regno, int size) } static void -envy24_wrcs(struct sc_info *sc, int regno, u_int32_t data, int size) +envy24_wrcs(struct sc_info *sc, int regno, uint32_t data, int size) { switch (size) { case 1: @@ -431,7 +431,7 @@ envy24_wrcs(struct sc_info *sc, int regno, u_int32_t data, int size) } } -static u_int32_t +static uint32_t envy24_rdmt(struct sc_info *sc, int regno, int size) { switch (size) { @@ -447,7 +447,7 @@ envy24_rdmt(struct sc_info *sc, int regno, int size) } static void -envy24_wrmt(struct sc_info *sc, int regno, u_int32_t data, int size) +envy24_wrmt(struct sc_info *sc, int regno, uint32_t data, int size) { switch (size) { case 1: @@ -462,7 +462,7 @@ envy24_wrmt(struct sc_info *sc, int regno, u_int32_t data, int size) } } -static u_int32_t +static uint32_t envy24_rdci(struct sc_info *sc, int regno) { envy24_wrcs(sc, ENVY24_CCS_INDEX, regno, 1); @@ -470,7 +470,7 @@ envy24_rdci(struct sc_info *sc, int regno) } static void -envy24_wrci(struct sc_info *sc, int regno, u_int32_t data) +envy24_wrci(struct sc_info *sc, int regno, uint32_t data) { envy24_wrcs(sc, ENVY24_CCS_INDEX, regno, 1); envy24_wrcs(sc, ENVY24_CCS_DATA, data, 1); @@ -481,9 +481,9 @@ envy24_wrci(struct sc_info *sc, int regno, u_int32_t data) /* I2C port/E2PROM access routines */ static int -envy24_rdi2c(struct sc_info *sc, u_int32_t dev, u_int32_t addr) +envy24_rdi2c(struct sc_info *sc, uint32_t dev, uint32_t addr) { - u_int32_t data; + uint32_t data; int i; #if(0) @@ -520,9 +520,9 @@ envy24_rdi2c(struct sc_info *sc, u_int32_t dev, u_int32_t addr) #if 0 static int -envy24_wri2c(struct sc_info *sc, u_int32_t dev, u_int32_t addr, u_int32_t data) +envy24_wri2c(struct sc_info *sc, uint32_t dev, uint32_t addr, uint32_t data) { - u_int32_t tmp; + uint32_t tmp; int i; #if(0) @@ -556,9 +556,9 @@ envy24_wri2c(struct sc_info *sc, u_int32_t dev, u_int32_t addr, u_int32_t data) #endif static int -envy24_rdrom(struct sc_info *sc, u_int32_t addr) +envy24_rdrom(struct sc_info *sc, uint32_t addr) { - u_int32_t data; + uint32_t data; #if(0) device_printf(sc->dev, "envy24_rdrom(sc, 0x%02x)\n", addr); @@ -639,7 +639,7 @@ envy24_cfgfree(struct cfg_info *cfg) { static int envy24_coldcd(struct sc_info *sc) { - u_int32_t data; + uint32_t data; int i; #if(0) @@ -663,7 +663,7 @@ envy24_coldcd(struct sc_info *sc) static int envy24_slavecd(struct sc_info *sc) { - u_int32_t data; + uint32_t data; int i; #if(0) @@ -689,13 +689,13 @@ static int envy24_rdcd(kobj_t obj, void *devinfo, int regno) { struct sc_info *sc = (struct sc_info *)devinfo; - u_int32_t data; + uint32_t data; int i; #if(0) device_printf(sc->dev, "envy24_rdcd(obj, sc, 0x%02x)\n", regno); #endif - envy24_wrmt(sc, ENVY24_MT_AC97IDX, (u_int32_t)regno, 1); + envy24_wrmt(sc, ENVY24_MT_AC97IDX, (uint32_t)regno, 1); envy24_wrmt(sc, ENVY24_MT_AC97CMD, ENVY24_MT_AC97CMD_RD, 1); for (i = 0; i < ENVY24_TIMEOUT; i++) { data = envy24_rdmt(sc, ENVY24_MT_AC97CMD, 1); @@ -711,17 +711,17 @@ envy24_rdcd(kobj_t obj, void *devinfo, int regno) } static int -envy24_wrcd(kobj_t obj, void *devinfo, int regno, u_int16_t data) +envy24_wrcd(kobj_t obj, void *devinfo, int regno, uint16_t data) { struct sc_info *sc = (struct sc_info *)devinfo; - u_int32_t cmd; + uint32_t cmd; int i; #if(0) device_printf(sc->dev, "envy24_wrcd(obj, sc, 0x%02x, 0x%04x)\n", regno, data); #endif - envy24_wrmt(sc, ENVY24_MT_AC97IDX, (u_int32_t)regno, 1); - envy24_wrmt(sc, ENVY24_MT_AC97DLO, (u_int32_t)data, 2); + envy24_wrmt(sc, ENVY24_MT_AC97IDX, (uint32_t)regno, 1); + envy24_wrmt(sc, ENVY24_MT_AC97DLO, (uint32_t)data, 2); envy24_wrmt(sc, ENVY24_MT_AC97CMD, ENVY24_MT_AC97CMD_WR, 1); for (i = 0; i < ENVY24_TIMEOUT; i++) { cmd = envy24_rdmt(sc, ENVY24_MT_AC97CMD, 1); @@ -744,14 +744,14 @@ AC97_DECLARE(envy24_ac97); /* GPIO access routines */ -static u_int32_t +static uint32_t envy24_gpiord(struct sc_info *sc) { return envy24_rdci(sc, ENVY24_CCI_GPIODAT); } static void -envy24_gpiowr(struct sc_info *sc, u_int32_t data) +envy24_gpiowr(struct sc_info *sc, uint32_t data) { #if(0) device_printf(sc->dev, "envy24_gpiowr(sc, 0x%02x)\n", data & 0xff); @@ -762,7 +762,7 @@ envy24_gpiowr(struct sc_info *sc, u_int32_t data) } #if 0 -static u_int32_t +static uint32_t envy24_gpiogetmask(struct sc_info *sc) { return envy24_rdci(sc, ENVY24_CCI_GPIOMASK); @@ -770,14 +770,14 @@ envy24_gpiogetmask(struct sc_info *sc) #endif static void -envy24_gpiosetmask(struct sc_info *sc, u_int32_t mask) +envy24_gpiosetmask(struct sc_info *sc, uint32_t mask) { envy24_wrci(sc, ENVY24_CCI_GPIOMASK, mask); return; } #if 0 -static u_int32_t +static uint32_t envy24_gpiogetdir(struct sc_info *sc) { return envy24_rdci(sc, ENVY24_CCI_GPIOCTL); @@ -785,7 +785,7 @@ envy24_gpiogetdir(struct sc_info *sc) #endif static void -envy24_gpiosetdir(struct sc_info *sc, u_int32_t dir) +envy24_gpiosetdir(struct sc_info *sc, uint32_t dir) { envy24_wrci(sc, ENVY24_CCI_GPIOCTL, dir); return; @@ -806,7 +806,7 @@ struct envy24_delta_ak4524_codec { static void envy24_gpio_i2c_ctl(void *codec, unsigned int scl, unsigned int sda) { - u_int32_t data = 0; + uint32_t data = 0; struct envy24_delta_ak4524_codec *ptr = codec; #if(0) device_printf(ptr->parent->dev, "--> %d, %d\n", scl, sda); @@ -879,7 +879,7 @@ i2c_ack(void *codec, void (*ctrl)(void*, unsigned int, unsigned int)) } static void -i2c_wr(void *codec, void (*ctrl)(void*, unsigned int, unsigned int), u_int32_t dev, int reg, u_int8_t val) +i2c_wr(void *codec, void (*ctrl)(void*, unsigned int, unsigned int), uint32_t dev, int reg, uint8_t val) { struct envy24_delta_ak4524_codec *ptr = codec; int mask; @@ -910,7 +910,7 @@ i2c_wr(void *codec, void (*ctrl)(void*, unsigned int, unsigned int), u_int32_t static void envy24_delta_ak4524_ctl(void *codec, unsigned int cs, unsigned int cclk, unsigned int cdti) { - u_int32_t data = 0; + uint32_t data = 0; struct envy24_delta_ak4524_codec *ptr = codec; #if(0) @@ -983,7 +983,7 @@ static void envy24_delta_ak4524_init(void *codec) { #if 0 - u_int32_t gpiomask, gpiodir; + uint32_t gpiomask, gpiodir; #endif struct envy24_delta_ak4524_codec *ptr = codec; if (ptr == NULL) @@ -1073,8 +1073,8 @@ envy24_delta_ak4524_setvolume(void *codec, int dir, unsigned int left, unsigned /* hardware access routeines */ static struct { - u_int32_t speed; - u_int32_t code; + uint32_t speed; + uint32_t code; } envy24_speedtab[] = { {48000, ENVY24_MT_RATE_48000}, {24000, ENVY24_MT_RATE_24000}, @@ -1092,9 +1092,9 @@ static struct { {0, 0x10} }; -static u_int32_t -envy24_setspeed(struct sc_info *sc, u_int32_t speed) { - u_int32_t code; +static uint32_t +envy24_setspeed(struct sc_info *sc, uint32_t speed) { + uint32_t code; int i = 0; #if(0) @@ -1155,7 +1155,7 @@ if (sc->cfg->subvendor==0x153b && sc->cfg->subdevice==0x1138 ) { static void envy24_mutevolume(struct sc_info *sc, unsigned ch) { - u_int32_t vol; + uint32_t vol; #if(0) device_printf(sc->dev, "envy24_mutevolume(sc, %d)\n", ch); @@ -1167,11 +1167,11 @@ envy24_mutevolume(struct sc_info *sc, unsigned ch) envy24_wrmt(sc, ENVY24_MT_VOLUME, vol, 2); } -static u_int32_t +static uint32_t envy24_gethwptr(struct sc_info *sc, int dir) { int unit, regno; - u_int32_t ptr, rtn; + uint32_t ptr, rtn; #if(0) device_printf(sc->dev, "envy24_gethwptr(sc, %d)\n", dir); @@ -1201,9 +1201,9 @@ static void envy24_updintr(struct sc_info *sc, int dir) { int regintr; - u_int32_t mask, intr; - u_int32_t cnt; - u_int16_t blk; + uint32_t mask, intr; + uint32_t cnt; + uint16_t blk; #if(0) device_printf(sc->dev, "envy24_updintr(sc, %d)\n", dir); @@ -1241,7 +1241,7 @@ envy24_updintr(struct sc_info *sc, int dir) static void envy24_maskintr(struct sc_info *sc, int dir) { - u_int32_t mask, intr; + uint32_t mask, intr; #if(0) device_printf(sc->dev, "envy24_maskintr(sc, %d)\n", dir); @@ -1260,7 +1260,7 @@ envy24_maskintr(struct sc_info *sc, int dir) static int envy24_checkintr(struct sc_info *sc, int dir) { - u_int32_t mask, stat, intr, rtn; + uint32_t mask, stat, intr, rtn; #if(0) device_printf(sc->dev, "envy24_checkintr(sc, %d)\n", dir); @@ -1287,7 +1287,7 @@ envy24_checkintr(struct sc_info *sc, int dir) static void envy24_start(struct sc_info *sc, int dir) { - u_int32_t stat, sw; + uint32_t stat, sw; #if(0) device_printf(sc->dev, "envy24_start(sc, %d)\n", dir); @@ -1311,7 +1311,7 @@ envy24_start(struct sc_info *sc, int dir) static void envy24_stop(struct sc_info *sc, int dir) { - u_int32_t stat, sw; + uint32_t stat, sw; #if(0) device_printf(sc->dev, "envy24_stop(sc, %d)\n", dir); @@ -1330,8 +1330,8 @@ envy24_stop(struct sc_info *sc, int dir) static int envy24_route(struct sc_info *sc, int dac, int class, int adc, int rev) { - u_int32_t reg, mask; - u_int32_t left, right; + uint32_t reg, mask; + uint32_t left, right; #if(0) device_printf(sc->dev, "envy24_route(sc, %d, %d, %d, %d)\n", @@ -1394,13 +1394,13 @@ envy24_p32sl(struct sc_chinfo *ch) { int length; sample32_t *dmabuf; - u_int32_t *data; + uint32_t *data; int src, dst, ssize, dsize, slot; int i; length = sndbuf_getready(ch->buffer) / 8; dmabuf = ch->parent->pbuf; - data = (u_int32_t *)ch->data; + data = (uint32_t *)ch->data; src = sndbuf_getreadyptr(ch->buffer) / 4; dst = src / 2 + ch->offset; ssize = ch->size / 4; @@ -1424,7 +1424,7 @@ envy24_p16sl(struct sc_chinfo *ch) { int length; sample32_t *dmabuf; - u_int16_t *data; + uint16_t *data; int src, dst, ssize, dsize, slot; int i; @@ -1433,7 +1433,7 @@ envy24_p16sl(struct sc_chinfo *ch) #endif length = sndbuf_getready(ch->buffer) / 4; dmabuf = ch->parent->pbuf; - data = (u_int16_t *)ch->data; + data = (uint16_t *)ch->data; src = sndbuf_getreadyptr(ch->buffer) / 2; dst = src / 2 + ch->offset; ssize = ch->size / 2; @@ -1444,8 +1444,8 @@ envy24_p16sl(struct sc_chinfo *ch) #endif for (i = 0; i < length; i++) { - dmabuf[dst * ENVY24_PLAY_CHNUM + slot].buffer = (u_int32_t)data[src] << 16; - dmabuf[dst * ENVY24_PLAY_CHNUM + slot + 1].buffer = (u_int32_t)data[src + 1] << 16; + dmabuf[dst * ENVY24_PLAY_CHNUM + slot].buffer = (uint32_t)data[src] << 16; + dmabuf[dst * ENVY24_PLAY_CHNUM + slot + 1].buffer = (uint32_t)data[src + 1] << 16; #if(0) if (i < 16) { printf("%08x", dmabuf[dst * ENVY24_PLAY_CHNUM + slot]); @@ -1469,13 +1469,13 @@ envy24_p8u(struct sc_chinfo *ch) { int length; sample32_t *dmabuf; - u_int8_t *data; + uint8_t *data; int src, dst, ssize, dsize, slot; int i; length = sndbuf_getready(ch->buffer) / 2; dmabuf = ch->parent->pbuf; - data = (u_int8_t *)ch->data; + data = (uint8_t *)ch->data; src = sndbuf_getreadyptr(ch->buffer); dst = src / 2 + ch->offset; ssize = ch->size; @@ -1483,8 +1483,8 @@ envy24_p8u(struct sc_chinfo *ch) slot = ch->num * 2; for (i = 0; i < length; i++) { - dmabuf[dst * ENVY24_PLAY_CHNUM + slot].buffer = ((u_int32_t)data[src] ^ 0x80) << 24; - dmabuf[dst * ENVY24_PLAY_CHNUM + slot + 1].buffer = ((u_int32_t)data[src + 1] ^ 0x80) << 24; + dmabuf[dst * ENVY24_PLAY_CHNUM + slot].buffer = ((uint32_t)data[src] ^ 0x80) << 24; + dmabuf[dst * ENVY24_PLAY_CHNUM + slot + 1].buffer = ((uint32_t)data[src + 1] ^ 0x80) << 24; dst++; dst %= dsize; src += 2; @@ -1499,13 +1499,13 @@ envy24_r32sl(struct sc_chinfo *ch) { int length; sample32_t *dmabuf; - u_int32_t *data; + uint32_t *data; int src, dst, ssize, dsize, slot; int i; length = sndbuf_getfree(ch->buffer) / 8; dmabuf = ch->parent->rbuf; - data = (u_int32_t *)ch->data; + data = (uint32_t *)ch->data; dst = sndbuf_getfreeptr(ch->buffer) / 4; src = dst / 2 + ch->offset; dsize = ch->size / 4; @@ -1529,13 +1529,13 @@ envy24_r16sl(struct sc_chinfo *ch) { int length; sample32_t *dmabuf; - u_int16_t *data; + uint16_t *data; int src, dst, ssize, dsize, slot; int i; length = sndbuf_getfree(ch->buffer) / 4; dmabuf = ch->parent->rbuf; - data = (u_int16_t *)ch->data; + data = (uint16_t *)ch->data; dst = sndbuf_getfreeptr(ch->buffer) / 2; src = dst / 2 + ch->offset; dsize = ch->size / 2; @@ -1619,7 +1619,7 @@ envy24chan_free(kobj_t obj, void *data) } static int -envy24chan_setformat(kobj_t obj, void *data, u_int32_t format) +envy24chan_setformat(kobj_t obj, void *data, uint32_t format) { struct sc_chinfo *ch = data; struct sc_info *sc = ch->parent; @@ -1684,11 +1684,11 @@ envy24chan_setformat(kobj_t obj, void *data, u_int32_t format) start triggerd, some other channel is running, and that channel's speed isn't same with, then trigger function will fail. */ -static u_int32_t -envy24chan_setspeed(kobj_t obj, void *data, u_int32_t speed) +static uint32_t +envy24chan_setspeed(kobj_t obj, void *data, uint32_t speed) { struct sc_chinfo *ch = data; - u_int32_t val, prev; + uint32_t val, prev; int i; #if(0) @@ -1709,12 +1709,12 @@ envy24chan_setspeed(kobj_t obj, void *data, u_int32_t speed) return ch->speed; } -static u_int32_t -envy24chan_setblocksize(kobj_t obj, void *data, u_int32_t blocksize) +static uint32_t +envy24chan_setblocksize(kobj_t obj, void *data, uint32_t blocksize) { struct sc_chinfo *ch = data; /* struct sc_info *sc = ch->parent; */ - u_int32_t size, prev; + uint32_t size, prev; unsigned int bcnt, bsize; #if(0) @@ -1757,7 +1757,7 @@ envy24chan_trigger(kobj_t obj, void *data, int go) { struct sc_chinfo *ch = data; struct sc_info *sc = ch->parent; - u_int32_t ptr; + uint32_t ptr; int slot; int error = 0; #if 0 @@ -1864,12 +1864,12 @@ fail: return (error); } -static u_int32_t +static uint32_t envy24chan_getptr(kobj_t obj, void *data) { struct sc_chinfo *ch = data; struct sc_info *sc = ch->parent; - u_int32_t ptr, rtn; + uint32_t ptr, rtn; #if(0) device_printf(sc->dev, "envy24chan_getptr()\n"); @@ -2023,8 +2023,8 @@ envy24mixer_set(struct snd_mixer *m, unsigned dev, unsigned left, unsigned right return right << 8 | left; } -static u_int32_t -envy24mixer_setrecsrc(struct snd_mixer *m, u_int32_t src) +static uint32_t +envy24mixer_setrecsrc(struct snd_mixer *m, uint32_t src) { struct sc_info *sc = mix_getdevinfo(m); int ch = envy24_mixmap[src]; @@ -2055,7 +2055,7 @@ envy24_intr(void *p) { struct sc_info *sc = (struct sc_info *)p; struct sc_chinfo *ch; - u_int32_t ptr, dsize, feed; + uint32_t ptr, dsize, feed; int i; #if(0) @@ -2122,7 +2122,7 @@ envy24_intr(void *p) static int envy24_pci_probe(device_t dev) { - u_int16_t sv, sd; + uint16_t sv, sd; int i; #if(0) @@ -2191,11 +2191,11 @@ envy24_dmafree(struct sc_info *sc) { #if(0) device_printf(sc->dev, "envy24_dmafree():"); - printf(" sc->raddr(0x%08x)", (u_int32_t)sc->raddr); - printf(" sc->paddr(0x%08x)", (u_int32_t)sc->paddr); - if (sc->rbuf) printf(" sc->rbuf(0x%08x)", (u_int32_t)sc->rbuf); + printf(" sc->raddr(0x%08x)", (uint32_t)sc->raddr); + printf(" sc->paddr(0x%08x)", (uint32_t)sc->paddr); + if (sc->rbuf) printf(" sc->rbuf(0x%08x)", (uint32_t)sc->rbuf); else printf(" sc->rbuf(null)"); - if (sc->pbuf) printf(" sc->pbuf(0x%08x)\n", (u_int32_t)sc->pbuf); + if (sc->pbuf) printf(" sc->pbuf(0x%08x)\n", (uint32_t)sc->pbuf); else printf(" sc->pbuf(null)\n"); #endif #if(0) @@ -2372,12 +2372,12 @@ envy24_putcfg(struct sc_info *sc) static int envy24_init(struct sc_info *sc) { - u_int32_t data; + uint32_t data; #if(0) int rtn; #endif int i; - u_int32_t sv, sd; + uint32_t sv, sd; #if(0) device_printf(sc->dev, "envy24_init()\n"); diff --git a/sys/dev/sound/pci/envy24ht.c b/sys/dev/sound/pci/envy24ht.c index aacd2b33040c..19a4ee39eacd 100644 --- a/sys/dev/sound/pci/envy24ht.c +++ b/sys/dev/sound/pci/envy24ht.c @@ -72,7 +72,7 @@ struct sc_info; #define ENVY24HT_NAMELEN 32 struct envy24ht_sample { - volatile u_int32_t buffer; + volatile uint32_t buffer; }; typedef struct envy24ht_sample sample32_t; @@ -86,12 +86,12 @@ struct sc_chinfo { unsigned num; /* hw channel number */ /* channel information */ - u_int32_t format; - u_int32_t speed; - u_int32_t blk; /* hw block size(dword) */ + uint32_t format; + uint32_t speed; + uint32_t blk; /* hw block size(dword) */ /* format conversion structure */ - u_int8_t *data; + uint8_t *data; unsigned int size; /* data buffer size(byte) */ int unit; /* sample size(byte) */ unsigned int offset; /* samples number offset */ @@ -114,11 +114,11 @@ struct codec_entry { /* system configuration information */ struct cfg_info { char *name; - u_int16_t subvendor, subdevice; - u_int8_t scfg, acl, i2s, spdif; - u_int32_t gpiomask, gpiostate, gpiodir; - u_int32_t cdti, cclk, cs; - u_int8_t cif, type, free; + uint16_t subvendor, subdevice; + uint8_t scfg, acl, i2s, spdif; + uint32_t gpiomask, gpiostate, gpiodir; + uint32_t cdti, cclk, cs; + uint8_t cif, type, free; struct codec_entry *codec; }; @@ -152,22 +152,22 @@ struct sc_info { void *adc[4], *dac[4]; /* mixer control data */ - u_int32_t src; - u_int8_t left[ENVY24HT_CHAN_NUM]; - u_int8_t right[ENVY24HT_CHAN_NUM]; + uint32_t src; + uint8_t left[ENVY24HT_CHAN_NUM]; + uint8_t right[ENVY24HT_CHAN_NUM]; /* Play/Record DMA fifo */ sample32_t *pbuf; sample32_t *rbuf; - u_int32_t psize, rsize; /* DMA buffer size(byte) */ - u_int16_t blk[2]; /* transfer check blocksize(dword) */ + uint32_t psize, rsize; /* DMA buffer size(byte) */ + uint16_t blk[2]; /* transfer check blocksize(dword) */ bus_dmamap_t pmap, rmap; bus_addr_t paddr, raddr; /* current status */ - u_int32_t speed; + uint32_t speed; int run[2]; - u_int16_t intr[2]; + uint16_t intr[2]; struct pcmchan_caps caps[2]; /* channel info table */ @@ -190,11 +190,11 @@ static void envy24ht_r32sl(struct sc_chinfo *); /* channel interface */ static void *envy24htchan_init(kobj_t, void *, struct snd_dbuf *, struct pcm_channel *, int); -static int envy24htchan_setformat(kobj_t, void *, u_int32_t); -static u_int32_t envy24htchan_setspeed(kobj_t, void *, u_int32_t); -static u_int32_t envy24htchan_setblocksize(kobj_t, void *, u_int32_t); +static int envy24htchan_setformat(kobj_t, void *, uint32_t); +static uint32_t envy24htchan_setspeed(kobj_t, void *, uint32_t); +static uint32_t envy24htchan_setblocksize(kobj_t, void *, uint32_t); static int envy24htchan_trigger(kobj_t, void *, int); -static u_int32_t envy24htchan_getptr(kobj_t, void *); +static uint32_t envy24htchan_getptr(kobj_t, void *); static struct pcmchan_caps *envy24htchan_getcaps(kobj_t, void *); /* mixer interface */ @@ -202,7 +202,7 @@ static int envy24htmixer_init(struct snd_mixer *); static int envy24htmixer_reinit(struct snd_mixer *); static int envy24htmixer_uninit(struct snd_mixer *); static int envy24htmixer_set(struct snd_mixer *, unsigned, unsigned, unsigned); -static u_int32_t envy24htmixer_setrecsrc(struct snd_mixer *, u_int32_t); +static uint32_t envy24htmixer_setrecsrc(struct snd_mixer *, uint32_t); /* SPI codec access interface */ static void *envy24ht_spi_create(device_t, void *, int, int); @@ -262,7 +262,7 @@ static int envy24ht_mixmap[] = { }; /* variable rate audio */ -static u_int32_t envy24ht_speed[] = { +static uint32_t envy24ht_speed[] = { 192000, 176400, 96000, 88200, 64000, 48000, 44100, 32000, 24000, 22050, 16000, 12000, 11025, 9600, 8000, 0 }; @@ -415,14 +415,14 @@ static struct cfg_info cfg_table[] = { } }; -static u_int32_t envy24ht_recfmt[] = { +static uint32_t envy24ht_recfmt[] = { SND_FORMAT(AFMT_S16_LE, 2, 0), SND_FORMAT(AFMT_S32_LE, 2, 0), 0 }; static struct pcmchan_caps envy24ht_reccaps = {8000, 96000, envy24ht_recfmt, 0}; -static u_int32_t envy24ht_playfmt[] = { +static uint32_t envy24ht_playfmt[] = { SND_FORMAT(AFMT_U8, 2, 0), SND_FORMAT(AFMT_S16_LE, 2, 0), SND_FORMAT(AFMT_S32_LE, 2, 0), @@ -432,7 +432,7 @@ static u_int32_t envy24ht_playfmt[] = { static struct pcmchan_caps envy24ht_playcaps = {8000, 192000, envy24ht_playfmt, 0}; struct envy24ht_emldma { - u_int32_t format; + uint32_t format; void (*emldma)(struct sc_chinfo *); int unit; }; @@ -453,7 +453,7 @@ static struct envy24ht_emldma envy24ht_remltab[] = { /* -------------------------------------------------------------------- */ /* common routines */ -static u_int32_t +static uint32_t envy24ht_rdcs(struct sc_info *sc, int regno, int size) { switch (size) { @@ -469,7 +469,7 @@ envy24ht_rdcs(struct sc_info *sc, int regno, int size) } static void -envy24ht_wrcs(struct sc_info *sc, int regno, u_int32_t data, int size) +envy24ht_wrcs(struct sc_info *sc, int regno, uint32_t data, int size) { switch (size) { case 1: @@ -484,7 +484,7 @@ envy24ht_wrcs(struct sc_info *sc, int regno, u_int32_t data, int size) } } -static u_int32_t +static uint32_t envy24ht_rdmt(struct sc_info *sc, int regno, int size) { switch (size) { @@ -500,7 +500,7 @@ envy24ht_rdmt(struct sc_info *sc, int regno, int size) } static void -envy24ht_wrmt(struct sc_info *sc, int regno, u_int32_t data, int size) +envy24ht_wrmt(struct sc_info *sc, int regno, uint32_t data, int size) { switch (size) { case 1: @@ -520,9 +520,9 @@ envy24ht_wrmt(struct sc_info *sc, int regno, u_int32_t data, int size) /* I2C port/E2PROM access routines */ static int -envy24ht_rdi2c(struct sc_info *sc, u_int32_t dev, u_int32_t addr) +envy24ht_rdi2c(struct sc_info *sc, uint32_t dev, uint32_t addr) { - u_int32_t data; + uint32_t data; int i; #if(0) @@ -558,9 +558,9 @@ envy24ht_rdi2c(struct sc_info *sc, u_int32_t dev, u_int32_t addr) } static int -envy24ht_wri2c(struct sc_info *sc, u_int32_t dev, u_int32_t addr, u_int32_t data) +envy24ht_wri2c(struct sc_info *sc, uint32_t dev, uint32_t addr, uint32_t data) { - u_int32_t tmp; + uint32_t tmp; int i; #if(0) @@ -593,9 +593,9 @@ envy24ht_wri2c(struct sc_info *sc, u_int32_t dev, u_int32_t addr, u_int32_t data } static int -envy24ht_rdrom(struct sc_info *sc, u_int32_t addr) +envy24ht_rdrom(struct sc_info *sc, uint32_t addr) { - u_int32_t data; + uint32_t data; #if(0) device_printf(sc->dev, "envy24ht_rdrom(sc, 0x%02x)\n", addr); @@ -720,7 +720,7 @@ envy24ht_cfgfree(struct cfg_info *cfg) { static int envy24ht_coldcd(struct sc_info *sc) { - u_int32_t data; + uint32_t data; int i; #if(0) @@ -743,7 +743,7 @@ envy24ht_coldcd(struct sc_info *sc) static int envy24ht_slavecd(struct sc_info *sc) { - u_int32_t data; + uint32_t data; int i; #if(0) @@ -768,13 +768,13 @@ static int envy24ht_rdcd(kobj_t obj, void *devinfo, int regno) { struct sc_info *sc = (struct sc_info *)devinfo; - u_int32_t data; + uint32_t data; int i; #if(0) device_printf(sc->dev, "envy24ht_rdcd(obj, sc, 0x%02x)\n", regno); #endif - envy24ht_wrmt(sc, ENVY24HT_MT_AC97IDX, (u_int32_t)regno, 1); + envy24ht_wrmt(sc, ENVY24HT_MT_AC97IDX, (uint32_t)regno, 1); envy24ht_wrmt(sc, ENVY24HT_MT_AC97CMD, ENVY24HT_MT_AC97CMD_RD, 1); for (i = 0; i < ENVY24HT_TIMEOUT; i++) { data = envy24ht_rdmt(sc, ENVY24HT_MT_AC97CMD, 1); @@ -790,17 +790,17 @@ envy24ht_rdcd(kobj_t obj, void *devinfo, int regno) } static int -envy24ht_wrcd(kobj_t obj, void *devinfo, int regno, u_int16_t data) +envy24ht_wrcd(kobj_t obj, void *devinfo, int regno, uint16_t data) { struct sc_info *sc = (struct sc_info *)devinfo; - u_int32_t cmd; + uint32_t cmd; int i; #if(0) device_printf(sc->dev, "envy24ht_wrcd(obj, sc, 0x%02x, 0x%04x)\n", regno, data); #endif - envy24ht_wrmt(sc, ENVY24HT_MT_AC97IDX, (u_int32_t)regno, 1); - envy24ht_wrmt(sc, ENVY24HT_MT_AC97DLO, (u_int32_t)data, 2); + envy24ht_wrmt(sc, ENVY24HT_MT_AC97IDX, (uint32_t)regno, 1); + envy24ht_wrmt(sc, ENVY24HT_MT_AC97DLO, (uint32_t)data, 2); envy24ht_wrmt(sc, ENVY24HT_MT_AC97CMD, ENVY24HT_MT_AC97CMD_WR, 1); for (i = 0; i < ENVY24HT_TIMEOUT; i++) { cmd = envy24ht_rdmt(sc, ENVY24HT_MT_AC97CMD, 1); @@ -823,7 +823,7 @@ AC97_DECLARE(envy24ht_ac97); /* GPIO access routines */ -static u_int32_t +static uint32_t envy24ht_gpiord(struct sc_info *sc) { if (sc->cfg->subvendor == 0x153b && sc->cfg->subdevice == 0x1150) @@ -833,7 +833,7 @@ envy24ht_gpiord(struct sc_info *sc) } static void -envy24ht_gpiowr(struct sc_info *sc, u_int32_t data) +envy24ht_gpiowr(struct sc_info *sc, uint32_t data) { #if(0) device_printf(sc->dev, "envy24ht_gpiowr(sc, 0x%02x)\n", data & 0x7FFFFF); @@ -846,7 +846,7 @@ envy24ht_gpiowr(struct sc_info *sc, u_int32_t data) } #if 0 -static u_int32_t +static uint32_t envy24ht_gpiogetmask(struct sc_info *sc) { return (envy24ht_rdcs(sc, ENVY24HT_CCS_GPIO_HMASK, 1) << 16 | envy24ht_rdcs(sc, ENVY24HT_CCS_GPIO_LMASK, 2)); @@ -854,7 +854,7 @@ envy24ht_gpiogetmask(struct sc_info *sc) #endif static void -envy24ht_gpiosetmask(struct sc_info *sc, u_int32_t mask) +envy24ht_gpiosetmask(struct sc_info *sc, uint32_t mask) { envy24ht_wrcs(sc, ENVY24HT_CCS_GPIO_LMASK, mask, 2); if (sc->cfg->subdevice != 0x1150) @@ -863,7 +863,7 @@ envy24ht_gpiosetmask(struct sc_info *sc, u_int32_t mask) } #if 0 -static u_int32_t +static uint32_t envy24ht_gpiogetdir(struct sc_info *sc) { return envy24ht_rdcs(sc, ENVY24HT_CCS_GPIO_CTLDIR, 4); @@ -871,7 +871,7 @@ envy24ht_gpiogetdir(struct sc_info *sc) #endif static void -envy24ht_gpiosetdir(struct sc_info *sc, u_int32_t dir) +envy24ht_gpiosetdir(struct sc_info *sc, uint32_t dir) { if (sc->cfg->subvendor == 0x153b && sc->cfg->subdevice == 0x1150) envy24ht_wrcs(sc, ENVY24HT_CCS_GPIO_CTLDIR, dir, 2); @@ -895,7 +895,7 @@ struct envy24ht_spi_codec { static void envy24ht_spi_ctl(void *codec, unsigned int cs, unsigned int cclk, unsigned int cdti) { - u_int32_t data = 0; + uint32_t data = 0; struct envy24ht_spi_codec *ptr = codec; #if(0) @@ -1021,8 +1021,8 @@ envy24ht_spi_setvolume(void *codec, int dir, unsigned int left, unsigned int rig /* hardware access routeines */ static struct { - u_int32_t speed; - u_int32_t code; + uint32_t speed; + uint32_t code; } envy24ht_speedtab[] = { {48000, ENVY24HT_MT_RATE_48000}, {24000, ENVY24HT_MT_RATE_24000}, @@ -1042,9 +1042,9 @@ static struct { {0, 0x10} }; -static u_int32_t -envy24ht_setspeed(struct sc_info *sc, u_int32_t speed) { - u_int32_t code, i2sfmt; +static uint32_t +envy24ht_setspeed(struct sc_info *sc, uint32_t speed) { + uint32_t code, i2sfmt; int i = 0; #if(0) @@ -1110,7 +1110,7 @@ static void envy24ht_mutevolume(struct sc_info *sc, unsigned ch) { #if 0 - u_int32_t vol; + uint32_t vol; device_printf(sc->dev, "envy24ht_mutevolume(sc, %d)\n", ch); vol = ENVY24HT_VOL_MUTE << 8 | ENVY24HT_VOL_MUTE; @@ -1121,11 +1121,11 @@ envy24ht_mutevolume(struct sc_info *sc, unsigned ch) #endif } -static u_int32_t +static uint32_t envy24ht_gethwptr(struct sc_info *sc, int dir) { int unit, regno; - u_int32_t ptr, rtn; + uint32_t ptr, rtn; #if(0) device_printf(sc->dev, "envy24ht_gethwptr(sc, %d)\n", dir); @@ -1155,9 +1155,9 @@ static void envy24ht_updintr(struct sc_info *sc, int dir) { int regintr; - u_int32_t mask, intr; - u_int32_t cnt; - u_int16_t blk; + uint32_t mask, intr; + uint32_t cnt; + uint16_t blk; #if(0) device_printf(sc->dev, "envy24ht_updintr(sc, %d)\n", dir); @@ -1195,7 +1195,7 @@ envy24ht_updintr(struct sc_info *sc, int dir) static void envy24ht_maskintr(struct sc_info *sc, int dir) { - u_int32_t mask, intr; + uint32_t mask, intr; #if(0) device_printf(sc->dev, "envy24ht_maskintr(sc, %d)\n", dir); @@ -1214,7 +1214,7 @@ envy24ht_maskintr(struct sc_info *sc, int dir) static int envy24ht_checkintr(struct sc_info *sc, int dir) { - u_int32_t mask, stat, intr, rtn; + uint32_t mask, stat, intr, rtn; #if(0) device_printf(sc->dev, "envy24ht_checkintr(sc, %d)\n", dir); @@ -1247,7 +1247,7 @@ envy24ht_checkintr(struct sc_info *sc, int dir) static void envy24ht_start(struct sc_info *sc, int dir) { - u_int32_t stat, sw; + uint32_t stat, sw; #if(0) device_printf(sc->dev, "envy24ht_start(sc, %d)\n", dir); @@ -1271,7 +1271,7 @@ envy24ht_start(struct sc_info *sc, int dir) static void envy24ht_stop(struct sc_info *sc, int dir) { - u_int32_t stat, sw; + uint32_t stat, sw; #if(0) device_printf(sc->dev, "envy24ht_stop(sc, %d)\n", dir); @@ -1303,13 +1303,13 @@ envy24ht_p32sl(struct sc_chinfo *ch) { int length; sample32_t *dmabuf; - u_int32_t *data; + uint32_t *data; int src, dst, ssize, dsize, slot; int i; length = sndbuf_getready(ch->buffer) / 8; dmabuf = ch->parent->pbuf; - data = (u_int32_t *)ch->data; + data = (uint32_t *)ch->data; src = sndbuf_getreadyptr(ch->buffer) / 4; dst = src / 2 + ch->offset; ssize = ch->size / 4; @@ -1333,7 +1333,7 @@ envy24ht_p16sl(struct sc_chinfo *ch) { int length; sample32_t *dmabuf; - u_int16_t *data; + uint16_t *data; int src, dst, ssize, dsize, slot; int i; @@ -1342,7 +1342,7 @@ envy24ht_p16sl(struct sc_chinfo *ch) #endif length = sndbuf_getready(ch->buffer) / 4; dmabuf = ch->parent->pbuf; - data = (u_int16_t *)ch->data; + data = (uint16_t *)ch->data; src = sndbuf_getreadyptr(ch->buffer) / 2; dst = src / 2 + ch->offset; ssize = ch->size / 2; @@ -1353,8 +1353,8 @@ envy24ht_p16sl(struct sc_chinfo *ch) #endif for (i = 0; i < length; i++) { - dmabuf[dst * ENVY24HT_PLAY_CHNUM + slot].buffer = (u_int32_t)data[src] << 16; - dmabuf[dst * ENVY24HT_PLAY_CHNUM + slot + 1].buffer = (u_int32_t)data[src + 1] << 16; + dmabuf[dst * ENVY24HT_PLAY_CHNUM + slot].buffer = (uint32_t)data[src] << 16; + dmabuf[dst * ENVY24HT_PLAY_CHNUM + slot + 1].buffer = (uint32_t)data[src + 1] << 16; #if(0) if (i < 16) { printf("%08x", dmabuf[dst * ENVY24HT_PLAY_CHNUM + slot]); @@ -1378,13 +1378,13 @@ envy24ht_p8u(struct sc_chinfo *ch) { int length; sample32_t *dmabuf; - u_int8_t *data; + uint8_t *data; int src, dst, ssize, dsize, slot; int i; length = sndbuf_getready(ch->buffer) / 2; dmabuf = ch->parent->pbuf; - data = (u_int8_t *)ch->data; + data = (uint8_t *)ch->data; src = sndbuf_getreadyptr(ch->buffer); dst = src / 2 + ch->offset; ssize = ch->size; @@ -1392,8 +1392,8 @@ envy24ht_p8u(struct sc_chinfo *ch) slot = ch->num * 2; for (i = 0; i < length; i++) { - dmabuf[dst * ENVY24HT_PLAY_CHNUM + slot].buffer = ((u_int32_t)data[src] ^ 0x80) << 24; - dmabuf[dst * ENVY24HT_PLAY_CHNUM + slot + 1].buffer = ((u_int32_t)data[src + 1] ^ 0x80) << 24; + dmabuf[dst * ENVY24HT_PLAY_CHNUM + slot].buffer = ((uint32_t)data[src] ^ 0x80) << 24; + dmabuf[dst * ENVY24HT_PLAY_CHNUM + slot + 1].buffer = ((uint32_t)data[src + 1] ^ 0x80) << 24; dst++; dst %= dsize; src += 2; @@ -1408,13 +1408,13 @@ envy24ht_r32sl(struct sc_chinfo *ch) { int length; sample32_t *dmabuf; - u_int32_t *data; + uint32_t *data; int src, dst, ssize, dsize, slot; int i; length = sndbuf_getfree(ch->buffer) / 8; dmabuf = ch->parent->rbuf; - data = (u_int32_t *)ch->data; + data = (uint32_t *)ch->data; dst = sndbuf_getfreeptr(ch->buffer) / 4; src = dst / 2 + ch->offset; dsize = ch->size / 4; @@ -1438,13 +1438,13 @@ envy24ht_r16sl(struct sc_chinfo *ch) { int length; sample32_t *dmabuf; - u_int16_t *data; + uint16_t *data; int src, dst, ssize, dsize, slot; int i; length = sndbuf_getfree(ch->buffer) / 4; dmabuf = ch->parent->rbuf; - data = (u_int16_t *)ch->data; + data = (uint16_t *)ch->data; dst = sndbuf_getfreeptr(ch->buffer) / 2; src = dst / 2 + ch->offset; dsize = ch->size / 2; @@ -1530,7 +1530,7 @@ envy24htchan_free(kobj_t obj, void *data) } static int -envy24htchan_setformat(kobj_t obj, void *data, u_int32_t format) +envy24htchan_setformat(kobj_t obj, void *data, uint32_t format) { struct sc_chinfo *ch = data; struct sc_info *sc = ch->parent; @@ -1595,11 +1595,11 @@ envy24htchan_setformat(kobj_t obj, void *data, u_int32_t format) start triggerd, some other channel is running, and that channel's speed isn't same with, then trigger function will fail. */ -static u_int32_t -envy24htchan_setspeed(kobj_t obj, void *data, u_int32_t speed) +static uint32_t +envy24htchan_setspeed(kobj_t obj, void *data, uint32_t speed) { struct sc_chinfo *ch = data; - u_int32_t val, prev; + uint32_t val, prev; int i; #if(0) @@ -1620,12 +1620,12 @@ envy24htchan_setspeed(kobj_t obj, void *data, u_int32_t speed) return ch->speed; } -static u_int32_t -envy24htchan_setblocksize(kobj_t obj, void *data, u_int32_t blocksize) +static uint32_t +envy24htchan_setblocksize(kobj_t obj, void *data, uint32_t blocksize) { struct sc_chinfo *ch = data; /* struct sc_info *sc = ch->parent; */ - u_int32_t size, prev; + uint32_t size, prev; unsigned int bcnt, bsize; #if(0) @@ -1668,7 +1668,7 @@ envy24htchan_trigger(kobj_t obj, void *data, int go) { struct sc_chinfo *ch = data; struct sc_info *sc = ch->parent; - u_int32_t ptr; + uint32_t ptr; int slot; int error = 0; #if 0 @@ -1773,12 +1773,12 @@ fail: return (error); } -static u_int32_t +static uint32_t envy24htchan_getptr(kobj_t obj, void *data) { struct sc_chinfo *ch = data; struct sc_info *sc = ch->parent; - u_int32_t ptr, rtn; + uint32_t ptr, rtn; #if(0) device_printf(sc->dev, "envy24htchan_getptr()\n"); @@ -1937,8 +1937,8 @@ envy24htmixer_set(struct snd_mixer *m, unsigned dev, unsigned left, unsigned rig return right << 8 | left; } -static u_int32_t -envy24htmixer_setrecsrc(struct snd_mixer *m, u_int32_t src) +static uint32_t +envy24htmixer_setrecsrc(struct snd_mixer *m, uint32_t src) { struct sc_info *sc = mix_getdevinfo(m); int ch = envy24ht_mixmap[src]; @@ -1969,7 +1969,7 @@ envy24ht_intr(void *p) { struct sc_info *sc = (struct sc_info *)p; struct sc_chinfo *ch; - u_int32_t ptr, dsize, feed; + uint32_t ptr, dsize, feed; int i; #if(0) @@ -2036,7 +2036,7 @@ envy24ht_intr(void *p) static int envy24ht_pci_probe(device_t dev) { - u_int16_t sv, sd; + uint16_t sv, sd; int i; #if(0) @@ -2107,11 +2107,11 @@ envy24ht_dmafree(struct sc_info *sc) { #if(0) device_printf(sc->dev, "envy24ht_dmafree():"); - printf(" sc->raddr(0x%08x)", (u_int32_t)sc->raddr); - printf(" sc->paddr(0x%08x)", (u_int32_t)sc->paddr); - if (sc->rbuf) printf(" sc->rbuf(0x%08x)", (u_int32_t)sc->rbuf); + printf(" sc->raddr(0x%08x)", (uint32_t)sc->raddr); + printf(" sc->paddr(0x%08x)", (uint32_t)sc->paddr); + if (sc->rbuf) printf(" sc->rbuf(0x%08x)", (uint32_t)sc->rbuf); else printf(" sc->rbuf(null)"); - if (sc->pbuf) printf(" sc->pbuf(0x%08x)\n", (u_int32_t)sc->pbuf); + if (sc->pbuf) printf(" sc->pbuf(0x%08x)\n", (uint32_t)sc->pbuf); else printf(" sc->pbuf(null)\n"); #endif #if(0) @@ -2277,12 +2277,12 @@ envy24ht_putcfg(struct sc_info *sc) static int envy24ht_init(struct sc_info *sc) { - u_int32_t data; + uint32_t data; #if(0) int rtn; #endif int i; - u_int32_t sv, sd; + uint32_t sv, sd; #if(0) device_printf(sc->dev, "envy24ht_init()\n"); diff --git a/sys/dev/sound/pci/fm801.c b/sys/dev/sound/pci/fm801.c index 3c7b8d0f7540..69c74ad91303 100644 --- a/sys/dev/sound/pci/fm801.c +++ b/sys/dev/sound/pci/fm801.c @@ -107,7 +107,7 @@ static int fm801ch_setup(struct pcm_channel *c); */ -static u_int32_t fmts[] = { +static uint32_t fmts[] = { SND_FORMAT(AFMT_U8, 1, 0), SND_FORMAT(AFMT_U8, 2, 0), SND_FORMAT(AFMT_S16_LE, 1, 0), @@ -126,8 +126,8 @@ struct fm801_chinfo { struct fm801_info *parent; struct pcm_channel *channel; struct snd_dbuf *buffer; - u_int32_t spd, dir, fmt; /* speed, direction, format */ - u_int32_t shift; + uint32_t spd, dir, fmt; /* speed, direction, format */ + uint32_t shift; }; struct fm801_info { @@ -138,13 +138,13 @@ struct fm801_info { device_t dev; int num; - u_int32_t unit; + uint32_t unit; struct resource *reg, *irq; int regtype, regid, irqid; void *ih; - u_int32_t play_flip, + uint32_t play_flip, play_nextblk, play_start, play_blksize, @@ -152,7 +152,7 @@ struct fm801_info { play_shift, play_size; - u_int32_t rec_flip, + uint32_t rec_flip, rec_nextblk, rec_start, rec_blksize, @@ -168,7 +168,7 @@ struct fm801_info { }; /* Bus Read / Write routines */ -static u_int32_t +static uint32_t fm801_rd(struct fm801_info *fm801, int regno, int size) { switch(size) { @@ -184,7 +184,7 @@ fm801_rd(struct fm801_info *fm801, int regno, int size) } static void -fm801_wr(struct fm801_info *fm801, int regno, u_int32_t data, int size) +fm801_wr(struct fm801_info *fm801, int regno, uint32_t data, int size) { switch(size) { @@ -236,7 +236,7 @@ fm801_rdcd(kobj_t obj, void *devinfo, int regno) } static int -fm801_wrcd(kobj_t obj, void *devinfo, int regno, u_int32_t data) +fm801_wrcd(kobj_t obj, void *devinfo, int regno, uint32_t data) { struct fm801_info *fm801 = (struct fm801_info *)devinfo; int i; @@ -287,7 +287,7 @@ static void fm801_intr(void *p) { struct fm801_info *fm801 = (struct fm801_info *)p; - u_int32_t intsrc = fm801_rd(fm801, FM_INTSTATUS, 2); + uint32_t intsrc = fm801_rd(fm801, FM_INTSTATUS, 2); DPRINT("\nfm801_intr intsrc 0x%x ", intsrc); @@ -342,7 +342,7 @@ fm801ch_init(kobj_t obj, void *devinfo, struct snd_dbuf *b, struct pcm_channel * } static int -fm801ch_setformat(kobj_t obj, void *data, u_int32_t format) +fm801ch_setformat(kobj_t obj, void *data, uint32_t format) { struct fm801_chinfo *ch = data; struct fm801_info *fm801 = ch->parent; @@ -370,8 +370,8 @@ fm801ch_setformat(kobj_t obj, void *data, u_int32_t format) } struct { - u_int32_t limit; - u_int32_t rate; + uint32_t limit; + uint32_t rate; } fm801_rates[11] = { { 6600, 5500 }, { 8750, 8000 }, @@ -387,8 +387,8 @@ struct { /* anything above -> 48000 */ }; -static u_int32_t -fm801ch_setspeed(kobj_t obj, void *data, u_int32_t speed) +static uint32_t +fm801ch_setspeed(kobj_t obj, void *data, uint32_t speed) { struct fm801_chinfo *ch = data; struct fm801_info *fm801 = ch->parent; @@ -413,8 +413,8 @@ fm801ch_setspeed(kobj_t obj, void *data, u_int32_t speed) return fm801_rates[i].rate; } -static u_int32_t -fm801ch_setblocksize(kobj_t obj, void *data, u_int32_t blocksize) +static uint32_t +fm801ch_setblocksize(kobj_t obj, void *data, uint32_t blocksize) { struct fm801_chinfo *ch = data; struct fm801_info *fm801 = ch->parent; @@ -440,8 +440,8 @@ fm801ch_trigger(kobj_t obj, void *data, int go) { struct fm801_chinfo *ch = data; struct fm801_info *fm801 = ch->parent; - u_int32_t baseaddr = ch->buffer->buf_addr; - u_int32_t k1; + uint32_t baseaddr = ch->buffer->buf_addr; + uint32_t k1; DPRINT("fm801ch_trigger go %d , ", go); @@ -490,12 +490,12 @@ fm801ch_trigger(kobj_t obj, void *data, int go) } /* Almost ALSA copy */ -static u_int32_t +static uint32_t fm801ch_getptr(kobj_t obj, void *data) { struct fm801_chinfo *ch = data; struct fm801_info *fm801 = ch->parent; - u_int32_t result = 0; + uint32_t result = 0; if (ch->dir == PCMDIR_PLAY) { result = fm801_rd(fm801, @@ -538,7 +538,7 @@ CHANNEL_DECLARE(fm801ch); static int fm801_init(struct fm801_info *fm801) { - u_int32_t k1; + uint32_t k1; /* reset codec */ fm801_wr(fm801, FM_CODEC_CTL, 0x0020,2); @@ -710,7 +710,7 @@ fm801_pci_probe( device_t dev ) static struct resource * fm801_alloc_resource(device_t bus, device_t child, int type, int rid, rman_res_t start, rman_res_t end, rman_res_t count, - u_int flags) + unsigned int flags) { struct fm801_info *fm801; diff --git a/sys/dev/sound/pci/hda/hdaa.c b/sys/dev/sound/pci/hda/hdaa.c index 8add23217d1b..44cca506751f 100644 --- a/sys/dev/sound/pci/hda/hdaa.c +++ b/sys/dev/sound/pci/hda/hdaa.c @@ -2055,7 +2055,7 @@ hdaa_audio_setup(struct hdaa_chan *ch) static unsigned gcd(unsigned a, unsigned b) { - u_int c; + unsigned int c; while (b != 0) { c = a; diff --git a/sys/dev/sound/pci/maestro3.c b/sys/dev/sound/pci/maestro3.c index d6e1d0179225..5bf420c86c95 100644 --- a/sys/dev/sound/pci/maestro3.c +++ b/sys/dev/sound/pci/maestro3.c @@ -84,7 +84,7 @@ enum { }; static struct m3_card_type { - u_int32_t pci_id; int which; int delay1; int delay2; char *name; + uint32_t pci_id; int which; int delay1; int delay2; char *name; } m3_card_types[] = { { 0x1988125d, ESS_ALLEGRO_1, 50, 800, "ESS Technology Allegro-1" }, { 0x1998125d, ESS_MAESTRO3, 20, 500, "ESS Technology Maestro3" }, @@ -103,36 +103,36 @@ static struct m3_card_type { struct sc_info; struct sc_pchinfo { - u_int32_t spd; - u_int32_t fmt; + uint32_t spd; + uint32_t fmt; struct snd_dbuf *buffer; struct pcm_channel *channel; struct sc_info *parent; - u_int32_t bufsize; - u_int32_t dac_data; - u_int32_t dac_idx; - u_int32_t active; - u_int32_t ptr; - u_int32_t prevptr; + uint32_t bufsize; + uint32_t dac_data; + uint32_t dac_idx; + uint32_t active; + uint32_t ptr; + uint32_t prevptr; }; struct sc_rchinfo { - u_int32_t spd; - u_int32_t fmt; + uint32_t spd; + uint32_t fmt; struct snd_dbuf *buffer; struct pcm_channel *channel; struct sc_info *parent; - u_int32_t bufsize; - u_int32_t adc_data; - u_int32_t adc_idx; - u_int32_t active; - u_int32_t ptr; - u_int32_t prevptr; + uint32_t bufsize; + uint32_t adc_data; + uint32_t adc_idx; + uint32_t active; + uint32_t ptr; + uint32_t prevptr; }; struct sc_info { device_t dev; - u_int32_t type; + uint32_t type; int which; int delay1; int delay2; @@ -154,7 +154,7 @@ struct sc_info { int rch_cnt; int pch_active_cnt; unsigned int bufsz; - u_int16_t *savemem; + uint16_t *savemem; struct mtx sc_lock; }; @@ -168,40 +168,40 @@ struct sc_info { /* play channel interface */ static void *m3_pchan_init(kobj_t, void *, struct snd_dbuf *, struct pcm_channel *, int); static int m3_pchan_free(kobj_t, void *); -static int m3_pchan_setformat(kobj_t, void *, u_int32_t); -static u_int32_t m3_pchan_setspeed(kobj_t, void *, u_int32_t); -static u_int32_t m3_pchan_setblocksize(kobj_t, void *, u_int32_t); +static int m3_pchan_setformat(kobj_t, void *, uint32_t); +static uint32_t m3_pchan_setspeed(kobj_t, void *, uint32_t); +static uint32_t m3_pchan_setblocksize(kobj_t, void *, uint32_t); static int m3_pchan_trigger(kobj_t, void *, int); static int m3_pchan_trigger_locked(kobj_t, void *, int); -static u_int32_t m3_pchan_getptr_internal(struct sc_pchinfo *); -static u_int32_t m3_pchan_getptr(kobj_t, void *); +static uint32_t m3_pchan_getptr_internal(struct sc_pchinfo *); +static uint32_t m3_pchan_getptr(kobj_t, void *); static struct pcmchan_caps *m3_pchan_getcaps(kobj_t, void *); /* record channel interface */ static void *m3_rchan_init(kobj_t, void *, struct snd_dbuf *, struct pcm_channel *, int); static int m3_rchan_free(kobj_t, void *); -static int m3_rchan_setformat(kobj_t, void *, u_int32_t); -static u_int32_t m3_rchan_setspeed(kobj_t, void *, u_int32_t); -static u_int32_t m3_rchan_setblocksize(kobj_t, void *, u_int32_t); +static int m3_rchan_setformat(kobj_t, void *, uint32_t); +static uint32_t m3_rchan_setspeed(kobj_t, void *, uint32_t); +static uint32_t m3_rchan_setblocksize(kobj_t, void *, uint32_t); static int m3_rchan_trigger(kobj_t, void *, int); static int m3_rchan_trigger_locked(kobj_t, void *, int); -static u_int32_t m3_rchan_getptr_internal(struct sc_rchinfo *); -static u_int32_t m3_rchan_getptr(kobj_t, void *); +static uint32_t m3_rchan_getptr_internal(struct sc_rchinfo *); +static uint32_t m3_rchan_getptr(kobj_t, void *); static struct pcmchan_caps *m3_rchan_getcaps(kobj_t, void *); static int m3_chan_active(struct sc_info *); /* talk to the codec - called from ac97.c */ -static u_int32_t m3_initcd(kobj_t, void *); +static uint32_t m3_initcd(kobj_t, void *); static int m3_rdcd(kobj_t, void *, int); -static int m3_wrcd(kobj_t, void *, int, u_int32_t); +static int m3_wrcd(kobj_t, void *, int, uint32_t); /* stuff */ static void m3_intr(void *); static int m3_power(struct sc_info *, int); static int m3_init(struct sc_info *); static int m3_uninit(struct sc_info *); -static u_int8_t m3_assp_halt(struct sc_info *); +static uint8_t m3_assp_halt(struct sc_info *); static void m3_config(struct sc_info *); static void m3_amp_enable(struct sc_info *); static void m3_enable_ints(struct sc_info *); @@ -220,7 +220,7 @@ AC97_DECLARE(m3_codec); /* -------------------------------------------------------------------- */ /* channel descriptors */ -static u_int32_t m3_playfmt[] = { +static uint32_t m3_playfmt[] = { SND_FORMAT(AFMT_U8, 1, 0), SND_FORMAT(AFMT_U8, 2, 0), SND_FORMAT(AFMT_S16_LE, 1, 0), @@ -242,7 +242,7 @@ static kobj_method_t m3_pch_methods[] = { }; CHANNEL_DECLARE(m3_pch); -static u_int32_t m3_recfmt[] = { +static uint32_t m3_recfmt[] = { SND_FORMAT(AFMT_U8, 1, 0), SND_FORMAT(AFMT_U8, 2, 0), SND_FORMAT(AFMT_S16_LE, 1, 0), @@ -282,8 +282,8 @@ CHANNEL_DECLARE(m3_rch); #define m3_wr_assp_data(sc, index, data) \ m3_wr_assp(sc, MEMTYPE_INTERNAL_DATA, index, data) -static __inline u_int16_t -m3_rd_assp(struct sc_info *sc, u_int16_t region, u_int16_t index) +static __inline uint16_t +m3_rd_assp(struct sc_info *sc, uint16_t region, uint16_t index) { m3_wr_2(sc, DSP_PORT_MEMORY_TYPE, region & MEMTYPE_MASK); m3_wr_2(sc, DSP_PORT_MEMORY_INDEX, index); @@ -291,8 +291,8 @@ m3_rd_assp(struct sc_info *sc, u_int16_t region, u_int16_t index) } static __inline void -m3_wr_assp(struct sc_info *sc, u_int16_t region, u_int16_t index, - u_int16_t data) +m3_wr_assp(struct sc_info *sc, uint16_t region, uint16_t index, + uint16_t data) { m3_wr_2(sc, DSP_PORT_MEMORY_TYPE, region & MEMTYPE_MASK); m3_wr_2(sc, DSP_PORT_MEMORY_INDEX, index); @@ -316,11 +316,11 @@ m3_wait(struct sc_info *sc) /* -------------------------------------------------------------------- */ /* ac97 codec */ -static u_int32_t +static uint32_t m3_initcd(kobj_t kobj, void *devinfo) { struct sc_info *sc = (struct sc_info *)devinfo; - u_int32_t data; + uint32_t data; M3_DEBUG(CALL, ("m3_initcd\n")); @@ -334,7 +334,7 @@ static int m3_rdcd(kobj_t kobj, void *devinfo, int regno) { struct sc_info *sc = (struct sc_info *)devinfo; - u_int32_t data; + uint32_t data; if (m3_wait(sc)) { device_printf(sc->dev, "m3_rdcd timed out.\n"); @@ -351,7 +351,7 @@ m3_rdcd(kobj_t kobj, void *devinfo, int regno) } static int -m3_wrcd(kobj_t kobj, void *devinfo, int regno, u_int32_t data) +m3_wrcd(kobj_t kobj, void *devinfo, int regno, uint32_t data) { struct sc_info *sc = (struct sc_info *)devinfo; if (m3_wait(sc)) { @@ -375,12 +375,12 @@ m3_pchan_init(kobj_t kobj, void *devinfo, struct snd_dbuf *b, struct pcm_channel { struct sc_info *sc = devinfo; struct sc_pchinfo *ch; - u_int32_t bus_addr, i; + uint32_t bus_addr, i; int idx, data_bytes, dac_data; int dsp_in_size, dsp_out_size, dsp_in_buf, dsp_out_buf; struct data_word { - u_int16_t addr, val; + uint16_t addr, val; } pv[] = { {CDATA_LEFT_VOLUME, M3_DEFAULT_VOL}, {CDATA_RIGHT_VOLUME, M3_DEFAULT_VOL}, @@ -537,11 +537,11 @@ m3_pchan_free(kobj_t kobj, void *chdata) } static int -m3_pchan_setformat(kobj_t kobj, void *chdata, u_int32_t format) +m3_pchan_setformat(kobj_t kobj, void *chdata, uint32_t format) { struct sc_pchinfo *ch = chdata; struct sc_info *sc = ch->parent; - u_int32_t data; + uint32_t data; M3_LOCK(sc); M3_DEBUG(CHANGE, @@ -564,12 +564,12 @@ m3_pchan_setformat(kobj_t kobj, void *chdata, u_int32_t format) return (0); } -static u_int32_t -m3_pchan_setspeed(kobj_t kobj, void *chdata, u_int32_t speed) +static uint32_t +m3_pchan_setspeed(kobj_t kobj, void *chdata, uint32_t speed) { struct sc_pchinfo *ch = chdata; struct sc_info *sc = ch->parent; - u_int32_t freq; + uint32_t freq; M3_LOCK(sc); M3_DEBUG(CHANGE, ("m3_pchan_setspeed(dac=%d, speed=%d)\n", @@ -587,8 +587,8 @@ m3_pchan_setspeed(kobj_t kobj, void *chdata, u_int32_t speed) return (speed); } -static u_int32_t -m3_pchan_setblocksize(kobj_t kobj, void *chdata, u_int32_t blocksize) +static uint32_t +m3_pchan_setblocksize(kobj_t kobj, void *chdata, uint32_t blocksize) { struct sc_pchinfo *ch = chdata; @@ -636,7 +636,7 @@ m3_pchan_trigger_locked(kobj_t kobj, void *chdata, int go) { struct sc_pchinfo *ch = chdata; struct sc_info *sc = ch->parent; - u_int32_t data; + uint32_t data; M3_LOCK_ASSERT(sc); M3_DEBUG(go == PCMTRIG_START ? CHANGE : @@ -703,11 +703,11 @@ m3_pchan_trigger_locked(kobj_t kobj, void *chdata, int go) return 0; } -static u_int32_t +static uint32_t m3_pchan_getptr_internal(struct sc_pchinfo *ch) { struct sc_info *sc = ch->parent; - u_int32_t hi, lo, bus_base, bus_crnt; + uint32_t hi, lo, bus_base, bus_crnt; bus_base = ch->buffer->buf_addr; hi = m3_rd_assp_data(sc, ch->dac_data + CDATA_HOST_SRC_CURRENTH); @@ -720,12 +720,12 @@ m3_pchan_getptr_internal(struct sc_pchinfo *ch) return (bus_crnt - bus_base); /* current byte offset of channel */ } -static u_int32_t +static uint32_t m3_pchan_getptr(kobj_t kobj, void *chdata) { struct sc_pchinfo *ch = chdata; struct sc_info *sc = ch->parent; - u_int32_t ptr; + uint32_t ptr; M3_LOCK(sc); ptr = ch->ptr; @@ -752,13 +752,13 @@ m3_rchan_init(kobj_t kobj, void *devinfo, struct snd_dbuf *b, struct pcm_channel { struct sc_info *sc = devinfo; struct sc_rchinfo *ch; - u_int32_t bus_addr, i; + uint32_t bus_addr, i; int idx, data_bytes, adc_data; int dsp_in_size, dsp_out_size, dsp_in_buf, dsp_out_buf; struct data_word { - u_int16_t addr, val; + uint16_t addr, val; } rv[] = { {CDATA_LEFT_VOLUME, M3_DEFAULT_VOL}, {CDATA_RIGHT_VOLUME, M3_DEFAULT_VOL}, @@ -911,11 +911,11 @@ m3_rchan_free(kobj_t kobj, void *chdata) } static int -m3_rchan_setformat(kobj_t kobj, void *chdata, u_int32_t format) +m3_rchan_setformat(kobj_t kobj, void *chdata, uint32_t format) { struct sc_rchinfo *ch = chdata; struct sc_info *sc = ch->parent; - u_int32_t data; + uint32_t data; M3_LOCK(sc); M3_DEBUG(CHANGE, @@ -937,12 +937,12 @@ m3_rchan_setformat(kobj_t kobj, void *chdata, u_int32_t format) return (0); } -static u_int32_t -m3_rchan_setspeed(kobj_t kobj, void *chdata, u_int32_t speed) +static uint32_t +m3_rchan_setspeed(kobj_t kobj, void *chdata, uint32_t speed) { struct sc_rchinfo *ch = chdata; struct sc_info *sc = ch->parent; - u_int32_t freq; + uint32_t freq; M3_LOCK(sc); M3_DEBUG(CHANGE, ("m3_rchan_setspeed(adc=%d, speed=%d)\n", @@ -960,8 +960,8 @@ m3_rchan_setspeed(kobj_t kobj, void *chdata, u_int32_t speed) return (speed); } -static u_int32_t -m3_rchan_setblocksize(kobj_t kobj, void *chdata, u_int32_t blocksize) +static uint32_t +m3_rchan_setblocksize(kobj_t kobj, void *chdata, uint32_t blocksize) { struct sc_rchinfo *ch = chdata; @@ -993,7 +993,7 @@ m3_rchan_trigger_locked(kobj_t kobj, void *chdata, int go) { struct sc_rchinfo *ch = chdata; struct sc_info *sc = ch->parent; - u_int32_t data; + uint32_t data; M3_LOCK_ASSERT(sc); M3_DEBUG(go == PCMTRIG_START ? CHANGE : @@ -1055,11 +1055,11 @@ m3_rchan_trigger_locked(kobj_t kobj, void *chdata, int go) return 0; } -static u_int32_t +static uint32_t m3_rchan_getptr_internal(struct sc_rchinfo *ch) { struct sc_info *sc = ch->parent; - u_int32_t hi, lo, bus_base, bus_crnt; + uint32_t hi, lo, bus_base, bus_crnt; bus_base = ch->buffer->buf_addr; hi = m3_rd_assp_data(sc, ch->adc_data + CDATA_HOST_SRC_CURRENTH); @@ -1072,12 +1072,12 @@ m3_rchan_getptr_internal(struct sc_rchinfo *ch) return (bus_crnt - bus_base); /* current byte offset of channel */ } -static u_int32_t +static uint32_t m3_rchan_getptr(kobj_t kobj, void *chdata) { struct sc_rchinfo *ch = chdata; struct sc_info *sc = ch->parent; - u_int32_t ptr; + uint32_t ptr; M3_LOCK(sc); ptr = ch->ptr; @@ -1105,7 +1105,7 @@ m3_intr(void *p) struct sc_info *sc = (struct sc_info *)p; struct sc_pchinfo *pch; struct sc_rchinfo *rch; - u_int32_t status, ctl, i, delta; + uint32_t status, ctl, i, delta; M3_DEBUG(INTR, ("m3_intr\n")); @@ -1119,7 +1119,7 @@ m3_intr(void *p) m3_wr_1(sc, HOST_INT_STATUS, 0xff); /* ack the int? */ if (status & HV_INT_PENDING) { - u_int8_t event; + uint8_t event; event = m3_rd_1(sc, HW_VOL_COUNTER_MASTER); switch (event) { @@ -1195,7 +1195,7 @@ m3_handle_channel_intr_out: static int m3_power(struct sc_info *sc, int state) { - u_int32_t data; + uint32_t data; M3_DEBUG(CHANGE, ("m3_power(%d)\n", state)); M3_LOCK_ASSERT(sc); @@ -1211,8 +1211,8 @@ m3_power(struct sc_info *sc, int state) static int m3_init(struct sc_info *sc) { - u_int32_t data, i, size; - u_int8_t reset_state; + uint32_t data, i, size; + uint8_t reset_state; M3_LOCK_ASSERT(sc); M3_DEBUG(CHANGE, ("m3_init\n")); @@ -1448,7 +1448,7 @@ m3_pci_attach(device_t dev) mixer_hwvol_init(dev); /* Create the buffer for saving the card state during suspend */ - len = sizeof(u_int16_t) * (REV_B_CODE_MEMORY_LENGTH + + len = sizeof(uint16_t) * (REV_B_CODE_MEMORY_LENGTH + REV_B_DATA_MEMORY_LENGTH); sc->savemem = malloc(len, M_DEVBUF, M_WAITOK | M_ZERO); @@ -1545,7 +1545,7 @@ m3_pci_resume(device_t dev) { struct sc_info *sc = pcm_getdevinfo(dev); int i, index = 0; - u_int8_t reset_state; + uint8_t reset_state; M3_DEBUG(CHANGE, ("m3_pci_resume\n")); @@ -1614,10 +1614,10 @@ m3_pci_shutdown(device_t dev) return 0; } -static u_int8_t +static uint8_t m3_assp_halt(struct sc_info *sc) { - u_int8_t data, reset_state; + uint8_t data, reset_state; M3_LOCK_ASSERT(sc); @@ -1633,7 +1633,7 @@ m3_assp_halt(struct sc_info *sc) static void m3_config(struct sc_info *sc) { - u_int32_t data, hv_cfg; + uint32_t data, hv_cfg; int hint; M3_LOCK_ASSERT(sc); @@ -1687,7 +1687,7 @@ m3_config(struct sc_info *sc) static void m3_enable_ints(struct sc_info *sc) { - u_int8_t data; + uint8_t data; m3_wr_2(sc, HOST_INT_CTRL, ASSP_INT_ENABLE | HV_INT_ENABLE); data = m3_rd_1(sc, ASSP_CONTROL_C); @@ -1697,8 +1697,8 @@ m3_enable_ints(struct sc_info *sc) static void m3_amp_enable(struct sc_info *sc) { - u_int32_t gpo, polarity_port, polarity; - u_int16_t data; + uint32_t gpo, polarity_port, polarity; + uint16_t data; M3_LOCK_ASSERT(sc); @@ -1728,7 +1728,7 @@ m3_amp_enable(struct sc_info *sc) static void m3_codec_reset(struct sc_info *sc) { - u_int16_t data, dir; + uint16_t data, dir; int retry = 0; M3_LOCK_ASSERT(sc); diff --git a/sys/dev/sound/pci/neomagic-coeff.h b/sys/dev/sound/pci/neomagic-coeff.h index cc8a7a420540..a69c9f036b5c 100644 --- a/sys/dev/sound/pci/neomagic-coeff.h +++ b/sys/dev/sound/pci/neomagic-coeff.h @@ -4627,7 +4627,7 @@ static u_char coefficients[NM_TOTAL_COEFF_COUNT * 4] = { 0x01, 0x8D, 0xFF, 0x0F, 0x00 }; -static u_int16_t +static uint16_t coefficientSizes[] = { /* Playback */ 0x00C0, 0x5000, 0x0060, 0x2800, 0x0040, 0x0060, 0x1400, 0x0000, diff --git a/sys/dev/sound/pci/neomagic.c b/sys/dev/sound/pci/neomagic.c index 9268ce722c5b..0e0af654b734 100644 --- a/sys/dev/sound/pci/neomagic.c +++ b/sys/dev/sound/pci/neomagic.c @@ -52,7 +52,7 @@ struct sc_info; /* channel registers */ struct sc_chinfo { int active, spd, dir, fmt; - u_int32_t blksize, wmark; + uint32_t blksize, wmark; struct snd_dbuf *buffer; struct pcm_channel *channel; struct sc_info *parent; @@ -61,16 +61,16 @@ struct sc_chinfo { /* device private data */ struct sc_info { device_t dev; - u_int32_t type; + uint32_t type; struct resource *reg, *irq, *buf; int regid, irqid, bufid; void *ih; - u_int32_t ac97_base, ac97_status, ac97_busy; - u_int32_t buftop, pbuf, rbuf, cbuf, acbuf; - u_int32_t playint, recint, misc1int, misc2int; - u_int32_t irsz, badintr; + uint32_t ac97_base, ac97_status, ac97_busy; + uint32_t buftop, pbuf, rbuf, cbuf, acbuf; + uint32_t playint, recint, misc1int, misc2int; + uint32_t irsz, badintr; struct sc_chinfo pch, rch; }; @@ -88,18 +88,18 @@ static int nm_init(struct sc_info *); static void nm_intr(void *); /* talk to the card */ -static u_int32_t nm_rd(struct sc_info *, int, int); -static void nm_wr(struct sc_info *, int, u_int32_t, int); -static u_int32_t nm_rdbuf(struct sc_info *, int, int); -static void nm_wrbuf(struct sc_info *, int, u_int32_t, int); +static uint32_t nm_rd(struct sc_info *, int, int); +static void nm_wr(struct sc_info *, int, uint32_t, int); +static uint32_t nm_rdbuf(struct sc_info *, int, int); +static void nm_wrbuf(struct sc_info *, int, uint32_t, int); -static u_int32_t badcards[] = { +static uint32_t badcards[] = { 0x0007103c, 0x008f1028, 0x00dd1014, 0x8005110a, }; -#define NUM_BADCARDS (sizeof(badcards) / sizeof(u_int32_t)) +#define NUM_BADCARDS (sizeof(badcards) / sizeof(uint32_t)) /* The actual rates supported by the card. */ static int samplerates[9] = { @@ -116,7 +116,7 @@ static int samplerates[9] = { /* -------------------------------------------------------------------- */ -static u_int32_t nm_fmt[] = { +static uint32_t nm_fmt[] = { SND_FORMAT(AFMT_U8, 1, 0), SND_FORMAT(AFMT_U8, 2, 0), SND_FORMAT(AFMT_S16_LE, 1, 0), @@ -128,7 +128,7 @@ static struct pcmchan_caps nm_caps = {4000, 48000, nm_fmt, 0}; /* -------------------------------------------------------------------- */ /* Hardware */ -static u_int32_t +static uint32_t nm_rd(struct sc_info *sc, int regno, int size) { bus_space_tag_t st = rman_get_bustag(sc->reg); @@ -147,7 +147,7 @@ nm_rd(struct sc_info *sc, int regno, int size) } static void -nm_wr(struct sc_info *sc, int regno, u_int32_t data, int size) +nm_wr(struct sc_info *sc, int regno, uint32_t data, int size) { bus_space_tag_t st = rman_get_bustag(sc->reg); bus_space_handle_t sh = rman_get_bushandle(sc->reg); @@ -165,7 +165,7 @@ nm_wr(struct sc_info *sc, int regno, u_int32_t data, int size) } } -static u_int32_t +static uint32_t nm_rdbuf(struct sc_info *sc, int regno, int size) { bus_space_tag_t st = rman_get_bustag(sc->buf); @@ -184,7 +184,7 @@ nm_rdbuf(struct sc_info *sc, int regno, int size) } static void -nm_wrbuf(struct sc_info *sc, int regno, u_int32_t data, int size) +nm_wrbuf(struct sc_info *sc, int regno, uint32_t data, int size) { bus_space_tag_t st = rman_get_bustag(sc->buf); bus_space_handle_t sh = rman_get_bushandle(sc->buf); @@ -221,7 +221,7 @@ nm_waitcd(struct sc_info *sc) return (fail); } -static u_int32_t +static uint32_t nm_initcd(kobj_t obj, void *devinfo) { struct sc_info *sc = (struct sc_info *)devinfo; @@ -246,7 +246,7 @@ static int nm_rdcd(kobj_t obj, void *devinfo, int regno) { struct sc_info *sc = (struct sc_info *)devinfo; - u_int32_t x; + uint32_t x; if (!nm_waitcd(sc)) { x = nm_rd(sc, sc->ac97_base + regno, 2); @@ -259,7 +259,7 @@ nm_rdcd(kobj_t obj, void *devinfo, int regno) } static int -nm_wrcd(kobj_t obj, void *devinfo, int regno, u_int32_t data) +nm_wrcd(kobj_t obj, void *devinfo, int regno, uint32_t data) { struct sc_info *sc = (struct sc_info *)devinfo; int cnt = 3; @@ -288,7 +288,7 @@ AC97_DECLARE(nm_ac97); /* -------------------------------------------------------------------- */ static void -nm_ackint(struct sc_info *sc, u_int32_t num) +nm_ackint(struct sc_info *sc, uint32_t num) { if (sc->type == NM256AV_PCI_ID) { nm_wr(sc, NM_INT_REG, num << 1, 2); @@ -301,7 +301,7 @@ static int nm_loadcoeff(struct sc_info *sc, int dir, int num) { int ofs, sz, i; - u_int32_t addr; + uint32_t addr; addr = (dir == PCMDIR_PLAY)? 0x01c : 0x21c; if (dir == PCMDIR_REC) @@ -323,8 +323,8 @@ static int nm_setch(struct sc_chinfo *ch) { struct sc_info *sc = ch->parent; - u_int32_t base; - u_int8_t x; + uint32_t base; + uint8_t x; for (x = 0; x < 8; x++) if (ch->spd < (samplerates[x] + samplerates[x + 1]) / 2) @@ -351,7 +351,7 @@ nmchan_init(kobj_t obj, void *devinfo, struct snd_dbuf *b, struct pcm_channel *c { struct sc_info *sc = devinfo; struct sc_chinfo *ch; - u_int32_t chnbuf; + uint32_t chnbuf; chnbuf = (dir == PCMDIR_PLAY)? sc->pbuf : sc->rbuf; ch = (dir == PCMDIR_PLAY)? &sc->pch : &sc->rch; @@ -359,7 +359,7 @@ nmchan_init(kobj_t obj, void *devinfo, struct snd_dbuf *b, struct pcm_channel *c ch->blksize = 0; ch->wmark = 0; ch->buffer = b; - sndbuf_setup(ch->buffer, (u_int8_t *)rman_get_virtual(sc->buf) + chnbuf, NM_BUFFSIZE); + sndbuf_setup(ch->buffer, (uint8_t *)rman_get_virtual(sc->buf) + chnbuf, NM_BUFFSIZE); if (bootverbose) device_printf(sc->dev, "%s buf %p\n", (dir == PCMDIR_PLAY)? "play" : "rec", ch->buffer->buf); @@ -376,7 +376,7 @@ nmchan_free(kobj_t obj, void *data) } static int -nmchan_setformat(kobj_t obj, void *data, u_int32_t format) +nmchan_setformat(kobj_t obj, void *data, uint32_t format) { struct sc_chinfo *ch = data; @@ -384,8 +384,8 @@ nmchan_setformat(kobj_t obj, void *data, u_int32_t format) return nm_setch(ch); } -static u_int32_t -nmchan_setspeed(kobj_t obj, void *data, u_int32_t speed) +static uint32_t +nmchan_setspeed(kobj_t obj, void *data, uint32_t speed) { struct sc_chinfo *ch = data; @@ -393,8 +393,8 @@ nmchan_setspeed(kobj_t obj, void *data, u_int32_t speed) return nm_setch(ch)? 0 : ch->spd; } -static u_int32_t -nmchan_setblocksize(kobj_t obj, void *data, u_int32_t blocksize) +static uint32_t +nmchan_setblocksize(kobj_t obj, void *data, uint32_t blocksize) { struct sc_chinfo *ch = data; @@ -451,7 +451,7 @@ nmchan_trigger(kobj_t obj, void *data, int go) return 0; } -static u_int32_t +static uint32_t nmchan_getptr(kobj_t obj, void *data) { struct sc_chinfo *ch = data; @@ -540,7 +540,7 @@ nm_intr(void *p) static int nm_init(struct sc_info *sc) { - u_int32_t ofs, i; + uint32_t ofs, i; if (sc->type == NM256AV_PCI_ID) { sc->ac97_base = NM_MIXER_OFFSET; @@ -599,7 +599,7 @@ nm_pci_probe(device_t dev) { struct sc_info *sc = NULL; char *s = NULL; - u_int32_t subdev, i; + uint32_t subdev, i; subdev = (pci_get_subdevice(dev) << 16) | pci_get_subvendor(dev); switch (pci_get_devid(dev)) { diff --git a/sys/dev/sound/pci/solo.c b/sys/dev/sound/pci/solo.c index 87df94b914b5..21054973d9a2 100644 --- a/sys/dev/sound/pci/solo.c +++ b/sys/dev/sound/pci/solo.c @@ -47,7 +47,7 @@ /* more accurate clocks and split audio1/audio2 rates */ #define ESS18XX_NEWSPEED -static u_int32_t ess_playfmt[] = { +static uint32_t ess_playfmt[] = { SND_FORMAT(AFMT_U8, 1, 0), SND_FORMAT(AFMT_U8, 2, 0), SND_FORMAT(AFMT_S8, 1, 0), @@ -63,7 +63,7 @@ static struct pcmchan_caps ess_playcaps = {6000, 48000, ess_playfmt, 0}; /* * Recording output is byte-swapped */ -static u_int32_t ess_recfmt[] = { +static uint32_t ess_recfmt[] = { SND_FORMAT(AFMT_U8, 1, 0), SND_FORMAT(AFMT_U8, 2, 0), SND_FORMAT(AFMT_S8, 1, 0), @@ -83,7 +83,7 @@ struct ess_chinfo { struct pcm_channel *channel; struct snd_dbuf *buffer; int dir, hwch, stopping; - u_int32_t fmt, spd, blksz; + uint32_t fmt, spd, blksz; }; struct ess_info { @@ -105,24 +105,24 @@ struct ess_info { #define ess_lock_assert(_ess) mtx_assert(&(_ess)->lock, MA_OWNED) static int ess_rd(struct ess_info *sc, int reg); -static void ess_wr(struct ess_info *sc, int reg, u_int8_t val); +static void ess_wr(struct ess_info *sc, int reg, uint8_t val); static int ess_dspready(struct ess_info *sc); static int ess_cmd(struct ess_info *sc, u_char val); static int ess_cmd1(struct ess_info *sc, u_char cmd, int val); static int ess_get_byte(struct ess_info *sc); -static void ess_setmixer(struct ess_info *sc, u_int port, u_int value); -static int ess_getmixer(struct ess_info *sc, u_int port); +static void ess_setmixer(struct ess_info *sc, unsigned int port, unsigned int value); +static int ess_getmixer(struct ess_info *sc, unsigned int port); static int ess_reset_dsp(struct ess_info *sc); static int ess_write(struct ess_info *sc, u_char reg, int val); static int ess_read(struct ess_info *sc, u_char reg); static void ess_intr(void *arg); -static int ess_setupch(struct ess_info *sc, int ch, int dir, int spd, u_int32_t fmt, int len); +static int ess_setupch(struct ess_info *sc, int ch, int dir, int spd, uint32_t fmt, int len); static int ess_start(struct ess_chinfo *ch); static int ess_stop(struct ess_chinfo *ch); -static int ess_dmasetup(struct ess_info *sc, int ch, u_int32_t base, u_int16_t cnt, int dir); +static int ess_dmasetup(struct ess_info *sc, int ch, uint32_t base, uint16_t cnt, int dir); static int ess_dmapos(struct ess_info *sc, int ch); static int ess_dmatrigger(struct ess_info *sc, int ch, int go); @@ -157,7 +157,7 @@ port_rd(struct resource *port, int regno, int size) } static void -port_wr(struct resource *port, int regno, u_int32_t data, int size) +port_wr(struct resource *port, int regno, uint32_t data, int size) { bus_space_tag_t st = rman_get_bustag(port); bus_space_handle_t sh = rman_get_bushandle(port); @@ -182,7 +182,7 @@ ess_rd(struct ess_info *sc, int reg) } static void -ess_wr(struct ess_info *sc, int reg, u_int8_t val) +ess_wr(struct ess_info *sc, int reg, uint8_t val) { port_wr(sc->sb, reg, val, 1); } @@ -226,7 +226,7 @@ ess_cmd1(struct ess_info *sc, u_char cmd, int val) } static void -ess_setmixer(struct ess_info *sc, u_int port, u_int value) +ess_setmixer(struct ess_info *sc, unsigned int port, unsigned int value) { DEB(printf("ess_setmixer: reg=%x, val=%x\n", port, value);) ess_wr(sc, SB_MIX_ADDR, (u_char) (port & 0xff)); /* Select register */ @@ -236,7 +236,7 @@ ess_setmixer(struct ess_info *sc, u_int port, u_int value) } static int -ess_getmixer(struct ess_info *sc, u_int port) +ess_getmixer(struct ess_info *sc, unsigned int port) { int val; @@ -359,11 +359,11 @@ ess_intr(void *arg) } /* utility functions for ESS */ -static u_int8_t +static uint8_t ess_calcspeed8(int *spd) { int speed = *spd; - u_int32_t t; + uint32_t t; if (speed > 22000) { t = (795500 + speed / 2) / speed; @@ -378,11 +378,11 @@ ess_calcspeed8(int *spd) return t & 0x000000ff; } -static u_int8_t +static uint8_t ess_calcspeed9(int *spd) { int speed, s0, s1, use0; - u_int8_t t0, t1; + uint8_t t0, t1; /* rate = source / (256 - divisor) */ /* divisor = 256 - (source / rate) */ @@ -400,7 +400,7 @@ ess_calcspeed9(int *spd) return use0? t0 : t1; } -static u_int8_t +static uint8_t ess_calcfilter(int spd) { int cutoff; @@ -412,13 +412,13 @@ ess_calcfilter(int spd) } static int -ess_setupch(struct ess_info *sc, int ch, int dir, int spd, u_int32_t fmt, int len) +ess_setupch(struct ess_info *sc, int ch, int dir, int spd, uint32_t fmt, int len) { int play = (dir == PCMDIR_PLAY)? 1 : 0; int b16 = (fmt & AFMT_16BIT)? 1 : 0; int stereo = (AFMT_CHANNEL(fmt) > 1)? 1 : 0; int unsign = (!(fmt & AFMT_SIGNED))? 1 : 0; - u_int8_t spdval, fmtval; + uint8_t spdval, fmtval; DEB(printf("ess_setupch\n")); spdval = (sc->newspeed)? ess_calcspeed9(&spd) : ess_calcspeed8(&spd); @@ -539,7 +539,7 @@ esschan_init(kobj_t obj, void *devinfo, struct snd_dbuf *b, struct pcm_channel * } static int -esschan_setformat(kobj_t obj, void *data, u_int32_t format) +esschan_setformat(kobj_t obj, void *data, uint32_t format) { struct ess_chinfo *ch = data; @@ -547,8 +547,8 @@ esschan_setformat(kobj_t obj, void *data, u_int32_t format) return 0; } -static u_int32_t -esschan_setspeed(kobj_t obj, void *data, u_int32_t speed) +static uint32_t +esschan_setspeed(kobj_t obj, void *data, uint32_t speed) { struct ess_chinfo *ch = data; struct ess_info *sc = ch->parent; @@ -561,8 +561,8 @@ esschan_setspeed(kobj_t obj, void *data, u_int32_t speed) return ch->spd; } -static u_int32_t -esschan_setblocksize(kobj_t obj, void *data, u_int32_t blocksize) +static uint32_t +esschan_setblocksize(kobj_t obj, void *data, uint32_t blocksize) { struct ess_chinfo *ch = data; @@ -600,12 +600,12 @@ esschan_trigger(kobj_t obj, void *data, int go) return 0; } -static u_int32_t +static uint32_t esschan_getptr(kobj_t obj, void *data) { struct ess_chinfo *ch = data; struct ess_info *sc = ch->parent; - u_int32_t ret; + uint32_t ret; ess_lock(sc); ret = ess_dmapos(sc, ch->hwch); @@ -712,8 +712,8 @@ essmix_set(struct snd_mixer *m, unsigned dev, unsigned left, unsigned right) return left | (right << 8); } -static u_int32_t -essmix_setrecsrc(struct snd_mixer *m, u_int32_t src) +static uint32_t +essmix_setrecsrc(struct snd_mixer *m, uint32_t src) { struct ess_info *sc = mix_getdevinfo(m); u_char recdev; @@ -754,7 +754,7 @@ MIXER_DECLARE(solomixer); /************************************************************/ static int -ess_dmasetup(struct ess_info *sc, int ch, u_int32_t base, u_int16_t cnt, int dir) +ess_dmasetup(struct ess_info *sc, int ch, uint32_t base, uint16_t cnt, int dir) { KASSERT(ch == 1 || ch == 2, ("bad ch")); sc->dmasz[ch - 1] = cnt; @@ -895,7 +895,7 @@ static int ess_probe(device_t dev) { char *s = NULL; - u_int32_t subdev; + uint32_t subdev; subdev = (pci_get_subdevice(dev) << 16) | pci_get_subvendor(dev); switch (pci_get_devid(dev)) { @@ -960,7 +960,7 @@ ess_attach(device_t dev) { struct ess_info *sc; char status[SND_STATUSLEN]; - u_int16_t ddma; + uint16_t ddma; sc = malloc(sizeof(*sc), M_DEVBUF, M_WAITOK | M_ZERO); pci_enable_busmaster(dev); diff --git a/sys/dev/sound/pci/spicds.c b/sys/dev/sound/pci/spicds.c index 350034d8bafb..960aee8efdd8 100644 --- a/sys/dev/sound/pci/spicds.c +++ b/sys/dev/sound/pci/spicds.c @@ -73,7 +73,7 @@ spicds_wrbit(struct spicds_info *codec, int bit) } static void -spicds_wrcd(struct spicds_info *codec, int reg, u_int16_t val) +spicds_wrcd(struct spicds_info *codec, int reg, uint16_t val) { int mask; diff --git a/sys/dev/sound/pci/t4dwave.c b/sys/dev/sound/pci/t4dwave.c index 53388353d15a..d4650cfa07e2 100644 --- a/sys/dev/sound/pci/t4dwave.c +++ b/sys/dev/sound/pci/t4dwave.c @@ -66,12 +66,12 @@ struct tr_info; /* channel registers */ struct tr_chinfo { - u_int32_t cso, alpha, fms, fmc, ec; - u_int32_t lba; - u_int32_t eso, delta; - u_int32_t rvol, cvol; - u_int32_t gvsel, pan, vol, ctrl; - u_int32_t active:1, was_active:1; + uint32_t cso, alpha, fms, fmc, ec; + uint32_t lba; + uint32_t eso, delta; + uint32_t rvol, cvol; + uint32_t gvsel, pan, vol, ctrl; + uint32_t active:1, was_active:1; int index, bufhalf; struct snd_dbuf *buffer; struct pcm_channel *channel; @@ -79,8 +79,8 @@ struct tr_chinfo { }; struct tr_rchinfo { - u_int32_t delta; - u_int32_t active:1, was_active:1; + uint32_t delta; + uint32_t active:1, was_active:1; struct snd_dbuf *buffer; struct pcm_channel *channel; struct tr_info *parent; @@ -88,8 +88,8 @@ struct tr_rchinfo { /* device private data */ struct tr_info { - u_int32_t type; - u_int32_t rev; + uint32_t type; + uint32_t rev; bus_space_tag_t st; bus_space_handle_t sh; @@ -101,8 +101,8 @@ struct tr_info { struct mtx lock; - u_int32_t hwchns; - u_int32_t playchns; + uint32_t hwchns; + uint32_t playchns; unsigned int bufsz; struct tr_chinfo chinfo[TR_MAXPLAYCH]; @@ -111,7 +111,7 @@ struct tr_info { /* -------------------------------------------------------------------- */ -static u_int32_t tr_recfmt[] = { +static uint32_t tr_recfmt[] = { SND_FORMAT(AFMT_U8, 1, 0), SND_FORMAT(AFMT_U8, 2, 0), SND_FORMAT(AFMT_S8, 1, 0), @@ -124,7 +124,7 @@ static u_int32_t tr_recfmt[] = { }; static struct pcmchan_caps tr_reccaps = {4000, 48000, tr_recfmt, 0}; -static u_int32_t tr_playfmt[] = { +static uint32_t tr_playfmt[] = { SND_FORMAT(AFMT_U8, 1, 0), SND_FORMAT(AFMT_U8, 2, 0), SND_FORMAT(AFMT_S8, 1, 0), @@ -141,7 +141,7 @@ static struct pcmchan_caps tr_playcaps = {4000, 48000, tr_playfmt, 0}; /* Hardware */ -static u_int32_t +static uint32_t tr_rd(struct tr_info *tr, int regno, int size) { switch(size) { @@ -157,7 +157,7 @@ tr_rd(struct tr_info *tr, int regno, int size) } static void -tr_wr(struct tr_info *tr, int regno, u_int32_t data, int size) +tr_wr(struct tr_info *tr, int regno, uint32_t data, int size) { switch(size) { case 1: @@ -211,7 +211,7 @@ tr_rdcd(kobj_t obj, void *devinfo, int regno) regno &= 0x7f; mtx_lock(&tr->lock); if (tr->type == ALI_PCI_ID) { - u_int32_t chk1, chk2; + uint32_t chk1, chk2; j = trw; for (i = TR_TIMEOUT_CDC; (i > 0) && (j & trw); i--) j = tr_rd(tr, treg, 4); @@ -235,7 +235,7 @@ tr_rdcd(kobj_t obj, void *devinfo, int regno) } static int -tr_wrcd(kobj_t obj, void *devinfo, int regno, u_int32_t data) +tr_wrcd(kobj_t obj, void *devinfo, int regno, uint32_t data) { struct tr_info *tr = (struct tr_info *)devinfo; int i, j, treg, trw; @@ -272,7 +272,7 @@ tr_wrcd(kobj_t obj, void *devinfo, int regno, u_int32_t data) for (i = TR_TIMEOUT_CDC; (i > 0) && (j & trw); i--) j = tr_rd(tr, treg, 4); if (i > 0) { - u_int32_t chk1, chk2; + uint32_t chk1, chk2; chk1 = tr_rd(tr, 0xc8, 4); chk2 = tr_rd(tr, 0xc8, 4); for (i = TR_TIMEOUT_CDC; (i > 0) && (chk1 == chk2); @@ -306,7 +306,7 @@ AC97_DECLARE(tr_ac97); /* playback channel interrupts */ #if 0 -static u_int32_t +static uint32_t tr_testint(struct tr_chinfo *ch) { struct tr_info *tr = ch->parent; @@ -333,7 +333,7 @@ static void tr_enaint(struct tr_chinfo *ch, int enable) { struct tr_info *tr = ch->parent; - u_int32_t i, reg; + uint32_t i, reg; int bank, chan; mtx_lock(&tr->lock); @@ -390,7 +390,7 @@ static void tr_wrch(struct tr_chinfo *ch) { struct tr_info *tr = ch->parent; - u_int32_t cr[TR_CHN_REGS], i; + uint32_t cr[TR_CHN_REGS], i; ch->gvsel &= 0x00000001; ch->fmc &= 0x00000003; @@ -440,7 +440,7 @@ static void tr_rdch(struct tr_chinfo *ch) { struct tr_info *tr = ch->parent; - u_int32_t cr[5], i; + uint32_t cr[5], i; mtx_lock(&tr->lock); tr_selch(ch); @@ -480,10 +480,10 @@ tr_rdch(struct tr_chinfo *ch) } } -static u_int32_t -tr_fmttobits(u_int32_t fmt) +static uint32_t +tr_fmttobits(uint32_t fmt) { - u_int32_t bits; + uint32_t bits; bits = 0; bits |= (fmt & AFMT_SIGNED)? 0x2 : 0; @@ -515,7 +515,7 @@ trpchan_init(kobj_t obj, void *devinfo, struct snd_dbuf *b, struct pcm_channel * } static int -trpchan_setformat(kobj_t obj, void *data, u_int32_t format) +trpchan_setformat(kobj_t obj, void *data, uint32_t format) { struct tr_chinfo *ch = data; @@ -524,8 +524,8 @@ trpchan_setformat(kobj_t obj, void *data, u_int32_t format) return 0; } -static u_int32_t -trpchan_setspeed(kobj_t obj, void *data, u_int32_t speed) +static uint32_t +trpchan_setspeed(kobj_t obj, void *data, uint32_t speed) { struct tr_chinfo *ch = data; @@ -533,8 +533,8 @@ trpchan_setspeed(kobj_t obj, void *data, u_int32_t speed) return (ch->delta * 48000) >> 12; } -static u_int32_t -trpchan_setblocksize(kobj_t obj, void *data, u_int32_t blocksize) +static uint32_t +trpchan_setblocksize(kobj_t obj, void *data, uint32_t blocksize) { struct tr_chinfo *ch = data; @@ -575,7 +575,7 @@ trpchan_trigger(kobj_t obj, void *data, int go) return 0; } -static u_int32_t +static uint32_t trpchan_getptr(kobj_t obj, void *data) { struct tr_chinfo *ch = data; @@ -623,11 +623,11 @@ trrchan_init(kobj_t obj, void *devinfo, struct snd_dbuf *b, struct pcm_channel * } static int -trrchan_setformat(kobj_t obj, void *data, u_int32_t format) +trrchan_setformat(kobj_t obj, void *data, uint32_t format) { struct tr_rchinfo *ch = data; struct tr_info *tr = ch->parent; - u_int32_t i, bits; + uint32_t i, bits; bits = tr_fmttobits(format); /* set # of samples between interrupts */ @@ -640,8 +640,8 @@ trrchan_setformat(kobj_t obj, void *data, u_int32_t format) return 0; } -static u_int32_t -trrchan_setspeed(kobj_t obj, void *data, u_int32_t speed) +static uint32_t +trrchan_setspeed(kobj_t obj, void *data, uint32_t speed) { struct tr_rchinfo *ch = data; struct tr_info *tr = ch->parent; @@ -654,8 +654,8 @@ trrchan_setspeed(kobj_t obj, void *data, u_int32_t speed) return (48000 << 12) / ch->delta; } -static u_int32_t -trrchan_setblocksize(kobj_t obj, void *data, u_int32_t blocksize) +static uint32_t +trrchan_setblocksize(kobj_t obj, void *data, uint32_t blocksize) { struct tr_rchinfo *ch = data; @@ -669,7 +669,7 @@ trrchan_trigger(kobj_t obj, void *data, int go) { struct tr_rchinfo *ch = data; struct tr_info *tr = ch->parent; - u_int32_t i; + uint32_t i; if (!PCMTRIG_COMMON(go)) return 0; @@ -696,7 +696,7 @@ trrchan_trigger(kobj_t obj, void *data, int go) return 0; } -static u_int32_t +static uint32_t trrchan_getptr(kobj_t obj, void *data) { struct tr_rchinfo *ch = data; @@ -732,7 +732,7 @@ tr_intr(void *p) { struct tr_info *tr = (struct tr_info *)p; struct tr_chinfo *ch; - u_int32_t active, mask, bufhalf, chnum, intsrc; + uint32_t active, mask, bufhalf, chnum, intsrc; int tmp; intsrc = tr_rd(tr, TR_REG_MISCINT, 4); diff --git a/sys/dev/sound/pci/via82c686.c b/sys/dev/sound/pci/via82c686.c index 144f0ff21fb6..85356cc64145 100644 --- a/sys/dev/sound/pci/via82c686.c +++ b/sys/dev/sound/pci/via82c686.c @@ -52,8 +52,8 @@ /* we rely on this struct being packed to 64 bits */ struct via_dma_op { - u_int32_t ptr; - u_int32_t flags; + uint32_t ptr; + uint32_t flags; #define VIA_DMAOP_EOL 0x80000000 #define VIA_DMAOP_FLAG 0x40000000 #define VIA_DMAOP_STOP 0x20000000 @@ -89,11 +89,11 @@ struct via_info { struct via_chinfo pch, rch; struct via_dma_op *sgd_table; - u_int16_t codec_caps; + uint16_t codec_caps; struct mtx lock; }; -static u_int32_t via_fmt[] = { +static uint32_t via_fmt[] = { SND_FORMAT(AFMT_U8, 1, 0), SND_FORMAT(AFMT_U8, 2, 0), SND_FORMAT(AFMT_S16_LE, 1, 0), @@ -103,7 +103,7 @@ static u_int32_t via_fmt[] = { static struct pcmchan_caps via_vracaps = {4000, 48000, via_fmt, 0}; static struct pcmchan_caps via_caps = {48000, 48000, via_fmt, 0}; -static __inline u_int32_t +static __inline uint32_t via_rd(struct via_info *via, int regno, int size) { @@ -120,7 +120,7 @@ via_rd(struct via_info *via, int regno, int size) } static __inline void -via_wr(struct via_info *via, int regno, u_int32_t data, int size) +via_wr(struct via_info *via, int regno, uint32_t data, int size) { switch (size) { @@ -174,7 +174,7 @@ via_waitvalid_codec(struct via_info *via) } static int -via_write_codec(kobj_t obj, void *addr, int reg, u_int32_t val) +via_write_codec(kobj_t obj, void *addr, int reg, uint32_t val) { struct via_info *via = addr; @@ -216,7 +216,7 @@ AC97_DECLARE(via_ac97); static int via_buildsgdt(struct via_chinfo *ch) { - u_int32_t phys_addr, flag; + uint32_t phys_addr, flag; int i, segs, seg_size; /* @@ -277,7 +277,7 @@ viachan_init(kobj_t obj, void *devinfo, struct snd_dbuf *b, struct pcm_channel * } static int -viachan_setformat(kobj_t obj, void *data, u_int32_t format) +viachan_setformat(kobj_t obj, void *data, uint32_t format) { struct via_chinfo *ch = data; struct via_info *via = ch->parent; @@ -300,8 +300,8 @@ viachan_setformat(kobj_t obj, void *data, u_int32_t format) return 0; } -static u_int32_t -viachan_setspeed(kobj_t obj, void *data, u_int32_t speed) +static uint32_t +viachan_setspeed(kobj_t obj, void *data, uint32_t speed) { struct via_chinfo *ch = data; struct via_info *via = ch->parent; @@ -323,8 +323,8 @@ viachan_setspeed(kobj_t obj, void *data, u_int32_t speed) return 48000; } -static u_int32_t -viachan_setblocksize(kobj_t obj, void *data, u_int32_t blocksize) +static uint32_t +viachan_setblocksize(kobj_t obj, void *data, uint32_t blocksize) { struct via_chinfo *ch = data; @@ -359,13 +359,13 @@ viachan_trigger(kobj_t obj, void *data, int go) return 0; } -static u_int32_t +static uint32_t viachan_getptr(kobj_t obj, void *data) { struct via_chinfo *ch = data; struct via_info *via = ch->parent; bus_addr_t sgd_addr = ch->sgd_addr; - u_int32_t ptr, base, base1, len, seg; + uint32_t ptr, base, base1, len, seg; mtx_lock(&via->lock); base1 = via_rd(via, ch->base, 4); @@ -469,7 +469,7 @@ via_attach(device_t dev) { struct via_info *via = NULL; char status[SND_STATUSLEN]; - u_int32_t data, cnt; + uint32_t data, cnt; via = malloc(sizeof(*via), M_DEVBUF, M_WAITOK | M_ZERO); mtx_init(&via->lock, device_get_nameunit(dev), "snd_via82c686 softc", diff --git a/sys/dev/sound/pci/vibes.c b/sys/dev/sound/pci/vibes.c index 648370c6c973..59b6f75ad6a0 100644 --- a/sys/dev/sound/pci/vibes.c +++ b/sys/dev/sound/pci/vibes.c @@ -65,7 +65,7 @@ struct sc_chinfo { struct sc_info *parent; struct pcm_channel *channel; struct snd_dbuf *buffer; - u_int32_t fmt, spd; + uint32_t fmt, spd; int dir; int dma_active, dma_was_active; }; @@ -99,10 +99,10 @@ struct sc_info { unsigned int bufsz; struct sc_chinfo rch, pch; - u_int8_t rev; + uint8_t rev; }; -static u_int32_t sc_fmt[] = { +static uint32_t sc_fmt[] = { SND_FORMAT(AFMT_U8, 1, 0), SND_FORMAT(AFMT_U8, 2, 0), SND_FORMAT(AFMT_S16_LE, 1, 0), @@ -117,16 +117,16 @@ static struct pcmchan_caps sc_caps = {8000, 48000, sc_fmt, 0}; #define sv_direct_set(x, y, z) _sv_direct_set(x, y, z, __LINE__) -static u_int8_t -sv_direct_get(struct sc_info *sc, u_int8_t reg) +static uint8_t +sv_direct_get(struct sc_info *sc, uint8_t reg) { return bus_space_read_1(sc->enh_st, sc->enh_sh, reg); } static void -_sv_direct_set(struct sc_info *sc, u_int8_t reg, u_int8_t val, int line) +_sv_direct_set(struct sc_info *sc, uint8_t reg, uint8_t val, int line) { - u_int8_t n; + uint8_t n; bus_space_write_1(sc->enh_st, sc->enh_sh, reg, val); n = sv_direct_get(sc, reg); @@ -135,8 +135,8 @@ _sv_direct_set(struct sc_info *sc, u_int8_t reg, u_int8_t val, int line) } } -static u_int8_t -sv_indirect_get(struct sc_info *sc, u_int8_t reg) +static uint8_t +sv_indirect_get(struct sc_info *sc, uint8_t reg) { if (reg == SV_REG_FORMAT || reg == SV_REG_ANALOG_PWR) reg |= SV_CM_INDEX_MCE; @@ -148,7 +148,7 @@ sv_indirect_get(struct sc_info *sc, u_int8_t reg) #define sv_indirect_set(x, y, z) _sv_indirect_set(x, y, z, __LINE__) static void -_sv_indirect_set(struct sc_info *sc, u_int8_t reg, u_int8_t val, int line) +_sv_indirect_set(struct sc_info *sc, uint8_t reg, uint8_t val, int line) { if (reg == SV_REG_FORMAT || reg == SV_REG_ANALOG_PWR) reg |= SV_CM_INDEX_MCE; @@ -158,7 +158,7 @@ _sv_indirect_set(struct sc_info *sc, u_int8_t reg, u_int8_t val, int line) reg &= ~SV_CM_INDEX_MCE; if (reg != SV_REG_ADC_PLLM) { - u_int8_t n; + uint8_t n; n = sv_indirect_get(sc, reg); if (n != val) { device_printf(sc->dev, "sv_indirect_set register 0x%02x %d != %d line %d\n", reg, n, val, line); @@ -168,7 +168,7 @@ _sv_indirect_set(struct sc_info *sc, u_int8_t reg, u_int8_t val, int line) static void sv_dma_set_config(bus_space_tag_t st, bus_space_handle_t sh, - u_int32_t base, u_int32_t count, u_int8_t mode) + uint32_t base, uint32_t count, uint8_t mode) { bus_space_write_4(st, sh, SV_DMA_ADDR, base); bus_space_write_4(st, sh, SV_DMA_COUNT, count & 0xffffff); @@ -178,7 +178,7 @@ sv_dma_set_config(bus_space_tag_t st, bus_space_handle_t sh, base, count, mode)); } -static u_int32_t +static uint32_t sv_dma_get_count(bus_space_tag_t st, bus_space_handle_t sh) { return bus_space_read_4(st, sh, SV_DMA_COUNT) & 0xffffff; @@ -216,8 +216,8 @@ svchan_getcaps(kobj_t obj, void *data) return &sc_caps; } -static u_int32_t -svchan_setblocksize(kobj_t obj, void *data, u_int32_t blocksize) +static uint32_t +svchan_setblocksize(kobj_t obj, void *data, uint32_t blocksize) { struct sc_chinfo *ch = data; struct sc_info *sc = ch->parent; @@ -230,7 +230,7 @@ svchan_setblocksize(kobj_t obj, void *data, u_int32_t blocksize) } static int -svchan_setformat(kobj_t obj, void *data, u_int32_t format) +svchan_setformat(kobj_t obj, void *data, uint32_t format) { struct sc_chinfo *ch = data; /* NB Just note format here as setting format register @@ -240,8 +240,8 @@ svchan_setformat(kobj_t obj, void *data, u_int32_t format) return 0; } -static u_int32_t -svchan_setspeed(kobj_t obj, void *data, u_int32_t speed) +static uint32_t +svchan_setspeed(kobj_t obj, void *data, uint32_t speed) { struct sc_chinfo *ch = data; RANGE(speed, 8000, 48000); @@ -253,10 +253,10 @@ svchan_setspeed(kobj_t obj, void *data, u_int32_t speed) /* Recording interface */ static int -sv_set_recspeed(struct sc_info *sc, u_int32_t speed) +sv_set_recspeed(struct sc_info *sc, uint32_t speed) { - u_int32_t f_out, f_actual; - u_int32_t rs, re, r, best_r = 0, r2, t, n, best_n = 0; + uint32_t f_out, f_actual; + uint32_t rs, re, r, best_r = 0, r2, t, n, best_n = 0; int32_t m, best_m = 0, ms, me, err, min_err; /* This algorithm is a variant described in sonicvibes.pdf @@ -314,8 +314,8 @@ svrchan_trigger(kobj_t obj, void *data, int go) { struct sc_chinfo *ch = data; struct sc_info *sc = ch->parent; - u_int32_t count, enable; - u_int8_t v; + uint32_t count, enable; + uint8_t v; switch(go) { case PCMTRIG_START: @@ -353,12 +353,12 @@ svrchan_trigger(kobj_t obj, void *data, int go) return 0; } -static u_int32_t +static uint32_t svrchan_getptr(kobj_t obj, void *data) { struct sc_chinfo *ch = data; struct sc_info *sc = ch->parent; - u_int32_t sz, remain; + uint32_t sz, remain; sz = ch->buffer->bufsize; /* DMAC uses words */ @@ -386,8 +386,8 @@ svpchan_trigger(kobj_t obj, void *data, int go) { struct sc_chinfo *ch = data; struct sc_info *sc = ch->parent; - u_int32_t count, enable, speed; - u_int8_t v; + uint32_t count, enable, speed; + uint8_t v; switch(go) { case PCMTRIG_START: @@ -430,12 +430,12 @@ svpchan_trigger(kobj_t obj, void *data, int go) return 0; } -static u_int32_t +static uint32_t svpchan_getptr(kobj_t obj, void *data) { struct sc_chinfo *ch = data; struct sc_info *sc = ch->parent; - u_int32_t sz, remain; + uint32_t sz, remain; sz = ch->buffer->bufsize; /* DMAA uses bytes */ @@ -459,12 +459,12 @@ CHANNEL_DECLARE(svpchan); /* Mixer support */ struct sv_mix_props { - u_int8_t reg; /* Register */ - u_int8_t stereo:1; /* Supports 2 channels */ - u_int8_t mute:1; /* Supports muting */ - u_int8_t neg:1; /* Negative gain */ - u_int8_t max; /* Max gain */ - u_int8_t iselect; /* Input selector */ + uint8_t reg; /* Register */ + uint8_t stereo:1; /* Supports 2 channels */ + uint8_t mute:1; /* Supports muting */ + uint8_t neg:1; /* Negative gain */ + uint8_t max; /* Max gain */ + uint8_t iselect; /* Input selector */ } static const mt [SOUND_MIXER_NRDEVICES] = { [SOUND_MIXER_LINE1] = {SV_REG_AUX1, 1, 1, 1, SV_DEFAULT_MAX, SV_INPUT_AUX1}, [SOUND_MIXER_CD] = {SV_REG_CD, 1, 1, 1, SV_DEFAULT_MAX, SV_INPUT_CD}, @@ -478,9 +478,9 @@ struct sv_mix_props { }; static void -sv_channel_gain(struct sc_info *sc, u_int32_t dev, u_int32_t gain, u_int32_t channel) +sv_channel_gain(struct sc_info *sc, uint32_t dev, uint32_t gain, uint32_t channel) { - u_int8_t v; + uint8_t v; int32_t g; g = mt[dev].max * gain / 100; @@ -500,7 +500,7 @@ sv_channel_gain(struct sc_info *sc, u_int32_t dev, u_int32_t gain, u_int32_t cha } static int -sv_gain(struct sc_info *sc, u_int32_t dev, u_int32_t left, u_int32_t right) +sv_gain(struct sc_info *sc, uint32_t dev, uint32_t left, uint32_t right) { sv_channel_gain(sc, dev, left, 0); if (mt[dev].stereo) @@ -520,7 +520,7 @@ sv_mix_mute_all(struct sc_info *sc) static int sv_mix_init(struct snd_mixer *m) { - u_int32_t i, v; + uint32_t i, v; for(i = v = 0; i < SOUND_MIXER_NRDEVICES; i++) { if (mt[i].max) v |= (1 << i); @@ -536,17 +536,17 @@ sv_mix_init(struct snd_mixer *m) } static int -sv_mix_set(struct snd_mixer *m, u_int32_t dev, u_int32_t left, u_int32_t right) +sv_mix_set(struct snd_mixer *m, uint32_t dev, uint32_t left, uint32_t right) { struct sc_info *sc = mix_getdevinfo(m); return sv_gain(sc, dev, left, right); } -static u_int32_t -sv_mix_setrecsrc(struct snd_mixer *m, u_int32_t mask) +static uint32_t +sv_mix_setrecsrc(struct snd_mixer *m, uint32_t mask) { struct sc_info *sc = mix_getdevinfo(m); - u_int32_t i, v; + uint32_t i, v; v = sv_indirect_get(sc, SV_REG_ADC_INPUT) & SV_INPUT_GAIN_MASK; for(i = 0; i < SOUND_MIXER_NRDEVICES; i++) { @@ -573,7 +573,7 @@ MIXER_DECLARE(sv_mixer); static void sv_power(struct sc_info *sc, int state) { - u_int8_t v; + uint8_t v; switch (state) { case 0: @@ -599,7 +599,7 @@ sv_power(struct sc_info *sc, int state) static int sv_init(struct sc_info *sc) { - u_int8_t v; + uint8_t v; /* Effect reset */ v = sv_direct_get(sc, SV_CM_CONTROL) & ~SV_CM_CONTROL_ENHANCED; @@ -691,7 +691,7 @@ static void sv_intr(void *data) { struct sc_info *sc = data; - u_int8_t status; + uint8_t status; status = sv_direct_get(sc, SV_CM_STATUS); if (status & SV_CM_STATUS_AINT) @@ -722,7 +722,7 @@ static int sv_attach(device_t dev) { struct sc_info *sc; rman_res_t count, midi_start, games_start; - u_int32_t data; + uint32_t data; char status[SND_STATUSLEN]; u_long sdmaa, sdmac, ml, mu; @@ -841,7 +841,7 @@ sv_attach(device_t dev) { /* Poke port into dma_a configuration, nb bit flags to enable dma */ data = pci_read_config(dev, SV_PCI_DMAA, 4) | SV_PCI_DMA_ENABLE | SV_PCI_DMA_EXTENDED; - data = ((u_int32_t)sdmaa & 0xfffffff0) | (data & 0x0f); + data = ((uint32_t)sdmaa & 0xfffffff0) | (data & 0x0f); pci_write_config(dev, SV_PCI_DMAA, data, 4); DEB(printf("dmaa: 0x%x 0x%x\n", data, pci_read_config(dev, SV_PCI_DMAA, 4))); @@ -859,7 +859,7 @@ sv_attach(device_t dev) { /* Poke port into dma_c configuration, nb bit flags to enable dma */ data = pci_read_config(dev, SV_PCI_DMAC, 4) | SV_PCI_DMA_ENABLE | SV_PCI_DMA_EXTENDED; - data = ((u_int32_t)sdmac & 0xfffffff0) | (data & 0x0f); + data = ((uint32_t)sdmac & 0xfffffff0) | (data & 0x0f); pci_write_config(dev, SV_PCI_DMAC, data, 4); DEB(printf("dmac: 0x%x 0x%x\n", data, pci_read_config(dev, SV_PCI_DMAC, 4))); diff --git a/sys/dev/sound/pcm/ac97.c b/sys/dev/sound/pcm/ac97.c index ec742ccbbfaa..8a2bd23e056e 100644 --- a/sys/dev/sound/pcm/ac97.c +++ b/sys/dev/sound/pcm/ac97.c @@ -59,24 +59,24 @@ struct ac97_info { kobj_t methods; device_t dev; void *devinfo; - u_int32_t id; - u_int32_t subvendor; + uint32_t id; + uint32_t subvendor; unsigned count, caps, se, extcaps, extid, extstat, noext:1; - u_int32_t flags; + uint32_t flags; struct ac97mixtable_entry mix[AC97_MIXER_SIZE]; char name[16]; struct mtx lock; }; struct ac97_vendorid { - u_int32_t id; + uint32_t id; const char *name; }; struct ac97_codecid { - u_int32_t id; - u_int8_t stepmask; - u_int8_t noext:1; + uint32_t id; + uint8_t stepmask; + uint8_t noext:1; char *name; ac97_patch patch; }; @@ -302,11 +302,11 @@ static char *ac97extfeature[] = { "reserved 7", }; -u_int16_t +uint16_t ac97_rdcd(struct ac97_info *codec, int reg) { if (codec->flags & AC97_F_RDCD_BUG) { - u_int16_t i[2], j = 100; + uint16_t i[2], j = 100; i[0] = AC97_READ(codec->methods, codec->devinfo, reg); i[1] = AC97_READ(codec->methods, codec->devinfo, reg); @@ -318,7 +318,7 @@ ac97_rdcd(struct ac97_info *codec, int reg) } void -ac97_wrcd(struct ac97_info *codec, int reg, u_int16_t val) +ac97_wrcd(struct ac97_info *codec, int reg, uint16_t val) { AC97_WRITE(codec->methods, codec->devinfo, reg, val); } @@ -326,7 +326,7 @@ ac97_wrcd(struct ac97_info *codec, int reg, u_int16_t val) static void ac97_reset(struct ac97_info *codec) { - u_int32_t i, ps; + uint32_t i, ps; ac97_wrcd(codec, AC97_REG_RESET, 0); for (i = 0; i < 500; i++) { ps = ac97_rdcd(codec, AC97_REG_POWER) & AC97_POWER_STATUS; @@ -340,7 +340,7 @@ ac97_reset(struct ac97_info *codec) int ac97_setrate(struct ac97_info *codec, int which, int rate) { - u_int16_t v; + uint16_t v; switch(which) { case AC97_REGEXT_FDACRATE: @@ -369,7 +369,7 @@ ac97_setrate(struct ac97_info *codec, int which, int rate) } int -ac97_setextmode(struct ac97_info *codec, u_int16_t mode) +ac97_setextmode(struct ac97_info *codec, uint16_t mode) { mode &= AC97_EXTCAPS; if ((mode & ~codec->extcaps) != 0) { @@ -384,25 +384,25 @@ ac97_setextmode(struct ac97_info *codec, u_int16_t mode) return (mode == codec->extstat)? 0 : -1; } -u_int16_t +uint16_t ac97_getextmode(struct ac97_info *codec) { return codec->extstat; } -u_int16_t +uint16_t ac97_getextcaps(struct ac97_info *codec) { return codec->extcaps; } -u_int16_t +uint16_t ac97_getcaps(struct ac97_info *codec) { return codec->caps; } -u_int32_t +uint32_t ac97_getsubvendor(struct ac97_info *codec) { return codec->subvendor; @@ -565,7 +565,7 @@ ac97_fix_tone(struct ac97_info *codec) } static const char* -ac97_hw_desc(u_int32_t id, const char* vname, const char* cname, char* buf) +ac97_hw_desc(uint32_t id, const char* vname, const char* cname, char* buf) { if (cname == NULL) { sprintf(buf, "Unknown AC97 Codec (id = 0x%08x)", id); @@ -590,7 +590,7 @@ ac97_initmixer(struct ac97_info *codec) char desc[80]; device_t pdev; unsigned i, j, k, bit, old; - u_int32_t id; + uint32_t id; int reg; mtx_lock(&codec->lock); @@ -633,15 +633,15 @@ ac97_initmixer(struct ac97_info *codec) pdev = device_get_parent(pdev); } codec->id = id; - codec->subvendor = (u_int32_t)pci_get_subdevice(pdev) << 16; - codec->subvendor |= (u_int32_t)pci_get_subvendor(pdev) & + codec->subvendor = (uint32_t)pci_get_subdevice(pdev) << 16; + codec->subvendor |= (uint32_t)pci_get_subvendor(pdev) & 0x0000ffff; codec->noext = 0; codec_patch = NULL; cname = NULL; for (i = 0; ac97codecid[i].id; i++) { - u_int32_t modelmask = 0xffffffff ^ ac97codecid[i].stepmask; + uint32_t modelmask = 0xffffffff ^ ac97codecid[i].stepmask; if ((ac97codecid[i].id & modelmask) == (id & modelmask)) { codec->noext = ac97codecid[i].noext; codec_patch = ac97codecid[i].patch; @@ -841,12 +841,12 @@ ac97_destroy(struct ac97_info *codec) } void -ac97_setflags(struct ac97_info *codec, u_int32_t val) +ac97_setflags(struct ac97_info *codec, uint32_t val) { codec->flags = val; } -u_int32_t +uint32_t ac97_getflags(struct ac97_info *codec) { return codec->flags; @@ -946,7 +946,7 @@ sysctl_hw_snd_ac97_eapd(SYSCTL_HANDLER_ARGS) { struct ac97_info *codec; int ea, inv, err = 0; - u_int16_t val; + uint16_t val; codec = oidp->oid_arg1; if (codec == NULL || codec->id == 0) @@ -972,7 +972,7 @@ sysctl_hw_snd_ac97_eapd(SYSCTL_HANDLER_ARGS) static void ac97_init_sysctl(struct ac97_info *codec) { - u_int16_t orig, val; + uint16_t orig, val; if (codec == NULL || codec->dev == NULL) return; @@ -996,7 +996,7 @@ static int ac97mix_init(struct snd_mixer *m) { struct ac97_info *codec = mix_getdevinfo(m); - u_int32_t i, mask; + uint32_t i, mask; if (codec == NULL) return -1; @@ -1117,8 +1117,8 @@ ac97mix_set(struct snd_mixer *m, unsigned dev, unsigned left, unsigned right) return ac97_setmixer(codec, dev, left, right); } -static u_int32_t -ac97mix_setrecsrc(struct snd_mixer *m, u_int32_t src) +static uint32_t +ac97mix_setrecsrc(struct snd_mixer *m, uint32_t src) { int i; struct ac97_info *codec = mix_getdevinfo(m); diff --git a/sys/dev/sound/pcm/ac97.h b/sys/dev/sound/pcm/ac97.h index ad0408d4163f..c9bb2493ebc9 100644 --- a/sys/dev/sound/pcm/ac97.h +++ b/sys/dev/sound/pcm/ac97.h @@ -94,14 +94,14 @@ extern kobj_class_t ac97_getmixerclass(void); struct ac97_info *ac97_create(device_t dev, void *devinfo, kobj_class_t cls); void ac97_destroy(struct ac97_info *codec); -void ac97_setflags(struct ac97_info *codec, u_int32_t val); -u_int32_t ac97_getflags(struct ac97_info *codec); +void ac97_setflags(struct ac97_info *codec, uint32_t val); +uint32_t ac97_getflags(struct ac97_info *codec); int ac97_setrate(struct ac97_info *codec, int which, int rate); -int ac97_setextmode(struct ac97_info *codec, u_int16_t mode); -u_int16_t ac97_getextmode(struct ac97_info *codec); -u_int16_t ac97_getextcaps(struct ac97_info *codec); -u_int16_t ac97_getcaps(struct ac97_info *codec); -u_int32_t ac97_getsubvendor(struct ac97_info *codec); +int ac97_setextmode(struct ac97_info *codec, uint16_t mode); +uint16_t ac97_getextmode(struct ac97_info *codec); +uint16_t ac97_getextcaps(struct ac97_info *codec); +uint16_t ac97_getcaps(struct ac97_info *codec); +uint32_t ac97_getsubvendor(struct ac97_info *codec); -u_int16_t ac97_rdcd(struct ac97_info *codec, int reg); -void ac97_wrcd(struct ac97_info *codec, int reg, u_int16_t val); +uint16_t ac97_rdcd(struct ac97_info *codec, int reg); +void ac97_wrcd(struct ac97_info *codec, int reg, uint16_t val); diff --git a/sys/dev/sound/pcm/ac97_if.m b/sys/dev/sound/pcm/ac97_if.m index 3cdbc72cc82d..745c85eaa115 100644 --- a/sys/dev/sound/pcm/ac97_if.m +++ b/sys/dev/sound/pcm/ac97_if.m @@ -33,7 +33,7 @@ INTERFACE ac97; CODE { - static u_int32_t + static uint32_t ac97_noinit(kobj_t obj, void *devinfo) { return 1; @@ -41,7 +41,7 @@ CODE { }; -METHOD u_int32_t init { +METHOD uint32_t init { kobj_t obj; void *devinfo; } DEFAULT ac97_noinit; @@ -56,5 +56,5 @@ METHOD int write { kobj_t obj; void *devinfo; int regno; - u_int32_t data; + uint32_t data; }; diff --git a/sys/dev/sound/pcm/buffer.c b/sys/dev/sound/pcm/buffer.c index 73f75716a198..fe46dc069b05 100644 --- a/sys/dev/sound/pcm/buffer.c +++ b/sys/dev/sound/pcm/buffer.c @@ -46,7 +46,7 @@ #include "snd_fxdiv_gen.h" struct snd_dbuf * -sndbuf_create(struct pcm_channel *channel, u_int32_t fmt, u_int32_t spd, +sndbuf_create(struct pcm_channel *channel, uint32_t fmt, uint32_t spd, const char *desc) { struct snd_dbuf *b; @@ -184,7 +184,7 @@ int sndbuf_resize(struct snd_dbuf *b, unsigned int blkcnt, unsigned int blksz) { unsigned int bufsize, allocsize; - u_int8_t *tmpbuf; + uint8_t *tmpbuf; CHN_LOCK(b->channel); if (b->maxsize == 0) @@ -238,7 +238,7 @@ int sndbuf_remalloc(struct snd_dbuf *b, unsigned int blkcnt, unsigned int blksz) { unsigned int bufsize, allocsize; - u_int8_t *buf, *tmpbuf, *shadbuf; + uint8_t *buf, *tmpbuf, *shadbuf; if (blkcnt < 2 || blksz < 16) return EINVAL; @@ -325,7 +325,7 @@ sndbuf_fillsilence(struct snd_dbuf *b) } void -sndbuf_fillsilence_rl(struct snd_dbuf *b, u_int rl) +sndbuf_fillsilence_rl(struct snd_dbuf *b, unsigned int rl) { if (b->bufsize > 0) memset(b->buf, sndbuf_zerodata(b->fmt), b->bufsize); @@ -366,7 +366,7 @@ sndbuf_reset(struct snd_dbuf *b) } int -sndbuf_setfmt(struct snd_dbuf *b, u_int32_t fmt) +sndbuf_setfmt(struct snd_dbuf *b, uint32_t fmt) { b->fmt = fmt; b->bps = AFMT_BPS(b->fmt); @@ -439,7 +439,7 @@ sndbuf_getfreeptr(struct snd_dbuf *b) return (b->rp + b->rl) % b->bufsize; } -u_int64_t +uint64_t sndbuf_getblocks(struct snd_dbuf *b) { return b->total / b->blksz; @@ -454,8 +454,8 @@ sndbuf_xbytes(unsigned int v, struct snd_dbuf *from, struct snd_dbuf *to) return snd_xbytes(v, from->align * from->spd, to->align * to->spd); } -u_int8_t -sndbuf_zerodata(u_int32_t fmt) +uint8_t +sndbuf_zerodata(uint32_t fmt) { if (fmt & (AFMT_SIGNED | AFMT_PASSTHROUGH)) return (0x00); @@ -482,7 +482,7 @@ sndbuf_zerodata(u_int32_t fmt) * @retval 0 Unconditional */ int -sndbuf_acquire(struct snd_dbuf *b, u_int8_t *from, unsigned int count) +sndbuf_acquire(struct snd_dbuf *b, uint8_t *from, unsigned int count) { int l; @@ -519,7 +519,7 @@ sndbuf_acquire(struct snd_dbuf *b, u_int8_t *from, unsigned int count) * @returns 0 unconditionally */ int -sndbuf_dispose(struct snd_dbuf *b, u_int8_t *to, unsigned int count) +sndbuf_dispose(struct snd_dbuf *b, uint8_t *to, unsigned int count) { int l; @@ -600,7 +600,7 @@ sndbuf_clearshadow(struct snd_dbuf *b) void sndbuf_getpeaks(struct snd_dbuf *b, int *lp, int *rp) { - u_int32_t lpeak, rpeak; + uint32_t lpeak, rpeak; lpeak = 0; rpeak = 0; diff --git a/sys/dev/sound/pcm/buffer.h b/sys/dev/sound/pcm/buffer.h index 34f885db6609..4363a637bc34 100644 --- a/sys/dev/sound/pcm/buffer.h +++ b/sys/dev/sound/pcm/buffer.h @@ -36,20 +36,20 @@ #define SNDBUF_NAMELEN 48 struct snd_dbuf { - u_int8_t *buf, *tmpbuf; - u_int8_t *shadbuf; /**< shadow buffer used w/ S_D_SILENCE/SKIP */ + uint8_t *buf, *tmpbuf; + uint8_t *shadbuf; /**< shadow buffer used w/ S_D_SILENCE/SKIP */ volatile int sl; /**< shadbuf ready length in # of bytes */ unsigned int bufsize, maxsize, allocsize; volatile int dl; /* transfer size */ volatile int rp; /* pointers to the ready area */ volatile int rl; /* length of ready area */ volatile int hp; - volatile u_int64_t total, prev_total; + volatile uint64_t total, prev_total; int dmachan; /* dma channel */ - u_int32_t fmt, spd, bps, align; + uint32_t fmt, spd, bps, align; unsigned int blksz, blkcnt; int xrun; - u_int32_t flags; + uint32_t flags; bus_dmamap_t dmamap; bus_dma_tag_t dmatag; bus_addr_t buf_addr; @@ -60,7 +60,7 @@ struct snd_dbuf { char name[SNDBUF_NAMELEN]; }; -struct snd_dbuf *sndbuf_create(struct pcm_channel *channel, u_int32_t fmt, u_int32_t spd, const char *desc); +struct snd_dbuf *sndbuf_create(struct pcm_channel *channel, uint32_t fmt, uint32_t spd, const char *desc); void sndbuf_destroy(struct snd_dbuf *b); void sndbuf_ref(struct snd_dbuf *b); void sndbuf_rele(struct snd_dbuf *b); @@ -73,11 +73,11 @@ int sndbuf_remalloc(struct snd_dbuf *b, unsigned int blkcnt, unsigned int blksz) void sndbuf_reset(struct snd_dbuf *b); void sndbuf_clear(struct snd_dbuf *b, unsigned int length); void sndbuf_fillsilence(struct snd_dbuf *b); -void sndbuf_fillsilence_rl(struct snd_dbuf *b, u_int rl); +void sndbuf_fillsilence_rl(struct snd_dbuf *b, unsigned int rl); void sndbuf_softreset(struct snd_dbuf *b); void sndbuf_clearshadow(struct snd_dbuf *b); -int sndbuf_setfmt(struct snd_dbuf *b, u_int32_t fmt); +int sndbuf_setfmt(struct snd_dbuf *b, uint32_t fmt); void sndbuf_setspd(struct snd_dbuf *b, unsigned int spd); void *sndbuf_getbufofs(struct snd_dbuf *b, unsigned int ofs); @@ -89,25 +89,25 @@ unsigned int sndbuf_getfree(struct snd_dbuf *b); unsigned int sndbuf_getfreeptr(struct snd_dbuf *b); unsigned int sndbuf_getready(struct snd_dbuf *b); unsigned int sndbuf_getreadyptr(struct snd_dbuf *b); -u_int64_t sndbuf_getblocks(struct snd_dbuf *b); +uint64_t sndbuf_getblocks(struct snd_dbuf *b); unsigned int sndbuf_xbytes(unsigned int v, struct snd_dbuf *from, struct snd_dbuf *to); -u_int8_t sndbuf_zerodata(u_int32_t fmt); +uint8_t sndbuf_zerodata(uint32_t fmt); -int sndbuf_acquire(struct snd_dbuf *b, u_int8_t *from, unsigned int count); -int sndbuf_dispose(struct snd_dbuf *b, u_int8_t *to, unsigned int count); +int sndbuf_acquire(struct snd_dbuf *b, uint8_t *from, unsigned int count); +int sndbuf_dispose(struct snd_dbuf *b, uint8_t *to, unsigned int count); int sndbuf_feed(struct snd_dbuf *from, struct snd_dbuf *to, struct pcm_channel *channel, struct pcm_feeder *feeder, unsigned int count); #ifdef OSSV4_EXPERIMENT void sndbuf_getpeaks(struct snd_dbuf *b, int *lp, int *rp); #endif -static inline u_int32_t -snd_xbytes(u_int32_t v, u_int32_t from, u_int32_t to) +static inline uint32_t +snd_xbytes(uint32_t v, uint32_t from, uint32_t to) { if (from == to) return (v); if (from == 0) return (0); - return ((u_int64_t)v * to / from); + return ((uint64_t)v * to / from); } diff --git a/sys/dev/sound/pcm/channel.c b/sys/dev/sound/pcm/channel.c index 21c223c61205..029086265550 100644 --- a/sys/dev/sound/pcm/channel.c +++ b/sys/dev/sound/pcm/channel.c @@ -278,10 +278,10 @@ chn_lockdestroy(struct pcm_channel *c) * @retval 0 = not ready for I/O */ int -chn_polltrigger(struct pcm_channel *c, u_int64_t ref_total) +chn_polltrigger(struct pcm_channel *c, uint64_t ref_total) { struct snd_dbuf *bs = c->bufsoft; - u_int delta; + unsigned int delta; CHN_LOCKASSERT(c); @@ -596,10 +596,10 @@ chn_intr(struct pcm_channel *c) CHN_UNLOCK(c); } -u_int32_t +uint32_t chn_start(struct pcm_channel *c, int force) { - u_int32_t i, j; + uint32_t i, j; struct snd_dbuf *b = c->bufhard; struct snd_dbuf *bs = c->bufsoft; int err; @@ -693,7 +693,7 @@ chn_sync(struct pcm_channel *c, int threshold) { struct snd_dbuf *b, *bs; int ret, count, hcount, minflush, resid, residp, syncdelay, blksz; - u_int32_t cflag; + uint32_t cflag; CHN_LOCKASSERT(c); @@ -1641,10 +1641,10 @@ chn_vpc_reset(struct pcm_channel *c, int vc, int force) chn_setvolume_matrix(c, vc, i, c->volume[vc][SND_CHN_T_VOL_0DB]); } -static u_int32_t -round_pow2(u_int32_t v) +static uint32_t +round_pow2(uint32_t v) { - u_int32_t ret; + uint32_t ret; if (v < 2) v = 2; @@ -1657,7 +1657,7 @@ round_pow2(u_int32_t v) return ret; } -u_int32_t +uint32_t chn_2ndbufmaxsize(struct pcm_channel *c) { struct snd_dbuf *bs; @@ -1669,13 +1669,13 @@ chn_2ndbufmaxsize(struct pcm_channel *c) maxsize = (uint64_t)bs->align * bs->spd * CHN_2NDBUFTIME_MS / 1000; RANGE(maxsize, CHN_2NDBUFSIZE_MIN, CHN_2NDBUFSIZE_MAX); - return ((u_int32_t)maxsize); + return ((uint32_t)maxsize); } -static u_int32_t -round_blksz(u_int32_t v, int round, u_int32_t maxsize) +static uint32_t +round_blksz(uint32_t v, int round, uint32_t maxsize) { - u_int32_t ret, tmp; + uint32_t ret, tmp; if (round < 1) round = 1; @@ -1770,8 +1770,8 @@ round_blksz(u_int32_t v, int round, u_int32_t maxsize) #define CHN_LATENCY_DATA_REF 192000 /* 48khz stereo 16bit ~ 48000 x 2 x 2 */ static int -chn_calclatency(int dir, int latency, int bps, u_int32_t datarate, - u_int32_t max, int *rblksz, int *rblkcnt) +chn_calclatency(int dir, int latency, int bps, uint32_t datarate, + uint32_t max, int *rblksz, int *rblkcnt) { static int pblkcnts[CHN_LATENCY_PROFILE_MAX + 1][CHN_LATENCY_MAX + 1] = { {1, 2, 3, 4, 5, 5, 4, 3, 2, 1, 1}, @@ -1789,7 +1789,7 @@ chn_calclatency(int dir, int latency, int bps, u_int32_t datarate, {14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 16}, {15, 15, 15, 15, 15, 16, 16, 16, 16, 16, 17} }; - u_int32_t bufsz; + uint32_t bufsz; int lprofile, blksz, blkcnt; if (latency < CHN_LATENCY_MIN || latency > CHN_LATENCY_MAX || @@ -1996,8 +1996,8 @@ chn_resizebuf(struct pcm_channel *c, int latency, /* * Interrupt timeout */ - c->timeout = ((u_int64_t)hz * bs->bufsize) / - ((u_int64_t)bs->spd * bs->align); + c->timeout = ((uint64_t)hz * bs->bufsize) / + ((uint64_t)bs->spd * bs->align); if (c->parentchannel != NULL) c->timeout = min(c->timeout, c->parentchannel->timeout); if (c->timeout < 1) @@ -2330,10 +2330,10 @@ chn_getcaps(struct pcm_channel *c) return CHANNEL_GETCAPS(c->methods, c->devinfo); } -u_int32_t +uint32_t chn_getformats(struct pcm_channel *c) { - u_int32_t *fmtlist, fmts; + uint32_t *fmtlist, fmts; int i; fmtlist = chn_getcaps(c)->fmtlist; @@ -2349,7 +2349,7 @@ chn_getformats(struct pcm_channel *c) } int -chn_notify(struct pcm_channel *c, u_int32_t flags) +chn_notify(struct pcm_channel *c, uint32_t flags) { struct pcm_channel *ch; struct pcmchan_caps *caps; diff --git a/sys/dev/sound/pcm/channel.h b/sys/dev/sound/pcm/channel.h index c78c25dac13b..aac6ab368625 100644 --- a/sys/dev/sound/pcm/channel.h +++ b/sys/dev/sound/pcm/channel.h @@ -33,9 +33,9 @@ */ struct pcmchan_caps { - u_int32_t minspeed, maxspeed; - u_int32_t *fmtlist; - u_int32_t caps; + uint32_t minspeed, maxspeed; + uint32_t *fmtlist; + uint32_t caps; }; struct pcmchan_matrix { @@ -89,14 +89,14 @@ struct pcm_channel { pid_t pid; struct pcm_feeder *feeder; - u_int32_t align; + uint32_t align; int latency; - u_int32_t speed; - u_int32_t format; - u_int32_t flags; - u_int32_t feederflags; - u_int64_t blocks; + uint32_t speed; + uint32_t format; + uint32_t flags; + uint32_t feederflags; + uint64_t blocks; int direction; unsigned int interrupts, xruns, feedcount; @@ -143,7 +143,7 @@ struct pcm_channel { */ struct pcmchan_syncmember *sm; #ifdef OSSV4_EXPERIMENT - u_int16_t lpeak, rpeak; /**< Peak value from 0-32767. */ + uint16_t lpeak, rpeak; /**< Peak value from 0-32767. */ #endif struct { @@ -257,10 +257,10 @@ struct pcm_channel { int chn_write(struct pcm_channel *c, struct uio *buf); int chn_read(struct pcm_channel *c, struct uio *buf); -u_int32_t chn_start(struct pcm_channel *c, int force); +uint32_t chn_start(struct pcm_channel *c, int force); int chn_sync(struct pcm_channel *c, int threshold); int chn_flush(struct pcm_channel *c); -int chn_polltrigger(struct pcm_channel *c, u_int64_t ref_total); +int chn_polltrigger(struct pcm_channel *c, uint64_t ref_total); int chn_poll(struct pcm_channel *c, int ev, struct thread *td); char *chn_mkname(char *buf, size_t len, struct pcm_channel *c); @@ -269,7 +269,7 @@ struct pcm_channel *chn_init(struct snddev_info *d, struct pcm_channel *parent, void chn_kill(struct pcm_channel *c); void chn_shutdown(struct pcm_channel *c); int chn_release(struct pcm_channel *c); -int chn_reset(struct pcm_channel *c, u_int32_t fmt, u_int32_t spd); +int chn_reset(struct pcm_channel *c, uint32_t fmt, uint32_t spd); int chn_setvolume_multi(struct pcm_channel *c, int vc, int left, int right, int center); int chn_setvolume_matrix(struct pcm_channel *c, int vc, int vt, int val); @@ -287,7 +287,7 @@ void chn_syncstate(struct pcm_channel *c); int chn_trigger(struct pcm_channel *c, int go); int chn_getptr(struct pcm_channel *c); struct pcmchan_caps *chn_getcaps(struct pcm_channel *c); -u_int32_t chn_getformats(struct pcm_channel *c); +uint32_t chn_getformats(struct pcm_channel *c); struct pcmchan_matrix *chn_getmatrix(struct pcm_channel *); int chn_setmatrix(struct pcm_channel *, struct pcmchan_matrix *); @@ -300,7 +300,7 @@ void chn_resetbuf(struct pcm_channel *c); void chn_intr(struct pcm_channel *c); int chn_abort(struct pcm_channel *c); -int chn_notify(struct pcm_channel *c, u_int32_t flags); +int chn_notify(struct pcm_channel *c, uint32_t flags); int chn_getrates(struct pcm_channel *c, int **rates); int chn_syncdestroy(struct pcm_channel *c); @@ -455,6 +455,6 @@ enum { #define CHN_2NDBUFSIZE_MAX (4 * 1024 * 1024) #define CHN_2NDBUFTIME_MS 200 -u_int32_t chn_2ndbufmaxsize(struct pcm_channel *); +uint32_t chn_2ndbufmaxsize(struct pcm_channel *); #define CHANNEL_DECLARE(name) static DEFINE_CLASS(name, name ## _methods, sizeof(struct kobj)) diff --git a/sys/dev/sound/pcm/channel_if.m b/sys/dev/sound/pcm/channel_if.m index 407ee8787ee1..1bf04a9bf33a 100644 --- a/sys/dev/sound/pcm/channel_if.m +++ b/sys/dev/sound/pcm/channel_if.m @@ -53,14 +53,14 @@ CODE { return 1; } - static u_int32_t + static uint32_t channel_nogetptr(kobj_t obj, void *data) { return 0; } static int - channel_nonotify(kobj_t obj, void *data, u_int32_t changed) + channel_nonotify(kobj_t obj, void *data, uint32_t changed) { return 0; } @@ -79,13 +79,13 @@ CODE { } static int - channel_nosetfragments(kobj_t obj, void *data, u_int32_t blocksize, u_int32_t blockcount) + channel_nosetfragments(kobj_t obj, void *data, uint32_t blocksize, uint32_t blockcount) { return ENOTSUP; } static struct pcmchan_matrix * - channel_nogetmatrix(kobj_t obj, void *data, u_int32_t format) + channel_nogetmatrix(kobj_t obj, void *data, uint32_t format) { format = feeder_matrix_default_format(format); return (feeder_matrix_format_map(format)); @@ -124,26 +124,26 @@ METHOD int resetdone { METHOD int setformat { kobj_t obj; void *data; - u_int32_t format; + uint32_t format; }; -METHOD u_int32_t setspeed { +METHOD uint32_t setspeed { kobj_t obj; void *data; - u_int32_t speed; + uint32_t speed; }; -METHOD u_int32_t setblocksize { +METHOD uint32_t setblocksize { kobj_t obj; void *data; - u_int32_t blocksize; + uint32_t blocksize; }; METHOD int setfragments { kobj_t obj; void *data; - u_int32_t blocksize; - u_int32_t blockcount; + uint32_t blocksize; + uint32_t blockcount; } DEFAULT channel_nosetfragments; METHOD int trigger { @@ -152,7 +152,7 @@ METHOD int trigger { int go; }; -METHOD u_int32_t getptr { +METHOD uint32_t getptr { kobj_t obj; void *data; } DEFAULT channel_nogetptr; @@ -165,7 +165,7 @@ METHOD struct pcmchan_caps* getcaps { METHOD int notify { kobj_t obj; void *data; - u_int32_t changed; + uint32_t changed; } DEFAULT channel_nonotify; /** @@ -222,7 +222,7 @@ METHOD int getrates { METHOD struct pcmchan_matrix * getmatrix { kobj_t obj; void *data; - u_int32_t format; + uint32_t format; } DEFAULT channel_nogetmatrix; METHOD int setmatrix { diff --git a/sys/dev/sound/pcm/dsp.c b/sys/dev/sound/pcm/dsp.c index f49df6e8a8c6..33b0e4419bd8 100644 --- a/sys/dev/sound/pcm/dsp.c +++ b/sys/dev/sound/pcm/dsp.c @@ -3024,7 +3024,7 @@ dsp_kqevent(struct knote *kn, long hint) * the reference and fire based on the current amount of ready/free * data in the buffer, so all knotes see the same live state. */ - if (chn_polltrigger(ch, (u_int64_t)kn->kn_sdata)) { + if (chn_polltrigger(ch, (uint64_t)kn->kn_sdata)) { if (kn->kn_filter == EVFILT_READ) { kn->kn_data = sndbuf_getready(ch->bufsoft); if (ch->flags & CHN_F_MMAP) diff --git a/sys/dev/sound/pcm/feeder.c b/sys/dev/sound/pcm/feeder.c index af6e367895a0..123a75ce5d53 100644 --- a/sys/dev/sound/pcm/feeder.c +++ b/sys/dev/sound/pcm/feeder.c @@ -90,7 +90,7 @@ feeder_create(struct feeder_class *fc, struct pcm_feederdesc *desc) } struct feeder_class * -feeder_getclass(u_int32_t type) +feeder_getclass(uint32_t type) { struct feeder_class *fc; @@ -132,7 +132,7 @@ feeder_remove(struct pcm_channel *c) } struct pcm_feeder * -feeder_find(struct pcm_channel *c, u_int32_t type) +feeder_find(struct pcm_channel *c, uint32_t type) { struct pcm_feeder *f; @@ -181,10 +181,10 @@ feeder_find(struct pcm_channel *c, u_int32_t type) #define score_val(s1) ((s1) & 0x3f00) #define score_cse(s1) ((s1) & 0x7f) -static u_int32_t -snd_fmtscore(u_int32_t fmt) +static uint32_t +snd_fmtscore(uint32_t fmt) { - u_int32_t ret; + uint32_t ret; ret = 0; if (fmt & AFMT_SIGNED) @@ -212,10 +212,10 @@ snd_fmtscore(u_int32_t fmt) return ret; } -static u_int32_t -snd_fmtbestfunc(u_int32_t fmt, u_int32_t *fmts, int cheq) +static uint32_t +snd_fmtbestfunc(uint32_t fmt, uint32_t *fmts, int cheq) { - u_int32_t best, score, score2, oldscore; + uint32_t best, score, score2, oldscore; int i; if (fmt == 0 || fmts == NULL || fmts[0] == 0) @@ -257,23 +257,23 @@ snd_fmtbestfunc(u_int32_t fmt, u_int32_t *fmts, int cheq) return best; } -static u_int32_t -snd_fmtbestbit(u_int32_t fmt, u_int32_t *fmts) +static uint32_t +snd_fmtbestbit(uint32_t fmt, uint32_t *fmts) { return snd_fmtbestfunc(fmt, fmts, 0); } -static u_int32_t -snd_fmtbestchannel(u_int32_t fmt, u_int32_t *fmts) +static uint32_t +snd_fmtbestchannel(uint32_t fmt, uint32_t *fmts) { return snd_fmtbestfunc(fmt, fmts, 1); } -u_int32_t -snd_fmtbest(u_int32_t fmt, u_int32_t *fmts) +uint32_t +snd_fmtbest(uint32_t fmt, uint32_t *fmts) { - u_int32_t best1, best2; - u_int32_t score, score1, score2; + uint32_t best1, best2; + uint32_t score, score1, score2; if (snd_fmtvalid(fmt, fmts)) return fmt; @@ -304,7 +304,7 @@ snd_fmtbest(u_int32_t fmt, u_int32_t *fmts) } static int -feed_root(struct pcm_feeder *feeder, struct pcm_channel *ch, u_int8_t *buffer, u_int32_t count, void *source) +feed_root(struct pcm_feeder *feeder, struct pcm_channel *ch, uint8_t *buffer, uint32_t count, void *source) { struct snd_dbuf *src = source; int l, offset; diff --git a/sys/dev/sound/pcm/feeder.h b/sys/dev/sound/pcm/feeder.h index 127b479cd7c9..3b30d67b8bfa 100644 --- a/sys/dev/sound/pcm/feeder.h +++ b/sys/dev/sound/pcm/feeder.h @@ -43,7 +43,7 @@ enum feeder_type { }; struct pcm_feederdesc { - u_int32_t in, out; + uint32_t in, out; }; struct feeder_class { @@ -61,14 +61,14 @@ struct pcm_feeder { }; void feeder_register(void *p); -struct feeder_class *feeder_getclass(u_int32_t type); +struct feeder_class *feeder_getclass(uint32_t type); -u_int32_t snd_fmtbest(u_int32_t fmt, u_int32_t *fmts); +uint32_t snd_fmtbest(uint32_t fmt, uint32_t *fmts); int feeder_add(struct pcm_channel *c, struct feeder_class *fc, struct pcm_feederdesc *desc); void feeder_remove(struct pcm_channel *c); -struct pcm_feeder *feeder_find(struct pcm_channel *c, u_int32_t type); +struct pcm_feeder *feeder_find(struct pcm_channel *c, uint32_t type); int feeder_chain(struct pcm_channel *); #define FEEDER_DECLARE(feeder, ctype) \ diff --git a/sys/dev/sound/pcm/feeder_if.m b/sys/dev/sound/pcm/feeder_if.m index 21644d2a4a54..562b5bc6c965 100644 --- a/sys/dev/sound/pcm/feeder_if.m +++ b/sys/dev/sound/pcm/feeder_if.m @@ -81,7 +81,7 @@ METHOD int get { METHOD int feed { struct pcm_feeder* feeder; struct pcm_channel* c; - u_int8_t* buffer; - u_int32_t count; + uint8_t* buffer; + uint32_t count; void* source; }; diff --git a/sys/dev/sound/pcm/mixer.c b/sys/dev/sound/pcm/mixer.c index be0125023f19..e08c897e01aa 100644 --- a/sys/dev/sound/pcm/mixer.c +++ b/sys/dev/sound/pcm/mixer.c @@ -41,7 +41,7 @@ #include "feeder_if.h" #include "mixer_if.h" -static u_int16_t snd_mixerdefaults[SOUND_MIXER_NRDEVICES] = { +static uint16_t snd_mixerdefaults[SOUND_MIXER_NRDEVICES] = { [SOUND_MIXER_VOLUME] = 75, [SOUND_MIXER_BASS] = 50, [SOUND_MIXER_TREBLE] = 50, @@ -109,7 +109,7 @@ mixer_lookup(char *devname) static int mixer_set_softpcmvol(struct snd_mixer *m, struct snddev_info *d, - u_int left, u_int right) + unsigned int left, unsigned int right) { struct pcm_channel *c; int dropmtx, acquiremtx; @@ -154,7 +154,7 @@ mixer_set_softpcmvol(struct snd_mixer *m, struct snddev_info *d, static int mixer_set_eq(struct snd_mixer *m, struct snddev_info *d, - u_int dev, u_int level) + unsigned int dev, unsigned int level) { struct pcm_channel *c; struct pcm_feeder *f; @@ -205,12 +205,12 @@ mixer_set_eq(struct snd_mixer *m, struct snddev_info *d, } static int -mixer_set(struct snd_mixer *m, u_int dev, u_int32_t muted, u_int lev) +mixer_set(struct snd_mixer *m, unsigned int dev, uint32_t muted, unsigned int lev) { struct snddev_info *d; - u_int l, r, tl, tr; - u_int32_t parent = SOUND_MIXER_NONE, child = 0; - u_int32_t realdev; + unsigned int l, r, tl, tr; + uint32_t parent = SOUND_MIXER_NONE, child = 0; + uint32_t realdev; int i, dropmtx; if (m == NULL || dev >= SOUND_MIXER_NRDEVICES || @@ -309,9 +309,9 @@ mixer_get(struct snd_mixer *mixer, int dev) } void -mix_setmutedevs(struct snd_mixer *mixer, u_int32_t mutedevs) +mix_setmutedevs(struct snd_mixer *mixer, uint32_t mutedevs) { - u_int32_t delta; + uint32_t delta; /* Filter out invalid values. */ mutedevs &= mixer->devs; @@ -331,10 +331,10 @@ mix_setmutedevs(struct snd_mixer *mixer, u_int32_t mutedevs) } static int -mixer_setrecsrc(struct snd_mixer *mixer, u_int32_t src) +mixer_setrecsrc(struct snd_mixer *mixer, uint32_t src) { struct snddev_info *d; - u_int32_t recsrc; + uint32_t recsrc; int dropmtx; d = device_get_softc(mixer->dev); @@ -447,7 +447,7 @@ mixer_set_recroute(struct snd_mixer *m, int route) } void -mix_setdevs(struct snd_mixer *m, u_int32_t v) +mix_setdevs(struct snd_mixer *m, uint32_t v) { struct snddev_info *d; int i; @@ -478,15 +478,15 @@ mix_setdevs(struct snd_mixer *m, u_int32_t v) * @param v mask of recording devices */ void -mix_setrecdevs(struct snd_mixer *m, u_int32_t v) +mix_setrecdevs(struct snd_mixer *m, uint32_t v) { m->recdevs = v; } void -mix_setparentchild(struct snd_mixer *m, u_int32_t parent, u_int32_t childs) +mix_setparentchild(struct snd_mixer *m, uint32_t parent, uint32_t childs) { - u_int32_t mask = 0; + uint32_t mask = 0; int i; if (m == NULL || parent >= SOUND_MIXER_NRDEVICES) @@ -507,7 +507,7 @@ mix_setparentchild(struct snd_mixer *m, u_int32_t parent, u_int32_t childs) } void -mix_setrealdev(struct snd_mixer *m, u_int32_t dev, u_int32_t realdev) +mix_setrealdev(struct snd_mixer *m, uint32_t dev, uint32_t realdev) { if (m == NULL || dev >= SOUND_MIXER_NRDEVICES || !(realdev == SOUND_MIXER_NONE || realdev < SOUND_MIXER_NRDEVICES)) @@ -515,27 +515,27 @@ mix_setrealdev(struct snd_mixer *m, u_int32_t dev, u_int32_t realdev) m->realdev[dev] = realdev; } -u_int32_t -mix_getparent(struct snd_mixer *m, u_int32_t dev) +uint32_t +mix_getparent(struct snd_mixer *m, uint32_t dev) { if (m == NULL || dev >= SOUND_MIXER_NRDEVICES) return SOUND_MIXER_NONE; return m->parent[dev]; } -u_int32_t +uint32_t mix_getdevs(struct snd_mixer *m) { return m->devs; } -u_int32_t +uint32_t mix_getmutedevs(struct snd_mixer *m) { return m->mutedevs; } -u_int32_t +uint32_t mix_getrecdevs(struct snd_mixer *m) { return m->recdevs; @@ -615,7 +615,7 @@ mixer_init(device_t dev, kobj_class_t cls, void *devinfo) { struct snddev_info *snddev; struct snd_mixer *m; - u_int16_t v; + uint16_t v; struct cdev *pdev; const char *name; int i, unit, val; @@ -637,7 +637,7 @@ mixer_init(device_t dev, kobj_class_t cls, void *devinfo) if (resource_int_value(name, unit, snd_mixernames[i], &val) == 0) { if (val >= 0 && val <= 100) { - v = (u_int16_t) val; + v = (uint16_t) val; } } @@ -856,7 +856,7 @@ mixer_hwvol_step(device_t dev, int left_step, int right_step) } int -mix_set(struct snd_mixer *m, u_int dev, u_int left, u_int right) +mix_set(struct snd_mixer *m, unsigned int dev, unsigned int left, unsigned int right) { int ret; @@ -870,7 +870,7 @@ mix_set(struct snd_mixer *m, u_int dev, u_int left, u_int right) } int -mix_get(struct snd_mixer *m, u_int dev) +mix_get(struct snd_mixer *m, unsigned int dev) { int ret; @@ -884,7 +884,7 @@ mix_get(struct snd_mixer *m, u_int dev) } int -mix_setrecsrc(struct snd_mixer *m, u_int32_t src) +mix_setrecsrc(struct snd_mixer *m, uint32_t src) { int ret; @@ -897,10 +897,10 @@ mix_setrecsrc(struct snd_mixer *m, u_int32_t src) return ((ret != 0) ? ENXIO : 0); } -u_int32_t +uint32_t mix_getrecsrc(struct snd_mixer *m) { - u_int32_t ret; + uint32_t ret; KASSERT(m != NULL, ("NULL snd_mixer")); diff --git a/sys/dev/sound/pcm/mixer.h b/sys/dev/sound/pcm/mixer.h index 6f764307cfc8..835d09f9dfb5 100644 --- a/sys/dev/sound/pcm/mixer.h +++ b/sys/dev/sound/pcm/mixer.h @@ -42,15 +42,15 @@ struct snd_mixer { int hwvol_step; int type; device_t dev; - u_int32_t devs; - u_int32_t mutedevs; - u_int32_t recdevs; - u_int32_t recsrc; - u_int16_t level[32]; - u_int16_t level_muted[32]; - u_int8_t parent[32]; - u_int32_t child[32]; - u_int8_t realdev[32]; + uint32_t devs; + uint32_t mutedevs; + uint32_t recdevs; + uint32_t recsrc; + uint16_t level[32]; + uint16_t level_muted[32]; + uint8_t parent[32]; + uint32_t child[32]; + uint8_t realdev[32]; char name[MIXER_NAMELEN]; struct mtx lock; int modify_counter; @@ -71,21 +71,21 @@ void mixer_hwvol_mute(device_t dev); void mixer_hwvol_step_locked(struct snd_mixer *m, int l_step, int r_step); void mixer_hwvol_step(device_t dev, int left_step, int right_step); -int mix_set(struct snd_mixer *m, u_int dev, u_int left, u_int right); -int mix_get(struct snd_mixer *m, u_int dev); -int mix_setrecsrc(struct snd_mixer *m, u_int32_t src); -u_int32_t mix_getrecsrc(struct snd_mixer *m); +int mix_set(struct snd_mixer *m, unsigned int dev, unsigned int left, unsigned int right); +int mix_get(struct snd_mixer *m, unsigned int dev); +int mix_setrecsrc(struct snd_mixer *m, uint32_t src); +uint32_t mix_getrecsrc(struct snd_mixer *m); device_t mix_get_dev(struct snd_mixer *m); -void mix_setdevs(struct snd_mixer *m, u_int32_t v); -void mix_setrecdevs(struct snd_mixer *m, u_int32_t v); -void mix_setmutedevs(struct snd_mixer *m, u_int32_t v); -u_int32_t mix_getdevs(struct snd_mixer *m); -u_int32_t mix_getrecdevs(struct snd_mixer *m); -u_int32_t mix_getmutedevs(struct snd_mixer *m); -void mix_setparentchild(struct snd_mixer *m, u_int32_t parent, u_int32_t childs); -void mix_setrealdev(struct snd_mixer *m, u_int32_t dev, u_int32_t realdev); -u_int32_t mix_getparent(struct snd_mixer *m, u_int32_t dev); +void mix_setdevs(struct snd_mixer *m, uint32_t v); +void mix_setrecdevs(struct snd_mixer *m, uint32_t v); +void mix_setmutedevs(struct snd_mixer *m, uint32_t v); +uint32_t mix_getdevs(struct snd_mixer *m); +uint32_t mix_getrecdevs(struct snd_mixer *m); +uint32_t mix_getmutedevs(struct snd_mixer *m); +void mix_setparentchild(struct snd_mixer *m, uint32_t parent, uint32_t childs); +void mix_setrealdev(struct snd_mixer *m, uint32_t dev, uint32_t realdev); +uint32_t mix_getparent(struct snd_mixer *m, uint32_t dev); void *mix_getdevinfo(struct snd_mixer *m); #define MIXER_TYPE_PRIMARY 0 /* mixer_init() */ diff --git a/sys/dev/sound/pcm/mixer_if.m b/sys/dev/sound/pcm/mixer_if.m index 8cb0b9ae6592..e7eff6cb845e 100644 --- a/sys/dev/sound/pcm/mixer_if.m +++ b/sys/dev/sound/pcm/mixer_if.m @@ -60,7 +60,7 @@ METHOD int set { unsigned right; }; -METHOD u_int32_t setrecsrc { +METHOD uint32_t setrecsrc { struct snd_mixer *m; - u_int32_t src; + uint32_t src; }; diff --git a/sys/dev/sound/pcm/sound.h b/sys/dev/sound/pcm/sound.h index 9e616707b518..53bd5a31f06e 100644 --- a/sys/dev/sound/pcm/sound.h +++ b/sys/dev/sound/pcm/sound.h @@ -155,8 +155,8 @@ unsigned int pcm_getbuffersize(device_t dev, unsigned int minbufsz, unsigned int void pcm_init(device_t dev, void *devinfo); int pcm_register(device_t dev, char *str); int pcm_unregister(device_t dev); -u_int32_t pcm_getflags(device_t dev); -void pcm_setflags(device_t dev, u_int32_t val); +uint32_t pcm_getflags(device_t dev); +void pcm_setflags(device_t dev, uint32_t val); void *pcm_getdevinfo(device_t dev); int snd_setup_intr(device_t dev, struct resource *res, int flags, |
