Revision 74475455 hw/tsc210x.c
b/hw/tsc210x.c | ||
---|---|---|
503 | 503 |
l_ch = 1; |
504 | 504 |
r_ch = 1; |
505 | 505 |
if (s->softstep && !(s->dac_power & (1 << 10))) { |
506 |
l_ch = (qemu_get_clock(vm_clock) > |
|
506 |
l_ch = (qemu_get_clock_ns(vm_clock) >
|
|
507 | 507 |
s->volume_change + TSC_SOFTSTEP_DELAY); |
508 |
r_ch = (qemu_get_clock(vm_clock) > |
|
508 |
r_ch = (qemu_get_clock_ns(vm_clock) >
|
|
509 | 509 |
s->volume_change + TSC_SOFTSTEP_DELAY); |
510 | 510 |
} |
511 | 511 |
|
... | ... | |
514 | 514 |
case 0x05: /* Stereo DAC Power Control */ |
515 | 515 |
return 0x2aa0 | s->dac_power | |
516 | 516 |
(((s->dac_power & (1 << 10)) && |
517 |
(qemu_get_clock(vm_clock) > |
|
517 |
(qemu_get_clock_ns(vm_clock) >
|
|
518 | 518 |
s->powerdown + TSC_POWEROFF_DELAY)) << 6); |
519 | 519 |
|
520 | 520 |
case 0x06: /* Audio Control 3 */ |
... | ... | |
695 | 695 |
|
696 | 696 |
case 0x02: /* DAC Volume Control */ |
697 | 697 |
s->volume = value; |
698 |
s->volume_change = qemu_get_clock(vm_clock); |
|
698 |
s->volume_change = qemu_get_clock_ns(vm_clock);
|
|
699 | 699 |
return; |
700 | 700 |
|
701 | 701 |
case 0x03: |
... | ... | |
717 | 717 |
|
718 | 718 |
case 0x05: /* Stereo DAC Power Control */ |
719 | 719 |
if ((value & ~s->dac_power) & (1 << 10)) |
720 |
s->powerdown = qemu_get_clock(vm_clock); |
|
720 |
s->powerdown = qemu_get_clock_ns(vm_clock);
|
|
721 | 721 |
|
722 | 722 |
s->dac_power = value & 0x9543; |
723 | 723 |
#ifdef TSC_VERBOSE |
... | ... | |
864 | 864 |
s->busy = 1; |
865 | 865 |
s->precision = s->nextprecision; |
866 | 866 |
s->function = s->nextfunction; |
867 |
expires = qemu_get_clock(vm_clock) + (get_ticks_per_sec() >> 10); |
|
867 |
expires = qemu_get_clock_ns(vm_clock) + (get_ticks_per_sec() >> 10);
|
|
868 | 868 |
qemu_mod_timer(s->timer, expires); |
869 | 869 |
} |
870 | 870 |
|
... | ... | |
1005 | 1005 |
static void tsc210x_save(QEMUFile *f, void *opaque) |
1006 | 1006 |
{ |
1007 | 1007 |
TSC210xState *s = (TSC210xState *) opaque; |
1008 |
int64_t now = qemu_get_clock(vm_clock); |
|
1008 |
int64_t now = qemu_get_clock_ns(vm_clock);
|
|
1009 | 1009 |
int i; |
1010 | 1010 |
|
1011 | 1011 |
qemu_put_be16(f, s->x); |
... | ... | |
1051 | 1051 |
static int tsc210x_load(QEMUFile *f, void *opaque, int version_id) |
1052 | 1052 |
{ |
1053 | 1053 |
TSC210xState *s = (TSC210xState *) opaque; |
1054 |
int64_t now = qemu_get_clock(vm_clock); |
|
1054 |
int64_t now = qemu_get_clock_ns(vm_clock);
|
|
1055 | 1055 |
int i; |
1056 | 1056 |
|
1057 | 1057 |
s->x = qemu_get_be16(f); |
... | ... | |
1111 | 1111 |
s->y = 160; |
1112 | 1112 |
s->pressure = 0; |
1113 | 1113 |
s->precision = s->nextprecision = 0; |
1114 |
s->timer = qemu_new_timer(vm_clock, tsc210x_timer_tick, s); |
|
1114 |
s->timer = qemu_new_timer_ns(vm_clock, tsc210x_timer_tick, s);
|
|
1115 | 1115 |
s->pint = pint; |
1116 | 1116 |
s->model = 0x2102; |
1117 | 1117 |
s->name = "tsc2102"; |
... | ... | |
1160 | 1160 |
s->y = 240; |
1161 | 1161 |
s->pressure = 0; |
1162 | 1162 |
s->precision = s->nextprecision = 0; |
1163 |
s->timer = qemu_new_timer(vm_clock, tsc210x_timer_tick, s); |
|
1163 |
s->timer = qemu_new_timer_ns(vm_clock, tsc210x_timer_tick, s);
|
|
1164 | 1164 |
s->pint = penirq; |
1165 | 1165 |
s->kbint = kbirq; |
1166 | 1166 |
s->davint = dav; |
Also available in: Unified diff