summaryrefslogtreecommitdiff
path: root/sound/soc/atmel/atmel_ssc_dai.h
diff options
context:
space:
mode:
authorPeter Rosin <peda@axentia.se>2015-02-09 16:08:25 +0100
committerMark Brown <broonie@kernel.org>2015-02-10 15:12:41 +0800
commitb6d6c6e95ff0e78f9b8393e6b9f25d5a4341ae1a (patch)
tree216b9e3275326fbb89fbd305694e0811924a45c4 /sound/soc/atmel/atmel_ssc_dai.h
parent56bbd86c2e47d4f7707cb329fc008487c940ca27 (diff)
ASoC: atmel_ssc_dai: Allow more rates
When the SSC acts as BCK master, use a ratnum rule to limit the rate instead of only doing the standard rates. When the SSC acts as BCK slave, allow any BCK frequency up to the SSC master clock, divided by either of 2, 3 or 6. Put a cap at 384kHz. Who's /ever/ going to need more than that? The divider of 2, 3 or 6 is selected based on the Serial Clock Ratio Considerations section from the SSC documentation: The Transmitter and the Receiver can be programmed to operate with the clock signals provided on either the TK or RK pins. This allows the SSC to support many slave-mode data transfers. In this case, the maximum clock speed allowed on the RK pin is: - Peripheral clock divided by 2 if Receiver Frame Synchro is input - Peripheral clock divided by 3 if Receiver Frame Synchro is output In addition, the maximum clock speed allowed on the TK pin is: - Peripheral clock divided by 6 if Transmit Frame Synchro is input - Peripheral clock divided by 2 if Transmit Frame Synchro is output Signed-off-by: Peter Rosin <peda@axentia.se> Acked-by: Bo Shen <voice.shen@atmel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/atmel/atmel_ssc_dai.h')
-rw-r--r--sound/soc/atmel/atmel_ssc_dai.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/sound/soc/atmel/atmel_ssc_dai.h b/sound/soc/atmel/atmel_ssc_dai.h
index b1f08d511495..80b153857a88 100644
--- a/sound/soc/atmel/atmel_ssc_dai.h
+++ b/sound/soc/atmel/atmel_ssc_dai.h
@@ -115,6 +115,7 @@ struct atmel_ssc_info {
unsigned short rcmr_period;
struct atmel_pcm_dma_params *dma_params[2];
struct atmel_ssc_state ssc_state;
+ unsigned long mck_rate;
};
int atmel_ssc_set_audio(int ssc_id);