|
1 <?xml version="1.0" encoding="utf-8"?> |
|
2 <!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. --> |
|
3 <!-- This component and the accompanying materials are made available under the terms of the License |
|
4 "Eclipse Public License v1.0" which accompanies this distribution, |
|
5 and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". --> |
|
6 <!-- Initial Contributors: |
|
7 Nokia Corporation - initial contribution. |
|
8 Contributors: |
|
9 --> |
|
10 <!DOCTYPE concept |
|
11 PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd"> |
|
12 <concept id="GUID-B4C05C46-F2C9-57FA-AD85-EFE6479C2FF1" xml:lang="en"><title>Design</title><shortdesc>When you start a port, you must make a decision if the driver must |
|
13 provide record, playback, or both playback and record.</shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody> |
|
14 <p>If the PDD is to support audio transfer in a single direction, either record |
|
15 or playback, then a conventional PDD implementation is required. The PDD opens |
|
16 only a single driver channel and the PDD factory creates either a record or |
|
17 playback PDD object. </p> |
|
18 <p>If the PDD is to support audio transfer in both directions then it must |
|
19 be implemented to open two units, one playback unit and one record unit. For |
|
20 each unit the PDD factory must create the appropriate PDD object. </p> |
|
21 <p>One complication in this configuration is the need to co-ordinate access |
|
22 to the single audio hardware device from the two separate PDD objects. This |
|
23 configuration needs coordination when accessing the hardware device from two |
|
24 separate PDD objects, detecting and preventing situations where the handling |
|
25 of a PDD function for the channel in one direction conflicts with the channel |
|
26 setup in the other direction, specifically: </p> |
|
27 <ul> |
|
28 <li id="GUID-076CE21B-E350-5D87-A486-8AFC120E8DE9"><p>preventing the setup |
|
29 of conflicting audio configurations between the record and playback channels. </p> </li> |
|
30 <li id="GUID-27C1DD90-DE14-51CD-A723-86C7696D4C4F"><p>preventing the channel |
|
31 in one direction from powering down the audio hardware device while it is |
|
32 being used for data transfer by the other channel. </p> </li> |
|
33 </ul> |
|
34 <p>The solution is to move the code that controls those aspects of audio hardware |
|
35 setup which are shared between the two driver channels into the PDD factory |
|
36 object, as this object is shared. </p> |
|
37 <p>The porting process focuses on implementing a PDD that supports both record |
|
38 and playback as this is the most common situation. The template port Sound |
|
39 Driver is setup for this configuration. A PDD that supports audio transfer |
|
40 in a single direction only omits the implementation for the direction not |
|
41 supported. </p> |
|
42 </conbody></concept> |