Build the SB128/ES137x Driver
[AROS.git] / workbench / devs / AHI / TODO
blob8daee39cdaeade8533529c69b9059644f33c8a63
2 Added           Fixed           What?
3 ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
4 970314          970326          Fast Echo
5 970314                          AHIST_INPUT
6 970314                          Echo example
7 970314          030119          32 bit samples for CMD_WRITE
8 970314          970315          Dynamic loading/unloading of samples for CMD_WRITE
9 970320          970321          Finish new prefs program
10 970320          970321          Update user's guide for new prefs program
11 970321          970407          Localize the prefs program
12 970321          030119          Dynamic (prioritized?) volume boost in device mode
13 970322          970326          Rewrite the echo stuff, init code i C
14 970323                          Dev-API should be able to play from VMEM
15 970328          970404          Convert "Programming guidelines" to texinfo
16 970418          970602          MasterVolume with clipping
17 970418                          Better info about outvol, monvol, gain etc
18 970504                          Big buffer mixing
19 970504          970602          32 bit output for all drivers
20 970625          970628          Better BestAudioID() examples
21 970703          970707          Improve the Paula driver
22 970802                          "Hidden" flag in audio modes
23 970802                          Move env. variables to the audio mode files
24 970802                          Localize the audio modes
25 970802                          Make prefs program able to modify the audio modes
26 970802          970820          Fix the GetAttr() routine in the Paula driver
27 970820                          Hooks should be allowed to be NULL for no-op.
28 971007                          Tell if a mode is hardware accelerated or not.
29 971007                          Tell if a mode can handle stereo samples.
30 971119                          GetAttr should ask driver about AHIDB_Stereo etc!
31 980112                          Speedup GetAudioAttrsA by using audioctrl better.
32 980224                          AUDIO: crashes if UNIT is 4.
33 980511                          AUDIO: and ahi.device should report how much is played.
34 980805                          AHIC_Monitor, "Monitor always" in prefs.
35 990908                          Global volume control for device modes.
36 991111                          Open the filesave requester on the user's screen.
37 001213                          If AHISF_TIMING is not used, ahiac_BuffSize is not set.
38 010422                          Zero-sized CMD_WRITE sometimes locks AHI.
39 010815                          toccata.library emulation uses hardcoded "fast" modes.
42 V5 Proposal, improvements and new lowlevel soundcard access
43 ===========================================================
45 Improvements
46 ************
48 Be able to ask the device which units are available.
49 Use the device interface on Direct modes too.
50 All AHIDB_#?Arg tags should also have a AHIDB_#?Array, that holds all values.
51 A new function AHI_FreeArray() should be used to free the list.
53 AHIR_DoChannels
55 AHIA_AntiClick (ULONG) -- Specifies how many (output) samples AHI will spend
56 interpolating when starting a new sound. (Implementera som en rutin som tar
57 Addrutinen som argement, kör den på en egen buffer och mixar in den i ut-strömmen.
58 Skitenkelt.)
60 New AHI_AllocAudio tags
61 ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
62 AHIA_ErrorFunc:  A Hook that gets called when an error occurs (CPU limit
63 reached, input or output clipping etc).
66 New/improved AHI_ControlAudio tags
67 ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
68 AHIC_MonitorVolumeLeft (ULONG)           (Set to dB level specified by index)
69 AHIC_MonitorVolumeRight (ULONG)
70 AHIC_MonitorVolumeLeft_Query (ULONG *)   (Get index)
71 AHIC_MonitorVolumeRight_Query (ULONG *)
72 AHIC_OutputVolumeLeft (ULONG)
73 AHIC_OutputVolumeRight (ULONG)
74 AHIC_OutputVolumeLeft_Query (ULONG *)
75 AHIC_OutputVolumeRight_Query (ULONG *)
76 AHIC_InputGainLeft (ULONG)
77 AHIC_InputGainRight (ULONG)
78 AHIC_InputGainLeft_Query (ULONG *)
79 AHIC_InputGainRight_Query (ULONG *)
81 AHI will translate the old tags (AHIC_MonitorVolume,
82 AHIC_MonitorVolume_Query etc) so the driver will only need to know about
83 the new ones.
85 AHIC_InputClipped (BOOL)
86 AHIC_OutputClipped (BOOL)
87 AHIC_UsedCPU (Fixed)
89 New/improved database tags
90 ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
91 AHIDB_MonitorVolumesLeft/AHIDB_MonitorVolumeLeftArg/AHIDB_MonitorVolumeLeft
92 AHIDB_MonitorVolumesRight/AHIDB_MonitorVolumeRightArg/AHIDB_MonitorVolumeRight
93 AHIDB_OutputVolumesLeft/AHIDB_OutputVolumeLeftArg/AHIDB_OutputVolumeLeft
94 AHIDB_OutputVolumesRight/AHIDB_OutputVolumeRightArg/AHIDB_OutputVolumeRight
95 AHIDB_InputGainsLeft/AHIDB_InputGainLeftArg/AHIDB_InputGainLeft
96 AHIDB_InputGainsRight/AHIDB_InputGainRightArg/AHIDB_InputGainRight
98 AHI will translate the old tags.  If the left and right channel cannot be
99 controlled separately, AHIDB_MonitorVolumesRight, AHIDB_OutputVolumesRight
100 or AHIDB_InputGainsRight will return 0. The values are in dB, stored as Fixed.
101 Mute is coded as LONG_MIN (AHI_MUTED).
103 AHIDB_Hidden (BOOL):  Prevent mode from showing up in the requester.
104 AHIDB_Accelerated (ULONG):  Level of hardware acceleration (None, effects,
105 mixing etc)
106 AHIDB_Surround (BOOL)
107 AHIDB_SampleFormats/AHIDB_SampleFormatArg/AHIDB_SampleFormat:  Sample
108 formats supported by the mixing routines.  See "Total Control" below.
110 AHIDB_Frequency can now return AHI_EXTERNAL_FREQ (defined 0), to indicate that
111 the mixing frequency depends on an external source.
113 Add AHIDB_Available
116 New AHI_AudioRequest tags
117 ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
118 AHIR_DoHidden: Show hidden modes, too.
121 New Effect interface
122 ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
123 To be defined.
126 Multiple sound card support
127 ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
128 To be defined.  Basically, a new driver call, or perhaps a AHIsub_GetAttr
129 tag that returns the number of sound cards installed, as well as the number
130 of independent DA/AD converters on each card.  ahi.device will then build
131 the audio modes from a template in DEVS:AUDIOMODES.
134 Preferences program
135 ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
136 Allow the preferences program to set the default requester size and coordinates.
137 Dynamic volume boost. Dynamic mixing frequency.
141 Patchbay system
142 ***************
144 Each time an application allocates an AudioCtrl structure, a straigt
145 connection from the application to the sound hardware is opened.  This is a
146 one-way connection (the recording stream cannot be modified).  With the new
147 effect API, the user can add modules on this connection (predefined like
148 echo, master volume, outputvolume etc, and custom modules as well).  All
149 these connections from application to sound card are public.  This lets
150 other applications hook into each others streams as well.
152 Each module would need at least three functions:  Begin(), End() and
153 Process().  Begin() would let the module know the minimum and maximum
154 packet length (remember, the packet length is variable) and the data
155 format.  Process() would get a pointer to a packet, which it may modify.
157 The patchbay system only works when the mixing routines are used, not in
158 "Absolute Power" mode. (NO!)
160 There are lots of problems. How should wet/dry channels be handled? How
161 should future enhancements, like separate effects one each virtual channel
162 be handled? How can hardware acceleration be taken advantage of? PPC code?
163 How should the public AudioCtrl structures been shown, in the audio mode
164 requester given a temporary mode ID? What if the application saves this mode
165 in its preferences file?
167 Total Control
168 *************
170 A new Audio mode for each card driver, with bit 0-4 set to 0.  This mode is
171 the "Absolute Power" mode, where all mixing routines are disabled and you
172 can write data to the FIFO yourself.
174 Add a new database tag, AHIDB_Direct (BOOL), that identifies such audio modes.
176 Add a new requester tag, AHIR_DoDirectModes, that also shows the raw modes.
177 They will be named "Paula", "Prelude.1", "Prelude.2", "Delfina", etc.
178 I.e., just the card's name.  In order to only show the raw modes, a filter
179 taglist containing "AHIR_Direct, TRUE" must be used.
181 Add new AHI_ControlAudio tags:  AHIC_MixFreq (to change the mixing
182 frequency), AHIC_SampleFormat and AHIC_SampleFormat_Query (to set and get
183 the current data format), AHIC_DirectLength and AHIC_DirectLength_Query (to set
184 and get the block length to be used), AHIC_DirectWrite (pass a buffer of size
185 AHIC_DirectLength to be transferred to the card) and AHIC_DirectRead (read
186 AHIC_DirectLength samples to a buffer).
188 Should I have separate read and write fifo depth? YES!
190 Add database tags:  AHIDB_SampleFormats/AHIDB_SampleFormatArg/
191 AHIDB_SampleFormat (find out the supported hardware sample formats)
192 AHIDB_DirectLengths/AHIDB_DirectLengthArg/AHIDB_DirectLength (to find out the
193 available FIFO depths).
195 Add new sample formats:  AHIST_ULAW, AHIST_ALAW, AHIST_ADPCM, AHIST_MP1L3 etc...
197 In these modes, the MixFunc() will be replaced by a routine that transfers
198 the memory block set by the last AHIC_DirectWrite to the driver-allocated
199 mixing buffer.  This allows the driver to reuse the current transfer
200 routines (esp.  useful in the paula driver), which allows minimal changes
201 the the current drivers.  However, there is nothing preventing you from
202 skipping the call to MixFunc() and read directly from the AHIC_DirectWrite
203 block.
205 The PlayerFunc() should be called before you fill the fifo.  The user is
206 responsible for setting a new AHIC_DirectWrite block from this hook.
208 *************
210 User-defined audio modes, just like "Default Music Unit", id #0
211 User-defined pseudo drivers that handles mixing from several programs/device
212 units.