diff options
author | Takashi Iwai <tiwai@suse.de> | 2013-04-15 13:45:16 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2013-04-15 13:45:16 -0400 |
commit | ad2109d7d258a92fa016f1f36b423bfcc69f7efc (patch) | |
tree | f1a98ab99b8e80c376b13ac3a82d750ab9b179cf /include/sound | |
parent | cbc200bca4b51a8e2406d4b654d978f8503d430b (diff) | |
parent | 5cbad7d39ad229c68a724e5e139fd845b93766b2 (diff) |
Merge tag 'asoc-v3.10' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next
ASoC: Updates for v3.10
A bunch of changes here, the most interesting one subsystem wise being
Morimoto-san's work to create snd_soc_component which doesn't do much
for now but will be pretty important going forwards:
- Add a new component object type which will form the basis of moving
to a more generic handling of SoC and off-SoC components, contributed
by Kuninori Morimoto.
- A fairly large set of cleanups for the dmaengine integration from
Lars-Peter Clausen, starting to move towards being able to have a
generic driver based on the library.
- Performance optimisations to DAPM from Ryo Tsutsui.
- Support for mixer control sharing in DAPM from Stephen Warren.
- Multiplatform ARM cleanups from Arnd Bergmann.
- New CODEC drivers for AK5385 and TAS5086 from Daniel Mack.
Diffstat (limited to 'include/sound')
-rw-r--r-- | include/sound/dmaengine_pcm.h | 27 | ||||
-rw-r--r-- | include/sound/soc-dai.h | 8 | ||||
-rw-r--r-- | include/sound/soc-dapm.h | 1 | ||||
-rw-r--r-- | include/sound/soc.h | 29 | ||||
-rw-r--r-- | include/sound/tas5086.h | 7 | ||||
-rw-r--r-- | include/sound/tegra_wm8903.h | 26 |
6 files changed, 55 insertions, 43 deletions
diff --git a/include/sound/dmaengine_pcm.h b/include/sound/dmaengine_pcm.h index b877334bbb0f..95620428a59b 100644 --- a/include/sound/dmaengine_pcm.h +++ b/include/sound/dmaengine_pcm.h | |||
@@ -32,9 +32,6 @@ snd_pcm_substream_to_dma_direction(const struct snd_pcm_substream *substream) | |||
32 | return DMA_DEV_TO_MEM; | 32 | return DMA_DEV_TO_MEM; |
33 | } | 33 | } |
34 | 34 | ||
35 | void snd_dmaengine_pcm_set_data(struct snd_pcm_substream *substream, void *data); | ||
36 | void *snd_dmaengine_pcm_get_data(struct snd_pcm_substream *substream); | ||
37 | |||
38 | int snd_hwparams_to_dma_slave_config(const struct snd_pcm_substream *substream, | 35 | 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); | 36 | const struct snd_pcm_hw_params *params, struct dma_slave_config *slave_config); |
40 | int snd_dmaengine_pcm_trigger(struct snd_pcm_substream *substream, int cmd); | 37 | int snd_dmaengine_pcm_trigger(struct snd_pcm_substream *substream, int cmd); |
@@ -47,4 +44,28 @@ int snd_dmaengine_pcm_close(struct snd_pcm_substream *substream); | |||
47 | 44 | ||
48 | struct dma_chan *snd_dmaengine_pcm_get_chan(struct snd_pcm_substream *substream); | 45 | struct dma_chan *snd_dmaengine_pcm_get_chan(struct snd_pcm_substream *substream); |
49 | 46 | ||
47 | /** | ||
48 | * struct snd_dmaengine_dai_dma_data - DAI DMA configuration data | ||
49 | * @addr: Address of the DAI data source or destination register. | ||
50 | * @addr_width: Width of the DAI data source or destination register. | ||
51 | * @maxburst: Maximum number of words(note: words, as in units of the | ||
52 | * src_addr_width member, not bytes) that can be send to or received from the | ||
53 | * DAI in one burst. | ||
54 | * @slave_id: Slave requester id for the DMA channel. | ||
55 | * @filter_data: Custom DMA channel filter data, this will usually be used when | ||
56 | * requesting the DMA channel. | ||
57 | */ | ||
58 | struct snd_dmaengine_dai_dma_data { | ||
59 | dma_addr_t addr; | ||
60 | enum dma_slave_buswidth addr_width; | ||
61 | u32 maxburst; | ||
62 | unsigned int slave_id; | ||
63 | void *filter_data; | ||
64 | }; | ||
65 | |||
66 | void snd_dmaengine_pcm_set_config_from_dai_data( | ||
67 | const struct snd_pcm_substream *substream, | ||
68 | const struct snd_dmaengine_dai_dma_data *dma_data, | ||
69 | struct dma_slave_config *config); | ||
70 | |||
50 | #endif | 71 | #endif |
diff --git a/include/sound/soc-dai.h b/include/sound/soc-dai.h index 3d84808952b9..ae9a227d35d3 100644 --- a/include/sound/soc-dai.h +++ b/include/sound/soc-dai.h | |||
@@ -95,14 +95,6 @@ struct snd_soc_dai_driver; | |||
95 | struct snd_soc_dai; | 95 | struct snd_soc_dai; |
96 | struct snd_ac97_bus_ops; | 96 | struct snd_ac97_bus_ops; |
97 | 97 | ||
98 | /* Digital Audio Interface registration */ | ||
99 | int snd_soc_register_dai(struct device *dev, | ||
100 | struct snd_soc_dai_driver *dai_drv); | ||
101 | void snd_soc_unregister_dai(struct device *dev); | ||
102 | int snd_soc_register_dais(struct device *dev, | ||
103 | struct snd_soc_dai_driver *dai_drv, size_t count); | ||
104 | void snd_soc_unregister_dais(struct device *dev, size_t count); | ||
105 | |||
106 | /* Digital Audio Interface clocking API.*/ | 98 | /* Digital Audio Interface clocking API.*/ |
107 | int snd_soc_dai_set_sysclk(struct snd_soc_dai *dai, int clk_id, | 99 | int snd_soc_dai_set_sysclk(struct snd_soc_dai *dai, int clk_id, |
108 | unsigned int freq, int dir); | 100 | unsigned int freq, int dir); |
diff --git a/include/sound/soc-dapm.h b/include/sound/soc-dapm.h index 44a30b108683..d4609029f014 100644 --- a/include/sound/soc-dapm.h +++ b/include/sound/soc-dapm.h | |||
@@ -566,7 +566,6 @@ struct snd_soc_dapm_update { | |||
566 | 566 | ||
567 | /* DAPM context */ | 567 | /* DAPM context */ |
568 | struct snd_soc_dapm_context { | 568 | struct snd_soc_dapm_context { |
569 | int n_widgets; /* number of widgets in this context */ | ||
570 | enum snd_soc_bias_level bias_level; | 569 | enum snd_soc_bias_level bias_level; |
571 | enum snd_soc_bias_level suspend_bias_level; | 570 | enum snd_soc_bias_level suspend_bias_level; |
572 | struct delayed_work delayed_work; | 571 | struct delayed_work delayed_work; |
diff --git a/include/sound/soc.h b/include/sound/soc.h index a6a059ca3874..9eb0e4db4835 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h | |||
@@ -324,6 +324,8 @@ struct snd_soc_dai_link; | |||
324 | struct snd_soc_platform_driver; | 324 | struct snd_soc_platform_driver; |
325 | struct snd_soc_codec; | 325 | struct snd_soc_codec; |
326 | struct snd_soc_codec_driver; | 326 | struct snd_soc_codec_driver; |
327 | struct snd_soc_component; | ||
328 | struct snd_soc_component_driver; | ||
327 | struct soc_enum; | 329 | struct soc_enum; |
328 | struct snd_soc_jack; | 330 | struct snd_soc_jack; |
329 | struct snd_soc_jack_zone; | 331 | struct snd_soc_jack_zone; |
@@ -371,12 +373,16 @@ int snd_soc_suspend(struct device *dev); | |||
371 | int snd_soc_resume(struct device *dev); | 373 | int snd_soc_resume(struct device *dev); |
372 | int snd_soc_poweroff(struct device *dev); | 374 | int snd_soc_poweroff(struct device *dev); |
373 | int snd_soc_register_platform(struct device *dev, | 375 | int snd_soc_register_platform(struct device *dev, |
374 | struct snd_soc_platform_driver *platform_drv); | 376 | const struct snd_soc_platform_driver *platform_drv); |
375 | void snd_soc_unregister_platform(struct device *dev); | 377 | void snd_soc_unregister_platform(struct device *dev); |
376 | int snd_soc_register_codec(struct device *dev, | 378 | int snd_soc_register_codec(struct device *dev, |
377 | const struct snd_soc_codec_driver *codec_drv, | 379 | const struct snd_soc_codec_driver *codec_drv, |
378 | struct snd_soc_dai_driver *dai_drv, int num_dai); | 380 | struct snd_soc_dai_driver *dai_drv, int num_dai); |
379 | void snd_soc_unregister_codec(struct device *dev); | 381 | void snd_soc_unregister_codec(struct device *dev); |
382 | int snd_soc_register_component(struct device *dev, | ||
383 | const struct snd_soc_component_driver *cmpnt_drv, | ||
384 | struct snd_soc_dai_driver *dai_drv, int num_dai); | ||
385 | void snd_soc_unregister_component(struct device *dev); | ||
380 | int snd_soc_codec_volatile_register(struct snd_soc_codec *codec, | 386 | int snd_soc_codec_volatile_register(struct snd_soc_codec *codec, |
381 | unsigned int reg); | 387 | unsigned int reg); |
382 | int snd_soc_codec_readable_register(struct snd_soc_codec *codec, | 388 | int snd_soc_codec_readable_register(struct snd_soc_codec *codec, |
@@ -801,10 +807,10 @@ struct snd_soc_platform_driver { | |||
801 | struct snd_soc_dai *); | 807 | struct snd_soc_dai *); |
802 | 808 | ||
803 | /* platform stream pcm ops */ | 809 | /* platform stream pcm ops */ |
804 | struct snd_pcm_ops *ops; | 810 | const struct snd_pcm_ops *ops; |
805 | 811 | ||
806 | /* platform stream compress ops */ | 812 | /* platform stream compress ops */ |
807 | struct snd_compr_ops *compr_ops; | 813 | const struct snd_compr_ops *compr_ops; |
808 | 814 | ||
809 | /* platform stream completion event */ | 815 | /* platform stream completion event */ |
810 | int (*stream_event)(struct snd_soc_dapm_context *dapm, int event); | 816 | int (*stream_event)(struct snd_soc_dapm_context *dapm, int event); |
@@ -823,7 +829,7 @@ struct snd_soc_platform { | |||
823 | const char *name; | 829 | const char *name; |
824 | int id; | 830 | int id; |
825 | struct device *dev; | 831 | struct device *dev; |
826 | struct snd_soc_platform_driver *driver; | 832 | const struct snd_soc_platform_driver *driver; |
827 | struct mutex mutex; | 833 | struct mutex mutex; |
828 | 834 | ||
829 | unsigned int suspended:1; /* platform is suspended */ | 835 | unsigned int suspended:1; /* platform is suspended */ |
@@ -841,6 +847,20 @@ struct snd_soc_platform { | |||
841 | #endif | 847 | #endif |
842 | }; | 848 | }; |
843 | 849 | ||
850 | struct snd_soc_component_driver { | ||
851 | const char *name; | ||
852 | }; | ||
853 | |||
854 | struct snd_soc_component { | ||
855 | const char *name; | ||
856 | int id; | ||
857 | int num_dai; | ||
858 | struct device *dev; | ||
859 | struct list_head list; | ||
860 | |||
861 | const struct snd_soc_component_driver *driver; | ||
862 | }; | ||
863 | |||
844 | struct snd_soc_dai_link { | 864 | struct snd_soc_dai_link { |
845 | /* config - must be set by machine driver */ | 865 | /* config - must be set by machine driver */ |
846 | const char *name; /* Codec name */ | 866 | const char *name; /* Codec name */ |
@@ -1086,7 +1106,6 @@ struct soc_enum { | |||
1086 | unsigned int mask; | 1106 | unsigned int mask; |
1087 | const char * const *texts; | 1107 | const char * const *texts; |
1088 | const unsigned int *values; | 1108 | const unsigned int *values; |
1089 | void *dapm; | ||
1090 | }; | 1109 | }; |
1091 | 1110 | ||
1092 | /* codec IO */ | 1111 | /* codec IO */ |
diff --git a/include/sound/tas5086.h b/include/sound/tas5086.h new file mode 100644 index 000000000000..aac481b7db8f --- /dev/null +++ b/include/sound/tas5086.h | |||
@@ -0,0 +1,7 @@ | |||
1 | #ifndef _SND_SOC_CODEC_TAS5086_H_ | ||
2 | #define _SND_SOC_CODEC_TAS5086_H_ | ||
3 | |||
4 | #define TAS5086_CLK_IDX_MCLK 0 | ||
5 | #define TAS5086_CLK_IDX_SCLK 1 | ||
6 | |||
7 | #endif /* _SND_SOC_CODEC_TAS5086_H_ */ | ||
diff --git a/include/sound/tegra_wm8903.h b/include/sound/tegra_wm8903.h deleted file mode 100644 index 57b202ee97c3..000000000000 --- a/include/sound/tegra_wm8903.h +++ /dev/null | |||
@@ -1,26 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright 2011 NVIDIA, Inc. | ||
3 | * | ||
4 | * This software is licensed under the terms of the GNU General Public | ||
5 | * License version 2, as published by the Free Software Foundation, and | ||
6 | * may be copied, distributed, and modified under those terms. | ||
7 | * | ||
8 | * This program is distributed in the hope that it will be useful, | ||
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
11 | * GNU General Public License for more details. | ||
12 | * | ||
13 | */ | ||
14 | |||
15 | #ifndef __SOUND_TEGRA_WM38903_H | ||
16 | #define __SOUND_TEGRA_WM38903_H | ||
17 | |||
18 | struct tegra_wm8903_platform_data { | ||
19 | int gpio_spkr_en; | ||
20 | int gpio_hp_det; | ||
21 | int gpio_hp_mute; | ||
22 | int gpio_int_mic_en; | ||
23 | int gpio_ext_mic_en; | ||
24 | }; | ||
25 | |||
26 | #endif | ||