122f08665SArnd Bergmann /* SPDX-License-Identifier: GPL-2.0 */ 222f08665SArnd Bergmann #ifndef __SOC_PXA_AUDIO_H__ 322f08665SArnd Bergmann #define __SOC_PXA_AUDIO_H__ 422f08665SArnd Bergmann 522f08665SArnd Bergmann #include <sound/core.h> 622f08665SArnd Bergmann #include <sound/pcm.h> 722f08665SArnd Bergmann #include <sound/ac97_codec.h> 822f08665SArnd Bergmann 922f08665SArnd Bergmann /* 1022f08665SArnd Bergmann * @reset_gpio: AC97 reset gpio (normally gpio113 or gpio95) 1122f08665SArnd Bergmann * a -1 value means no gpio will be used for reset 1222f08665SArnd Bergmann * @codec_pdata: AC97 codec platform_data 1322f08665SArnd Bergmann 1422f08665SArnd Bergmann * reset_gpio should only be specified for pxa27x CPUs where a silicon 1522f08665SArnd Bergmann * bug prevents correct operation of the reset line. If not specified, 1622f08665SArnd Bergmann * the default behaviour on these CPUs is to consider gpio 113 as the 1722f08665SArnd Bergmann * AC97 reset line, which is the default on most boards. 1822f08665SArnd Bergmann */ 1922f08665SArnd Bergmann typedef struct { 2022f08665SArnd Bergmann int (*startup)(struct snd_pcm_substream *, void *); 2122f08665SArnd Bergmann void (*shutdown)(struct snd_pcm_substream *, void *); 2222f08665SArnd Bergmann void (*suspend)(void *); 2322f08665SArnd Bergmann void (*resume)(void *); 2422f08665SArnd Bergmann void *priv; 2522f08665SArnd Bergmann int reset_gpio; 2622f08665SArnd Bergmann void *codec_pdata[AC97_BUS_MAX_DEVICES]; 2722f08665SArnd Bergmann } pxa2xx_audio_ops_t; 2822f08665SArnd Bergmann 2922f08665SArnd Bergmann extern void pxa_set_ac97_info(pxa2xx_audio_ops_t *ops); 30*a9ae9c52SArnd Bergmann extern void pxa27x_configure_ac97reset(int reset_gpio, bool to_gpio); 3122f08665SArnd Bergmann 3222f08665SArnd Bergmann #endif 33