Revision 129dcd2c hw/hda-audio.c
b/hw/hda-audio.c | ||
---|---|---|
808 | 808 |
return 0; |
809 | 809 |
} |
810 | 810 |
|
811 |
static int hda_audio_exit(HDACodecDevice *hda) |
|
812 |
{ |
|
813 |
HDAAudioState *a = DO_UPCAST(HDAAudioState, hda, hda); |
|
814 |
HDAAudioStream *st; |
|
815 |
int i; |
|
816 |
|
|
817 |
dprint(a, 1, "%s\n", __FUNCTION__); |
|
818 |
for (i = 0; i < ARRAY_SIZE(a->st); i++) { |
|
819 |
st = a->st + i; |
|
820 |
if (st->node == NULL) { |
|
821 |
continue; |
|
822 |
} |
|
823 |
if (st->output) { |
|
824 |
AUD_close_out(&a->card, st->voice.out); |
|
825 |
} else { |
|
826 |
AUD_close_in(&a->card, st->voice.in); |
|
827 |
} |
|
828 |
} |
|
829 |
AUD_remove_card(&a->card); |
|
830 |
return 0; |
|
831 |
} |
|
832 |
|
|
811 | 833 |
static int hda_audio_post_load(void *opaque, int version) |
812 | 834 |
{ |
813 | 835 |
HDAAudioState *a = opaque; |
... | ... | |
879 | 901 |
.qdev.vmsd = &vmstate_hda_audio, |
880 | 902 |
.qdev.props = hda_audio_properties, |
881 | 903 |
.init = hda_audio_init_output, |
904 |
.exit = hda_audio_exit, |
|
882 | 905 |
.command = hda_audio_command, |
883 | 906 |
.stream = hda_audio_stream, |
884 | 907 |
}; |
... | ... | |
890 | 913 |
.qdev.vmsd = &vmstate_hda_audio, |
891 | 914 |
.qdev.props = hda_audio_properties, |
892 | 915 |
.init = hda_audio_init_duplex, |
916 |
.exit = hda_audio_exit, |
|
893 | 917 |
.command = hda_audio_command, |
894 | 918 |
.stream = hda_audio_stream, |
895 | 919 |
}; |
Also available in: Unified diff