Commit b5527dad authored by Anthony Liguori's avatar Anthony Liguori
Browse files

Merge remote-tracking branch 'kraxel/tags/pull-audio-1' into staging



Change audio wakeup rate from 250 Hz to 100 Hz.
Emulation bugfixes for intel-hda and adlib.

# gpg: Signature made Mon 09 Dec 2013 06:04:16 AM PST using RSA key ID D3E87138
# gpg: Can't check signature: public key not found

# By Gerd Hoffmann (2) and others
# Via Gerd Hoffmann
* kraxel/tags/pull-audio-1:
  intel-hda: fix position buffer
  adlib: fix patching of port I/O addresses
  audio: adjust pulse to 100Hz wakeup rate
  audio: Lower default wakeup rate to 100 times / second

Message-id: 1386597974-26506-1-git-send-email-kraxel@redhat.com
Signed-off-by: default avatarAnthony Liguori <aliguori@amazon.com>
parents 75c4ce82 d58ce68a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -95,7 +95,7 @@ static struct {
        }
    },

    .period = { .hertz = 250 },
    .period = { .hertz = 100 },
    .plive = 0,
    .log_to_monitor = 0,
    .try_poll_in = 1,
+4 −4
Original line number Diff line number Diff line
@@ -547,11 +547,11 @@ static int qpa_init_out (HWVoiceOut *hw, struct audsettings *as)
    ss.rate = as->freq;

    /*
     * qemu audio tick runs at 250 Hz (by default), so processing
     * data chunks worth 4 ms of sound should be a good fit.
     * qemu audio tick runs at 100 Hz (by default), so processing
     * data chunks worth 10 ms of sound should be a good fit.
     */
    ba.tlength = pa_usec_to_bytes (4 * 1000, &ss);
    ba.minreq = pa_usec_to_bytes (2 * 1000, &ss);
    ba.tlength = pa_usec_to_bytes (10 * 1000, &ss);
    ba.minreq = pa_usec_to_bytes (5 * 1000, &ss);
    ba.maxlength = -1;
    ba.prebuf = -1;

+2 −2
Original line number Diff line number Diff line
@@ -347,8 +347,8 @@ static void adlib_realizefn (DeviceState *dev, Error **errp)
    s->samples = AUD_get_buffer_size_out (s->voice) >> SHIFT;
    s->mixbuf = g_malloc0 (s->samples << SHIFT);

    adlib_portio_list[1].offset = s->port;
    adlib_portio_list[2].offset = s->port + 8;
    adlib_portio_list[0].offset = s->port;
    adlib_portio_list[1].offset = s->port + 8;
    portio_list_init (port_list, OBJECT(s), adlib_portio_list, s, "adlib");
    portio_list_add (port_list, isa_address_space_io(&s->parent_obj), 0);
}
+1 −0
Original line number Diff line number Diff line
@@ -444,6 +444,7 @@ static bool intel_hda_xfer(HDACodecDevice *dev, uint32_t stnr, bool output,
        }
    }
    if (d->dp_lbase & 0x01) {
        s = st - d->st;
        addr = intel_hda_addr(d->dp_lbase & ~0x01, d->dp_ubase);
        stl_le_pci_dma(&d->pci, addr + 8*s, st->lpib);
    }