summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorChen Liangjun <b36089@freescale.com>2012-06-11 15:08:18 +0800
committerJason Liu <r64343@freescale.com>2012-07-20 13:38:50 +0800
commitd85b9d666cc6d6a6fdbfe7567cce4a7a9d08780f (patch)
tree99dbf64c601376227b716125001b4861819e1c8e /include
parent9531edc94a94124d1ca119300f7c2d8b267de094 (diff)
ENGR00212318 ASRC:update to in/out width config
The origin ASRC driver did not support input and output wordwidth config but an total wordwidth config instead. And the input wordwith and output wordwidth are all fixed to 24 bit. In this path, we do things below: 1 Update to use input wordwidth and output wordwidth config seperately instead of an total wordwidth config. 2 Set corresponding DMA(input/output) buswidth according ASRC's input and output wordwidth config. 3 Support 16/24 bit input wordwidth and 24 bit output wordwidth. Signed-off-by: Chen Liangjun <b36089@freescale.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/mxc_asrc.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/include/linux/mxc_asrc.h b/include/linux/mxc_asrc.h
index 4ccf8cb496ca..72556a5e1669 100644
--- a/include/linux/mxc_asrc.h
+++ b/include/linux/mxc_asrc.h
@@ -72,6 +72,12 @@ enum asrc_outclk {
OUTCLK_ASRCK1_CLK = 0x0f,
};
+enum asrc_word_width {
+ ASRC_WIDTH_24_BIT = 0,
+ ASRC_WIDTH_16_BIT = 1,
+ ASRC_WIDTH_8_BIT = 2,
+};
+
struct asrc_config {
enum asrc_pair_index pair;
unsigned int channel_num;
@@ -79,7 +85,8 @@ struct asrc_config {
unsigned int dma_buffer_size;
unsigned int input_sample_rate;
unsigned int output_sample_rate;
- unsigned int word_width;
+ enum asrc_word_width input_word_width;
+ enum asrc_word_width output_word_width;
enum asrc_inclk inclk;
enum asrc_outclk outclk;
};
@@ -170,6 +177,9 @@ enum asrc_error_status {
#define ASRC_ASRFSTB_REG 0xAC
#define ASRC_ASRMCRC_REG 0xB0
#define ASRC_ASRFSTC_REG 0xB4
+#define ASRC_ASRMCR1A_REG 0xC0
+#define ASRC_ASRMCR1B_REG 0xC4
+#define ASRC_ASRMCR1C_REG 0xC8
struct dma_block {