From 9aaca9683b014c4d718f32cbddb42e5b36ea3c0f Mon Sep 17 00:00:00 2001 From: Geoffrey Wossum Date: Thu, 5 Jun 2008 13:49:34 +0100 Subject: [ALSA] Revised AT32 ASoC Patch Attached is a revised version of my patch to add AT32 to ASoC. This cleans most of the style issues associated with the previous patch. Also fixes an issue with the playpaq_wm8510.c code depending on a non-released patch to th AT32 portmux support. Patch is against 2.6.24.3.atmel.3 kernel, the latest AVR32 kernel Atmel has released, with the linux-2.6-asoc patches from when v2.6.24 was tagged also applied. [Fixed up minor checkpatch issues and updated for current kernels -- broonie] Signed-off-by: Geoffrey Wossum Signed-off-by: Mark Brown Signed-off-by: Takashi Iwai --- sound/soc/at32/at32-ssc.h | 59 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 sound/soc/at32/at32-ssc.h (limited to 'sound/soc/at32/at32-ssc.h') diff --git a/sound/soc/at32/at32-ssc.h b/sound/soc/at32/at32-ssc.h new file mode 100644 index 00000000000..3c6901a6c03 --- /dev/null +++ b/sound/soc/at32/at32-ssc.h @@ -0,0 +1,59 @@ +/* sound/soc/at32/at32-ssc.h + * ASoC SSC interface for Atmel AT32 SoC + * + * Copyright (C) 2008 Long Range Systems + * Geoffrey Wossum + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#ifndef __SOUND_SOC_AT32_AT32_SSC_H +#define __SOUND_SOC_AT32_AT32_SSC_H __FILE__ + +#include +#include + +#include "at32-pcm.h" + + + +struct at32_ssc_state { + u32 ssc_cmr; + u32 ssc_rcmr; + u32 ssc_rfmr; + u32 ssc_tcmr; + u32 ssc_tfmr; + u32 ssc_sr; + u32 ssc_imr; +}; + + + +struct at32_ssc_info { + char *name; + struct ssc_device *ssc; + spinlock_t lock; /* lock for dir_mask */ + unsigned short dir_mask; /* 0=unused, 1=playback, 2=capture */ + unsigned short initialized; /* true if SSC has been initialized */ + unsigned short daifmt; + unsigned short cmr_div; + unsigned short tcmr_period; + unsigned short rcmr_period; + struct at32_pcm_dma_params *dma_params[2]; + struct at32_ssc_state ssc_state; +}; + + +/* SSC divider ids */ +#define AT32_SSC_CMR_DIV 0 /* MCK divider for BCLK */ +#define AT32_SSC_TCMR_PERIOD 1 /* BCLK divider for transmit FS */ +#define AT32_SSC_RCMR_PERIOD 2 /* BCLK divider for receive FS */ + + +extern struct snd_soc_cpu_dai at32_ssc_dai[]; + + + +#endif /* __SOUND_SOC_AT32_AT32_SSC_H */ -- cgit v1.2.3