]>
git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blob - sound/soc/at32/at32-ssc.h
1 /* sound/soc/at32/at32-ssc.h
2 * ASoC SSC interface for Atmel AT32 SoC
4 * Copyright (C) 2008 Long Range Systems
5 * Geoffrey Wossum <gwossum@acm.org>
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
12 #ifndef __SOUND_SOC_AT32_AT32_SSC_H
13 #define __SOUND_SOC_AT32_AT32_SSC_H __FILE__
15 #include <linux/types.h>
16 #include <linux/atmel-ssc.h>
22 struct at32_ssc_state
{
34 struct at32_ssc_info
{
36 struct ssc_device
*ssc
;
37 spinlock_t lock
; /* lock for dir_mask */
38 unsigned short dir_mask
; /* 0=unused, 1=playback, 2=capture */
39 unsigned short initialized
; /* true if SSC has been initialized */
40 unsigned short daifmt
;
41 unsigned short cmr_div
;
42 unsigned short tcmr_period
;
43 unsigned short rcmr_period
;
44 struct at32_pcm_dma_params
*dma_params
[2];
45 struct at32_ssc_state ssc_state
;
50 #define AT32_SSC_CMR_DIV 0 /* MCK divider for BCLK */
51 #define AT32_SSC_TCMR_PERIOD 1 /* BCLK divider for transmit FS */
52 #define AT32_SSC_RCMR_PERIOD 2 /* BCLK divider for receive FS */
55 extern struct snd_soc_dai at32_ssc_dai
[];
59 #endif /* __SOUND_SOC_AT32_AT32_SSC_H */