equal
deleted
inserted
replaced
|
1 /* |
|
2 * This component and the accompanying materials are made available |
|
3 * under the terms of the License "Eclipse Public License v1.0" |
|
4 * which accompanies this distribution, and is available |
|
5 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
6 * |
|
7 * Initial Contributors: |
|
8 * Accenture Ltd |
|
9 * |
|
10 * Contributors: |
|
11 * |
|
12 * Description: This file is a part of sound driver for Syborg adaptation. |
|
13 * |
|
14 */ |
|
15 |
|
16 #ifndef VIRTIO_AUDIO_DEFS_H //x |
|
17 #define VIRTIO_AUDIO_DEFS_H |
|
18 |
|
19 #include <e32def.h> |
|
20 |
|
21 /// @file virtio_audio_defs.h |
|
22 /// most of definitions here come from VirtIo Audio spec |
|
23 /// and was made compatible to the qemu backend (which means diverged from spec) |
|
24 |
|
25 namespace VirtIo |
|
26 { |
|
27 namespace Audio |
|
28 { |
|
29 |
|
30 static const TUint KMaxSGLItemCountPerAudioBuffer = 64; |
|
31 |
|
32 enum CommandId |
|
33 { |
|
34 ECmdSetEndian=1, |
|
35 ECmdSetChannels=2, |
|
36 ECmdSetFormat=3, |
|
37 ECmdSetFrequency=4, |
|
38 ECmdInit=5, |
|
39 ECmdRun=6 |
|
40 }; |
|
41 |
|
42 enum FormatId |
|
43 { |
|
44 EFormatU8=0, |
|
45 EFormatS8=1, |
|
46 EFormatU16=2, |
|
47 EFormatS16=3, |
|
48 EFormatU32=4, |
|
49 EFormatS32=5 |
|
50 }; |
|
51 |
|
52 enum RunType |
|
53 { |
|
54 EDoStop = 0, |
|
55 EDoRun = 1 |
|
56 }; |
|
57 |
|
58 // note the values are opposite to what spec says |
|
59 enum StreamDirection |
|
60 { |
|
61 EDirectionPlayback = 0, |
|
62 EDirectionRecord = 1 |
|
63 }; |
|
64 |
|
65 struct TCommand |
|
66 { |
|
67 TUint32 iCommand; |
|
68 TUint32 iStream; |
|
69 TUint32 iArg; |
|
70 }; |
|
71 |
|
72 struct TBufferInfo |
|
73 { |
|
74 TUint32 bufferSize; |
|
75 TUint32 iA[3]; // not really documented |
|
76 }; |
|
77 |
|
78 static const TUint32 KVirtIoPeripheralId = 0xc51d000a; |
|
79 static const TUint32 KVirtIoDeviceId = 0xffff; |
|
80 |
|
81 } // namespace Audio |
|
82 } // namespace VirtIo |
|
83 |
|
84 #endif |
|
85 |