speaker.cc (5636:27a9526eea1f) speaker.cc (5898:541097c69e22)
1/*
2 * Copyright (c) 2008 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

--- 33 unchanged lines hidden (view full) ---

42 assert(pkt->getSize() == 1);
43 controlVal.timer = timer->outputHigh(2) ? 1 : 0;
44 DPRINTF(PcSpeaker,
45 "Reading from speaker device: gate %s, speaker %s, output %s.\n",
46 controlVal.gate ? "on" : "off",
47 controlVal.speaker ? "on" : "off",
48 controlVal.timer ? "on" : "off");
49 pkt->set((uint8_t)controlVal);
1/*
2 * Copyright (c) 2008 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

--- 33 unchanged lines hidden (view full) ---

42 assert(pkt->getSize() == 1);
43 controlVal.timer = timer->outputHigh(2) ? 1 : 0;
44 DPRINTF(PcSpeaker,
45 "Reading from speaker device: gate %s, speaker %s, output %s.\n",
46 controlVal.gate ? "on" : "off",
47 controlVal.speaker ? "on" : "off",
48 controlVal.timer ? "on" : "off");
49 pkt->set((uint8_t)controlVal);
50 pkt->makeAtomicResponse();
50 return latency;
51}
52
53Tick
54X86ISA::Speaker::write(PacketPtr pkt)
55{
56 assert(pkt->getAddr() == pioAddr);
57 assert(pkt->getSize() == 1);

--- 4 unchanged lines hidden (view full) ---

62 warn("The gate bit of the pc speaker isn't implemented and "
63 "is always on.\n");
64 //This would control whether the timer output is hooked up to a physical
65 //speaker. Since M5 can't make noise, it's value doesn't actually do
66 //anything.
67 controlVal.speaker = val.speaker;
68 DPRINTF(PcSpeaker, "Writing to speaker device: gate %s, speaker %s.\n",
69 controlVal.gate ? "on" : "off", controlVal.speaker ? "on" : "off");
51 return latency;
52}
53
54Tick
55X86ISA::Speaker::write(PacketPtr pkt)
56{
57 assert(pkt->getAddr() == pioAddr);
58 assert(pkt->getSize() == 1);

--- 4 unchanged lines hidden (view full) ---

63 warn("The gate bit of the pc speaker isn't implemented and "
64 "is always on.\n");
65 //This would control whether the timer output is hooked up to a physical
66 //speaker. Since M5 can't make noise, it's value doesn't actually do
67 //anything.
68 controlVal.speaker = val.speaker;
69 DPRINTF(PcSpeaker, "Writing to speaker device: gate %s, speaker %s.\n",
70 controlVal.gate ? "on" : "off", controlVal.speaker ? "on" : "off");
71 pkt->makeAtomicResponse();
70 return latency;
71}
72
73X86ISA::Speaker *
74PcSpeakerParams::create()
75{
76 return new X86ISA::Speaker(this);
77}
72 return latency;
73}
74
75X86ISA::Speaker *
76PcSpeakerParams::create()
77{
78 return new X86ISA::Speaker(this);
79}