Describes the architecture of the Sound Driver.
There are three main parts:
the user side interface to the Driver channel. This is an instance of a class derived from RSoundSc.
The class RSoundSc provides the user side interface to the driver. This class is defined in \e32\include\d32soundsc.h. An instance of RSoundSc is required for each driver channel opened by the client. When opening a driver channel, the client specifies a channel number for the audio channel. Channel numbers 0 to 3 are allocated for output/playback channels and channels 4 to 7 are allocated for input/record channels.
the driver channel, also known as the logical channel or LDD.
The class DSoundScLdd is the logical channel object for either audio playback or record. This class is defined in \e32\include\drivers\soundsc.h. An instance of DSoundScLdd is created for each driver channel opened. The driver implements play and record operation over a single audio hardware device as two separate units. Therefore, a client that needs to issue both record and playback requests has to open two separate driver channels.
DSOundScLdd is derived from DLogicalChannel. DLogicalChannel is the base class for a logical channel and provides the framework in which user side client requests are normally executed in the context of a kernel side thread. However, for this particular driver, not every request is executed in the context of a kernel thread. Requests that do not require access to hardware are handled in the context of the calling thread.
the physical channel, also known as the PDD, manages access to the audio hardware device for all instances of the driver channel.
The class DSoundScPdd is the base class for the Sound Driver PDD object. This class is used for either playback or record, it implements the platform specific layer of the driver and an instance of this class is created for each driver channel opened. This is created by the Sound Driver physical device class DSoundScPddFactory when a channel is opened. The class DSoundScPdd is defined in \e32\include\drivers\soundsc.h.
The following diagram illustrates the Sound Driver architecture. The interactions between the user side and kernel side classes are shown.
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.