diff options
author | Sedji Gaouaou <sedji.gaouaou@atmel.com> | 2008-10-03 10:57:50 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2008-10-31 09:12:26 -0400 |
commit | 6c7425095c9ee23d080dba3e27217a254cce4562 (patch) | |
tree | c6c27e1c986b2adeda4adbdcad934b816d654b75 /sound/soc/at32/at32-ssc.h | |
parent | dc06102a0c8b5aa0dd7f9a40ce241e793c252a87 (diff) |
ASoC: Merge AT91 and AVR32 support into a single atmel architecture
The Ateml AT91 and AVR32 SoC share common IP for audio and can share the
same driver code using the atmel-ssc API provided for both architectures.
Do this, creating a new unified atmel ASoC architecture to replace the
previous at32 and at91 ones.
[This was contributed as a patch series for reviewability but has been
squashed down to a single commit to help preserve both the history and
bisectability. A small bugfix from Jukka is included.]
Tested-by: Jukka Hynninen <ext-jukka.hynninen@vaisala.com>
Signed-off-by: Sedji Gaouaou <sedji.gaouaou@atmel.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/at32/at32-ssc.h')
-rw-r--r-- | sound/soc/at32/at32-ssc.h | 59 |
1 files changed, 0 insertions, 59 deletions
diff --git a/sound/soc/at32/at32-ssc.h b/sound/soc/at32/at32-ssc.h deleted file mode 100644 index 3c052dbbe460..000000000000 --- a/sound/soc/at32/at32-ssc.h +++ /dev/null | |||
@@ -1,59 +0,0 @@ | |||
1 | /* sound/soc/at32/at32-ssc.h | ||
2 | * ASoC SSC interface for Atmel AT32 SoC | ||
3 | * | ||
4 | * Copyright (C) 2008 Long Range Systems | ||
5 | * Geoffrey Wossum <gwossum@acm.org> | ||
6 | * | ||
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. | ||
10 | */ | ||
11 | |||
12 | #ifndef __SOUND_SOC_AT32_AT32_SSC_H | ||
13 | #define __SOUND_SOC_AT32_AT32_SSC_H __FILE__ | ||
14 | |||
15 | #include <linux/types.h> | ||
16 | #include <linux/atmel-ssc.h> | ||
17 | |||
18 | #include "at32-pcm.h" | ||
19 | |||
20 | |||
21 | |||
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; | ||
30 | }; | ||
31 | |||
32 | |||
33 | |||
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; | ||
46 | }; | ||
47 | |||
48 | |||
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 */ | ||
53 | |||
54 | |||
55 | extern struct snd_soc_dai at32_ssc_dai[]; | ||
56 | |||
57 | |||
58 | |||
59 | #endif /* __SOUND_SOC_AT32_AT32_SSC_H */ | ||