diff options
Diffstat (limited to 'Documentation/sound')
-rw-r--r-- | Documentation/sound/alsa/compress_offload.txt | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/Documentation/sound/alsa/compress_offload.txt b/Documentation/sound/alsa/compress_offload.txt index 90e9b3a11abc..0bcc55155911 100644 --- a/Documentation/sound/alsa/compress_offload.txt +++ b/Documentation/sound/alsa/compress_offload.txt | |||
@@ -145,6 +145,52 @@ Modifications include: | |||
145 | - Addition of encoding options when required (derived from OpenMAX IL) | 145 | - Addition of encoding options when required (derived from OpenMAX IL) |
146 | - Addition of rateControlSupported (missing in OpenMAX AL) | 146 | - Addition of rateControlSupported (missing in OpenMAX AL) |
147 | 147 | ||
148 | Gapless Playback | ||
149 | ================ | ||
150 | When playing thru an album, the decoders have the ability to skip the encoder | ||
151 | delay and padding and directly move from one track content to another. The end | ||
152 | user can perceive this as gapless playback as we dont have silence while | ||
153 | switching from one track to another | ||
154 | |||
155 | Also, there might be low-intensity noises due to encoding. Perfect gapless is | ||
156 | difficult to reach with all types of compressed data, but works fine with most | ||
157 | music content. The decoder needs to know the encoder delay and encoder padding. | ||
158 | So we need to pass this to DSP. This metadata is extracted from ID3/MP4 headers | ||
159 | and are not present by default in the bitstream, hence the need for a new | ||
160 | interface to pass this information to the DSP. Also DSP and userspace needs to | ||
161 | switch from one track to another and start using data for second track. | ||
162 | |||
163 | The main additions are: | ||
164 | |||
165 | - set_metadata | ||
166 | This routine sets the encoder delay and encoder padding. This can be used by | ||
167 | decoder to strip the silence. This needs to be set before the data in the track | ||
168 | is written. | ||
169 | |||
170 | - set_next_track | ||
171 | This routine tells DSP that metadata and write operation sent after this would | ||
172 | correspond to subsequent track | ||
173 | |||
174 | - partial drain | ||
175 | This is called when end of file is reached. The userspace can inform DSP that | ||
176 | EOF is reached and now DSP can start skipping padding delay. Also next write | ||
177 | data would belong to next track | ||
178 | |||
179 | Sequence flow for gapless would be: | ||
180 | - Open | ||
181 | - Get caps / codec caps | ||
182 | - Set params | ||
183 | - Set metadata of the first track | ||
184 | - Fill data of the first track | ||
185 | - Trigger start | ||
186 | - User-space finished sending all, | ||
187 | - Indicaite next track data by sending set_next_track | ||
188 | - Set metadata of the next track | ||
189 | - then call partial_drain to flush most of buffer in DSP | ||
190 | - Fill data of the next track | ||
191 | - DSP switches to second track | ||
192 | (note: order for partial_drain and write for next track can be reversed as well) | ||
193 | |||
148 | Not supported: | 194 | Not supported: |
149 | 195 | ||
150 | - Support for VoIP/circuit-switched calls is not the target of this | 196 | - Support for VoIP/circuit-switched calls is not the target of this |