summaryrefslogtreecommitdiff
path: root/drivers/media/usb/em28xx/em28xx.h
diff options
context:
space:
mode:
authorFrank Schaefer <fschaefer.oss@googlemail.com>2014-09-13 08:52:20 (GMT)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2014-09-23 19:13:41 (GMT)
commitc5874208ff78a5180ef0456caa117704983f3a45 (patch)
tree48754c1457f1b8fbf786d6112c87f4d48531099c /drivers/media/usb/em28xx/em28xx.h
parent60a24ba03c5dcd51a754cb45e7d65753126f58ce (diff)
downloadlinux-c5874208ff78a5180ef0456caa117704983f3a45.tar.xz
[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 1f38163..3fd176f 100644
--- a/drivers/media/usb/em28xx/em28xx.h
+++ b/drivers/media/usb/em28xx/em28xx.h
@@ -312,6 +312,12 @@ struct em28xx_audio_mode {
unsigned int has_audio:1;
};
+enum em28xx_usb_audio_type {
+ EM28XX_USB_AUDIO_NONE = 0,
+ EM28XX_USB_AUDIO_CLASS,
+ EM28XX_USB_AUDIO_VENDOR,
+};
+
/* em28xx has two audio inputs: tuner and line in.
However, on most devices, an auxiliary AC97 codec device is used.
The AC97 device may have several different inputs and outputs,
@@ -601,9 +607,8 @@ struct em28xx {
unsigned int is_em25xx:1; /* em25xx/em276x/7x/8x family bridge */
unsigned char disconnected:1; /* device has been diconnected */
unsigned int has_video:1;
- unsigned int has_audio_class:1;
- unsigned int has_alsa_audio:1;
unsigned int is_audio_only:1;
+ enum em28xx_usb_audio_type usb_audio_type;
struct em28xx_board board;