All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC] ALSA: add new alsa control byte extended
@ 2013-11-29  4:29 Vinod Koul
  2013-11-29  7:27 ` Jarkko Nikula
  2013-11-29  7:46 ` Takashi Iwai
  0 siblings, 2 replies; 20+ messages in thread
From: Vinod Koul @ 2013-11-29  4:29 UTC (permalink / raw)
  To: alsa-devel; +Cc: tiwai, Vinod Koul, broonie, lgirdwood

As discussed in the last Audio uConf we need to improve byte controls to allow
larger size data to be sent to DSPs  The modern DSPs require alsa byte controls
size which far exceeds the today 512bytes limit. In order for usermode to send
larger sizes (few 100s of KBs) along with size information we add extended byte
control interface which sends any size bytes parameter buffer for DSPs to use
Obviosly the size must be supported by the device and would be required to
inform the max size allowed for the control.

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
---
 include/uapi/sound/asound.h |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/include/uapi/sound/asound.h b/include/uapi/sound/asound.h
index 9fc6219..8c10359 100644
--- a/include/uapi/sound/asound.h
+++ b/include/uapi/sound/asound.h
@@ -782,7 +782,8 @@ typedef int __bitwise snd_ctl_elem_type_t;
 #define	SNDRV_CTL_ELEM_TYPE_BYTES	((__force snd_ctl_elem_type_t) 4) /* byte array */
 #define	SNDRV_CTL_ELEM_TYPE_IEC958	((__force snd_ctl_elem_type_t) 5) /* IEC958 (S/PDIF) setup */
 #define	SNDRV_CTL_ELEM_TYPE_INTEGER64	((__force snd_ctl_elem_type_t) 6) /* 64-bit integer type */
-#define	SNDRV_CTL_ELEM_TYPE_LAST	SNDRV_CTL_ELEM_TYPE_INTEGER64
+#define SNDRV_CTL_ELEM_TYPE_BYTES_EXT	((__force snd_ctl_elem_type_t) 7) /* bytes array extended */
+#define	SNDRV_CTL_ELEM_TYPE_LAST	SNDRV_CTL_ELEM_TYPE_BYTES_EXT
 
 typedef int __bitwise snd_ctl_elem_iface_t;
 #define	SNDRV_CTL_ELEM_IFACE_CARD	((__force snd_ctl_elem_iface_t) 0) /* global control */
@@ -891,6 +892,11 @@ struct snd_ctl_elem_value {
 			unsigned char data[512];
 			unsigned char *data_ptr;	/* obsoleted */
 		} bytes;
+		struct {
+			unsigned long size;	/* size of buffer */
+			__u64 data;	i	/* user data pointer */
+		} bytes_ext;
+
 		struct snd_aes_iec958 iec958;
 	} value;		/* RO */
 	struct timespec tstamp;
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2013-11-29 14:25 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-29  4:29 [RFC] ALSA: add new alsa control byte extended Vinod Koul
2013-11-29  7:27 ` Jarkko Nikula
2013-11-29  7:18   ` Vinod Koul
2013-11-29  7:46 ` Takashi Iwai
2013-11-29  7:44   ` Vinod Koul
2013-11-29  9:08     ` Takashi Iwai
2013-11-29  8:34       ` Vinod Koul
2013-11-29  9:40       ` Jaroslav Kysela
2013-11-29  9:48         ` Takashi Iwai
2013-11-29 10:10           ` Jaroslav Kysela
2013-11-29 11:25             ` Mark Brown
2013-11-29 11:31               ` Takashi Iwai
2013-11-29 12:27                 ` Mark Brown
2013-11-29 11:05           ` Mark Brown
2013-11-29 10:29             ` Vinod Koul
2013-11-29 11:46               ` Mark Brown
2013-11-29 13:19                 ` Vinod Koul
2013-11-29 13:11               ` Charles Keepax
2013-11-29 13:28                 ` Vinod Koul
2013-11-29 14:17                 ` Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.