VirtualBox

source: vbox/trunk/src/VBox/Main/src-client/VBoxDriversRegister.cpp@ 50686

Last change on this file since 50686 was 50686, checked in by vboxsync, 11 years ago

src/VBox/Devices/Audio, src/VBox/Main/src-client, include/VBox/vmm:

src/VBox/Devices/Audio: part of restructuring of audio code. Devices files correspondin to Hda, AC97 and SB16 audio. The structure of files have been modifed as per PDM specs. The modified code is under #ifdef VBOX_WITH_PDM_AUDIO_DRIVER

src/VBox/Main/src-client: Driver for the VRDE that interacts with DrvAudio. Enhancement of the CFGM tree for audio.

Config.kmk : addition of one configuration parameter that will control whether new audio code is disabled or enabled. "VBOX_WITH_PDM_AUDIO_DRIVER"

pdmaudioifs.h: common header file between Device , Intermediate audio driver and Backends specific to audio.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.1 KB
Line 
1/** @file
2 *
3 * Main driver registration.
4 */
5
6/*
7 * Copyright (C) 2006-2012 Oracle Corporation
8 *
9 * This file is part of VirtualBox Open Source Edition (OSE), as
10 * available from http://www.215389.xyz. This file is free software;
11 * you can redistribute it and/or modify it under the terms of the GNU
12 * General Public License (GPL) as published by the Free Software
13 * Foundation, in version 2 as it comes in the "COPYING" file of the
14 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16 */
17
18
19/*******************************************************************************
20* Header Files *
21*******************************************************************************/
22#include "MouseImpl.h"
23#include "KeyboardImpl.h"
24#include "DisplayImpl.h"
25#include "VMMDev.h"
26#ifdef VBOX_WITH_PDM_AUDIO_DRIVER
27#include "DrvAudioVRDE.h"
28#else
29#include "AudioSnifferInterface.h"
30#endif
31#include "Nvram.h"
32#include "UsbWebcamInterface.h"
33#ifdef VBOX_WITH_USB_CARDREADER
34# include "UsbCardReader.h"
35#endif
36#include "ConsoleImpl.h"
37#ifdef VBOX_WITH_PCI_PASSTHROUGH
38# include "PCIRawDevImpl.h"
39#endif
40
41#include "Logging.h"
42
43#include <VBox/vmm/pdmdrv.h>
44#include <VBox/version.h>
45
46/**
47 * Register the main drivers.
48 *
49 * @returns VBox status code.
50 * @param pCallbacks Pointer to the callback table.
51 * @param u32Version VBox version number.
52 */
53extern "C" DECLEXPORT(int) VBoxDriversRegister(PCPDMDRVREGCB pCallbacks, uint32_t u32Version)
54{
55 LogFlow(("VBoxDriversRegister: u32Version=%#x\n", u32Version));
56 AssertReleaseMsg(u32Version == VBOX_VERSION, ("u32Version=%#x VBOX_VERSION=%#x\n", u32Version, VBOX_VERSION));
57
58 int rc = pCallbacks->pfnRegister(pCallbacks, &Mouse::DrvReg);
59 if (RT_FAILURE(rc))
60 return rc;
61
62 rc = pCallbacks->pfnRegister(pCallbacks, &Keyboard::DrvReg);
63 if (RT_FAILURE(rc))
64 return rc;
65
66 rc = pCallbacks->pfnRegister(pCallbacks, &Display::DrvReg);
67 if (RT_FAILURE(rc))
68 return rc;
69
70 rc = pCallbacks->pfnRegister(pCallbacks, &VMMDev::DrvReg);
71 if (RT_FAILURE(rc))
72 return rc;
73#ifdef VBOX_WITH_PDM_AUDIO_DRIVER
74 rc = pCallbacks->pfnRegister(pCallbacks, &g_DrvAudioVRDE);
75#else
76 rc = pCallbacks->pfnRegister(pCallbacks, &AudioSniffer::DrvReg);
77#endif
78 if (RT_FAILURE(rc))
79 return rc;
80
81 rc = pCallbacks->pfnRegister(pCallbacks, &Nvram::DrvReg);
82 if (RT_FAILURE(rc))
83 return rc;
84
85 rc = pCallbacks->pfnRegister(pCallbacks, &EmWebcam::DrvReg);
86 if (RT_FAILURE(rc))
87 return rc;
88
89#ifdef VBOX_WITH_USB_CARDREADER
90 rc = pCallbacks->pfnRegister(pCallbacks, &UsbCardReader::DrvReg);
91 if (RT_FAILURE(rc))
92 return rc;
93#endif
94
95 rc = pCallbacks->pfnRegister(pCallbacks, &Console::DrvStatusReg);
96 if (RT_FAILURE(rc))
97 return rc;
98
99#ifdef VBOX_WITH_PCI_PASSTHROUGH
100 rc = pCallbacks->pfnRegister(pCallbacks, &PCIRawDev::DrvReg);
101 if (RT_FAILURE(rc))
102 return rc;
103#endif
104
105 return VINF_SUCCESS;
106}
107/* vi: set tabstop=4 shiftwidth=4 expandtab: */
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette