summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorGe Lei <b42127@freescale.com>2012-11-15 14:46:19 +0800
committerChen Liangjun <b36089@freescale.com>2012-11-15 17:19:17 +0800
commit72ab3f46c599fadabf83f17b0bde7d6887c805fd (patch)
treeb1770dc63840bed3d52b70c633fc37e149800a7e /include
parent3a34fe70afc521a01f13cdd80bc2f5ae23e3b4c8 (diff)
ENGR00233570-1 ASRC: Use hook to add support for ASRC loadable
ASoC ESAI machine driver and pcm platform driver use the APIs from mxc_asrc.c, but once ASRC is used as a loadable module, these files can't find the APIs from this ko. In this patch, we use 'asrc_p2p_hook' to hook the APIs which will be used in ASoC ESAI machine driver and pcm platform driver. Signed-off-by: Ge Lei <b42127@freescale.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/mxc_asrc.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/linux/mxc_asrc.h b/include/linux/mxc_asrc.h
index 72817e6ece0f..37c64b7c2200 100644
--- a/include/linux/mxc_asrc.h
+++ b/include/linux/mxc_asrc.h
@@ -259,6 +259,19 @@ struct asrc_data {
struct device *dev;
};
+struct asrc_p2p_ops {
+ void (*asrc_p2p_start_conv)(enum asrc_pair_index);
+ void (*asrc_p2p_stop_conv)(enum asrc_pair_index);
+ int (*asrc_p2p_get_dma_request)(enum asrc_pair_index, bool);
+ u32 (*asrc_p2p_per_addr)(enum asrc_pair_index, bool);
+ int (*asrc_p2p_req_pair)(int, enum asrc_pair_index *index);
+ int (*asrc_p2p_config_pair)(struct asrc_config *config);
+ void (*asrc_p2p_release_pair)(enum asrc_pair_index);
+ void (*asrc_p2p_finish_conv)(enum asrc_pair_index);
+};
+
+extern void asrc_p2p_hook(struct asrc_p2p_ops *asrc_p2p_ct);
+
extern int asrc_req_pair(int chn_num, enum asrc_pair_index *index);
extern void asrc_release_pair(enum asrc_pair_index index);
extern int asrc_config_pair(struct asrc_config *config);