aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/hda_codec.h
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2008-07-30 09:01:44 -0400
committerTakashi Iwai <tiwai@suse.de>2008-10-12 20:42:58 -0400
commitb2e1859745b783922533d29e3b03af29378a23f0 (patch)
treef71eba89ae3a5bd3f7a6e3640f62904872f5c071 /sound/pci/hda/hda_codec.h
parent176d5335fe66f379a339b0ab99cc7566e90ff1a9 (diff)
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.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/sound/pci/hda/hda_codec.h b/sound/pci/hda/hda_codec.h
index 70e8fa09273d..b9b21766b730 100644
--- a/sound/pci/hda/hda_codec.h
+++ b/sound/pci/hda/hda_codec.h
@@ -520,6 +520,26 @@ enum {
520#define HDA_MAX_CODEC_ADDRESS 0x0f 520#define HDA_MAX_CODEC_ADDRESS 0x0f
521 521
522/* 522/*
523 * generic arrays
524 */
525struct snd_array {
526 unsigned int used;
527 unsigned int alloced;
528 unsigned int elem_size;
529 unsigned int alloc_align;
530 void *list;
531};
532
533void *snd_array_new(struct snd_array *array);
534void snd_array_free(struct snd_array *array);
535static inline void snd_array_init(struct snd_array *array, unsigned int size,
536 unsigned int align)
537{
538 array->elem_size = size;
539 array->alloc_align = align;
540}
541
542/*
523 * Structures 543 * Structures
524 */ 544 */
525 545