mirror of
https://github.com/torvalds/linux.git
synced 2024-11-11 06:31:49 +00:00
e217b085a1
To avoid a dependency on the pxa platform header files with hardcoded registers, change the driver to call a wrapper in the pxa2xx-ac97-lib that encapsulates all the other ac97 stuff. Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Acked-by: Robert Jarzmik <robert.jarzmik@free.fr> Cc: linux-input@vger.kernel.org Cc: alsa-devel@alsa-project.org Signed-off-by: Arnd Bergmann <arnd@arndb.de>
60 lines
2.3 KiB
C
60 lines
2.3 KiB
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef PXA2XX_LIB_H
|
|
#define PXA2XX_LIB_H
|
|
|
|
#include <uapi/sound/asound.h>
|
|
#include <linux/platform_device.h>
|
|
|
|
/* PCM */
|
|
struct snd_pcm_substream;
|
|
struct snd_pcm_hw_params;
|
|
struct snd_soc_pcm_runtime;
|
|
struct snd_pcm;
|
|
struct snd_soc_component;
|
|
|
|
extern int pxa2xx_pcm_hw_params(struct snd_pcm_substream *substream,
|
|
struct snd_pcm_hw_params *params);
|
|
extern int pxa2xx_pcm_trigger(struct snd_pcm_substream *substream, int cmd);
|
|
extern snd_pcm_uframes_t pxa2xx_pcm_pointer(struct snd_pcm_substream *substream);
|
|
extern int pxa2xx_pcm_prepare(struct snd_pcm_substream *substream);
|
|
extern int pxa2xx_pcm_open(struct snd_pcm_substream *substream);
|
|
extern int pxa2xx_pcm_close(struct snd_pcm_substream *substream);
|
|
extern int pxa2xx_pcm_preallocate_dma_buffer(struct snd_pcm *pcm);
|
|
extern int pxa2xx_soc_pcm_new(struct snd_soc_component *component,
|
|
struct snd_soc_pcm_runtime *rtd);
|
|
extern int pxa2xx_soc_pcm_open(struct snd_soc_component *component,
|
|
struct snd_pcm_substream *substream);
|
|
extern int pxa2xx_soc_pcm_close(struct snd_soc_component *component,
|
|
struct snd_pcm_substream *substream);
|
|
extern int pxa2xx_soc_pcm_hw_params(struct snd_soc_component *component,
|
|
struct snd_pcm_substream *substream,
|
|
struct snd_pcm_hw_params *params);
|
|
extern int pxa2xx_soc_pcm_prepare(struct snd_soc_component *component,
|
|
struct snd_pcm_substream *substream);
|
|
extern int pxa2xx_soc_pcm_trigger(struct snd_soc_component *component,
|
|
struct snd_pcm_substream *substream, int cmd);
|
|
extern snd_pcm_uframes_t
|
|
pxa2xx_soc_pcm_pointer(struct snd_soc_component *component,
|
|
struct snd_pcm_substream *substream);
|
|
|
|
/* AC97 */
|
|
|
|
extern int pxa2xx_ac97_read(int slot, unsigned short reg);
|
|
extern int pxa2xx_ac97_write(int slot, unsigned short reg, unsigned short val);
|
|
|
|
extern bool pxa2xx_ac97_try_warm_reset(void);
|
|
extern bool pxa2xx_ac97_try_cold_reset(void);
|
|
extern void pxa2xx_ac97_finish_reset(void);
|
|
|
|
extern int pxa2xx_ac97_hw_suspend(void);
|
|
extern int pxa2xx_ac97_hw_resume(void);
|
|
|
|
extern int pxa2xx_ac97_hw_probe(struct platform_device *dev);
|
|
extern void pxa2xx_ac97_hw_remove(struct platform_device *dev);
|
|
|
|
/* modem registers, used by touchscreen driver */
|
|
u32 pxa2xx_ac97_read_modr(void);
|
|
u32 pxa2xx_ac97_read_misr(void);
|
|
|
|
#endif
|