Changeset 717 for GPL/trunk/alsa-kernel/include/sound/pcm.h
- Timestamp:
- Aug 7, 2022, 6:11:12 PM (3 years ago)
- Location:
- GPL/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
GPL/trunk
- Property svn:mergeinfo changed
/GPL/branches/uniaud32-next merged: 710-716
- Property svn:mergeinfo changed
-
GPL/trunk/alsa-kernel/include/sound/pcm.h
r703 r717 399 399 struct fasync_struct *fasync; 400 400 bool stop_operating; /* sync_stop will be called */ 401 struct mutex buffer_mutex; /* protect for buffer changes */ 402 atomic_t buffer_accessing; /* >0: in r/w operation, <0: blocked */ 401 403 402 404 /* -- private section -- */ … … 1225 1227 int snd_pcm_lib_free_pages(struct snd_pcm_substream *substream); 1226 1228 1227 void snd_pcm_set_managed_buffer(struct snd_pcm_substream *substream, int type, 1228 struct device *data, size_t size, size_t max); 1229 void snd_pcm_set_managed_buffer_all(struct snd_pcm *pcm, int type, 1230 struct device *data, 1231 size_t size, size_t max); 1229 int snd_pcm_set_managed_buffer(struct snd_pcm_substream *substream, int type, 1230 struct device *data, size_t size, size_t max); 1231 int snd_pcm_set_managed_buffer_all(struct snd_pcm *pcm, int type, 1232 struct device *data, 1233 size_t size, size_t max); 1234 1235 /** 1236 * snd_pcm_set_fixed_buffer - Preallocate and set up the fixed size PCM buffer 1237 * @substream: the pcm substream instance 1238 * @type: DMA type (SNDRV_DMA_TYPE_*) 1239 * @data: DMA type dependent data 1240 * @size: the requested pre-allocation size in bytes 1241 * 1242 * This is a variant of snd_pcm_set_managed_buffer(), but this pre-allocates 1243 * only the given sized buffer and doesn't allow re-allocation nor dynamic 1244 * allocation of a larger buffer unlike the standard one. 1245 * The function may return -ENOMEM error, hence the caller must check it. 1246 */ 1247 static inline int __must_check 1248 snd_pcm_set_fixed_buffer(struct snd_pcm_substream *substream, int type, 1249 struct device *data, size_t size) 1250 { 1251 return snd_pcm_set_managed_buffer(substream, type, data, size, 0); 1252 } 1253 1254 /** 1255 * snd_pcm_set_fixed_buffer_all - Preallocate and set up the fixed size PCM buffer 1256 * @pcm: the pcm instance 1257 * @type: DMA type (SNDRV_DMA_TYPE_*) 1258 * @data: DMA type dependent data 1259 * @size: the requested pre-allocation size in bytes 1260 * 1261 * Apply the set up of the fixed buffer via snd_pcm_set_fixed_buffer() for 1262 * all substream. If any of allocation fails, it returns -ENOMEM, hence the 1263 * caller must check the return value. 1264 */ 1265 static inline int __must_check 1266 snd_pcm_set_fixed_buffer_all(struct snd_pcm *pcm, int type, 1267 struct device *data, size_t size) 1268 { 1269 return snd_pcm_set_managed_buffer_all(pcm, type, data, size, 0); 1270 } 1232 1271 1233 1272 int _snd_pcm_lib_alloc_vmalloc_buffer(struct snd_pcm_substream *substream,
Note:
See TracChangeset
for help on using the changeset viewer.