X-Git-Url: https://vcs.maemo.org/git/?a=blobdiff_plain;f=hw%2Fes1370.c;h=d607a94852fbd7fe4c54235fa364868985e4afc4;hb=cd346349b45ef056f138a184f660b8c34c3213cc;hp=217fd30b53a95ad43b70b24bfffa11cfa5e93727;hpb=946fc94733c9120ddc78512838d9087d01418eaa;p=qemu diff --git a/hw/es1370.c b/hw/es1370.c index 217fd30..d607a94 100644 --- a/hw/es1370.c +++ b/hw/es1370.c @@ -324,7 +324,7 @@ static void es1370_update_status (ES1370State *s, uint32_t new_status) else { s->status = new_status & ~STAT_INTR; } - pci_set_irq (s->pci_dev, 0, !!level); + qemu_set_irq(s->pci_dev->irq[0], !!level); } static void es1370_reset (ES1370State *s) @@ -350,7 +350,7 @@ static void es1370_reset (ES1370State *s) s->dac_voice[i] = NULL; } } - pci_set_irq (s->pci_dev, 0, 0); + qemu_irq_lower(s->pci_dev->irq[0]); } static void es1370_maybe_lower_irq (ES1370State *s, uint32_t sctl) @@ -423,6 +423,7 @@ static void es1370_update_voices (ES1370State *s, uint32_t ctl, uint32_t sctl) as.freq = new_freq; as.nchannels = 1 << (new_fmt & 1); as.fmt = (new_fmt & 2) ? AUD_FMT_S16 : AUD_FMT_U8; + as.endianness = 0; if (i == ADC_CHANNEL) { s->adc_voice = @@ -477,9 +478,10 @@ static inline uint32_t es1370_fixup (ES1370State *s, uint32_t addr) IO_WRITE_PROTO (es1370_writeb) { ES1370State *s = opaque; - addr = es1370_fixup (s, addr); uint32_t shift, mask; + addr = es1370_fixup (s, addr); + switch (addr) { case ES1370_REG_CONTROL: case ES1370_REG_CONTROL + 1: