1 |
e81bf0ed
|
Harald Welte
|
/* ----------------------------------------------------------------------------
|
2 |
|
|
* ATMEL Microcontroller Software Support
|
3 |
|
|
* ----------------------------------------------------------------------------
|
4 |
|
|
* Copyright (c) 2008, Atmel Corporation
|
5 |
|
|
*
|
6 |
|
|
* All rights reserved.
|
7 |
|
|
*
|
8 |
|
|
* Redistribution and use in source and binary forms, with or without
|
9 |
|
|
* modification, are permitted provided that the following conditions are met:
|
10 |
|
|
*
|
11 |
|
|
* - Redistributions of source code must retain the above copyright notice,
|
12 |
|
|
* this list of conditions and the disclaimer below.
|
13 |
|
|
*
|
14 |
|
|
* Atmel's name may not be used to endorse or promote products derived from
|
15 |
|
|
* this software without specific prior written permission.
|
16 |
|
|
*
|
17 |
|
|
* DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
|
18 |
|
|
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
19 |
|
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
20 |
|
|
* DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
|
21 |
|
|
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
22 |
|
|
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
|
23 |
|
|
* OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
24 |
|
|
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
25 |
|
|
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
|
26 |
|
|
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
27 |
|
|
* ----------------------------------------------------------------------------
|
28 |
|
|
*/
|
29 |
|
|
|
30 |
|
|
/**
|
31 |
|
|
\unit
|
32 |
|
|
|
33 |
|
|
!!!Purpose
|
34 |
|
|
|
35 |
|
|
Declaration of the descriptors required by a USB audio speaker driver.
|
36 |
|
|
|
37 |
|
|
!!!Usage
|
38 |
|
|
|
39 |
|
|
-# Initialize a USBDDriver instance using the
|
40 |
|
|
auddSpeakerDriverDescriptors list.
|
41 |
|
|
*/
|
42 |
|
|
|
43 |
|
|
#ifndef AUDDLOOPRECDESCRIPTORS_H
|
44 |
|
|
#define AUDDLOOPRECDESCRIPTORS_H
|
45 |
|
|
|
46 |
|
|
//------------------------------------------------------------------------------
|
47 |
|
|
// Headers
|
48 |
|
|
//------------------------------------------------------------------------------
|
49 |
|
|
|
50 |
|
|
#include <board.h>
|
51 |
|
|
#include <fast_source.h>
|
52 |
|
|
#include <usb/device/core/USBDDriverDescriptors.h>
|
53 |
|
|
|
54 |
|
|
//------------------------------------------------------------------------------
|
55 |
|
|
// Definitions
|
56 |
|
|
//------------------------------------------------------------------------------
|
57 |
|
|
|
58 |
|
|
//------------------------------------------------------------------------------
|
59 |
|
|
/// \page "Audio Speaker Endpoint Numbers"
|
60 |
|
|
///
|
61 |
|
|
/// This page lists the endpoint number settings for USB Audio Speaker device.
|
62 |
|
|
///
|
63 |
|
|
/// !Endpoints
|
64 |
|
|
/// - AUDDLoopRecDriverDescriptors_DATAOUT
|
65 |
|
|
/// - AUDDLoopRecDriverDescriptors_DATAIN
|
66 |
|
|
/// - AUDDLoopRecDriverDescriptors_HS_INTERVAL
|
67 |
|
|
/// - AUDDLoopRecDriverDescriptors_FS_INTERVAL
|
68 |
|
|
|
69 |
|
|
#if defined(at91sam7s) || defined(at91sam9xe)
|
70 |
|
|
/// Data out endpoint number, size 64B.
|
71 |
|
|
#define AUDDLoopRecDriverDescriptors_DATAOUT 0x01
|
72 |
|
|
/// Data in endpoint number, size 64B
|
73 |
|
|
#define AUDDLoopRecDriverDescriptors_DATAIN 0x02
|
74 |
|
|
#elif defined(CHIP_USB_UDP)
|
75 |
|
|
/// Data out endpoint number, size 192B.
|
76 |
|
|
#define AUDDLoopRecDriverDescriptors_DATAOUT 0x04
|
77 |
|
|
/// Data in endpoint number, size 192B.
|
78 |
|
|
#define AUDDLoopRecDriverDescriptors_DATAIN 0x05
|
79 |
|
|
#elif defined(at91sam9m10ek) || defined(at91sam9m10ekes)
|
80 |
|
|
/// Data out endpoint number, size 192B.
|
81 |
|
|
#define AUDDLoopRecDriverDescriptors_DATAOUT 0x01
|
82 |
|
|
/// Data in endpoint number, size 192B
|
83 |
|
|
#define AUDDLoopRecDriverDescriptors_DATAIN 0x06
|
84 |
|
|
#else
|
85 |
|
|
/// Data out endpoint number, size 192B.
|
86 |
|
|
#define AUDDLoopRecDriverDescriptors_DATAOUT 0x05
|
87 |
|
|
/// Data in endpoint number, size 192B
|
88 |
|
|
#define AUDDLoopRecDriverDescriptors_DATAIN 0x06
|
89 |
|
|
#endif
|
90 |
|
|
|
91 |
|
|
/// Endpoint polling interval 2^(x-1) * 125us
|
92 |
|
|
#define AUDDLoopRecDriverDescriptors_HS_INTERVAL 0x01
|
93 |
|
|
/// Endpoint polling interval 2^(x-1) * ms
|
94 |
|
|
#define AUDDLoopRecDriverDescriptors_FS_INTERVAL 0x01
|
95 |
|
|
//------------------------------------------------------------------------------
|
96 |
|
|
|
97 |
|
|
//------------------------------------------------------------------------------
|
98 |
|
|
/// \page "Audio Speaker Interface IDs"
|
99 |
|
|
///
|
100 |
|
|
/// This page lists the interface numbers for USB Audio Speaker device.
|
101 |
|
|
///
|
102 |
|
|
/// !Interfaces
|
103 |
|
|
/// - AUDDLoopRecDriverDescriptors_CONTROL
|
104 |
|
|
/// - AUDDLoopRecDriverDescriptors_STREAMING
|
105 |
|
|
/// - AUDDLoopRecDriverDescriptors_STREAMINGIN
|
106 |
|
|
|
107 |
|
|
/// Audio control interface ID.
|
108 |
|
|
#define AUDDLoopRecDriverDescriptors_CONTROL 0
|
109 |
|
|
/// Audio streaming interface ID (OUT, for playback).
|
110 |
|
|
#define AUDDLoopRecDriverDescriptors_STREAMING 1
|
111 |
|
|
/// Audio streaming interface ID (IN, for record).
|
112 |
|
|
#define AUDDLoopRecDriverDescriptors_STREAMINGIN 2
|
113 |
|
|
//------------------------------------------------------------------------------
|
114 |
|
|
|
115 |
|
|
//------------------------------------------------------------------------------
|
116 |
|
|
/// \page "Audio Speaker Entity IDs"
|
117 |
|
|
///
|
118 |
|
|
/// This page lists the entity IDs for USB Audio Speaker device.
|
119 |
|
|
///
|
120 |
|
|
/// !Entities
|
121 |
|
|
/// - AUDDLoopRecDriverDescriptors_INPUTTERMINAL
|
122 |
|
|
/// - AUDDLoopRecDriverDescriptors_OUTPUTTERMINAL
|
123 |
|
|
/// - AUDDLoopRecDriverDescriptors_FEATUREUNIT
|
124 |
|
|
/// - AUDDLoopRecDriverDescriptors_INPUTTERMINAL_REC
|
125 |
|
|
/// - AUDDLoopRecDriverDescriptors_OUTPUTTERMINAL_REC
|
126 |
|
|
/// - AUDDLoopRecDriverDescriptors_FEATUREUNIT_REC
|
127 |
|
|
|
128 |
|
|
/// Playback input terminal ID.
|
129 |
|
|
#define AUDDLoopRecDriverDescriptors_INPUTTERMINAL 0
|
130 |
|
|
/// Playback output terminal ID.
|
131 |
|
|
#define AUDDLoopRecDriverDescriptors_OUTPUTTERMINAL 1
|
132 |
|
|
/// Playback feature unit ID.
|
133 |
|
|
#define AUDDLoopRecDriverDescriptors_FEATUREUNIT 2
|
134 |
|
|
/// Record input terminal ID.
|
135 |
|
|
#define AUDDLoopRecDriverDescriptors_INPUTTERMINAL_REC 3
|
136 |
|
|
/// Record output terminal ID.
|
137 |
|
|
#define AUDDLoopRecDriverDescriptors_OUTPUTTERMINAL_REC 4
|
138 |
|
|
/// Record feature unit ID
|
139 |
|
|
#define AUDDLoopRecDriverDescriptors_FEATUREUNIT_REC 5
|
140 |
|
|
//------------------------------------------------------------------------------
|
141 |
|
|
|
142 |
|
|
//------------------------------------------------------------------------------
|
143 |
|
|
// Exported variables
|
144 |
|
|
//------------------------------------------------------------------------------
|
145 |
|
|
|
146 |
|
|
extern const USBDDriverDescriptors auddLoopRecDriverDescriptors;
|
147 |
|
|
|
148 |
|
|
#endif //#ifndef AUDDLOOPRECDESCRIPTORS_H
|
149 |
|
|
|