aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/usb/em28xx/em28xx.h
diff options
context:
space:
mode:
authorFrank Schaefer <fschaefer.oss@googlemail.com>2014-09-13 04:52:20 -0400
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2014-09-23 15:13:41 -0400
commitc5874208ff78a5180ef0456caa117704983f3a45 (patch)
tree48754c1457f1b8fbf786d6112c87f4d48531099c /drivers/media/usb/em28xx/em28xx.h
parent60a24ba03c5dcd51a754cb45e7d65753126f58ce (diff)
[media] em28xx: simplify usb audio class handling
As far as we know devices can either have audio class or vendor class usb interfaces but not both at the same time. Even if both interface types could be provided by devices at the same time, the current code is totally broken for that case. So clean up and simplify the usb audio class handling by replacing fields "has_audio_class" (device has usb audio class compliant interface) and "has_alsa_audio" (device has vendor audio interface) in struct em28xx with a single enum em28xx_usb_audio_type. Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/usb/em28xx/em28xx.h')
-rw-r--r--drivers/media/usb/em28xx/em28xx.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/media/usb/em28xx/em28xx.h b/drivers/media/usb/em28xx/em28xx.h
index 1f38163352b6..3fd176f99a23 100644
--- a/drivers/media/usb/em28xx/em28xx.h
+++ b/drivers/media/usb/em28xx/em28xx.h
@@ -312,6 +312,12 @@ struct em28xx_audio_mode {
312 unsigned int has_audio:1; 312 unsigned int has_audio:1;
313}; 313};
314 314
315enum em28xx_usb_audio_type {
316 EM28XX_USB_AUDIO_NONE = 0,
317 EM28XX_USB_AUDIO_CLASS,
318 EM28XX_USB_AUDIO_VENDOR,
319};
320
315/* em28xx has two audio inputs: tuner and line in. 321/* em28xx has two audio inputs: tuner and line in.
316 However, on most devices, an auxiliary AC97 codec device is used. 322 However, on most devices, an auxiliary AC97 codec device is used.
317 The AC97 device may have several different inputs and outputs, 323 The AC97 device may have several different inputs and outputs,
@@ -601,9 +607,8 @@ struct em28xx {
601 unsigned int is_em25xx:1; /* em25xx/em276x/7x/8x family bridge */ 607 unsigned int is_em25xx:1; /* em25xx/em276x/7x/8x family bridge */
602 unsigned char disconnected:1; /* device has been diconnected */ 608 unsigned char disconnected:1; /* device has been diconnected */
603 unsigned int has_video:1; 609 unsigned int has_video:1;
604 unsigned int has_audio_class:1;
605 unsigned int has_alsa_audio:1;
606 unsigned int is_audio_only:1; 610 unsigned int is_audio_only:1;
611 enum em28xx_usb_audio_type usb_audio_type;
607 612
608 struct em28xx_board board; 613 struct em28xx_board board;
609 614