Revert "powerpc/ep8248e: Fix compile problem if !CONFIG_FS_ENET"
[linux-2.6/linux-acpi-2.6/ibm-acpi-2.6.git] / sound / soc / at32 / at32-ssc.h
blob3c052dbbe460f9509af4c674a39010ddb74b4301
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>
18 #include "at32-pcm.h"
22 struct at32_ssc_state {
23 u32 ssc_cmr;
24 u32 ssc_rcmr;
25 u32 ssc_rfmr;
26 u32 ssc_tcmr;
27 u32 ssc_tfmr;
28 u32 ssc_sr;
29 u32 ssc_imr;
34 struct at32_ssc_info {
35 char *name;
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;
49 /* SSC divider ids */
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 */