diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2019-04-02 08:18:24 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2019-04-02 08:18:24 +0100 |
commit | d61d1a1fb2f1db6c54651844a28389c523f3f8c7 (patch) | |
tree | b2d1e8d86a7e4a7f7303872f39c605509d9602e6 /audio/audio_legacy.c | |
parent | 47175951a691a8a2d483f0cbc7f31b4e3814bffa (diff) | |
parent | be1092afa07794e5247eb504095fb5f2ae421ec6 (diff) | |
download | qemu-d61d1a1fb2f1db6c54651844a28389c523f3f8c7.zip qemu-d61d1a1fb2f1db6c54651844a28389c523f3f8c7.tar.gz qemu-d61d1a1fb2f1db6c54651844a28389c523f3f8c7.tar.bz2 |
Merge remote-tracking branch 'remotes/kraxel/tags/fixes-20190402-pull-request' into staging
fixes for 4.0 (audio, usb),
# gpg: Signature made Tue 02 Apr 2019 07:46:22 BST
# gpg: using RSA key 4CB6D8EED3E87138
# gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" [full]
# gpg: aka "Gerd Hoffmann <gerd@kraxel.org>" [full]
# gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>" [full]
# Primary key fingerprint: A032 8CFF B93A 17A7 9901 FE7D 4CB6 D8EE D3E8 7138
* remotes/kraxel/tags/fixes-20190402-pull-request:
audio: fix audio timer rate conversion bug
usb-mtp: remove usb_mtp_object_free_one
usb-mtp: fix return status of delete
hw/usb/bus.c: Handle "no speed matched" case in usb_mask_to_str()
Revert "audio: fix pc speaker init"
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'audio/audio_legacy.c')
-rw-r--r-- | audio/audio_legacy.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/audio/audio_legacy.c b/audio/audio_legacy.c index 6d14011..2fd58cb 100644 --- a/audio/audio_legacy.c +++ b/audio/audio_legacy.c @@ -26,6 +26,7 @@ #include "audio_int.h" #include "qemu-common.h" #include "qemu/cutils.h" +#include "qemu/timer.h" #include "qapi/error.h" #include "qapi/qapi-visit-audio.h" #include "qapi/visitor-impl.h" @@ -338,8 +339,13 @@ static AudiodevListEntry *legacy_opt(const char *drvname) handle_per_direction(audio_get_pdo_in(e->dev), "QEMU_AUDIO_ADC_"); handle_per_direction(audio_get_pdo_out(e->dev), "QEMU_AUDIO_DAC_"); + /* Original description: Timer period in HZ (0 - use lowest possible) */ get_int("QEMU_AUDIO_TIMER_PERIOD", &e->dev->timer_period, &e->dev->has_timer_period); + if (e->dev->has_timer_period && e->dev->timer_period) { + e->dev->timer_period = NANOSECONDS_PER_SECOND / 1000 / + e->dev->timer_period; + } switch (e->dev->driver) { case AUDIODEV_DRIVER_ALSA: |