pcspk.c (87f6a866f12b8ca037b0a5cfc2dc9b8db9e67696) | pcspk.c (85bc58520c0e43660cbbe51b9eb5022a0baafe9f) |
---|---|
1/* 2 * QEMU PC speaker emulation 3 * 4 * Copyright (c) 2006 Joachim Henke 5 * 6 * Permission is hereby granted, free of charge, to any person obtaining a copy 7 * of this software and associated documentation files (the "Software"), to deal 8 * in the Software without restriction, including without limitation the rights --- 148 unchanged lines hidden (view full) --- 157 object_property_add_link(obj, "pit", TYPE_PIT_COMMON, 158 (Object **)&s->pit, 159 qdev_prop_allow_set_link_before_realize, 160 0, &error_abort); 161} 162 163static void pcspk_realizefn(DeviceState *dev, Error **errp) 164{ | 1/* 2 * QEMU PC speaker emulation 3 * 4 * Copyright (c) 2006 Joachim Henke 5 * 6 * Permission is hereby granted, free of charge, to any person obtaining a copy 7 * of this software and associated documentation files (the "Software"), to deal 8 * in the Software without restriction, including without limitation the rights --- 148 unchanged lines hidden (view full) --- 157 object_property_add_link(obj, "pit", TYPE_PIT_COMMON, 158 (Object **)&s->pit, 159 qdev_prop_allow_set_link_before_realize, 160 0, &error_abort); 161} 162 163static void pcspk_realizefn(DeviceState *dev, Error **errp) 164{ |
165 struct audsettings as = {PCSPK_SAMPLE_RATE, 1, AUD_FMT_U8, 0}; | 165 struct audsettings as = {PCSPK_SAMPLE_RATE, 1, AUDIO_FORMAT_U8, 0}; |
166 ISADevice *isadev = ISA_DEVICE(dev); 167 PCSpkState *s = PC_SPEAKER(dev); 168 169 isa_register_ioport(isadev, &s->ioport, s->iobase); 170 171 AUD_register_card(s_spk, &s->card); 172 173 s->voice = AUD_open_out(&s->card, s->voice, s_spk, s, pcspk_callback, &as); --- 63 unchanged lines hidden --- | 166 ISADevice *isadev = ISA_DEVICE(dev); 167 PCSpkState *s = PC_SPEAKER(dev); 168 169 isa_register_ioport(isadev, &s->ioport, s->iobase); 170 171 AUD_register_card(s_spk, &s->card); 172 173 s->voice = AUD_open_out(&s->card, s->voice, s_spk, s, pcspk_callback, &as); --- 63 unchanged lines hidden --- |