diff options
Diffstat (limited to 'include/sound')
-rw-r--r-- | include/sound/cs42l52.h | 14 | ||||
-rw-r--r-- | include/sound/dmaengine_pcm.h | 10 | ||||
-rw-r--r-- | include/sound/memalloc.h | 2 | ||||
-rw-r--r-- | include/sound/pcm_params.h | 12 | ||||
-rw-r--r-- | include/sound/rcar_snd.h | 3 | ||||
-rw-r--r-- | include/sound/soc-dai.h | 6 | ||||
-rw-r--r-- | include/sound/soc-dapm.h | 3 | ||||
-rw-r--r-- | include/sound/soc.h | 17 | ||||
-rw-r--r-- | include/sound/spear_dma.h | 1 |
9 files changed, 50 insertions, 18 deletions
diff --git a/include/sound/cs42l52.h b/include/sound/cs42l52.h index 7c2be4a51894..bbabf84bdb44 100644 --- a/include/sound/cs42l52.h +++ b/include/sound/cs42l52.h | |||
@@ -16,17 +16,11 @@ struct cs42l52_platform_data { | |||
16 | /* MICBIAS Level. Check datasheet Pg48 */ | 16 | /* MICBIAS Level. Check datasheet Pg48 */ |
17 | unsigned int micbias_lvl; | 17 | unsigned int micbias_lvl; |
18 | 18 | ||
19 | /* MICA mode selection 0=Single 1=Differential */ | 19 | /* MICA mode selection Differential or Single-ended */ |
20 | unsigned int mica_cfg; | 20 | bool mica_diff_cfg; |
21 | 21 | ||
22 | /* MICB mode selection 0=Single 1=Differential */ | 22 | /* MICB mode selection Differential or Single-ended */ |
23 | unsigned int micb_cfg; | 23 | bool micb_diff_cfg; |
24 | |||
25 | /* MICA Select 0=MIC1A 1=MIC2A */ | ||
26 | unsigned int mica_sel; | ||
27 | |||
28 | /* MICB Select 0=MIC2A 1=MIC2B */ | ||
29 | unsigned int micb_sel; | ||
30 | 24 | ||
31 | /* Charge Pump Freq. Check datasheet Pg73 */ | 25 | /* Charge Pump Freq. Check datasheet Pg73 */ |
32 | unsigned int chgfreq; | 26 | unsigned int chgfreq; |
diff --git a/include/sound/dmaengine_pcm.h b/include/sound/dmaengine_pcm.h index 15017311f2e9..eb73a3a39ec2 100644 --- a/include/sound/dmaengine_pcm.h +++ b/include/sound/dmaengine_pcm.h | |||
@@ -114,6 +114,10 @@ void snd_dmaengine_pcm_set_config_from_dai_data( | |||
114 | * @compat_filter_fn: Will be used as the filter function when requesting a | 114 | * @compat_filter_fn: Will be used as the filter function when requesting a |
115 | * channel for platforms which do not use devicetree. The filter parameter | 115 | * channel for platforms which do not use devicetree. The filter parameter |
116 | * will be the DAI's DMA data. | 116 | * will be the DAI's DMA data. |
117 | * @dma_dev: If set, request DMA channel on this device rather than the DAI | ||
118 | * device. | ||
119 | * @chan_names: If set, these custom DMA channel names will be requested at | ||
120 | * registration time. | ||
117 | * @pcm_hardware: snd_pcm_hardware struct to be used for the PCM. | 121 | * @pcm_hardware: snd_pcm_hardware struct to be used for the PCM. |
118 | * @prealloc_buffer_size: Size of the preallocated audio buffer. | 122 | * @prealloc_buffer_size: Size of the preallocated audio buffer. |
119 | * | 123 | * |
@@ -130,6 +134,8 @@ struct snd_dmaengine_pcm_config { | |||
130 | struct snd_soc_pcm_runtime *rtd, | 134 | struct snd_soc_pcm_runtime *rtd, |
131 | struct snd_pcm_substream *substream); | 135 | struct snd_pcm_substream *substream); |
132 | dma_filter_fn compat_filter_fn; | 136 | dma_filter_fn compat_filter_fn; |
137 | struct device *dma_dev; | ||
138 | const char *chan_names[SNDRV_PCM_STREAM_LAST + 1]; | ||
133 | 139 | ||
134 | const struct snd_pcm_hardware *pcm_hardware; | 140 | const struct snd_pcm_hardware *pcm_hardware; |
135 | unsigned int prealloc_buffer_size; | 141 | unsigned int prealloc_buffer_size; |
@@ -140,6 +146,10 @@ int snd_dmaengine_pcm_register(struct device *dev, | |||
140 | unsigned int flags); | 146 | unsigned int flags); |
141 | void snd_dmaengine_pcm_unregister(struct device *dev); | 147 | void snd_dmaengine_pcm_unregister(struct device *dev); |
142 | 148 | ||
149 | int devm_snd_dmaengine_pcm_register(struct device *dev, | ||
150 | const struct snd_dmaengine_pcm_config *config, | ||
151 | unsigned int flags); | ||
152 | |||
143 | int snd_dmaengine_pcm_prepare_slave_config(struct snd_pcm_substream *substream, | 153 | int snd_dmaengine_pcm_prepare_slave_config(struct snd_pcm_substream *substream, |
144 | struct snd_pcm_hw_params *params, | 154 | struct snd_pcm_hw_params *params, |
145 | struct dma_slave_config *slave_config); | 155 | struct dma_slave_config *slave_config); |
diff --git a/include/sound/memalloc.h b/include/sound/memalloc.h index af9983970417..5f73785f5977 100644 --- a/include/sound/memalloc.h +++ b/include/sound/memalloc.h | |||
@@ -108,7 +108,7 @@ static inline dma_addr_t snd_sgbuf_get_addr(struct snd_dma_buffer *dmab, | |||
108 | { | 108 | { |
109 | struct snd_sg_buf *sgbuf = dmab->private_data; | 109 | struct snd_sg_buf *sgbuf = dmab->private_data; |
110 | dma_addr_t addr = sgbuf->table[offset >> PAGE_SHIFT].addr; | 110 | dma_addr_t addr = sgbuf->table[offset >> PAGE_SHIFT].addr; |
111 | addr &= PAGE_MASK; | 111 | addr &= ~((dma_addr_t)PAGE_SIZE - 1); |
112 | return addr + offset % PAGE_SIZE; | 112 | return addr + offset % PAGE_SIZE; |
113 | } | 113 | } |
114 | 114 | ||
diff --git a/include/sound/pcm_params.h b/include/sound/pcm_params.h index 37ae12e0ab06..6b1c78f05fab 100644 --- a/include/sound/pcm_params.h +++ b/include/sound/pcm_params.h | |||
@@ -354,4 +354,16 @@ params_period_bytes(const struct snd_pcm_hw_params *p) | |||
354 | params_channels(p)) / 8; | 354 | params_channels(p)) / 8; |
355 | } | 355 | } |
356 | 356 | ||
357 | static inline int | ||
358 | params_width(const struct snd_pcm_hw_params *p) | ||
359 | { | ||
360 | return snd_pcm_format_width(params_format(p)); | ||
361 | } | ||
362 | |||
363 | static inline int | ||
364 | params_physical_width(const struct snd_pcm_hw_params *p) | ||
365 | { | ||
366 | return snd_pcm_format_physical_width(params_format(p)); | ||
367 | } | ||
368 | |||
357 | #endif /* __SOUND_PCM_PARAMS_H */ | 369 | #endif /* __SOUND_PCM_PARAMS_H */ |
diff --git a/include/sound/rcar_snd.h b/include/sound/rcar_snd.h index 12afab18945d..e147498abe50 100644 --- a/include/sound/rcar_snd.h +++ b/include/sound/rcar_snd.h | |||
@@ -18,7 +18,7 @@ | |||
18 | #define RSND_GEN1_ADG 1 | 18 | #define RSND_GEN1_ADG 1 |
19 | #define RSND_GEN1_SSI 2 | 19 | #define RSND_GEN1_SSI 2 |
20 | 20 | ||
21 | #define RSND_GEN2_SRU 0 | 21 | #define RSND_GEN2_SCU 0 |
22 | #define RSND_GEN2_ADG 1 | 22 | #define RSND_GEN2_ADG 1 |
23 | #define RSND_GEN2_SSIU 2 | 23 | #define RSND_GEN2_SSIU 2 |
24 | #define RSND_GEN2_SSI 3 | 24 | #define RSND_GEN2_SSI 3 |
@@ -58,6 +58,7 @@ struct rsnd_ssi_platform_info { | |||
58 | 58 | ||
59 | struct rsnd_scu_platform_info { | 59 | struct rsnd_scu_platform_info { |
60 | u32 flags; | 60 | u32 flags; |
61 | u32 convert_rate; /* sampling rate convert */ | ||
61 | }; | 62 | }; |
62 | 63 | ||
63 | /* | 64 | /* |
diff --git a/include/sound/soc-dai.h b/include/sound/soc-dai.h index 800c101bb096..243d3b689699 100644 --- a/include/sound/soc-dai.h +++ b/include/sound/soc-dai.h | |||
@@ -220,6 +220,8 @@ struct snd_soc_dai_driver { | |||
220 | struct snd_soc_pcm_stream capture; | 220 | struct snd_soc_pcm_stream capture; |
221 | struct snd_soc_pcm_stream playback; | 221 | struct snd_soc_pcm_stream playback; |
222 | unsigned int symmetric_rates:1; | 222 | unsigned int symmetric_rates:1; |
223 | unsigned int symmetric_channels:1; | ||
224 | unsigned int symmetric_samplebits:1; | ||
223 | 225 | ||
224 | /* probe ordering - for components with runtime dependencies */ | 226 | /* probe ordering - for components with runtime dependencies */ |
225 | int probe_order; | 227 | int probe_order; |
@@ -244,6 +246,8 @@ struct snd_soc_dai { | |||
244 | unsigned int capture_active:1; /* stream is in use */ | 246 | unsigned int capture_active:1; /* stream is in use */ |
245 | unsigned int playback_active:1; /* stream is in use */ | 247 | unsigned int playback_active:1; /* stream is in use */ |
246 | unsigned int symmetric_rates:1; | 248 | unsigned int symmetric_rates:1; |
249 | unsigned int symmetric_channels:1; | ||
250 | unsigned int symmetric_samplebits:1; | ||
247 | struct snd_pcm_runtime *runtime; | 251 | struct snd_pcm_runtime *runtime; |
248 | unsigned int active; | 252 | unsigned int active; |
249 | unsigned char probed:1; | 253 | unsigned char probed:1; |
@@ -258,6 +262,8 @@ struct snd_soc_dai { | |||
258 | 262 | ||
259 | /* Symmetry data - only valid if symmetry is being enforced */ | 263 | /* Symmetry data - only valid if symmetry is being enforced */ |
260 | unsigned int rate; | 264 | unsigned int rate; |
265 | unsigned int channels; | ||
266 | unsigned int sample_bits; | ||
261 | 267 | ||
262 | /* parent platform/codec */ | 268 | /* parent platform/codec */ |
263 | struct snd_soc_platform *platform; | 269 | struct snd_soc_platform *platform; |
diff --git a/include/sound/soc-dapm.h b/include/sound/soc-dapm.h index 2037c45adfe6..56ebdfca6273 100644 --- a/include/sound/soc-dapm.h +++ b/include/sound/soc-dapm.h | |||
@@ -104,7 +104,8 @@ struct device; | |||
104 | SND_SOC_DAPM_INIT_REG_VAL(wreg, wshift, winvert), \ | 104 | SND_SOC_DAPM_INIT_REG_VAL(wreg, wshift, winvert), \ |
105 | .kcontrol_news = wcontrols, .num_kcontrols = 1} | 105 | .kcontrol_news = wcontrols, .num_kcontrols = 1} |
106 | #define SND_SOC_DAPM_MUX(wname, wreg, wshift, winvert, wcontrols) \ | 106 | #define SND_SOC_DAPM_MUX(wname, wreg, wshift, winvert, wcontrols) \ |
107 | { .id = snd_soc_dapm_mux, .name = wname, .reg = wreg, \ | 107 | { .id = snd_soc_dapm_mux, .name = wname, \ |
108 | SND_SOC_DAPM_INIT_REG_VAL(wreg, wshift, winvert), \ | ||
108 | .kcontrol_news = wcontrols, .num_kcontrols = 1} | 109 | .kcontrol_news = wcontrols, .num_kcontrols = 1} |
109 | #define SND_SOC_DAPM_VIRT_MUX(wname, wreg, wshift, winvert, wcontrols) \ | 110 | #define SND_SOC_DAPM_VIRT_MUX(wname, wreg, wshift, winvert, wcontrols) \ |
110 | { .id = snd_soc_dapm_virt_mux, .name = wname, \ | 111 | { .id = snd_soc_dapm_virt_mux, .name = wname, \ |
diff --git a/include/sound/soc.h b/include/sound/soc.h index 1f741cb24f33..5a049d969c59 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h | |||
@@ -334,9 +334,7 @@ struct snd_soc_jack_pin; | |||
334 | #include <sound/soc-dapm.h> | 334 | #include <sound/soc-dapm.h> |
335 | #include <sound/soc-dpcm.h> | 335 | #include <sound/soc-dpcm.h> |
336 | 336 | ||
337 | #ifdef CONFIG_GPIOLIB | ||
338 | struct snd_soc_jack_gpio; | 337 | struct snd_soc_jack_gpio; |
339 | #endif | ||
340 | 338 | ||
341 | typedef int (*hw_write_t)(void *,const char* ,int); | 339 | typedef int (*hw_write_t)(void *,const char* ,int); |
342 | 340 | ||
@@ -446,6 +444,17 @@ int snd_soc_jack_add_gpios(struct snd_soc_jack *jack, int count, | |||
446 | struct snd_soc_jack_gpio *gpios); | 444 | struct snd_soc_jack_gpio *gpios); |
447 | void snd_soc_jack_free_gpios(struct snd_soc_jack *jack, int count, | 445 | void snd_soc_jack_free_gpios(struct snd_soc_jack *jack, int count, |
448 | struct snd_soc_jack_gpio *gpios); | 446 | struct snd_soc_jack_gpio *gpios); |
447 | #else | ||
448 | static inline int snd_soc_jack_add_gpios(struct snd_soc_jack *jack, int count, | ||
449 | struct snd_soc_jack_gpio *gpios) | ||
450 | { | ||
451 | return 0; | ||
452 | } | ||
453 | |||
454 | static inline void snd_soc_jack_free_gpios(struct snd_soc_jack *jack, int count, | ||
455 | struct snd_soc_jack_gpio *gpios) | ||
456 | { | ||
457 | } | ||
449 | #endif | 458 | #endif |
450 | 459 | ||
451 | /* codec register bit access */ | 460 | /* codec register bit access */ |
@@ -580,7 +589,6 @@ struct snd_soc_jack_zone { | |||
580 | * to provide more complex checks (eg, reading an | 589 | * to provide more complex checks (eg, reading an |
581 | * ADC). | 590 | * ADC). |
582 | */ | 591 | */ |
583 | #ifdef CONFIG_GPIOLIB | ||
584 | struct snd_soc_jack_gpio { | 592 | struct snd_soc_jack_gpio { |
585 | unsigned int gpio; | 593 | unsigned int gpio; |
586 | const char *name; | 594 | const char *name; |
@@ -594,7 +602,6 @@ struct snd_soc_jack_gpio { | |||
594 | 602 | ||
595 | int (*jack_status_check)(void); | 603 | int (*jack_status_check)(void); |
596 | }; | 604 | }; |
597 | #endif | ||
598 | 605 | ||
599 | struct snd_soc_jack { | 606 | struct snd_soc_jack { |
600 | struct mutex mutex; | 607 | struct mutex mutex; |
@@ -879,6 +886,8 @@ struct snd_soc_dai_link { | |||
879 | 886 | ||
880 | /* Symmetry requirements */ | 887 | /* Symmetry requirements */ |
881 | unsigned int symmetric_rates:1; | 888 | unsigned int symmetric_rates:1; |
889 | unsigned int symmetric_channels:1; | ||
890 | unsigned int symmetric_samplebits:1; | ||
882 | 891 | ||
883 | /* Do not create a PCM for this DAI link (Backend link) */ | 892 | /* Do not create a PCM for this DAI link (Backend link) */ |
884 | unsigned int no_pcm:1; | 893 | unsigned int no_pcm:1; |
diff --git a/include/sound/spear_dma.h b/include/sound/spear_dma.h index 1b365bfdfb37..65aca51fe255 100644 --- a/include/sound/spear_dma.h +++ b/include/sound/spear_dma.h | |||
@@ -29,7 +29,6 @@ struct spear_dma_data { | |||
29 | dma_addr_t addr; | 29 | dma_addr_t addr; |
30 | u32 max_burst; | 30 | u32 max_burst; |
31 | enum dma_slave_buswidth addr_width; | 31 | enum dma_slave_buswidth addr_width; |
32 | bool (*filter)(struct dma_chan *chan, void *slave); | ||
33 | }; | 32 | }; |
34 | 33 | ||
35 | #endif /* SPEAR_DMA_H */ | 34 | #endif /* SPEAR_DMA_H */ |