blob: 85352becec7c0ca31c678c2fa1eb7f7d1ed23d1a [file] [log] [blame]
Dmitry Baryshkov9c636342008-09-10 05:01:17 +04001#ifndef PXA2XX_LIB_H
2#define PXA2XX_LIB_H
3
Robert Jarzmik6f8acad2017-09-02 21:54:06 +02004#include <uapi/sound/asound.h>
Dmitry Baryshkov9c636342008-09-10 05:01:17 +04005#include <linux/platform_device.h>
Dmitry Baryshkov9c636342008-09-10 05:01:17 +04006
Dmitry Baryshkova6d77312008-09-10 05:01:20 +04007/* PCM */
Robert Jarzmik6f8acad2017-09-02 21:54:06 +02008struct snd_pcm_substream;
9struct snd_pcm_hw_params;
10struct snd_pcm;
Dmitry Baryshkova6d77312008-09-10 05:01:20 +040011
Dmitry Baryshkova6d77312008-09-10 05:01:20 +040012extern int __pxa2xx_pcm_hw_params(struct snd_pcm_substream *substream,
13 struct snd_pcm_hw_params *params);
14extern int __pxa2xx_pcm_hw_free(struct snd_pcm_substream *substream);
15extern int pxa2xx_pcm_trigger(struct snd_pcm_substream *substream, int cmd);
16extern snd_pcm_uframes_t pxa2xx_pcm_pointer(struct snd_pcm_substream *substream);
17extern int __pxa2xx_pcm_prepare(struct snd_pcm_substream *substream);
Dmitry Baryshkova6d77312008-09-10 05:01:20 +040018extern int __pxa2xx_pcm_open(struct snd_pcm_substream *substream);
19extern int __pxa2xx_pcm_close(struct snd_pcm_substream *substream);
20extern int pxa2xx_pcm_mmap(struct snd_pcm_substream *substream,
21 struct vm_area_struct *vma);
22extern int pxa2xx_pcm_preallocate_dma_buffer(struct snd_pcm *pcm, int stream);
23extern void pxa2xx_pcm_free_dma_buffers(struct snd_pcm *pcm);
24
25/* AC97 */
26
Robert Jarzmik6f8acad2017-09-02 21:54:06 +020027extern int pxa2xx_ac97_read(int slot, unsigned short reg);
28extern int pxa2xx_ac97_write(int slot, unsigned short reg, unsigned short val);
Dmitry Baryshkov9c636342008-09-10 05:01:17 +040029
Robert Jarzmik6f8acad2017-09-02 21:54:06 +020030extern bool pxa2xx_ac97_try_warm_reset(void);
31extern bool pxa2xx_ac97_try_cold_reset(void);
32extern void pxa2xx_ac97_finish_reset(void);
Dmitry Baryshkov9c636342008-09-10 05:01:17 +040033
34extern int pxa2xx_ac97_hw_suspend(void);
35extern int pxa2xx_ac97_hw_resume(void);
36
37extern int pxa2xx_ac97_hw_probe(struct platform_device *dev);
38extern void pxa2xx_ac97_hw_remove(struct platform_device *dev);
39
Dmitry Baryshkov9c636342008-09-10 05:01:17 +040040#endif