diff options
Diffstat (limited to 'include/sound')
-rw-r--r-- | include/sound/ad1816a.h | 5 | ||||
-rw-r--r-- | include/sound/ak4113.h | 9 | ||||
-rw-r--r-- | include/sound/ak4114.h | 9 | ||||
-rw-r--r-- | include/sound/compress_driver.h | 5 | ||||
-rw-r--r-- | include/sound/control.h | 11 | ||||
-rw-r--r-- | include/sound/core.h | 44 | ||||
-rw-r--r-- | include/sound/emu10k1.h | 16 | ||||
-rw-r--r-- | include/sound/es1688.h | 3 | ||||
-rw-r--r-- | include/sound/gus.h | 6 | ||||
-rw-r--r-- | include/sound/hwdep.h | 3 | ||||
-rw-r--r-- | include/sound/pcm.h | 26 | ||||
-rw-r--r-- | include/sound/pcm_params.h | 96 | ||||
-rw-r--r-- | include/sound/rawmidi.h | 4 | ||||
-rw-r--r-- | include/sound/rcar_snd.h | 1 | ||||
-rw-r--r-- | include/sound/rt5677.h | 3 | ||||
-rw-r--r-- | include/sound/sb.h | 8 | ||||
-rw-r--r-- | include/sound/seq_kernel.h | 9 | ||||
-rw-r--r-- | include/sound/simple_card.h | 1 | ||||
-rw-r--r-- | include/sound/soc-dapm.h | 4 | ||||
-rw-r--r-- | include/sound/soc.h | 3 | ||||
-rw-r--r-- | include/sound/sta32x.h | 18 | ||||
-rw-r--r-- | include/sound/wss.h | 6 |
22 files changed, 150 insertions, 140 deletions
diff --git a/include/sound/ad1816a.h b/include/sound/ad1816a.h index abdf609c5918..f2d3a6d07210 100644 --- a/include/sound/ad1816a.h +++ b/include/sound/ad1816a.h | |||
@@ -170,10 +170,9 @@ extern int snd_ad1816a_create(struct snd_card *card, unsigned long port, | |||
170 | int irq, int dma1, int dma2, | 170 | int irq, int dma1, int dma2, |
171 | struct snd_ad1816a *chip); | 171 | struct snd_ad1816a *chip); |
172 | 172 | ||
173 | extern int snd_ad1816a_pcm(struct snd_ad1816a *chip, int device, struct snd_pcm **rpcm); | 173 | extern int snd_ad1816a_pcm(struct snd_ad1816a *chip, int device); |
174 | extern int snd_ad1816a_mixer(struct snd_ad1816a *chip); | 174 | extern int snd_ad1816a_mixer(struct snd_ad1816a *chip); |
175 | extern int snd_ad1816a_timer(struct snd_ad1816a *chip, int device, | 175 | extern int snd_ad1816a_timer(struct snd_ad1816a *chip, int device); |
176 | struct snd_timer **rtimer); | ||
177 | #ifdef CONFIG_PM | 176 | #ifdef CONFIG_PM |
178 | extern void snd_ad1816a_suspend(struct snd_ad1816a *chip); | 177 | extern void snd_ad1816a_suspend(struct snd_ad1816a *chip); |
179 | extern void snd_ad1816a_resume(struct snd_ad1816a *chip); | 178 | extern void snd_ad1816a_resume(struct snd_ad1816a *chip); |
diff --git a/include/sound/ak4113.h b/include/sound/ak4113.h index 3a34f6edc2d1..58c145620c3c 100644 --- a/include/sound/ak4113.h +++ b/include/sound/ak4113.h | |||
@@ -287,6 +287,7 @@ struct ak4113 { | |||
287 | ak4113_read_t *read; | 287 | ak4113_read_t *read; |
288 | void *private_data; | 288 | void *private_data; |
289 | atomic_t wq_processing; | 289 | atomic_t wq_processing; |
290 | struct mutex reinit_mutex; | ||
290 | spinlock_t lock; | 291 | spinlock_t lock; |
291 | unsigned char regmap[AK4113_WRITABLE_REGS]; | 292 | unsigned char regmap[AK4113_WRITABLE_REGS]; |
292 | struct snd_kcontrol *kctls[AK4113_CONTROLS]; | 293 | struct snd_kcontrol *kctls[AK4113_CONTROLS]; |
@@ -317,5 +318,13 @@ int snd_ak4113_build(struct ak4113 *ak4113, | |||
317 | int snd_ak4113_external_rate(struct ak4113 *ak4113); | 318 | int snd_ak4113_external_rate(struct ak4113 *ak4113); |
318 | int snd_ak4113_check_rate_and_errors(struct ak4113 *ak4113, unsigned int flags); | 319 | int snd_ak4113_check_rate_and_errors(struct ak4113 *ak4113, unsigned int flags); |
319 | 320 | ||
321 | #ifdef CONFIG_PM | ||
322 | void snd_ak4113_suspend(struct ak4113 *chip); | ||
323 | void snd_ak4113_resume(struct ak4113 *chip); | ||
324 | #else | ||
325 | static inline void snd_ak4113_suspend(struct ak4113 *chip) {} | ||
326 | static inline void snd_ak4113_resume(struct ak4113 *chip) {} | ||
327 | #endif | ||
328 | |||
320 | #endif /* __SOUND_AK4113_H */ | 329 | #endif /* __SOUND_AK4113_H */ |
321 | 330 | ||
diff --git a/include/sound/ak4114.h b/include/sound/ak4114.h index 069299a88915..b6feb7e225f2 100644 --- a/include/sound/ak4114.h +++ b/include/sound/ak4114.h | |||
@@ -169,6 +169,7 @@ struct ak4114 { | |||
169 | ak4114_read_t * read; | 169 | ak4114_read_t * read; |
170 | void * private_data; | 170 | void * private_data; |
171 | atomic_t wq_processing; | 171 | atomic_t wq_processing; |
172 | struct mutex reinit_mutex; | ||
172 | spinlock_t lock; | 173 | spinlock_t lock; |
173 | unsigned char regmap[6]; | 174 | unsigned char regmap[6]; |
174 | unsigned char txcsb[5]; | 175 | unsigned char txcsb[5]; |
@@ -199,5 +200,13 @@ int snd_ak4114_build(struct ak4114 *ak4114, | |||
199 | int snd_ak4114_external_rate(struct ak4114 *ak4114); | 200 | int snd_ak4114_external_rate(struct ak4114 *ak4114); |
200 | int snd_ak4114_check_rate_and_errors(struct ak4114 *ak4114, unsigned int flags); | 201 | int snd_ak4114_check_rate_and_errors(struct ak4114 *ak4114, unsigned int flags); |
201 | 202 | ||
203 | #ifdef CONFIG_PM | ||
204 | void snd_ak4114_suspend(struct ak4114 *chip); | ||
205 | void snd_ak4114_resume(struct ak4114 *chip); | ||
206 | #else | ||
207 | static inline void snd_ak4114_suspend(struct ak4114 *chip) {} | ||
208 | static inline void snd_ak4114_resume(struct ak4114 *chip) {} | ||
209 | #endif | ||
210 | |||
202 | #endif /* __SOUND_AK4114_H */ | 211 | #endif /* __SOUND_AK4114_H */ |
203 | 212 | ||
diff --git a/include/sound/compress_driver.h b/include/sound/compress_driver.h index 396e8f73670a..f48089d364c5 100644 --- a/include/sound/compress_driver.h +++ b/include/sound/compress_driver.h | |||
@@ -27,6 +27,7 @@ | |||
27 | 27 | ||
28 | #include <linux/types.h> | 28 | #include <linux/types.h> |
29 | #include <linux/sched.h> | 29 | #include <linux/sched.h> |
30 | #include <sound/core.h> | ||
30 | #include <sound/compress_offload.h> | 31 | #include <sound/compress_offload.h> |
31 | #include <sound/asound.h> | 32 | #include <sound/asound.h> |
32 | #include <sound/pcm.h> | 33 | #include <sound/pcm.h> |
@@ -134,7 +135,7 @@ struct snd_compr_ops { | |||
134 | /** | 135 | /** |
135 | * struct snd_compr: Compressed device | 136 | * struct snd_compr: Compressed device |
136 | * @name: DSP device name | 137 | * @name: DSP device name |
137 | * @dev: Device pointer | 138 | * @dev: associated device instance |
138 | * @ops: pointer to DSP callbacks | 139 | * @ops: pointer to DSP callbacks |
139 | * @private_data: pointer to DSP pvt data | 140 | * @private_data: pointer to DSP pvt data |
140 | * @card: sound card pointer | 141 | * @card: sound card pointer |
@@ -144,7 +145,7 @@ struct snd_compr_ops { | |||
144 | */ | 145 | */ |
145 | struct snd_compr { | 146 | struct snd_compr { |
146 | const char *name; | 147 | const char *name; |
147 | struct device *dev; | 148 | struct device dev; |
148 | struct snd_compr_ops *ops; | 149 | struct snd_compr_ops *ops; |
149 | void *private_data; | 150 | void *private_data; |
150 | struct snd_card *card; | 151 | struct snd_card *card; |
diff --git a/include/sound/control.h b/include/sound/control.h index 042613938a1d..75f3054023f7 100644 --- a/include/sound/control.h +++ b/include/sound/control.h | |||
@@ -93,12 +93,17 @@ struct snd_kctl_event { | |||
93 | 93 | ||
94 | struct pid; | 94 | struct pid; |
95 | 95 | ||
96 | enum { | ||
97 | SND_CTL_SUBDEV_PCM, | ||
98 | SND_CTL_SUBDEV_RAWMIDI, | ||
99 | SND_CTL_SUBDEV_ITEMS, | ||
100 | }; | ||
101 | |||
96 | struct snd_ctl_file { | 102 | struct snd_ctl_file { |
97 | struct list_head list; /* list of all control files */ | 103 | struct list_head list; /* list of all control files */ |
98 | struct snd_card *card; | 104 | struct snd_card *card; |
99 | struct pid *pid; | 105 | struct pid *pid; |
100 | int prefer_pcm_subdevice; | 106 | int preferred_subdevice[SND_CTL_SUBDEV_ITEMS]; |
101 | int prefer_rawmidi_subdevice; | ||
102 | wait_queue_head_t change_sleep; | 107 | wait_queue_head_t change_sleep; |
103 | spinlock_t read_lock; | 108 | spinlock_t read_lock; |
104 | struct fasync_struct *fasync; | 109 | struct fasync_struct *fasync; |
@@ -138,6 +143,8 @@ int snd_ctl_unregister_ioctl_compat(snd_kctl_ioctl_func_t fcn); | |||
138 | #define snd_ctl_unregister_ioctl_compat(fcn) | 143 | #define snd_ctl_unregister_ioctl_compat(fcn) |
139 | #endif | 144 | #endif |
140 | 145 | ||
146 | int snd_ctl_get_preferred_subdevice(struct snd_card *card, int type); | ||
147 | |||
141 | static inline unsigned int snd_ctl_get_ioffnum(struct snd_kcontrol *kctl, struct snd_ctl_elem_id *id) | 148 | static inline unsigned int snd_ctl_get_ioffnum(struct snd_kcontrol *kctl, struct snd_ctl_elem_id *id) |
142 | { | 149 | { |
143 | return id->numid - kctl->id.numid; | 150 | return id->numid - kctl->id.numid; |
diff --git a/include/sound/core.h b/include/sound/core.h index 1df3f2fe5350..da5748289968 100644 --- a/include/sound/core.h +++ b/include/sound/core.h | |||
@@ -109,6 +109,7 @@ struct snd_card { | |||
109 | private data */ | 109 | private data */ |
110 | struct list_head devices; /* devices */ | 110 | struct list_head devices; /* devices */ |
111 | 111 | ||
112 | struct device ctl_dev; /* control device */ | ||
112 | unsigned int last_numid; /* last used numeric ID */ | 113 | unsigned int last_numid; /* last used numeric ID */ |
113 | struct rw_semaphore controls_rwsem; /* controls list lock */ | 114 | struct rw_semaphore controls_rwsem; /* controls list lock */ |
114 | rwlock_t ctl_files_rwlock; /* ctl_files list lock */ | 115 | rwlock_t ctl_files_rwlock; /* ctl_files list lock */ |
@@ -131,6 +132,7 @@ struct snd_card { | |||
131 | struct completion *release_completion; | 132 | struct completion *release_completion; |
132 | struct device *dev; /* device assigned to this card */ | 133 | struct device *dev; /* device assigned to this card */ |
133 | struct device card_dev; /* cardX object for sysfs */ | 134 | struct device card_dev; /* cardX object for sysfs */ |
135 | const struct attribute_group *dev_groups[4]; /* assigned sysfs attr */ | ||
134 | bool registered; /* card_dev is registered? */ | 136 | bool registered; /* card_dev is registered? */ |
135 | 137 | ||
136 | #ifdef CONFIG_PM | 138 | #ifdef CONFIG_PM |
@@ -206,43 +208,13 @@ extern struct class *sound_class; | |||
206 | 208 | ||
207 | void snd_request_card(int card); | 209 | void snd_request_card(int card); |
208 | 210 | ||
209 | int snd_register_device_for_dev(int type, struct snd_card *card, | 211 | void snd_device_initialize(struct device *dev, struct snd_card *card); |
210 | int dev, | ||
211 | const struct file_operations *f_ops, | ||
212 | void *private_data, | ||
213 | const char *name, | ||
214 | struct device *device); | ||
215 | 212 | ||
216 | /** | 213 | int snd_register_device(int type, struct snd_card *card, int dev, |
217 | * snd_register_device - Register the ALSA device file for the card | 214 | const struct file_operations *f_ops, |
218 | * @type: the device type, SNDRV_DEVICE_TYPE_XXX | 215 | void *private_data, struct device *device); |
219 | * @card: the card instance | 216 | int snd_unregister_device(struct device *dev); |
220 | * @dev: the device index | ||
221 | * @f_ops: the file operations | ||
222 | * @private_data: user pointer for f_ops->open() | ||
223 | * @name: the device file name | ||
224 | * | ||
225 | * Registers an ALSA device file for the given card. | ||
226 | * The operators have to be set in reg parameter. | ||
227 | * | ||
228 | * This function uses the card's device pointer to link to the | ||
229 | * correct &struct device. | ||
230 | * | ||
231 | * Return: Zero if successful, or a negative error code on failure. | ||
232 | */ | ||
233 | static inline int snd_register_device(int type, struct snd_card *card, int dev, | ||
234 | const struct file_operations *f_ops, | ||
235 | void *private_data, | ||
236 | const char *name) | ||
237 | { | ||
238 | return snd_register_device_for_dev(type, card, dev, f_ops, | ||
239 | private_data, name, | ||
240 | snd_card_get_device_link(card)); | ||
241 | } | ||
242 | |||
243 | int snd_unregister_device(int type, struct snd_card *card, int dev); | ||
244 | void *snd_lookup_minor_data(unsigned int minor, int type); | 217 | void *snd_lookup_minor_data(unsigned int minor, int type); |
245 | struct device *snd_get_device(int type, struct snd_card *card, int dev); | ||
246 | 218 | ||
247 | #ifdef CONFIG_SND_OSSEMUL | 219 | #ifdef CONFIG_SND_OSSEMUL |
248 | int snd_register_oss_device(int type, struct snd_card *card, int dev, | 220 | int snd_register_oss_device(int type, struct snd_card *card, int dev, |
@@ -291,6 +263,8 @@ void snd_card_set_id(struct snd_card *card, const char *id); | |||
291 | int snd_card_register(struct snd_card *card); | 263 | int snd_card_register(struct snd_card *card); |
292 | int snd_card_info_init(void); | 264 | int snd_card_info_init(void); |
293 | int snd_card_info_done(void); | 265 | int snd_card_info_done(void); |
266 | int snd_card_add_dev_attr(struct snd_card *card, | ||
267 | const struct attribute_group *group); | ||
294 | int snd_component_add(struct snd_card *card, const char *component); | 268 | int snd_component_add(struct snd_card *card, const char *component); |
295 | int snd_card_file_add(struct snd_card *card, struct file *file); | 269 | int snd_card_file_add(struct snd_card *card, struct file *file); |
296 | int snd_card_file_remove(struct snd_card *card, struct file *file); | 270 | int snd_card_file_remove(struct snd_card *card, struct file *file); |
diff --git a/include/sound/emu10k1.h b/include/sound/emu10k1.h index c46908c1bb3f..0de95ccb92cf 100644 --- a/include/sound/emu10k1.h +++ b/include/sound/emu10k1.h | |||
@@ -33,8 +33,8 @@ | |||
33 | #include <linux/interrupt.h> | 33 | #include <linux/interrupt.h> |
34 | #include <linux/mutex.h> | 34 | #include <linux/mutex.h> |
35 | #include <linux/firmware.h> | 35 | #include <linux/firmware.h> |
36 | #include <linux/io.h> | ||
36 | 37 | ||
37 | #include <asm/io.h> | ||
38 | #include <uapi/sound/emu10k1.h> | 38 | #include <uapi/sound/emu10k1.h> |
39 | 39 | ||
40 | /* ------------------- DEFINES -------------------- */ | 40 | /* ------------------- DEFINES -------------------- */ |
@@ -1809,17 +1809,17 @@ int snd_emu10k1_create(struct snd_card *card, | |||
1809 | uint subsystem, | 1809 | uint subsystem, |
1810 | struct snd_emu10k1 ** remu); | 1810 | struct snd_emu10k1 ** remu); |
1811 | 1811 | ||
1812 | int snd_emu10k1_pcm(struct snd_emu10k1 * emu, int device, struct snd_pcm ** rpcm); | 1812 | int snd_emu10k1_pcm(struct snd_emu10k1 *emu, int device); |
1813 | int snd_emu10k1_pcm_mic(struct snd_emu10k1 * emu, int device, struct snd_pcm ** rpcm); | 1813 | int snd_emu10k1_pcm_mic(struct snd_emu10k1 *emu, int device); |
1814 | int snd_emu10k1_pcm_efx(struct snd_emu10k1 * emu, int device, struct snd_pcm ** rpcm); | 1814 | int snd_emu10k1_pcm_efx(struct snd_emu10k1 *emu, int device); |
1815 | int snd_p16v_pcm(struct snd_emu10k1 * emu, int device, struct snd_pcm ** rpcm); | 1815 | int snd_p16v_pcm(struct snd_emu10k1 *emu, int device); |
1816 | int snd_p16v_free(struct snd_emu10k1 * emu); | 1816 | int snd_p16v_free(struct snd_emu10k1 * emu); |
1817 | int snd_p16v_mixer(struct snd_emu10k1 * emu); | 1817 | int snd_p16v_mixer(struct snd_emu10k1 * emu); |
1818 | int snd_emu10k1_pcm_multi(struct snd_emu10k1 * emu, int device, struct snd_pcm ** rpcm); | 1818 | int snd_emu10k1_pcm_multi(struct snd_emu10k1 *emu, int device); |
1819 | int snd_emu10k1_fx8010_pcm(struct snd_emu10k1 * emu, int device, struct snd_pcm ** rpcm); | 1819 | int snd_emu10k1_fx8010_pcm(struct snd_emu10k1 *emu, int device); |
1820 | int snd_emu10k1_mixer(struct snd_emu10k1 * emu, int pcm_device, int multi_device); | 1820 | int snd_emu10k1_mixer(struct snd_emu10k1 * emu, int pcm_device, int multi_device); |
1821 | int snd_emu10k1_timer(struct snd_emu10k1 * emu, int device); | 1821 | int snd_emu10k1_timer(struct snd_emu10k1 * emu, int device); |
1822 | int snd_emu10k1_fx8010_new(struct snd_emu10k1 *emu, int device, struct snd_hwdep ** rhwdep); | 1822 | int snd_emu10k1_fx8010_new(struct snd_emu10k1 *emu, int device); |
1823 | 1823 | ||
1824 | irqreturn_t snd_emu10k1_interrupt(int irq, void *dev_id); | 1824 | irqreturn_t snd_emu10k1_interrupt(int irq, void *dev_id); |
1825 | 1825 | ||
diff --git a/include/sound/es1688.h b/include/sound/es1688.h index 1d636a2d8896..b34f23a5bb74 100644 --- a/include/sound/es1688.h +++ b/include/sound/es1688.h | |||
@@ -115,8 +115,7 @@ int snd_es1688_create(struct snd_card *card, | |||
115 | int mpu_irq, | 115 | int mpu_irq, |
116 | int dma8, | 116 | int dma8, |
117 | unsigned short hardware); | 117 | unsigned short hardware); |
118 | int snd_es1688_pcm(struct snd_card *card, struct snd_es1688 *chip, int device, | 118 | int snd_es1688_pcm(struct snd_card *card, struct snd_es1688 *chip, int device); |
119 | struct snd_pcm **rpcm); | ||
120 | int snd_es1688_mixer(struct snd_card *card, struct snd_es1688 *chip); | 119 | int snd_es1688_mixer(struct snd_card *card, struct snd_es1688 *chip); |
121 | int snd_es1688_reset(struct snd_es1688 *chip); | 120 | int snd_es1688_reset(struct snd_es1688 *chip); |
122 | 121 | ||
diff --git a/include/sound/gus.h b/include/sound/gus.h index 42905d811da7..07c116fe78c8 100644 --- a/include/sound/gus.h +++ b/include/sound/gus.h | |||
@@ -27,7 +27,7 @@ | |||
27 | #include <sound/timer.h> | 27 | #include <sound/timer.h> |
28 | #include <sound/seq_midi_emul.h> | 28 | #include <sound/seq_midi_emul.h> |
29 | #include <sound/seq_device.h> | 29 | #include <sound/seq_device.h> |
30 | #include <asm/io.h> | 30 | #include <linux/io.h> |
31 | 31 | ||
32 | /* IO ports */ | 32 | /* IO ports */ |
33 | 33 | ||
@@ -591,7 +591,7 @@ int snd_gf1_new_mixer(struct snd_gus_card * gus); | |||
591 | 591 | ||
592 | /* gus_pcm.c */ | 592 | /* gus_pcm.c */ |
593 | 593 | ||
594 | int snd_gf1_pcm_new(struct snd_gus_card * gus, int pcm_dev, int control_index, struct snd_pcm ** rpcm); | 594 | int snd_gf1_pcm_new(struct snd_gus_card *gus, int pcm_dev, int control_index); |
595 | 595 | ||
596 | #ifdef CONFIG_SND_DEBUG | 596 | #ifdef CONFIG_SND_DEBUG |
597 | extern void snd_gf1_print_voice_registers(struct snd_gus_card * gus); | 597 | extern void snd_gf1_print_voice_registers(struct snd_gus_card * gus); |
@@ -620,7 +620,7 @@ void snd_gus_irq_profile_init(struct snd_gus_card *gus); | |||
620 | 620 | ||
621 | /* gus_uart.c */ | 621 | /* gus_uart.c */ |
622 | 622 | ||
623 | int snd_gf1_rawmidi_new(struct snd_gus_card * gus, int device, struct snd_rawmidi **rrawmidi); | 623 | int snd_gf1_rawmidi_new(struct snd_gus_card *gus, int device); |
624 | 624 | ||
625 | /* gus_dram.c */ | 625 | /* gus_dram.c */ |
626 | int snd_gus_dram_write(struct snd_gus_card *gus, char __user *ptr, | 626 | int snd_gus_dram_write(struct snd_gus_card *gus, char __user *ptr, |
diff --git a/include/sound/hwdep.h b/include/sound/hwdep.h index ae04a3ec9c77..ab9fcb2f97f0 100644 --- a/include/sound/hwdep.h +++ b/include/sound/hwdep.h | |||
@@ -68,8 +68,7 @@ struct snd_hwdep { | |||
68 | wait_queue_head_t open_wait; | 68 | wait_queue_head_t open_wait; |
69 | void *private_data; | 69 | void *private_data; |
70 | void (*private_free) (struct snd_hwdep *hwdep); | 70 | void (*private_free) (struct snd_hwdep *hwdep); |
71 | struct device *dev; | 71 | struct device dev; |
72 | const struct attribute_group **groups; | ||
73 | 72 | ||
74 | struct mutex open_mutex; | 73 | struct mutex open_mutex; |
75 | int used; /* reference counter */ | 74 | int used; /* reference counter */ |
diff --git a/include/sound/pcm.h b/include/sound/pcm.h index b429b73e875e..c0ddb7e69c28 100644 --- a/include/sound/pcm.h +++ b/include/sound/pcm.h | |||
@@ -94,9 +94,6 @@ struct snd_pcm_ops { | |||
94 | #define SNDRV_PCM_DEVICES 8 | 94 | #define SNDRV_PCM_DEVICES 8 |
95 | #endif | 95 | #endif |
96 | 96 | ||
97 | #define SNDRV_PCM_IOCTL1_FALSE ((void *)0) | ||
98 | #define SNDRV_PCM_IOCTL1_TRUE ((void *)1) | ||
99 | |||
100 | #define SNDRV_PCM_IOCTL1_RESET 0 | 97 | #define SNDRV_PCM_IOCTL1_RESET 0 |
101 | #define SNDRV_PCM_IOCTL1_INFO 1 | 98 | #define SNDRV_PCM_IOCTL1_INFO 1 |
102 | #define SNDRV_PCM_IOCTL1_CHANNEL_INFO 2 | 99 | #define SNDRV_PCM_IOCTL1_CHANNEL_INFO 2 |
@@ -109,6 +106,7 @@ struct snd_pcm_ops { | |||
109 | #define SNDRV_PCM_TRIGGER_PAUSE_RELEASE 4 | 106 | #define SNDRV_PCM_TRIGGER_PAUSE_RELEASE 4 |
110 | #define SNDRV_PCM_TRIGGER_SUSPEND 5 | 107 | #define SNDRV_PCM_TRIGGER_SUSPEND 5 |
111 | #define SNDRV_PCM_TRIGGER_RESUME 6 | 108 | #define SNDRV_PCM_TRIGGER_RESUME 6 |
109 | #define SNDRV_PCM_TRIGGER_DRAIN 7 | ||
112 | 110 | ||
113 | #define SNDRV_PCM_POS_XRUN ((snd_pcm_uframes_t)-1) | 111 | #define SNDRV_PCM_POS_XRUN ((snd_pcm_uframes_t)-1) |
114 | 112 | ||
@@ -275,12 +273,19 @@ struct snd_pcm_hw_constraint_list { | |||
275 | unsigned int mask; | 273 | unsigned int mask; |
276 | }; | 274 | }; |
277 | 275 | ||
276 | struct snd_pcm_hw_constraint_ranges { | ||
277 | unsigned int count; | ||
278 | const struct snd_interval *ranges; | ||
279 | unsigned int mask; | ||
280 | }; | ||
281 | |||
278 | struct snd_pcm_hwptr_log; | 282 | struct snd_pcm_hwptr_log; |
279 | 283 | ||
280 | struct snd_pcm_runtime { | 284 | struct snd_pcm_runtime { |
281 | /* -- Status -- */ | 285 | /* -- Status -- */ |
282 | struct snd_pcm_substream *trigger_master; | 286 | struct snd_pcm_substream *trigger_master; |
283 | struct timespec trigger_tstamp; /* trigger timestamp */ | 287 | struct timespec trigger_tstamp; /* trigger timestamp */ |
288 | bool trigger_tstamp_latched; /* trigger timestamp latched in low-level driver/hardware */ | ||
284 | int overrange; | 289 | int overrange; |
285 | snd_pcm_uframes_t avail_max; | 290 | snd_pcm_uframes_t avail_max; |
286 | snd_pcm_uframes_t hw_ptr_base; /* Position at buffer restart */ | 291 | snd_pcm_uframes_t hw_ptr_base; /* Position at buffer restart */ |
@@ -449,6 +454,7 @@ struct snd_pcm_str { | |||
449 | #endif | 454 | #endif |
450 | #endif | 455 | #endif |
451 | struct snd_kcontrol *chmap_kctl; /* channel-mapping controls */ | 456 | struct snd_kcontrol *chmap_kctl; /* channel-mapping controls */ |
457 | struct device dev; | ||
452 | }; | 458 | }; |
453 | 459 | ||
454 | struct snd_pcm { | 460 | struct snd_pcm { |
@@ -465,7 +471,6 @@ struct snd_pcm { | |||
465 | wait_queue_head_t open_wait; | 471 | wait_queue_head_t open_wait; |
466 | void *private_data; | 472 | void *private_data; |
467 | void (*private_free) (struct snd_pcm *pcm); | 473 | void (*private_free) (struct snd_pcm *pcm); |
468 | struct device *dev; /* actual hw device this belongs to */ | ||
469 | bool internal; /* pcm is for internal use only */ | 474 | bool internal; /* pcm is for internal use only */ |
470 | bool nonatomic; /* whole PCM operations are in non-atomic context */ | 475 | bool nonatomic; /* whole PCM operations are in non-atomic context */ |
471 | #if defined(CONFIG_SND_PCM_OSS) || defined(CONFIG_SND_PCM_OSS_MODULE) | 476 | #if defined(CONFIG_SND_PCM_OSS) || defined(CONFIG_SND_PCM_OSS_MODULE) |
@@ -520,7 +525,6 @@ void snd_pcm_release_substream(struct snd_pcm_substream *substream); | |||
520 | int snd_pcm_attach_substream(struct snd_pcm *pcm, int stream, struct file *file, | 525 | int snd_pcm_attach_substream(struct snd_pcm *pcm, int stream, struct file *file, |
521 | struct snd_pcm_substream **rsubstream); | 526 | struct snd_pcm_substream **rsubstream); |
522 | void snd_pcm_detach_substream(struct snd_pcm_substream *substream); | 527 | void snd_pcm_detach_substream(struct snd_pcm_substream *substream); |
523 | void snd_pcm_vma_notify_data(void *client, void *data); | ||
524 | int snd_pcm_mmap_data(struct snd_pcm_substream *substream, struct file *file, struct vm_area_struct *area); | 528 | int snd_pcm_mmap_data(struct snd_pcm_substream *substream, struct file *file, struct vm_area_struct *area); |
525 | 529 | ||
526 | 530 | ||
@@ -910,6 +914,8 @@ void snd_interval_mulkdiv(const struct snd_interval *a, unsigned int k, | |||
910 | const struct snd_interval *b, struct snd_interval *c); | 914 | const struct snd_interval *b, struct snd_interval *c); |
911 | int snd_interval_list(struct snd_interval *i, unsigned int count, | 915 | int snd_interval_list(struct snd_interval *i, unsigned int count, |
912 | const unsigned int *list, unsigned int mask); | 916 | const unsigned int *list, unsigned int mask); |
917 | int snd_interval_ranges(struct snd_interval *i, unsigned int count, | ||
918 | const struct snd_interval *list, unsigned int mask); | ||
913 | int snd_interval_ratnum(struct snd_interval *i, | 919 | int snd_interval_ratnum(struct snd_interval *i, |
914 | unsigned int rats_count, struct snd_ratnum *rats, | 920 | unsigned int rats_count, struct snd_ratnum *rats, |
915 | unsigned int *nump, unsigned int *denp); | 921 | unsigned int *nump, unsigned int *denp); |
@@ -934,6 +940,10 @@ int snd_pcm_hw_constraint_list(struct snd_pcm_runtime *runtime, | |||
934 | unsigned int cond, | 940 | unsigned int cond, |
935 | snd_pcm_hw_param_t var, | 941 | snd_pcm_hw_param_t var, |
936 | const struct snd_pcm_hw_constraint_list *l); | 942 | const struct snd_pcm_hw_constraint_list *l); |
943 | int snd_pcm_hw_constraint_ranges(struct snd_pcm_runtime *runtime, | ||
944 | unsigned int cond, | ||
945 | snd_pcm_hw_param_t var, | ||
946 | const struct snd_pcm_hw_constraint_ranges *r); | ||
937 | int snd_pcm_hw_constraint_ratnums(struct snd_pcm_runtime *runtime, | 947 | int snd_pcm_hw_constraint_ratnums(struct snd_pcm_runtime *runtime, |
938 | unsigned int cond, | 948 | unsigned int cond, |
939 | snd_pcm_hw_param_t var, | 949 | snd_pcm_hw_param_t var, |
@@ -986,21 +996,15 @@ int snd_pcm_format_physical_width(snd_pcm_format_t format); /* in bits */ | |||
986 | ssize_t snd_pcm_format_size(snd_pcm_format_t format, size_t samples); | 996 | ssize_t snd_pcm_format_size(snd_pcm_format_t format, size_t samples); |
987 | const unsigned char *snd_pcm_format_silence_64(snd_pcm_format_t format); | 997 | const unsigned char *snd_pcm_format_silence_64(snd_pcm_format_t format); |
988 | int snd_pcm_format_set_silence(snd_pcm_format_t format, void *buf, unsigned int frames); | 998 | int snd_pcm_format_set_silence(snd_pcm_format_t format, void *buf, unsigned int frames); |
989 | snd_pcm_format_t snd_pcm_build_linear_format(int width, int unsigned, int big_endian); | ||
990 | 999 | ||
991 | void snd_pcm_set_ops(struct snd_pcm * pcm, int direction, | 1000 | void snd_pcm_set_ops(struct snd_pcm * pcm, int direction, |
992 | const struct snd_pcm_ops *ops); | 1001 | const struct snd_pcm_ops *ops); |
993 | void snd_pcm_set_sync(struct snd_pcm_substream *substream); | 1002 | void snd_pcm_set_sync(struct snd_pcm_substream *substream); |
994 | int snd_pcm_lib_interleave_len(struct snd_pcm_substream *substream); | ||
995 | int snd_pcm_lib_ioctl(struct snd_pcm_substream *substream, | 1003 | int snd_pcm_lib_ioctl(struct snd_pcm_substream *substream, |
996 | unsigned int cmd, void *arg); | 1004 | unsigned int cmd, void *arg); |
997 | int snd_pcm_update_state(struct snd_pcm_substream *substream, | 1005 | int snd_pcm_update_state(struct snd_pcm_substream *substream, |
998 | struct snd_pcm_runtime *runtime); | 1006 | struct snd_pcm_runtime *runtime); |
999 | int snd_pcm_update_hw_ptr(struct snd_pcm_substream *substream); | 1007 | int snd_pcm_update_hw_ptr(struct snd_pcm_substream *substream); |
1000 | int snd_pcm_playback_xrun_check(struct snd_pcm_substream *substream); | ||
1001 | int snd_pcm_capture_xrun_check(struct snd_pcm_substream *substream); | ||
1002 | int snd_pcm_playback_xrun_asap(struct snd_pcm_substream *substream); | ||
1003 | int snd_pcm_capture_xrun_asap(struct snd_pcm_substream *substream); | ||
1004 | void snd_pcm_playback_silence(struct snd_pcm_substream *substream, snd_pcm_uframes_t new_hw_ptr); | 1008 | void snd_pcm_playback_silence(struct snd_pcm_substream *substream, snd_pcm_uframes_t new_hw_ptr); |
1005 | void snd_pcm_period_elapsed(struct snd_pcm_substream *substream); | 1009 | void snd_pcm_period_elapsed(struct snd_pcm_substream *substream); |
1006 | snd_pcm_sframes_t snd_pcm_lib_write(struct snd_pcm_substream *substream, | 1010 | snd_pcm_sframes_t snd_pcm_lib_write(struct snd_pcm_substream *substream, |
diff --git a/include/sound/pcm_params.h b/include/sound/pcm_params.h index 6b1c78f05fab..3c45f3924ba7 100644 --- a/include/sound/pcm_params.h +++ b/include/sound/pcm_params.h | |||
@@ -38,31 +38,6 @@ int snd_pcm_hw_param_value(const struct snd_pcm_hw_params *params, | |||
38 | #define MASK_OFS(i) ((i) >> 5) | 38 | #define MASK_OFS(i) ((i) >> 5) |
39 | #define MASK_BIT(i) (1U << ((i) & 31)) | 39 | #define MASK_BIT(i) (1U << ((i) & 31)) |
40 | 40 | ||
41 | static inline unsigned int ld2(u_int32_t v) | ||
42 | { | ||
43 | unsigned r = 0; | ||
44 | |||
45 | if (v >= 0x10000) { | ||
46 | v >>= 16; | ||
47 | r += 16; | ||
48 | } | ||
49 | if (v >= 0x100) { | ||
50 | v >>= 8; | ||
51 | r += 8; | ||
52 | } | ||
53 | if (v >= 0x10) { | ||
54 | v >>= 4; | ||
55 | r += 4; | ||
56 | } | ||
57 | if (v >= 4) { | ||
58 | v >>= 2; | ||
59 | r += 2; | ||
60 | } | ||
61 | if (v >= 2) | ||
62 | r++; | ||
63 | return r; | ||
64 | } | ||
65 | |||
66 | static inline size_t snd_mask_sizeof(void) | 41 | static inline size_t snd_mask_sizeof(void) |
67 | { | 42 | { |
68 | return sizeof(struct snd_mask); | 43 | return sizeof(struct snd_mask); |
@@ -92,7 +67,7 @@ static inline unsigned int snd_mask_min(const struct snd_mask *mask) | |||
92 | int i; | 67 | int i; |
93 | for (i = 0; i < SNDRV_MASK_SIZE; i++) { | 68 | for (i = 0; i < SNDRV_MASK_SIZE; i++) { |
94 | if (mask->bits[i]) | 69 | if (mask->bits[i]) |
95 | return ffs(mask->bits[i]) - 1 + (i << 5); | 70 | return __ffs(mask->bits[i]) + (i << 5); |
96 | } | 71 | } |
97 | return 0; | 72 | return 0; |
98 | } | 73 | } |
@@ -102,7 +77,7 @@ static inline unsigned int snd_mask_max(const struct snd_mask *mask) | |||
102 | int i; | 77 | int i; |
103 | for (i = SNDRV_MASK_SIZE - 1; i >= 0; i--) { | 78 | for (i = SNDRV_MASK_SIZE - 1; i >= 0; i--) { |
104 | if (mask->bits[i]) | 79 | if (mask->bits[i]) |
105 | return ld2(mask->bits[i]) + (i << 5); | 80 | return __fls(mask->bits[i]) + (i << 5); |
106 | } | 81 | } |
107 | return 0; | 82 | return 0; |
108 | } | 83 | } |
@@ -325,43 +300,68 @@ static inline int snd_interval_eq(const struct snd_interval *i1, const struct sn | |||
325 | i1->max == i2->max && i1->openmax == i2->openmax; | 300 | i1->max == i2->max && i1->openmax == i2->openmax; |
326 | } | 301 | } |
327 | 302 | ||
328 | static inline unsigned int add(unsigned int a, unsigned int b) | 303 | /** |
304 | * params_access - get the access type from the hw params | ||
305 | * @p: hw params | ||
306 | */ | ||
307 | static inline snd_pcm_access_t params_access(const struct snd_pcm_hw_params *p) | ||
329 | { | 308 | { |
330 | if (a >= UINT_MAX - b) | 309 | return (__force snd_pcm_access_t)snd_mask_min(hw_param_mask_c(p, |
331 | return UINT_MAX; | 310 | SNDRV_PCM_HW_PARAM_ACCESS)); |
332 | return a + b; | ||
333 | } | 311 | } |
334 | 312 | ||
335 | static inline unsigned int sub(unsigned int a, unsigned int b) | 313 | /** |
314 | * params_format - get the sample format from the hw params | ||
315 | * @p: hw params | ||
316 | */ | ||
317 | static inline snd_pcm_format_t params_format(const struct snd_pcm_hw_params *p) | ||
336 | { | 318 | { |
337 | if (a > b) | 319 | return (__force snd_pcm_format_t)snd_mask_min(hw_param_mask_c(p, |
338 | return a - b; | 320 | SNDRV_PCM_HW_PARAM_FORMAT)); |
339 | return 0; | ||
340 | } | 321 | } |
341 | 322 | ||
342 | #define params_access(p) ((__force snd_pcm_access_t)\ | 323 | /** |
343 | snd_mask_min(hw_param_mask_c((p), SNDRV_PCM_HW_PARAM_ACCESS))) | 324 | * params_subformat - get the sample subformat from the hw params |
344 | #define params_format(p) ((__force snd_pcm_format_t)\ | 325 | * @p: hw params |
345 | snd_mask_min(hw_param_mask_c((p), SNDRV_PCM_HW_PARAM_FORMAT))) | 326 | */ |
346 | #define params_subformat(p) \ | 327 | static inline snd_pcm_subformat_t |
347 | snd_mask_min(hw_param_mask_c((p), SNDRV_PCM_HW_PARAM_SUBFORMAT)) | 328 | params_subformat(const struct snd_pcm_hw_params *p) |
329 | { | ||
330 | return (__force snd_pcm_subformat_t)snd_mask_min(hw_param_mask_c(p, | ||
331 | SNDRV_PCM_HW_PARAM_SUBFORMAT)); | ||
332 | } | ||
348 | 333 | ||
334 | /** | ||
335 | * params_period_bytes - get the period size (in bytes) from the hw params | ||
336 | * @p: hw params | ||
337 | */ | ||
349 | static inline unsigned int | 338 | static inline unsigned int |
350 | params_period_bytes(const struct snd_pcm_hw_params *p) | 339 | params_period_bytes(const struct snd_pcm_hw_params *p) |
351 | { | 340 | { |
352 | return (params_period_size(p) * | 341 | return hw_param_interval_c(p, SNDRV_PCM_HW_PARAM_PERIOD_BYTES)->min; |
353 | snd_pcm_format_physical_width(params_format(p)) * | ||
354 | params_channels(p)) / 8; | ||
355 | } | 342 | } |
356 | 343 | ||
357 | static inline int | 344 | /** |
358 | params_width(const struct snd_pcm_hw_params *p) | 345 | * params_width - get the number of bits of the sample format from the hw params |
346 | * @p: hw params | ||
347 | * | ||
348 | * This function returns the number of bits per sample that the selected sample | ||
349 | * format of the hw params has. | ||
350 | */ | ||
351 | static inline int params_width(const struct snd_pcm_hw_params *p) | ||
359 | { | 352 | { |
360 | return snd_pcm_format_width(params_format(p)); | 353 | return snd_pcm_format_width(params_format(p)); |
361 | } | 354 | } |
362 | 355 | ||
363 | static inline int | 356 | /* |
364 | params_physical_width(const struct snd_pcm_hw_params *p) | 357 | * params_physical_width - get the storage size of the sample format from the hw params |
358 | * @p: hw params | ||
359 | * | ||
360 | * This functions returns the number of bits per sample that the selected sample | ||
361 | * format of the hw params takes up in memory. This will be equal or larger than | ||
362 | * params_width(). | ||
363 | */ | ||
364 | static inline int params_physical_width(const struct snd_pcm_hw_params *p) | ||
365 | { | 365 | { |
366 | return snd_pcm_format_physical_width(params_format(p)); | 366 | return snd_pcm_format_physical_width(params_format(p)); |
367 | } | 367 | } |
diff --git a/include/sound/rawmidi.h b/include/sound/rawmidi.h index 311dafe6cc4b..f6cbef78db62 100644 --- a/include/sound/rawmidi.h +++ b/include/sound/rawmidi.h | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <linux/wait.h> | 28 | #include <linux/wait.h> |
29 | #include <linux/mutex.h> | 29 | #include <linux/mutex.h> |
30 | #include <linux/workqueue.h> | 30 | #include <linux/workqueue.h> |
31 | #include <linux/device.h> | ||
31 | 32 | ||
32 | #if defined(CONFIG_SND_SEQUENCER) || defined(CONFIG_SND_SEQUENCER_MODULE) | 33 | #if defined(CONFIG_SND_SEQUENCER) || defined(CONFIG_SND_SEQUENCER_MODULE) |
33 | #include <sound/seq_device.h> | 34 | #include <sound/seq_device.h> |
@@ -139,7 +140,8 @@ struct snd_rawmidi { | |||
139 | struct mutex open_mutex; | 140 | struct mutex open_mutex; |
140 | wait_queue_head_t open_wait; | 141 | wait_queue_head_t open_wait; |
141 | 142 | ||
142 | struct snd_info_entry *dev; | 143 | struct device dev; |
144 | |||
143 | struct snd_info_entry *proc_entry; | 145 | struct snd_info_entry *proc_entry; |
144 | 146 | ||
145 | #if defined(CONFIG_SND_SEQUENCER) || defined(CONFIG_SND_SEQUENCER_MODULE) | 147 | #if defined(CONFIG_SND_SEQUENCER) || defined(CONFIG_SND_SEQUENCER_MODULE) |
diff --git a/include/sound/rcar_snd.h b/include/sound/rcar_snd.h index 83284cae464c..4cecd0c175f6 100644 --- a/include/sound/rcar_snd.h +++ b/include/sound/rcar_snd.h | |||
@@ -55,6 +55,7 @@ struct rsnd_ssi_platform_info { | |||
55 | struct rsnd_src_platform_info { | 55 | struct rsnd_src_platform_info { |
56 | u32 convert_rate; /* sampling rate convert */ | 56 | u32 convert_rate; /* sampling rate convert */ |
57 | int dma_id; /* for Gen2 SCU */ | 57 | int dma_id; /* for Gen2 SCU */ |
58 | int irq; | ||
58 | }; | 59 | }; |
59 | 60 | ||
60 | /* | 61 | /* |
diff --git a/include/sound/rt5677.h b/include/sound/rt5677.h index d9eb7d861cd0..a6207043ac3c 100644 --- a/include/sound/rt5677.h +++ b/include/sound/rt5677.h | |||
@@ -37,6 +37,9 @@ struct rt5677_platform_data { | |||
37 | OFF, GPIO4, GPIO5 and GPIO6 respectively */ | 37 | OFF, GPIO4, GPIO5 and GPIO6 respectively */ |
38 | unsigned int jd2_gpio; | 38 | unsigned int jd2_gpio; |
39 | unsigned int jd3_gpio; | 39 | unsigned int jd3_gpio; |
40 | |||
41 | /* Set MICBIAS1 VDD 1v8 or 3v3 */ | ||
42 | bool micbias1_vdd_3v3; | ||
40 | }; | 43 | }; |
41 | 44 | ||
42 | #endif | 45 | #endif |
diff --git a/include/sound/sb.h b/include/sound/sb.h index ba3960329646..bacefaee411a 100644 --- a/include/sound/sb.h +++ b/include/sound/sb.h | |||
@@ -25,7 +25,7 @@ | |||
25 | #include <sound/pcm.h> | 25 | #include <sound/pcm.h> |
26 | #include <sound/rawmidi.h> | 26 | #include <sound/rawmidi.h> |
27 | #include <linux/interrupt.h> | 27 | #include <linux/interrupt.h> |
28 | #include <asm/io.h> | 28 | #include <linux/io.h> |
29 | 29 | ||
30 | enum sb_hw_type { | 30 | enum sb_hw_type { |
31 | SB_HW_AUTO, | 31 | SB_HW_AUTO, |
@@ -308,7 +308,7 @@ void snd_sbmixer_resume(struct snd_sb *chip); | |||
308 | #endif | 308 | #endif |
309 | 309 | ||
310 | /* sb8_init.c */ | 310 | /* sb8_init.c */ |
311 | int snd_sb8dsp_pcm(struct snd_sb *chip, int device, struct snd_pcm ** rpcm); | 311 | int snd_sb8dsp_pcm(struct snd_sb *chip, int device); |
312 | /* sb8.c */ | 312 | /* sb8.c */ |
313 | irqreturn_t snd_sb8dsp_interrupt(struct snd_sb *chip); | 313 | irqreturn_t snd_sb8dsp_interrupt(struct snd_sb *chip); |
314 | int snd_sb8_playback_open(struct snd_pcm_substream *substream); | 314 | int snd_sb8_playback_open(struct snd_pcm_substream *substream); |
@@ -317,10 +317,10 @@ int snd_sb8_playback_close(struct snd_pcm_substream *substream); | |||
317 | int snd_sb8_capture_close(struct snd_pcm_substream *substream); | 317 | int snd_sb8_capture_close(struct snd_pcm_substream *substream); |
318 | /* midi8.c */ | 318 | /* midi8.c */ |
319 | irqreturn_t snd_sb8dsp_midi_interrupt(struct snd_sb *chip); | 319 | irqreturn_t snd_sb8dsp_midi_interrupt(struct snd_sb *chip); |
320 | int snd_sb8dsp_midi(struct snd_sb *chip, int device, struct snd_rawmidi ** rrawmidi); | 320 | int snd_sb8dsp_midi(struct snd_sb *chip, int device); |
321 | 321 | ||
322 | /* sb16_init.c */ | 322 | /* sb16_init.c */ |
323 | int snd_sb16dsp_pcm(struct snd_sb *chip, int device, struct snd_pcm ** rpcm); | 323 | int snd_sb16dsp_pcm(struct snd_sb *chip, int device); |
324 | const struct snd_pcm_ops *snd_sb16dsp_get_pcm_ops(int direction); | 324 | const struct snd_pcm_ops *snd_sb16dsp_get_pcm_ops(int direction); |
325 | int snd_sb16dsp_configure(struct snd_sb *chip); | 325 | int snd_sb16dsp_configure(struct snd_sb *chip); |
326 | /* sb16.c */ | 326 | /* sb16.c */ |
diff --git a/include/sound/seq_kernel.h b/include/sound/seq_kernel.h index eea5400fe373..18a2ac58b88f 100644 --- a/include/sound/seq_kernel.h +++ b/include/sound/seq_kernel.h | |||
@@ -27,11 +27,8 @@ | |||
27 | typedef struct snd_seq_real_time snd_seq_real_time_t; | 27 | typedef struct snd_seq_real_time snd_seq_real_time_t; |
28 | typedef union snd_seq_timestamp snd_seq_timestamp_t; | 28 | typedef union snd_seq_timestamp snd_seq_timestamp_t; |
29 | 29 | ||
30 | /* maximum number of events dequeued per schedule interval */ | ||
31 | #define SNDRV_SEQ_MAX_DEQUEUE 50 | ||
32 | |||
33 | /* maximum number of queues */ | 30 | /* maximum number of queues */ |
34 | #define SNDRV_SEQ_MAX_QUEUES 8 | 31 | #define SNDRV_SEQ_MAX_QUEUES 32 |
35 | 32 | ||
36 | /* max number of concurrent clients */ | 33 | /* max number of concurrent clients */ |
37 | #define SNDRV_SEQ_MAX_CLIENTS 192 | 34 | #define SNDRV_SEQ_MAX_CLIENTS 192 |
@@ -42,9 +39,6 @@ typedef union snd_seq_timestamp snd_seq_timestamp_t; | |||
42 | /* max number of events in memory pool */ | 39 | /* max number of events in memory pool */ |
43 | #define SNDRV_SEQ_MAX_EVENTS 2000 | 40 | #define SNDRV_SEQ_MAX_EVENTS 2000 |
44 | 41 | ||
45 | /* default number of events in memory chunk */ | ||
46 | #define SNDRV_SEQ_DEFAULT_CHUNK_EVENTS 64 | ||
47 | |||
48 | /* default number of events in memory pool */ | 42 | /* default number of events in memory pool */ |
49 | #define SNDRV_SEQ_DEFAULT_EVENTS 500 | 43 | #define SNDRV_SEQ_DEFAULT_EVENTS 500 |
50 | 44 | ||
@@ -70,7 +64,6 @@ struct snd_seq_port_callback { | |||
70 | int (*unuse)(void *private_data, struct snd_seq_port_subscribe *info); | 64 | int (*unuse)(void *private_data, struct snd_seq_port_subscribe *info); |
71 | int (*event_input)(struct snd_seq_event *ev, int direct, void *private_data, int atomic, int hop); | 65 | int (*event_input)(struct snd_seq_event *ev, int direct, void *private_data, int atomic, int hop); |
72 | void (*private_free)(void *private_data); | 66 | void (*private_free)(void *private_data); |
73 | unsigned int callback_all; /* call subscribe callbacks at each connection/disconnection */ | ||
74 | /*...*/ | 67 | /*...*/ |
75 | }; | 68 | }; |
76 | 69 | ||
diff --git a/include/sound/simple_card.h b/include/sound/simple_card.h index 9b0ac77177b6..1255ddb1d3e2 100644 --- a/include/sound/simple_card.h +++ b/include/sound/simple_card.h | |||
@@ -20,6 +20,7 @@ struct asoc_simple_dai { | |||
20 | unsigned int sysclk; | 20 | unsigned int sysclk; |
21 | int slots; | 21 | int slots; |
22 | int slot_width; | 22 | int slot_width; |
23 | struct clk *clk; | ||
23 | }; | 24 | }; |
24 | 25 | ||
25 | struct asoc_simple_card_info { | 26 | struct asoc_simple_card_info { |
diff --git a/include/sound/soc-dapm.h b/include/sound/soc-dapm.h index 89823cfe6f04..8d7416e46861 100644 --- a/include/sound/soc-dapm.h +++ b/include/sound/soc-dapm.h | |||
@@ -405,7 +405,7 @@ int snd_soc_dapm_mux_update_power(struct snd_soc_dapm_context *dapm, | |||
405 | struct snd_soc_dapm_update *update); | 405 | struct snd_soc_dapm_update *update); |
406 | 406 | ||
407 | /* dapm sys fs - used by the core */ | 407 | /* dapm sys fs - used by the core */ |
408 | int snd_soc_dapm_sys_add(struct device *dev); | 408 | extern struct attribute *soc_dapm_dev_attrs[]; |
409 | void snd_soc_dapm_debugfs_init(struct snd_soc_dapm_context *dapm, | 409 | void snd_soc_dapm_debugfs_init(struct snd_soc_dapm_context *dapm, |
410 | struct dentry *parent); | 410 | struct dentry *parent); |
411 | 411 | ||
@@ -431,7 +431,6 @@ int snd_soc_dapm_force_enable_pin_unlocked(struct snd_soc_dapm_context *dapm, | |||
431 | const char *pin); | 431 | const char *pin); |
432 | int snd_soc_dapm_ignore_suspend(struct snd_soc_dapm_context *dapm, | 432 | int snd_soc_dapm_ignore_suspend(struct snd_soc_dapm_context *dapm, |
433 | const char *pin); | 433 | const char *pin); |
434 | void snd_soc_dapm_auto_nc_pins(struct snd_soc_card *card); | ||
435 | unsigned int dapm_kcontrol_get_value(const struct snd_kcontrol *kcontrol); | 434 | unsigned int dapm_kcontrol_get_value(const struct snd_kcontrol *kcontrol); |
436 | 435 | ||
437 | /* Mostly internal - should not normally be used */ | 436 | /* Mostly internal - should not normally be used */ |
@@ -526,7 +525,6 @@ struct snd_soc_dapm_widget { | |||
526 | enum snd_soc_dapm_type id; | 525 | enum snd_soc_dapm_type id; |
527 | const char *name; /* widget name */ | 526 | const char *name; /* widget name */ |
528 | const char *sname; /* stream name */ | 527 | const char *sname; /* stream name */ |
529 | struct snd_soc_codec *codec; | ||
530 | struct list_head list; | 528 | struct list_head list; |
531 | struct snd_soc_dapm_context *dapm; | 529 | struct snd_soc_dapm_context *dapm; |
532 | 530 | ||
diff --git a/include/sound/soc.h b/include/sound/soc.h index ac8b333acb4d..0d1ade195628 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h | |||
@@ -429,6 +429,9 @@ bool snd_soc_runtime_ignore_pmdown_time(struct snd_soc_pcm_runtime *rtd); | |||
429 | void snd_soc_runtime_activate(struct snd_soc_pcm_runtime *rtd, int stream); | 429 | void snd_soc_runtime_activate(struct snd_soc_pcm_runtime *rtd, int stream); |
430 | void snd_soc_runtime_deactivate(struct snd_soc_pcm_runtime *rtd, int stream); | 430 | void snd_soc_runtime_deactivate(struct snd_soc_pcm_runtime *rtd, int stream); |
431 | 431 | ||
432 | int snd_soc_runtime_set_dai_fmt(struct snd_soc_pcm_runtime *rtd, | ||
433 | unsigned int dai_fmt); | ||
434 | |||
432 | /* Utility functions to get clock rates from various things */ | 435 | /* Utility functions to get clock rates from various things */ |
433 | int snd_soc_calc_frame_size(int sample_size, int channels, int tdm_slots); | 436 | int snd_soc_calc_frame_size(int sample_size, int channels, int tdm_slots); |
434 | int snd_soc_params_to_frame_size(struct snd_pcm_hw_params *params); | 437 | int snd_soc_params_to_frame_size(struct snd_pcm_hw_params *params); |
diff --git a/include/sound/sta32x.h b/include/sound/sta32x.h index 8d93b0357a14..a894f7d17b1a 100644 --- a/include/sound/sta32x.h +++ b/include/sound/sta32x.h | |||
@@ -24,12 +24,20 @@ | |||
24 | #define STA32X_THERMAL_RECOVERY_ENABLE 2 | 24 | #define STA32X_THERMAL_RECOVERY_ENABLE 2 |
25 | 25 | ||
26 | struct sta32x_platform_data { | 26 | struct sta32x_platform_data { |
27 | int output_conf; | 27 | u8 output_conf; |
28 | int ch1_output_mapping; | 28 | u8 ch1_output_mapping; |
29 | int ch2_output_mapping; | 29 | u8 ch2_output_mapping; |
30 | int ch3_output_mapping; | 30 | u8 ch3_output_mapping; |
31 | int thermal_conf; | ||
32 | int needs_esd_watchdog; | 31 | int needs_esd_watchdog; |
32 | u8 drop_compensation_ns; | ||
33 | unsigned int thermal_warning_recovery:1; | ||
34 | unsigned int thermal_warning_adjustment:1; | ||
35 | unsigned int fault_detect_recovery:1; | ||
36 | unsigned int max_power_use_mpcc:1; | ||
37 | unsigned int max_power_correction:1; | ||
38 | unsigned int am_reduction_mode:1; | ||
39 | unsigned int odd_pwm_speed_mode:1; | ||
40 | unsigned int invalid_input_detect_mute:1; | ||
33 | }; | 41 | }; |
34 | 42 | ||
35 | #endif /* __LINUX_SND__STA32X_H */ | 43 | #endif /* __LINUX_SND__STA32X_H */ |
diff --git a/include/sound/wss.h b/include/sound/wss.h index 0c7f034f1e86..1823e3a964e2 100644 --- a/include/sound/wss.h +++ b/include/sound/wss.h | |||
@@ -154,8 +154,8 @@ int snd_wss_create(struct snd_card *card, | |||
154 | unsigned short hardware, | 154 | unsigned short hardware, |
155 | unsigned short hwshare, | 155 | unsigned short hwshare, |
156 | struct snd_wss **rchip); | 156 | struct snd_wss **rchip); |
157 | int snd_wss_pcm(struct snd_wss *chip, int device, struct snd_pcm **rpcm); | 157 | int snd_wss_pcm(struct snd_wss *chip, int device); |
158 | int snd_wss_timer(struct snd_wss *chip, int device, struct snd_timer **rtimer); | 158 | int snd_wss_timer(struct snd_wss *chip, int device); |
159 | int snd_wss_mixer(struct snd_wss *chip); | 159 | int snd_wss_mixer(struct snd_wss *chip); |
160 | 160 | ||
161 | const struct snd_pcm_ops *snd_wss_get_pcm_ops(int direction); | 161 | const struct snd_pcm_ops *snd_wss_get_pcm_ops(int direction); |
@@ -167,7 +167,7 @@ int snd_cs4236_create(struct snd_card *card, | |||
167 | unsigned short hardware, | 167 | unsigned short hardware, |
168 | unsigned short hwshare, | 168 | unsigned short hwshare, |
169 | struct snd_wss **rchip); | 169 | struct snd_wss **rchip); |
170 | int snd_cs4236_pcm(struct snd_wss *chip, int device, struct snd_pcm **rpcm); | 170 | int snd_cs4236_pcm(struct snd_wss *chip, int device); |
171 | int snd_cs4236_mixer(struct snd_wss *chip); | 171 | int snd_cs4236_mixer(struct snd_wss *chip); |
172 | 172 | ||
173 | /* | 173 | /* |