* [Qemu-devel] [PULL 0/2] audio: two intel-hda fixes. @ 2014-05-21 8:50 Gerd Hoffmann 2014-05-21 8:50 ` [Qemu-devel] [PULL 1/2] audio/intel-hda: support FIFORDY Gerd Hoffmann ` (2 more replies) 0 siblings, 3 replies; 4+ messages in thread From: Gerd Hoffmann @ 2014-05-21 8:50 UTC (permalink / raw) To: qemu-devel; +Cc: Gerd Hoffmann Hi, $sibject says all. please pull, Gerd The following changes since commit c5fa6c86d0765f837515d1c10654c621724a77e0: Merge remote-tracking branch 'remotes/qmp-unstable/queue/qmp' into staging (2014-05-19 14:10:01 +0100) are available in the git repository at: git://git.kraxel.org/qemu tags/pull-audio-5 for you to fetch changes up to b1fe60cd3525871a4c593ad8c2b39b89c19c00d0: hw/audio/intel-hda: Avoid shift into sign bit (2014-05-20 08:49:21 +0200) ---------------------------------------------------------------- audio: two intel-hda fixes. ---------------------------------------------------------------- Peter Maydell (1): hw/audio/intel-hda: Avoid shift into sign bit Stanislav Vorobiov (1): audio/intel-hda: support FIFORDY hw/audio/intel-hda.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Qemu-devel] [PULL 1/2] audio/intel-hda: support FIFORDY 2014-05-21 8:50 [Qemu-devel] [PULL 0/2] audio: two intel-hda fixes Gerd Hoffmann @ 2014-05-21 8:50 ` Gerd Hoffmann 2014-05-21 8:50 ` [Qemu-devel] [PULL 2/2] hw/audio/intel-hda: Avoid shift into sign bit Gerd Hoffmann 2014-05-22 17:13 ` [Qemu-devel] [PULL 0/2] audio: two intel-hda fixes Peter Maydell 2 siblings, 0 replies; 4+ messages in thread From: Gerd Hoffmann @ 2014-05-21 8:50 UTC (permalink / raw) To: qemu-devel; +Cc: Stanislav Vorobiov, Vassili Karpov (malc), Gerd Hoffmann From: Stanislav Vorobiov <s.vorobiov@samsung.com> linux kernel 3.12 has changed intel-hda driver to always check for FIFORDY, this causes long hangs in guest since QEMU always has this bit set to 0. We now simply set it to 1 always, since we're synchronous anyway and always ready to receive the stream Signed-off-by: Stanislav Vorobiov <s.vorobiov@samsung.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> --- hw/audio/intel-hda.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/audio/intel-hda.c b/hw/audio/intel-hda.c index d41f82c..9e075c0 100644 --- a/hw/audio/intel-hda.c +++ b/hw/audio/intel-hda.c @@ -574,7 +574,7 @@ static void intel_hda_set_st_ctl(IntelHDAState *d, const IntelHDAReg *reg, uint3 if (st->ctl & 0x01) { /* reset */ dprint(d, 1, "st #%d: reset\n", reg->stream); - st->ctl = 0; + st->ctl = SD_STS_FIFO_READY << 24; } if ((st->ctl & 0x02) != (old & 0x02)) { uint32_t stnr = (st->ctl >> 20) & 0x0f; @@ -829,6 +829,7 @@ static const struct IntelHDAReg regtab[] = { .wclear = 0x1c000000, \ .offset = offsetof(IntelHDAState, st[_i].ctl), \ .whandler = intel_hda_set_st_ctl, \ + .reset = SD_STS_FIFO_READY << 24 \ }, \ [ ST_REG(_i, ICH6_REG_SD_LPIB) ] = { \ .stream = _i, \ -- 1.8.3.1 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Qemu-devel] [PULL 2/2] hw/audio/intel-hda: Avoid shift into sign bit 2014-05-21 8:50 [Qemu-devel] [PULL 0/2] audio: two intel-hda fixes Gerd Hoffmann 2014-05-21 8:50 ` [Qemu-devel] [PULL 1/2] audio/intel-hda: support FIFORDY Gerd Hoffmann @ 2014-05-21 8:50 ` Gerd Hoffmann 2014-05-22 17:13 ` [Qemu-devel] [PULL 0/2] audio: two intel-hda fixes Peter Maydell 2 siblings, 0 replies; 4+ messages in thread From: Gerd Hoffmann @ 2014-05-21 8:50 UTC (permalink / raw) To: qemu-devel; +Cc: Peter Maydell, Vassili Karpov (malc), Gerd Hoffmann From: Peter Maydell <peter.maydell@linaro.org> Add a U suffix to avoid shifting into the sign bit (which is undefined behaviour in C). Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> --- hw/audio/intel-hda.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/audio/intel-hda.c b/hw/audio/intel-hda.c index 9e075c0..3cfb66c 100644 --- a/hw/audio/intel-hda.c +++ b/hw/audio/intel-hda.c @@ -245,7 +245,7 @@ static void intel_hda_update_int_sts(IntelHDAState *d) /* update global status */ if (sts & d->int_ctl) { - sts |= (1 << 31); + sts |= (1U << 31); } d->int_sts = sts; @@ -257,7 +257,7 @@ static void intel_hda_update_irq(IntelHDAState *d) int level; intel_hda_update_int_sts(d); - if (d->int_sts & (1 << 31) && d->int_ctl & (1 << 31)) { + if (d->int_sts & (1U << 31) && d->int_ctl & (1U << 31)) { level = 1; } else { level = 0; -- 1.8.3.1 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PULL 0/2] audio: two intel-hda fixes. 2014-05-21 8:50 [Qemu-devel] [PULL 0/2] audio: two intel-hda fixes Gerd Hoffmann 2014-05-21 8:50 ` [Qemu-devel] [PULL 1/2] audio/intel-hda: support FIFORDY Gerd Hoffmann 2014-05-21 8:50 ` [Qemu-devel] [PULL 2/2] hw/audio/intel-hda: Avoid shift into sign bit Gerd Hoffmann @ 2014-05-22 17:13 ` Peter Maydell 2 siblings, 0 replies; 4+ messages in thread From: Peter Maydell @ 2014-05-22 17:13 UTC (permalink / raw) To: Gerd Hoffmann; +Cc: QEMU Developers On 21 May 2014 09:50, Gerd Hoffmann <kraxel@redhat.com> wrote: > Hi, > > $sibject says all. > > please pull, > Gerd > > The following changes since commit c5fa6c86d0765f837515d1c10654c621724a77e0: > > Merge remote-tracking branch 'remotes/qmp-unstable/queue/qmp' into staging (2014-05-19 14:10:01 +0100) > > are available in the git repository at: > > > git://git.kraxel.org/qemu tags/pull-audio-5 > > for you to fetch changes up to b1fe60cd3525871a4c593ad8c2b39b89c19c00d0: > > hw/audio/intel-hda: Avoid shift into sign bit (2014-05-20 08:49:21 +0200) > > ---------------------------------------------------------------- > audio: two intel-hda fixes. > > ---------------------------------------------------------------- Applied, thanks. -- PMM ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-05-22 17:14 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2014-05-21 8:50 [Qemu-devel] [PULL 0/2] audio: two intel-hda fixes Gerd Hoffmann 2014-05-21 8:50 ` [Qemu-devel] [PULL 1/2] audio/intel-hda: support FIFORDY Gerd Hoffmann 2014-05-21 8:50 ` [Qemu-devel] [PULL 2/2] hw/audio/intel-hda: Avoid shift into sign bit Gerd Hoffmann 2014-05-22 17:13 ` [Qemu-devel] [PULL 0/2] audio: two intel-hda fixes Peter Maydell
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).