diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-01-05 07:57:31 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-01-25 16:04:32 -0500 |
commit | 6d79468dd8537530f4150e76ed9b4b63f80571c6 (patch) | |
tree | f785aeeec131c092b334e458127eb44fcf4ded2d /drivers/media/video/em28xx/em28xx.h | |
parent | 1a6f11e0e8db9e76ef34bc6731d5291e4df1ba37 (diff) |
V4L/DVB (6951): Integrates em28xx-audio.c into em28xx kernel module
Also fixes the remaining CodingStyle issues that Lindent didn't fix.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/em28xx/em28xx.h')
-rw-r--r-- | drivers/media/video/em28xx/em28xx.h | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/drivers/media/video/em28xx/em28xx.h b/drivers/media/video/em28xx/em28xx.h index 1fb3c230e232..c2d9ae0ac618 100644 --- a/drivers/media/video/em28xx/em28xx.h +++ b/drivers/media/video/em28xx/em28xx.h | |||
@@ -212,6 +212,28 @@ enum em28xx_dev_state { | |||
212 | DEV_MISCONFIGURED = 0x04, | 212 | DEV_MISCONFIGURED = 0x04, |
213 | }; | 213 | }; |
214 | 214 | ||
215 | #define EM28XX_AUDIO_BUFS 5 | ||
216 | #define EM28XX_NUM_AUDIO_PACKETS 64 | ||
217 | #define EM28XX_AUDIO_MAX_PACKET_SIZE 196 /* static value */ | ||
218 | #define EM28XX_CAPTURE_STREAM_EN 1 | ||
219 | #define EM28XX_AUDIO 0x10 | ||
220 | |||
221 | struct em28xx_audio { | ||
222 | char name[50]; | ||
223 | char *transfer_buffer[EM28XX_AUDIO_BUFS]; | ||
224 | struct urb *urb[EM28XX_AUDIO_BUFS]; | ||
225 | struct usb_device *udev; | ||
226 | unsigned int capture_transfer_done; | ||
227 | struct snd_pcm_substream *capture_pcm_substream; | ||
228 | |||
229 | unsigned int hwptr_done_capture; | ||
230 | struct snd_card *sndcard; | ||
231 | |||
232 | int users, shutdown; | ||
233 | enum em28xx_stream_state capture_stream; | ||
234 | spinlock_t slock; | ||
235 | }; | ||
236 | |||
215 | /* main device struct */ | 237 | /* main device struct */ |
216 | struct em28xx { | 238 | struct em28xx { |
217 | /* generic device properties */ | 239 | /* generic device properties */ |
@@ -266,6 +288,8 @@ struct em28xx { | |||
266 | unsigned long hash; /* eeprom hash - for boards with generic ID */ | 288 | unsigned long hash; /* eeprom hash - for boards with generic ID */ |
267 | unsigned long i2c_hash; /* i2c devicelist hash - for boards with generic ID */ | 289 | unsigned long i2c_hash; /* i2c devicelist hash - for boards with generic ID */ |
268 | 290 | ||
291 | struct em28xx_audio *adev; | ||
292 | |||
269 | /* states */ | 293 | /* states */ |
270 | enum em28xx_dev_state state; | 294 | enum em28xx_dev_state state; |
271 | enum em28xx_stream_state stream; | 295 | enum em28xx_stream_state stream; |
@@ -302,6 +326,15 @@ struct em28xx { | |||
302 | struct em28xx_fh { | 326 | struct em28xx_fh { |
303 | struct em28xx *dev; | 327 | struct em28xx *dev; |
304 | unsigned int stream_on:1; /* Locks streams */ | 328 | unsigned int stream_on:1; /* Locks streams */ |
329 | int radio; | ||
330 | }; | ||
331 | |||
332 | struct em28xx_ops { | ||
333 | struct list_head next; | ||
334 | char *name; | ||
335 | int id; | ||
336 | int (*init)(struct em28xx *); | ||
337 | int (*fini)(struct em28xx *); | ||
305 | }; | 338 | }; |
306 | 339 | ||
307 | /* Provided by em28xx-i2c.c */ | 340 | /* Provided by em28xx-i2c.c */ |
@@ -341,6 +374,10 @@ int em28xx_init_isoc(struct em28xx *dev); | |||
341 | void em28xx_uninit_isoc(struct em28xx *dev); | 374 | void em28xx_uninit_isoc(struct em28xx *dev); |
342 | int em28xx_set_alternate(struct em28xx *dev); | 375 | int em28xx_set_alternate(struct em28xx *dev); |
343 | 376 | ||
377 | /* Provided by em28xx-video.c */ | ||
378 | int em28xx_register_extension(struct em28xx_ops *dev); | ||
379 | void em28xx_unregister_extension(struct em28xx_ops *dev); | ||
380 | |||
344 | /* Provided by em28xx-cards.c */ | 381 | /* Provided by em28xx-cards.c */ |
345 | extern int em2800_variant_detect(struct usb_device* udev,int model); | 382 | extern int em2800_variant_detect(struct usb_device* udev,int model); |
346 | extern void em28xx_pre_card_setup(struct em28xx *dev); | 383 | extern void em28xx_pre_card_setup(struct em28xx *dev); |