xref: /OK3568_Linux_fs/kernel/arch/arm/mach-pxa/include/mach/audio.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun /* SPDX-License-Identifier: GPL-2.0 */
2*4882a593Smuzhiyun #ifndef __ASM_ARCH_AUDIO_H__
3*4882a593Smuzhiyun #define __ASM_ARCH_AUDIO_H__
4*4882a593Smuzhiyun 
5*4882a593Smuzhiyun #include <sound/core.h>
6*4882a593Smuzhiyun #include <sound/pcm.h>
7*4882a593Smuzhiyun #include <sound/ac97_codec.h>
8*4882a593Smuzhiyun 
9*4882a593Smuzhiyun /*
10*4882a593Smuzhiyun  * @reset_gpio: AC97 reset gpio (normally gpio113 or gpio95)
11*4882a593Smuzhiyun  *              a -1 value means no gpio will be used for reset
12*4882a593Smuzhiyun  * @codec_pdata: AC97 codec platform_data
13*4882a593Smuzhiyun 
14*4882a593Smuzhiyun  * reset_gpio should only be specified for pxa27x CPUs where a silicon
15*4882a593Smuzhiyun  * bug prevents correct operation of the reset line. If not specified,
16*4882a593Smuzhiyun  * the default behaviour on these CPUs is to consider gpio 113 as the
17*4882a593Smuzhiyun  * AC97 reset line, which is the default on most boards.
18*4882a593Smuzhiyun  */
19*4882a593Smuzhiyun typedef struct {
20*4882a593Smuzhiyun 	int (*startup)(struct snd_pcm_substream *, void *);
21*4882a593Smuzhiyun 	void (*shutdown)(struct snd_pcm_substream *, void *);
22*4882a593Smuzhiyun 	void (*suspend)(void *);
23*4882a593Smuzhiyun 	void (*resume)(void *);
24*4882a593Smuzhiyun 	void *priv;
25*4882a593Smuzhiyun 	int reset_gpio;
26*4882a593Smuzhiyun 	void *codec_pdata[AC97_BUS_MAX_DEVICES];
27*4882a593Smuzhiyun } pxa2xx_audio_ops_t;
28*4882a593Smuzhiyun 
29*4882a593Smuzhiyun extern void pxa_set_ac97_info(pxa2xx_audio_ops_t *ops);
30*4882a593Smuzhiyun 
31*4882a593Smuzhiyun #endif
32