xref: /haiku/src/add-ons/kernel/drivers/audio/echo/multi.h (revision bd9d5861cbe44f498588175b1f224154dec899a0)
15adb129eSJérôme Duval /*
25adb129eSJérôme Duval  * EchoGals/Echo24 BeOS Driver for Echo audio cards
35adb129eSJérôme Duval  *
45adb129eSJérôme Duval  * Copyright (c) 2003, Jerome Duval (jerome.duval@free.fr)
55adb129eSJérôme Duval  *
65adb129eSJérôme Duval  * Original code : BeOS Driver for Intel ICH AC'97 Link interface
75adb129eSJérôme Duval  * Copyright (c) 2002, Marcus Overhagen <marcus@overhagen.de>
85adb129eSJérôme Duval  *
95adb129eSJérôme Duval  * All rights reserved.
105adb129eSJérôme Duval  * Redistribution and use in source and binary forms, with or without modification,
115adb129eSJérôme Duval  * are permitted provided that the following conditions are met:
125adb129eSJérôme Duval  *
135adb129eSJérôme Duval  * - Redistributions of source code must retain the above copyright notice,
145adb129eSJérôme Duval  *   this list of conditions and the following disclaimer.
155adb129eSJérôme Duval  * - Redistributions in binary form must reproduce the above copyright notice,
165adb129eSJérôme Duval  *   this list of conditions and the following disclaimer in the documentation
175adb129eSJérôme Duval  *   and/or other materials provided with the distribution.
185adb129eSJérôme Duval  *
195adb129eSJérôme Duval  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
205adb129eSJérôme Duval  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
215adb129eSJérôme Duval  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
225adb129eSJérôme Duval  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
235adb129eSJérôme Duval  * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
245adb129eSJérôme Duval  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
255adb129eSJérôme Duval  * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
265adb129eSJérôme Duval  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
275adb129eSJérôme Duval  * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
285adb129eSJérôme Duval  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
295adb129eSJérôme Duval  *
305adb129eSJérôme Duval  */
315adb129eSJérôme Duval #ifndef _MULTI_H_
325adb129eSJérôme Duval #define _MULTI_H_
335adb129eSJérôme Duval 
34*c9002531SJérôme Duval #include "OsSupportBeOS.h"
35*c9002531SJérôme Duval #include "MixerXface.h"
36*c9002531SJérôme Duval 
375adb129eSJérôme Duval typedef struct _multi_mixer_control {
385adb129eSJérôme Duval 	struct _multi_dev 	*multi;
39*c9002531SJérôme Duval 	void	(*get) (void *card, MIXER_AUDIO_CHANNEL, int32 type, float *values);
40*c9002531SJérôme Duval 	void	(*set) (void *card, MIXER_AUDIO_CHANNEL, int32 type, float *values);
41*c9002531SJérôme Duval 	MIXER_AUDIO_CHANNEL 	channel;
425adb129eSJérôme Duval 	int32 type;
435adb129eSJérôme Duval 	multi_mix_control	mix_control;
445adb129eSJérôme Duval } multi_mixer_control;
455adb129eSJérôme Duval 
46*c9002531SJérôme Duval #define MULTI_CONTROL_FIRSTID	1024
47*c9002531SJérôme Duval #define MULTI_CONTROL_MASTERID	0
485adb129eSJérôme Duval 
495adb129eSJérôme Duval typedef struct _multi_dev {
505adb129eSJérôme Duval 	void	*card;
51*c9002531SJérôme Duval #define MULTICONTROLSNUM 128
52*c9002531SJérôme Duval 	multi_mixer_control controls[MULTICONTROLSNUM];
535adb129eSJérôme Duval 	uint32 control_count;
545adb129eSJérôme Duval 
55*c9002531SJérôme Duval #define MULTICHANNUM 128
56*c9002531SJérôme Duval 	multi_channel_info chans[MULTICHANNUM];
575adb129eSJérôme Duval 	uint32 output_channel_count;
585adb129eSJérôme Duval 	uint32 input_channel_count;
595adb129eSJérôme Duval 	uint32 output_bus_channel_count;
605adb129eSJérôme Duval 	uint32 input_bus_channel_count;
615adb129eSJérôme Duval 	uint32 aux_bus_channel_count;
625adb129eSJérôme Duval } multi_dev;
635adb129eSJérôme Duval 
645adb129eSJérôme Duval #endif
65