summaryrefslogtreecommitdiffstats
path: root/sys/i386/isa/sound
diff options
context:
space:
mode:
Diffstat (limited to 'sys/i386/isa/sound')
-rw-r--r--sys/i386/isa/sound/audio.c6
-rw-r--r--sys/i386/isa/sound/gus_wave.c6
-rw-r--r--sys/i386/isa/sound/pas2_mixer.c4
-rw-r--r--sys/i386/isa/sound/sb_dsp.c12
-rw-r--r--sys/i386/isa/sound/sequencer.c8
5 files changed, 21 insertions, 15 deletions
diff --git a/sys/i386/isa/sound/audio.c b/sys/i386/isa/sound/audio.c
index d92dd49..c526857 100644
--- a/sys/i386/isa/sound/audio.c
+++ b/sys/i386/isa/sound/audio.c
@@ -64,14 +64,14 @@ set_format(int dev, int fmt)
local_conversion[dev] = 0;
- if (!(audio_devs[dev]->format_mask & fmt)) /* Not supported */
+ if (!(audio_devs[dev]->format_mask & fmt)) { /* Not supported */
if (fmt == AFMT_MU_LAW) {
fmt = AFMT_U8;
local_conversion[dev] = AFMT_MU_LAW;
} else
fmt = AFMT_U8; /* This is always supported */
-
- audio_format[dev] = DMAbuf_ioctl(dev, SNDCTL_DSP_SETFMT,
+ }
+ audio_format[dev] = DMAbuf_ioctl(dev, SNDCTL_DSP_SETFMT,
(ioctl_arg) fmt, 1);
}
if (local_conversion[dev]) /* This shadows the HW format */
diff --git a/sys/i386/isa/sound/gus_wave.c b/sys/i386/isa/sound/gus_wave.c
index 54d36cb..70873b7 100644
--- a/sys/i386/isa/sound/gus_wave.c
+++ b/sys/i386/isa/sound/gus_wave.c
@@ -626,13 +626,15 @@ gus_set_voice_pos(int voice, long position)
{
int sample_no;
- if ((sample_no = sample_map[voice]) != -1)
- if (position < samples[sample_no].len)
+ if ((sample_no = sample_map[voice]) != -1) {
+ if (position < samples[sample_no].len) {
if (voices[voice].volume_irq_mode == VMODE_START_NOTE)
voices[voice].offset_pending = position;
else
gus_write_addr(0x0a, sample_ptrs[sample_no] + position,
samples[sample_no].mode & WAVE_16_BITS);
+ }
+ }
}
static void
diff --git a/sys/i386/isa/sound/pas2_mixer.c b/sys/i386/isa/sound/pas2_mixer.c
index 305ef45..1828ea2 100644
--- a/sys/i386/isa/sound/pas2_mixer.c
+++ b/sys/i386/isa/sound/pas2_mixer.c
@@ -132,12 +132,12 @@ pas_mixer_set(int whichDev, u_int level)
left = level & 0x7f;
right = (level & 0x7f00) >> 8;
- if (whichDev < SOUND_MIXER_NRDEVICES)
+ if (whichDev < SOUND_MIXER_NRDEVICES) {
if ((1 << whichDev) & rec_devices)
mixer = P_M_MV508_INPUTMIX;
else
mixer = P_M_MV508_OUTPUTMIX;
-
+ }
switch (whichDev) {
case SOUND_MIXER_VOLUME: /* Master volume (0-63) */
levels[whichDev] = mixer_output(right, left, 63, P_M_MV508_MASTER_A, 0);
diff --git a/sys/i386/isa/sound/sb_dsp.c b/sys/i386/isa/sound/sb_dsp.c
index 2facd33..8017bb9 100644
--- a/sys/i386/isa/sound/sb_dsp.c
+++ b/sys/i386/isa/sound/sb_dsp.c
@@ -247,13 +247,14 @@ dsp_speed(int speed)
/*
* SB models earlier than SB Pro have low limit for the input speed.
*/
- if (open_mode != OPEN_WRITE) /* Recording is possible */
- if (sbc_major < 3) /* Limited input speed with these cards */
+ if (open_mode != OPEN_WRITE) { /* Recording is possible */
+ if (sbc_major < 3) { /* Limited input speed with these cards */
if (sbc_major == 2 && sbc_minor > 0)
max_speed = 15000;
else
max_speed = 13000;
-
+ }
+ }
if (speed > max_speed)
speed = max_speed; /* Invalid speed */
@@ -1084,7 +1085,7 @@ sb_dsp_init(struct address_info * hw_config)
conf_printf(sb_dsp_operations.name, hw_config);
#if defined(CONFIG_SB16) && defined(CONFIG_SBPRO)
- if (!sb16) /* There is a better driver for SB16 */
+ if (!sb16) { /* There is a better driver for SB16 */
#endif /* CONFIG_SB16 && CONFIG_SBPRO */
if (num_audiodevs < MAX_AUDIO_DEV) {
audio_devs[my_dev = num_audiodevs++] = &sb_dsp_operations;
@@ -1104,6 +1105,9 @@ sb_dsp_init(struct address_info * hw_config)
#endif /* JAZZ16 */
} else
printf("SB: Too many DSP devices available\n");
+#if defined(CONFIG_SB16) && defined(CONFIG_SBPRO)
+ }
+#endif /* CONFIG_SB16 && CONFIG_SBPRO */
#else
conf_printf("SoundBlaster (configured without audio support)", hw_config);
#endif
diff --git a/sys/i386/isa/sound/sequencer.c b/sys/i386/isa/sound/sequencer.c
index 197bd74..ec3bb9b 100644
--- a/sys/i386/isa/sound/sequencer.c
+++ b/sys/i386/isa/sound/sequencer.c
@@ -1691,22 +1691,22 @@ sequencer_poll (int dev, struct fileinfo *file, int events, select_table * wait)
flags = splhigh();
- if (events & (POLLIN | POLLRDNORM))
+ if (events & (POLLIN | POLLRDNORM)) {
if (!iqlen)
selrecord(wait, &selinfo[dev]);
else {
revents |= events & (POLLIN | POLLRDNORM);
midi_sleep_flag.mode &= ~WK_SLEEP;
}
-
- if (events & (POLLOUT | POLLWRNORM))
+ }
+ if (events & (POLLOUT | POLLWRNORM)) {
if (qlen >= SEQ_MAX_QUEUE)
selrecord(wait, &selinfo[dev]);
else {
revents |= events & (POLLOUT | POLLWRNORM);
seq_sleep_flag.mode &= ~WK_SLEEP;
}
-
+ }
splx(flags);
return (revents);
OpenPOWER on IntegriCloud