diff options
author | Takashi Iwai <tiwai@suse.de> | 2008-07-30 15:01:44 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2008-10-13 02:42:58 +0200 |
commit | b2e1859745b783922533d29e3b03af29378a23f0 (patch) | |
tree | f71eba89ae3a5bd3f7a6e3640f62904872f5c071 /sound/pci/hda/hda_codec.h | |
parent | 176d5335fe66f379a339b0ab99cc7566e90ff1a9 (diff) | |
download | op-kernel-dev-b2e1859745b783922533d29e3b03af29378a23f0.zip op-kernel-dev-b2e1859745b783922533d29e3b03af29378a23f0.tar.gz |
ALSA: hda - Add generic arrays
Added helper functions to handle generic arrays.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/hda_codec.h')
-rw-r--r-- | sound/pci/hda/hda_codec.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/sound/pci/hda/hda_codec.h b/sound/pci/hda/hda_codec.h index 70e8fa0..b9b2176 100644 --- a/sound/pci/hda/hda_codec.h +++ b/sound/pci/hda/hda_codec.h @@ -520,6 +520,26 @@ enum { #define HDA_MAX_CODEC_ADDRESS 0x0f /* + * generic arrays + */ +struct snd_array { + unsigned int used; + unsigned int alloced; + unsigned int elem_size; + unsigned int alloc_align; + void *list; +}; + +void *snd_array_new(struct snd_array *array); +void snd_array_free(struct snd_array *array); +static inline void snd_array_init(struct snd_array *array, unsigned int size, + unsigned int align) +{ + array->elem_size = size; + array->alloc_align = align; +} + +/* * Structures */ |