@@ -7129,7 +7129,13 @@ int __snd_pcm_mmap_begin(snd_pcm_t *pcm, const snd_pcm_channel_area_t **areas,
snd_pcm_uframes_t f;
snd_pcm_uframes_t avail;
const snd_pcm_channel_area_t *xareas;
+
assert(pcm && areas && offset && frames);
+
+ if (pcm->fast_ops->mmap_begin)
+ return pcm->fast_ops->mmap_begin(pcm->fast_op_arg, areas, offset, frames);
+
+ /* fallback for plugins that do not specify new callback */
xareas = snd_pcm_mmap_areas(pcm);
if (xareas == NULL)
return -EBADFD;
@@ -184,6 +184,7 @@ typedef struct {
int (*poll_descriptors)(snd_pcm_t *pcm, struct pollfd *pfds, unsigned int space); /* locked */
int (*poll_revents)(snd_pcm_t *pcm, struct pollfd *pfds, unsigned int nfds, unsigned short *revents); /* locked */
int (*may_wait_for_avail_min)(snd_pcm_t *pcm, snd_pcm_uframes_t avail);
+ int (*mmap_begin)(snd_pcm_t *pcm, const snd_pcm_channel_area_t **areas, snd_pcm_uframes_t *offset, snd_pcm_uframes_t *frames); /* locked */
} snd_pcm_fast_ops_t;
struct _snd_pcm {