if (level) {
s->status = new_status | STAT_INTR;
- }
- else {
+ } else {
s->status = new_status & ~STAT_INTR;
}
pci_set_irq(&s->dev, !!level);
if (i == ADC_CHANNEL) {
AUD_close_in (&s->card, s->adc_voice);
s->adc_voice = NULL;
- }
- else {
+ } else {
AUD_close_out (&s->card, s->dac_voice[i]);
s->dac_voice[i] = NULL;
}
es1370_adc_callback,
&as
);
- }
- else {
+ } else {
s->dac_voice[i] =
AUD_open_out (
&s->card,
if (i == ADC_CHANNEL) {
AUD_set_active_in (s->adc_voice, on);
- }
- else {
+ } else {
AUD_set_active_out (s->dac_voice[i], on);
}
}
static inline uint32_t es1370_fixup (ES1370State *s, uint32_t addr)
{
addr &= 0xff;
- if (addr >= 0x30 && addr <= 0x3f)
+ if (addr >= 0x30 && addr <= 0x3f) {
addr |= s->mempage << 8;
+ }
return addr;
}
to_copy = MIN ((size_t) temp, sizeof (tmpbuf));
acquired = AUD_read (s->adc_voice, tmpbuf, to_copy);
- if (!acquired)
+ if (!acquired) {
break;
+ }
pci_dma_write (&s->dev, addr, tmpbuf, acquired);
addr += acquired;
transferred += acquired;
}
- }
- else {
+ } else {
SWVoiceOut *voice = s->dac_voice[index];
while (temp > 0) {
to_copy = MIN ((size_t) temp, sizeof (tmpbuf));
pci_dma_read (&s->dev, addr, tmpbuf, to_copy);
copied = AUD_write (voice, tmpbuf, to_copy);
- if (!copied)
+ if (!copied) {
break;
+ }
temp -= copied;
addr += copied;
transferred += copied;
if (csc_bytes == transferred) {
*irq = 1;
d->scount = sc | (sc << 16);
- }
- else {
+ } else {
*irq = 0;
d->scount = sc | (((csc_bytes - transferred - 1) >> d->shift) << 16);
}
/* Bah, how stupid is that having a 0 represent true value?
i just spent few hours on this shit */
AUD_log ("es1370: warning", "non looping mode\n");
- }
- else {
+ } else {
d->frame_cnt = size;
- if ((uint32_t) cnt <= d->frame_cnt)
+ if ((uint32_t) cnt <= d->frame_cnt) {
d->frame_cnt |= cnt << 16;
+ }
}
d->leftover = (transferred + d->leftover) & 3;
AUD_close_in (&s->card, s->adc_voice);
s->adc_voice = NULL;
}
- }
- else {
+ } else {
if (s->dac_voice[i]) {
AUD_close_out (&s->card, s->dac_voice[i]);
s->dac_voice[i] = NULL;