Statistics
| Branch: | Revision:

root / hw / pcspk.h @ bf3bc4c4

History | View | Annotate | Download (1.5 kB)

1 302fe51b Jan Kiszka
/*
2 302fe51b Jan Kiszka
 * QEMU PC speaker emulation
3 302fe51b Jan Kiszka
 *
4 302fe51b Jan Kiszka
 * Copyright (c) 2006 Joachim Henke
5 302fe51b Jan Kiszka
 *
6 302fe51b Jan Kiszka
 * Permission is hereby granted, free of charge, to any person obtaining a copy
7 302fe51b Jan Kiszka
 * of this software and associated documentation files (the "Software"), to deal
8 302fe51b Jan Kiszka
 * in the Software without restriction, including without limitation the rights
9 302fe51b Jan Kiszka
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 302fe51b Jan Kiszka
 * copies of the Software, and to permit persons to whom the Software is
11 302fe51b Jan Kiszka
 * furnished to do so, subject to the following conditions:
12 302fe51b Jan Kiszka
 *
13 302fe51b Jan Kiszka
 * The above copyright notice and this permission notice shall be included in
14 302fe51b Jan Kiszka
 * all copies or substantial portions of the Software.
15 302fe51b Jan Kiszka
 *
16 302fe51b Jan Kiszka
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 302fe51b Jan Kiszka
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 302fe51b Jan Kiszka
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 302fe51b Jan Kiszka
 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 302fe51b Jan Kiszka
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 302fe51b Jan Kiszka
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 302fe51b Jan Kiszka
 * THE SOFTWARE.
23 302fe51b Jan Kiszka
 */
24 302fe51b Jan Kiszka
25 302fe51b Jan Kiszka
#ifndef HW_PCSPK_H
26 302fe51b Jan Kiszka
#define HW_PCSPK_H
27 302fe51b Jan Kiszka
28 302fe51b Jan Kiszka
#include "hw.h"
29 302fe51b Jan Kiszka
#include "isa.h"
30 302fe51b Jan Kiszka
31 302fe51b Jan Kiszka
static inline ISADevice *pcspk_init(ISABus *bus, ISADevice *pit)
32 302fe51b Jan Kiszka
{
33 302fe51b Jan Kiszka
    ISADevice *dev;
34 302fe51b Jan Kiszka
35 302fe51b Jan Kiszka
    dev = isa_create(bus, "isa-pcspk");
36 302fe51b Jan Kiszka
    qdev_prop_set_uint32(&dev->qdev, "iobase", 0x61);
37 302fe51b Jan Kiszka
    qdev_prop_set_ptr(&dev->qdev, "pit", pit);
38 302fe51b Jan Kiszka
    qdev_init_nofail(&dev->qdev);
39 302fe51b Jan Kiszka
40 302fe51b Jan Kiszka
    return dev;
41 302fe51b Jan Kiszka
}
42 302fe51b Jan Kiszka
43 302fe51b Jan Kiszka
int pcspk_audio_init(ISABus *bus);
44 302fe51b Jan Kiszka
45 302fe51b Jan Kiszka
#endif /* !HW_PCSPK_H */