/**
 * Copyright (C) 2008, Creative Technology Ltd. All Rights Reserved.
 *
 * This source file is released under GPL v2 license (no other versions).
 * See the COPYING file included in the main directory of this source
 * distribution for the license terms and conditions.
 *
 * @File	ctmixer.h
 *
 * @Brief
 * This file contains the definition of the mixer device functions.
 *
 * @Author	Liu Chun
 * @Date 	Mar 28 2008
 *
 */

#ifndef CTMIXER_H
#define CTMIXER_H

#include "ctatc.h"
#include "ctresource.h"

#define INIT_VOL	0x1c00

enum MIXER_PORT_T {
	MIX_WAVE_FRONT,
	MIX_WAVE_REAR,
	MIX_WAVE_CENTLFE,
	MIX_WAVE_SURROUND,
	MIX_SPDIF_OUT,
	MIX_PCMO_FRONT,
	MIX_MIC_IN,
	MIX_LINE_IN,
	MIX_SPDIF_IN,
	MIX_PCMI_FRONT,
	MIX_PCMI_REAR,
	MIX_PCMI_CENTLFE,
	MIX_PCMI_SURROUND,

	NUM_MIX_PORTS
};

/* alsa mixer descriptor */
struct ct_mixer {
	struct ct_atc *atc;

	void **amixers;		/* amixer resources for volume control */
	void **sums;		/* sum resources for signal collection */
	unsigned int switch_state; /* A bit-map to indicate state of switches */

	int (*get_output_ports)(struct ct_mixer *mixer, enum MIXER_PORT_T type,
				  struct rsc **rleft, struct rsc **rright);

	int (*set_input_left)(struct ct_mixer *mixer,
			      enum MIXER_PORT_T type, struct rsc *rsc);
	int (*set_input_right)(struct ct_mixer *mixer,
			       enum MIXER_PORT_T type, struct rsc *rsc);
#ifdef CONFIG_PM_SLEEP
	int (*resume)(struct ct_mixer *mixer);
#endif
};

int ct_alsa_mix_create(struct ct_atc *atc,
		       enum CTALSADEVS device,
		       const char *device_name);
int ct_mixer_create(struct ct_atc *atc, struct ct_mixer **rmixer);
int ct_mixer_destroy(struct ct_mixer *mixer);

#endif /* CTMIXER_H */
g</a><a href='/cgit.cgi/linux/net-next.git/tree/sound/soc/au1x/Kconfig?id=11131e2b8e9454f79ebfc71e45fe246948ce4997'>tree</a><a href='/cgit.cgi/linux/net-next.git/commit/sound/soc/au1x/Kconfig?id=11131e2b8e9454f79ebfc71e45fe246948ce4997'>commit</a><a href='/cgit.cgi/linux/net-next.git/diff/sound/soc/au1x/Kconfig?id=11131e2b8e9454f79ebfc71e45fe246948ce4997'>diff</a></td><td class='form'><form class='right' method='get' action='/cgit.cgi/linux/net-next.git/log/sound/soc/au1x/Kconfig'>
<input type='hidden' name='id' value='11131e2b8e9454f79ebfc71e45fe246948ce4997'/><select name='qt'>
<option value='grep'>log msg</option>
<option value='author'>author</option>
<option value='committer'>committer</option>
<option value='range'>range</option>
</select>
<input class='txt' type='search' size='10' name='q' value=''/>
<input type='submit' value='search'/>
</form>
</td></tr></table>
<div class='path'>path: <a href='/cgit.cgi/linux/net-next.git/log/?id=11131e2b8e9454f79ebfc71e45fe246948ce4997'>root</a>/<a href='/cgit.cgi/linux/net-next.git/log/sound?id=11131e2b8e9454f79ebfc71e45fe246948ce4997'>sound</a>/<a href='/cgit.cgi/linux/net-next.git/log/sound/soc?id=11131e2b8e9454f79ebfc71e45fe246948ce4997'>soc</a>/<a href='/cgit.cgi/linux/net-next.git/log/sound/soc/au1x?id=11131e2b8e9454f79ebfc71e45fe246948ce4997'>au1x</a>/<a href='/cgit.cgi/linux/net-next.git/log/sound/soc/au1x/Kconfig?id=11131e2b8e9454f79ebfc71e45fe246948ce4997'>Kconfig</a></div><div class='content'><table class='list nowrap'><tr class='nohover'><th class='left'>Age</th><th class='left'>Commit message (<a href='/cgit.cgi/linux/net-next.git/log/sound/soc/au1x/Kconfig?id=11131e2b8e9454f79ebfc71e45fe246948ce4997&amp;showmsg=1'>Expand</a>)</th><th class='left'>Author</th><th class='left'>Files</th><th class='left'>Lines</th></tr>