aboutsummaryrefslogtreecommitdiffstats
path: root/include/sound
diff options
context:
space:
mode:
authorBarry Song <21cnbao@gmail.com>2009-09-11 13:16:29 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2009-09-13 07:37:53 -0400
commit472df3cbae8da6a949f1392a11958b8d21383735 (patch)
tree0e8c33fdf2de2cd970c29e7baf52a70fde005a59 /include/sound
parent2312fd8f6b252b7d3c1d74b20c75b7bff98bab65 (diff)
ASoC: Provide API for reordering channels
The patch adds an interface to set the relationship between audio channel number and slot number. The interface should be really useful because audio channel n doesn't always use slot n in all platforms. And for some devices, the relationship even can change with sound mode switch in 2.1,3.1,4.1,5.1,6.1,7.1 etc. Signed-off-by: Barry Song <21cnbao@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'include/sound')
-rw-r--r--include/sound/soc-dai.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/sound/soc-dai.h b/include/sound/soc-dai.h
index 16963d4d5df2..e0c7fa7b1060 100644
--- a/include/sound/soc-dai.h
+++ b/include/sound/soc-dai.h
@@ -114,6 +114,10 @@ int snd_soc_dai_set_fmt(struct snd_soc_dai *dai, unsigned int fmt);
114int snd_soc_dai_set_tdm_slot(struct snd_soc_dai *dai, 114int snd_soc_dai_set_tdm_slot(struct snd_soc_dai *dai,
115 unsigned int tx_mask, unsigned int rx_mask, int slots, int slot_width); 115 unsigned int tx_mask, unsigned int rx_mask, int slots, int slot_width);
116 116
117int snd_soc_dai_set_channel_map(struct snd_soc_dai *dai,
118 unsigned int tx_num, unsigned int *tx_slot,
119 unsigned int rx_num, unsigned int *rx_slot);
120
117int snd_soc_dai_set_tristate(struct snd_soc_dai *dai, int tristate); 121int snd_soc_dai_set_tristate(struct snd_soc_dai *dai, int tristate);
118 122
119/* Digital Audio Interface mute */ 123/* Digital Audio Interface mute */
@@ -148,6 +152,9 @@ struct snd_soc_dai_ops {
148 int (*set_tdm_slot)(struct snd_soc_dai *dai, 152 int (*set_tdm_slot)(struct snd_soc_dai *dai,
149 unsigned int tx_mask, unsigned int rx_mask, 153 unsigned int tx_mask, unsigned int rx_mask,
150 int slots, int slot_width); 154 int slots, int slot_width);
155 int (*set_channel_map)(struct snd_soc_dai *dai,
156 unsigned int tx_num, unsigned int *tx_slot,
157 unsigned int rx_num, unsigned int *rx_slot);
151 int (*set_tristate)(struct snd_soc_dai *dai, int tristate); 158 int (*set_tristate)(struct snd_soc_dai *dai, int tristate);
152 159
153 /* 160 /*