Revision 36ac4ad3

b/hw/intel-hda.c
389 389
{
390 390
    HDACodecBus *bus = DO_UPCAST(HDACodecBus, qbus, dev->qdev.parent_bus);
391 391
    IntelHDAState *d = container_of(bus, IntelHDAState, codecs);
392
    IntelHDAStream *st = NULL;
393 392
    target_phys_addr_t addr;
394 393
    uint32_t s, copy, left;
394
    IntelHDAStream *st;
395 395
    bool irq = false;
396 396

  
397
    for (s = 0; s < ARRAY_SIZE(d->st); s++) {
398
        if (stnr == ((d->st[s].ctl >> 20) & 0x0f)) {
399
            st = d->st + s;
397
    st = output ? d->st + 4 : d->st;
398
    for (s = 0; s < 4; s++) {
399
        if (stnr == ((st[s].ctl >> 20) & 0x0f)) {
400
            st = st + s;
400 401
            break;
401 402
        }
402 403
    }

Also available in: Unified diff