From a1170b1aecf33507bbf1a479367a86c9d83d0080 Mon Sep 17 00:00:00 2001 From: Haynes Mathew George Date: Thu, 27 Apr 2017 17:30:03 -0700 Subject: ASoC: msm: Add hwdep node for NOIRQ FE ALSA lacks support to accept shared memory supplied from userspace. But some usecases need to get a shareable file descriptor for the dma buffer. As an alternate to adding custom ioctls to the ALSA framework, use a hwdep node to get a file descriptor to the underlying dma buffer. Maintain compat mode as well. CRs-Fixed: 2041151 Change-Id: Id783bb84e8ef59b28e42d982903971625577b9a3 Signed-off-by: Haynes Mathew George --- include/uapi/sound/devdep_params.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/uapi/sound/devdep_params.h b/include/uapi/sound/devdep_params.h index 5061ec0da356..9e3133b76c68 100644 --- a/include/uapi/sound/devdep_params.h +++ b/include/uapi/sound/devdep_params.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2015, The Linux Foundation. All rights reserved. + * Copyright (c) 2013-2015,2017, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -66,4 +66,14 @@ struct dts_eagle_param_desc { uint32_t device; } __packed; +#define HWDEP_FE_BASE 3000 /*unique base for FE hw dep nodes*/ +struct snd_pcm_mmap_fd { + int32_t dir; + int32_t fd; + int32_t size; + int32_t actual_size; +}; + +#define SNDRV_PCM_IOCTL_MMAP_DATA_FD _IOWR('U', 0xd2, struct snd_pcm_mmap_fd) + #endif -- cgit v1.2.3