aboutsummaryrefslogtreecommitdiffstats
path: root/include/sound
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2012-07-19 02:03:20 -0400
committerTakashi Iwai <tiwai@suse.de>2012-07-19 02:03:20 -0400
commit4609ed6b1f0ab9f11a9d0361573b53d9d057c440 (patch)
tree802119cc6ddea286bc03d56431286ac52166352e /include/sound
parent639aa4bd58582f3015ae5621b7e9e754dcb58e6b (diff)
parent409b78cc17a4a3d07a541037575da648ced99437 (diff)
Merge tag 'asoc-3.6' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next
ASoC: Updates for 3.6 This has been a pretty quiet release - very little activity in framework terms, mostly just a few new drivers and updates: - Added the ability to add and remove DAPM paths dynamically, mostly for reparenting on clock changes. - New machine drivers for Marvell Brownstone, ST-Ericsson Ux500 reference platform and ttc-dkp. - New CPU drivers for Blackfin BF6xx SPORTs in I2S mode, Marvell MMP, Synopsis Designware I2S controllers, and SPEAr DMA and S/PDIF - New CODEC drivers for Dialog DA732x, ST STA529, ST-Ericsson AB8500, TI Isabelle and Wolfson Microelectronics WM5102 and WM5110
Diffstat (limited to 'include/sound')
-rw-r--r--include/sound/designware_i2s.h69
-rw-r--r--include/sound/dmaengine_pcm.h1
-rw-r--r--include/sound/pcm.h11
-rw-r--r--include/sound/soc-dapm.h12
-rw-r--r--include/sound/soc.h77
-rw-r--r--include/sound/spear_dma.h35
-rw-r--r--include/sound/spear_spdif.h29
7 files changed, 229 insertions, 5 deletions
diff --git a/include/sound/designware_i2s.h b/include/sound/designware_i2s.h
new file mode 100644
index 000000000000..26f406e0f673
--- /dev/null
+++ b/include/sound/designware_i2s.h
@@ -0,0 +1,69 @@
1/*
2 * Copyright (ST) 2012 Rajeev Kumar (rajeev-dlh.kumar@st.com)
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 *
18 */
19
20#ifndef __SOUND_DESIGNWARE_I2S_H
21#define __SOUND_DESIGNWARE_I2S_H
22
23#include <linux/dmaengine.h>
24#include <linux/types.h>
25
26/*
27 * struct i2s_clk_config_data - represent i2s clk configuration data
28 * @chan_nr: number of channel
29 * @data_width: number of bits per sample (8/16/24/32 bit)
30 * @sample_rate: sampling frequency (8Khz, 16Khz, 32Khz, 44Khz, 48Khz)
31 */
32struct i2s_clk_config_data {
33 int chan_nr;
34 u32 data_width;
35 u32 sample_rate;
36};
37
38struct i2s_platform_data {
39 #define DWC_I2S_PLAY (1 << 0)
40 #define DWC_I2S_RECORD (1 << 1)
41 unsigned int cap;
42 int channel;
43 u32 snd_fmts;
44 u32 snd_rates;
45
46 void *play_dma_data;
47 void *capture_dma_data;
48 bool (*filter)(struct dma_chan *chan, void *slave);
49 int (*i2s_clk_cfg)(struct i2s_clk_config_data *config);
50};
51
52struct i2s_dma_data {
53 void *data;
54 dma_addr_t addr;
55 u32 max_burst;
56 enum dma_slave_buswidth addr_width;
57 bool (*filter)(struct dma_chan *chan, void *slave);
58};
59
60/* I2S DMA registers */
61#define I2S_RXDMA 0x01C0
62#define I2S_TXDMA 0x01C8
63
64#define TWO_CHANNEL_SUPPORT 2 /* up to 2.0 */
65#define FOUR_CHANNEL_SUPPORT 4 /* up to 3.1 */
66#define SIX_CHANNEL_SUPPORT 6 /* up to 5.1 */
67#define EIGHT_CHANNEL_SUPPORT 8 /* up to 7.1 */
68
69#endif /* __SOUND_DESIGNWARE_I2S_H */
diff --git a/include/sound/dmaengine_pcm.h b/include/sound/dmaengine_pcm.h
index a8fcaa6d531f..b877334bbb0f 100644
--- a/include/sound/dmaengine_pcm.h
+++ b/include/sound/dmaengine_pcm.h
@@ -39,6 +39,7 @@ int snd_hwparams_to_dma_slave_config(const struct snd_pcm_substream *substream,
39 const struct snd_pcm_hw_params *params, struct dma_slave_config *slave_config); 39 const struct snd_pcm_hw_params *params, struct dma_slave_config *slave_config);
40int snd_dmaengine_pcm_trigger(struct snd_pcm_substream *substream, int cmd); 40int snd_dmaengine_pcm_trigger(struct snd_pcm_substream *substream, int cmd);
41snd_pcm_uframes_t snd_dmaengine_pcm_pointer(struct snd_pcm_substream *substream); 41snd_pcm_uframes_t snd_dmaengine_pcm_pointer(struct snd_pcm_substream *substream);
42snd_pcm_uframes_t snd_dmaengine_pcm_pointer_no_residue(struct snd_pcm_substream *substream);
42 43
43int snd_dmaengine_pcm_open(struct snd_pcm_substream *substream, 44int snd_dmaengine_pcm_open(struct snd_pcm_substream *substream,
44 dma_filter_fn filter_fn, void *filter_data); 45 dma_filter_fn filter_fn, void *filter_data);
diff --git a/include/sound/pcm.h b/include/sound/pcm.h
index e91e6047ca6f..c75c0d1a85e2 100644
--- a/include/sound/pcm.h
+++ b/include/sound/pcm.h
@@ -1074,4 +1074,15 @@ static inline void snd_pcm_limit_isa_dma_size(int dma, size_t *max)
1074 1074
1075const char *snd_pcm_format_name(snd_pcm_format_t format); 1075const char *snd_pcm_format_name(snd_pcm_format_t format);
1076 1076
1077/**
1078 * Get a string naming the direction of a stream
1079 */
1080static inline const char *snd_pcm_stream_str(struct snd_pcm_substream *substream)
1081{
1082 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
1083 return "Playback";
1084 else
1085 return "Capture";
1086}
1087
1077#endif /* __SOUND_PCM_H */ 1088#endif /* __SOUND_PCM_H */
diff --git a/include/sound/soc-dapm.h b/include/sound/soc-dapm.h
index e3833d9f1914..abe373d57adc 100644
--- a/include/sound/soc-dapm.h
+++ b/include/sound/soc-dapm.h
@@ -229,6 +229,10 @@ struct device;
229{ .id = snd_soc_dapm_adc, .name = wname, .sname = stname, .reg = wreg, \ 229{ .id = snd_soc_dapm_adc, .name = wname, .sname = stname, .reg = wreg, \
230 .shift = wshift, .invert = winvert, \ 230 .shift = wshift, .invert = winvert, \
231 .event = wevent, .event_flags = wflags} 231 .event = wevent, .event_flags = wflags}
232#define SND_SOC_DAPM_CLOCK_SUPPLY(wname) \
233{ .id = snd_soc_dapm_clock_supply, .name = wname, \
234 .reg = SND_SOC_NOPM, .event = dapm_clock_event, \
235 .event_flags = SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMD }
232 236
233/* generic widgets */ 237/* generic widgets */
234#define SND_SOC_DAPM_REG(wid, wname, wreg, wshift, wmask, won_val, woff_val) \ 238#define SND_SOC_DAPM_REG(wid, wname, wreg, wshift, wmask, won_val, woff_val) \
@@ -245,6 +249,7 @@ struct device;
245 .reg = SND_SOC_NOPM, .shift = wdelay, .event = dapm_regulator_event, \ 249 .reg = SND_SOC_NOPM, .shift = wdelay, .event = dapm_regulator_event, \
246 .event_flags = SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMD } 250 .event_flags = SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMD }
247 251
252
248/* dapm kcontrol types */ 253/* dapm kcontrol types */
249#define SOC_DAPM_SINGLE(xname, reg, shift, max, invert) \ 254#define SOC_DAPM_SINGLE(xname, reg, shift, max, invert) \
250{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \ 255{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \
@@ -327,6 +332,8 @@ int dapm_reg_event(struct snd_soc_dapm_widget *w,
327 struct snd_kcontrol *kcontrol, int event); 332 struct snd_kcontrol *kcontrol, int event);
328int dapm_regulator_event(struct snd_soc_dapm_widget *w, 333int dapm_regulator_event(struct snd_soc_dapm_widget *w,
329 struct snd_kcontrol *kcontrol, int event); 334 struct snd_kcontrol *kcontrol, int event);
335int dapm_clock_event(struct snd_soc_dapm_widget *w,
336 struct snd_kcontrol *kcontrol, int event);
330 337
331/* dapm controls */ 338/* dapm controls */
332int snd_soc_dapm_put_volsw(struct snd_kcontrol *kcontrol, 339int snd_soc_dapm_put_volsw(struct snd_kcontrol *kcontrol,
@@ -367,6 +374,8 @@ int snd_soc_dapm_new_widgets(struct snd_soc_dapm_context *dapm);
367void snd_soc_dapm_free(struct snd_soc_dapm_context *dapm); 374void snd_soc_dapm_free(struct snd_soc_dapm_context *dapm);
368int snd_soc_dapm_add_routes(struct snd_soc_dapm_context *dapm, 375int snd_soc_dapm_add_routes(struct snd_soc_dapm_context *dapm,
369 const struct snd_soc_dapm_route *route, int num); 376 const struct snd_soc_dapm_route *route, int num);
377int snd_soc_dapm_del_routes(struct snd_soc_dapm_context *dapm,
378 const struct snd_soc_dapm_route *route, int num);
370int snd_soc_dapm_weak_routes(struct snd_soc_dapm_context *dapm, 379int snd_soc_dapm_weak_routes(struct snd_soc_dapm_context *dapm,
371 const struct snd_soc_dapm_route *route, int num); 380 const struct snd_soc_dapm_route *route, int num);
372 381
@@ -432,6 +441,7 @@ enum snd_soc_dapm_type {
432 snd_soc_dapm_post, /* machine specific post widget - exec last */ 441 snd_soc_dapm_post, /* machine specific post widget - exec last */
433 snd_soc_dapm_supply, /* power/clock supply */ 442 snd_soc_dapm_supply, /* power/clock supply */
434 snd_soc_dapm_regulator_supply, /* external regulator */ 443 snd_soc_dapm_regulator_supply, /* external regulator */
444 snd_soc_dapm_clock_supply, /* external clock */
435 snd_soc_dapm_aif_in, /* audio interface input */ 445 snd_soc_dapm_aif_in, /* audio interface input */
436 snd_soc_dapm_aif_out, /* audio interface output */ 446 snd_soc_dapm_aif_out, /* audio interface output */
437 snd_soc_dapm_siggen, /* signal generator */ 447 snd_soc_dapm_siggen, /* signal generator */
@@ -537,6 +547,8 @@ struct snd_soc_dapm_widget {
537 struct list_head dirty; 547 struct list_head dirty;
538 int inputs; 548 int inputs;
539 int outputs; 549 int outputs;
550
551 struct clk *clk;
540}; 552};
541 553
542struct snd_soc_dapm_update { 554struct snd_soc_dapm_update {
diff --git a/include/sound/soc.h b/include/sound/soc.h
index c703871f5f65..e063380f63a2 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -42,11 +42,22 @@
42 ((unsigned long)&(struct soc_mixer_control) \ 42 ((unsigned long)&(struct soc_mixer_control) \
43 {.reg = xlreg, .rreg = xrreg, .shift = xshift, .rshift = xshift, \ 43 {.reg = xlreg, .rreg = xrreg, .shift = xshift, .rshift = xshift, \
44 .max = xmax, .platform_max = xmax, .invert = xinvert}) 44 .max = xmax, .platform_max = xmax, .invert = xinvert})
45#define SOC_DOUBLE_R_RANGE_VALUE(xlreg, xrreg, xshift, xmin, xmax, xinvert) \
46 ((unsigned long)&(struct soc_mixer_control) \
47 {.reg = xlreg, .rreg = xrreg, .shift = xshift, .rshift = xshift, \
48 .min = xmin, .max = xmax, .platform_max = xmax, .invert = xinvert})
45#define SOC_SINGLE(xname, reg, shift, max, invert) \ 49#define SOC_SINGLE(xname, reg, shift, max, invert) \
46{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \ 50{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \
47 .info = snd_soc_info_volsw, .get = snd_soc_get_volsw,\ 51 .info = snd_soc_info_volsw, .get = snd_soc_get_volsw,\
48 .put = snd_soc_put_volsw, \ 52 .put = snd_soc_put_volsw, \
49 .private_value = SOC_SINGLE_VALUE(reg, shift, max, invert) } 53 .private_value = SOC_SINGLE_VALUE(reg, shift, max, invert) }
54#define SOC_SINGLE_RANGE(xname, xreg, xshift, xmin, xmax, xinvert) \
55{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = (xname),\
56 .info = snd_soc_info_volsw_range, .get = snd_soc_get_volsw_range, \
57 .put = snd_soc_put_volsw_range, \
58 .private_value = (unsigned long)&(struct soc_mixer_control) \
59 {.reg = xreg, .shift = xshift, .min = xmin,\
60 .max = xmax, .platform_max = xmax, .invert = xinvert} }
50#define SOC_SINGLE_TLV(xname, reg, shift, max, invert, tlv_array) \ 61#define SOC_SINGLE_TLV(xname, reg, shift, max, invert, tlv_array) \
51{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \ 62{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \
52 .access = SNDRV_CTL_ELEM_ACCESS_TLV_READ |\ 63 .access = SNDRV_CTL_ELEM_ACCESS_TLV_READ |\
@@ -67,6 +78,16 @@
67 {.reg = xreg, .rreg = xreg, \ 78 {.reg = xreg, .rreg = xreg, \
68 .shift = xshift, .rshift = xshift, \ 79 .shift = xshift, .rshift = xshift, \
69 .max = xmax, .min = xmin} } 80 .max = xmax, .min = xmin} }
81#define SOC_SINGLE_RANGE_TLV(xname, xreg, xshift, xmin, xmax, xinvert, tlv_array) \
82{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = (xname),\
83 .access = SNDRV_CTL_ELEM_ACCESS_TLV_READ |\
84 SNDRV_CTL_ELEM_ACCESS_READWRITE,\
85 .tlv.p = (tlv_array), \
86 .info = snd_soc_info_volsw_range, \
87 .get = snd_soc_get_volsw_range, .put = snd_soc_put_volsw_range, \
88 .private_value = (unsigned long)&(struct soc_mixer_control) \
89 {.reg = xreg, .shift = xshift, .min = xmin,\
90 .max = xmax, .platform_max = xmax, .invert = xinvert} }
70#define SOC_DOUBLE(xname, reg, shift_left, shift_right, max, invert) \ 91#define SOC_DOUBLE(xname, reg, shift_left, shift_right, max, invert) \
71{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = (xname),\ 92{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = (xname),\
72 .info = snd_soc_info_volsw, .get = snd_soc_get_volsw, \ 93 .info = snd_soc_info_volsw, .get = snd_soc_get_volsw, \
@@ -79,6 +100,13 @@
79 .get = snd_soc_get_volsw, .put = snd_soc_put_volsw, \ 100 .get = snd_soc_get_volsw, .put = snd_soc_put_volsw, \
80 .private_value = SOC_DOUBLE_R_VALUE(reg_left, reg_right, xshift, \ 101 .private_value = SOC_DOUBLE_R_VALUE(reg_left, reg_right, xshift, \
81 xmax, xinvert) } 102 xmax, xinvert) }
103#define SOC_DOUBLE_R_RANGE(xname, reg_left, reg_right, xshift, xmin, \
104 xmax, xinvert) \
105{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = (xname),\
106 .info = snd_soc_info_volsw_range, \
107 .get = snd_soc_get_volsw_range, .put = snd_soc_put_volsw_range, \
108 .private_value = SOC_DOUBLE_R_RANGE_VALUE(reg_left, reg_right, \
109 xshift, xmin, xmax, xinvert) }
82#define SOC_DOUBLE_TLV(xname, reg, shift_left, shift_right, max, invert, tlv_array) \ 110#define SOC_DOUBLE_TLV(xname, reg, shift_left, shift_right, max, invert, tlv_array) \
83{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = (xname),\ 111{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = (xname),\
84 .access = SNDRV_CTL_ELEM_ACCESS_TLV_READ |\ 112 .access = SNDRV_CTL_ELEM_ACCESS_TLV_READ |\
@@ -97,6 +125,16 @@
97 .get = snd_soc_get_volsw, .put = snd_soc_put_volsw, \ 125 .get = snd_soc_get_volsw, .put = snd_soc_put_volsw, \
98 .private_value = SOC_DOUBLE_R_VALUE(reg_left, reg_right, xshift, \ 126 .private_value = SOC_DOUBLE_R_VALUE(reg_left, reg_right, xshift, \
99 xmax, xinvert) } 127 xmax, xinvert) }
128#define SOC_DOUBLE_R_RANGE_TLV(xname, reg_left, reg_right, xshift, xmin, \
129 xmax, xinvert, tlv_array) \
130{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = (xname),\
131 .access = SNDRV_CTL_ELEM_ACCESS_TLV_READ |\
132 SNDRV_CTL_ELEM_ACCESS_READWRITE,\
133 .tlv.p = (tlv_array), \
134 .info = snd_soc_info_volsw_range, \
135 .get = snd_soc_get_volsw_range, .put = snd_soc_put_volsw_range, \
136 .private_value = SOC_DOUBLE_R_RANGE_VALUE(reg_left, reg_right, \
137 xshift, xmin, xmax, xinvert) }
100#define SOC_DOUBLE_R_SX_TLV(xname, xreg, xrreg, xshift, xmin, xmax, tlv_array) \ 138#define SOC_DOUBLE_R_SX_TLV(xname, xreg, xrreg, xshift, xmin, xmax, tlv_array) \
101{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = (xname), \ 139{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = (xname), \
102 .access = SNDRV_CTL_ELEM_ACCESS_TLV_READ | \ 140 .access = SNDRV_CTL_ELEM_ACCESS_TLV_READ | \
@@ -460,6 +498,12 @@ int snd_soc_get_volsw_s8(struct snd_kcontrol *kcontrol,
460 struct snd_ctl_elem_value *ucontrol); 498 struct snd_ctl_elem_value *ucontrol);
461int snd_soc_put_volsw_s8(struct snd_kcontrol *kcontrol, 499int snd_soc_put_volsw_s8(struct snd_kcontrol *kcontrol,
462 struct snd_ctl_elem_value *ucontrol); 500 struct snd_ctl_elem_value *ucontrol);
501int snd_soc_info_volsw_range(struct snd_kcontrol *kcontrol,
502 struct snd_ctl_elem_info *uinfo);
503int snd_soc_put_volsw_range(struct snd_kcontrol *kcontrol,
504 struct snd_ctl_elem_value *ucontrol);
505int snd_soc_get_volsw_range(struct snd_kcontrol *kcontrol,
506 struct snd_ctl_elem_value *ucontrol);
463int snd_soc_limit_volume(struct snd_soc_codec *codec, 507int snd_soc_limit_volume(struct snd_soc_codec *codec,
464 const char *name, int max); 508 const char *name, int max);
465int snd_soc_bytes_info(struct snd_kcontrol *kcontrol, 509int snd_soc_bytes_info(struct snd_kcontrol *kcontrol,
@@ -785,13 +829,36 @@ struct snd_soc_dai_link {
785 /* config - must be set by machine driver */ 829 /* config - must be set by machine driver */
786 const char *name; /* Codec name */ 830 const char *name; /* Codec name */
787 const char *stream_name; /* Stream name */ 831 const char *stream_name; /* Stream name */
788 const char *codec_name; /* for multi-codec */ 832 /*
789 const struct device_node *codec_of_node; 833 * You MAY specify the link's CPU-side device, either by device name,
790 const char *platform_name; /* for multi-platform */ 834 * or by DT/OF node, but not both. If this information is omitted,
791 const struct device_node *platform_of_node; 835 * the CPU-side DAI is matched using .cpu_dai_name only, which hence
836 * must be globally unique. These fields are currently typically used
837 * only for codec to codec links, or systems using device tree.
838 */
839 const char *cpu_name;
840 const struct device_node *cpu_of_node;
841 /*
842 * You MAY specify the DAI name of the CPU DAI. If this information is
843 * omitted, the CPU-side DAI is matched using .cpu_name/.cpu_of_node
844 * only, which only works well when that device exposes a single DAI.
845 */
792 const char *cpu_dai_name; 846 const char *cpu_dai_name;
793 const struct device_node *cpu_dai_of_node; 847 /*
848 * You MUST specify the link's codec, either by device name, or by
849 * DT/OF node, but not both.
850 */
851 const char *codec_name;
852 const struct device_node *codec_of_node;
853 /* You MUST specify the DAI name within the codec */
794 const char *codec_dai_name; 854 const char *codec_dai_name;
855 /*
856 * You MAY specify the link's platform/PCM/DMA driver, either by
857 * device name, or by DT/OF node, but not both. Some forms of link
858 * do not need a platform.
859 */
860 const char *platform_name;
861 const struct device_node *platform_of_node;
795 int be_id; /* optional ID for machine driver BE identification */ 862 int be_id; /* optional ID for machine driver BE identification */
796 863
797 const struct snd_soc_pcm_stream *params; 864 const struct snd_soc_pcm_stream *params;
diff --git a/include/sound/spear_dma.h b/include/sound/spear_dma.h
new file mode 100644
index 000000000000..1b365bfdfb37
--- /dev/null
+++ b/include/sound/spear_dma.h
@@ -0,0 +1,35 @@
1/*
2* linux/spear_dma.h
3*
4* Copyright (ST) 2012 Rajeev Kumar (rajeev-dlh.kumar@st.com)
5*
6* This program is free software; you can redistribute it and/or modify
7* it under the terms of the GNU General Public License as published by
8* the Free Software Foundation; either version 2 of the License, or
9* (at your option) any later version.
10*
11* This program is distributed in the hope that it will be useful,
12* but WITHOUT ANY WARRANTY; without even the implied warranty of
13* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14* GNU General Public License for more details.
15*
16* You should have received a copy of the GNU General Public License
17* along with this program; if not, write to the Free Software
18* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19*
20*/
21
22#ifndef SPEAR_DMA_H
23#define SPEAR_DMA_H
24
25#include <linux/dmaengine.h>
26
27struct spear_dma_data {
28 void *data;
29 dma_addr_t addr;
30 u32 max_burst;
31 enum dma_slave_buswidth addr_width;
32 bool (*filter)(struct dma_chan *chan, void *slave);
33};
34
35#endif /* SPEAR_DMA_H */
diff --git a/include/sound/spear_spdif.h b/include/sound/spear_spdif.h
new file mode 100644
index 000000000000..a12f39695610
--- /dev/null
+++ b/include/sound/spear_spdif.h
@@ -0,0 +1,29 @@
1/*
2 * Copyright (ST) 2012 Vipin Kumar (vipin.kumar@st.com)
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 */
18
19#ifndef __SOUND_SPDIF_H
20#define __SOUND_SPDIF_H
21
22struct spear_spdif_platform_data {
23 /* DMA params */
24 void *dma_params;
25 bool (*filter)(struct dma_chan *chan, void *slave);
26 void (*reset_perip)(void);
27};
28
29#endif /* SOUND_SPDIF_H */