Revision ba43d289 hw/intel-hda.c

b/hw/intel-hda.c
485 485
    st->bp    = 0;
486 486
}
487 487

  
488
static void intel_hda_notify_codecs(IntelHDAState *d, uint32_t stream, bool running)
488
static void intel_hda_notify_codecs(IntelHDAState *d, uint32_t stream, bool running, bool output)
489 489
{
490 490
    DeviceState *qdev;
491 491
    HDACodecDevice *cdev;
......
493 493
    QLIST_FOREACH(qdev, &d->codecs.qbus.children, sibling) {
494 494
        cdev = DO_UPCAST(HDACodecDevice, qdev, qdev);
495 495
        if (cdev->info->stream) {
496
            cdev->info->stream(cdev, stream, running);
496
            cdev->info->stream(cdev, stream, running, output);
497 497
        }
498 498
    }
499 499
}
......
567 567

  
568 568
static void intel_hda_set_st_ctl(IntelHDAState *d, const IntelHDAReg *reg, uint32_t old)
569 569
{
570
    bool output = reg->stream >= 4;
570 571
    IntelHDAStream *st = d->st + reg->stream;
571 572

  
572 573
    if (st->ctl & 0x01) {
......
582 583
            dprint(d, 1, "st #%d: start %d (ring buf %d bytes)\n",
583 584
                   reg->stream, stnr, st->cbl);
584 585
            intel_hda_parse_bdl(d, st);
585
            intel_hda_notify_codecs(d, stnr, true);
586
            intel_hda_notify_codecs(d, stnr, true, output);
586 587
        } else {
587 588
            /* stop */
588 589
            dprint(d, 1, "st #%d: stop %d\n", reg->stream, stnr);
589
            intel_hda_notify_codecs(d, stnr, false);
590
            intel_hda_notify_codecs(d, stnr, false, output);
590 591
        }
591 592
    }
592 593
    intel_hda_update_irq(d);

Also available in: Unified diff