linux/drivers/media/usb/em28xx
Frank Schaefer 920f1e4a52 [media] em28xx: get rid of field has_audio in struct em28xx_audio_mode
Field has_audio in struct em28xx_audio_mode is used together with value
EM28XX_NO_AC97 of field ac97 to determine the internal type of audio
(none/i2s/ac97). This makes the code difficult to understand:

  !audio_mode.has_audio && audio_mode.ac97 == EM28XX_NO_AC97 => no audio
  !audio_mode.has_audio && audio_mode.ac97 != EM28XX_NO_AC97 => BUG
  audio_mode.has_audio  && audio_mode.ac97 == EM28XX_NO_AC97 => AC97 audio
  audio_mode.has_audio  && audio_mode.ac97 != EM28XX_NO_AC97 => I2S audio

Simplify the whole thing by introducing an enum em28xx_int_audio_type
which describes the internal audio type (none, ac97, i2s) and is hooked
directly to the device struct. Then get rid of field has_audio in struct
em28xx_audio_mode.

A follow-up patch will then remove struct em28xx_ac97_mode and finally
the whole struct em28xx_audio_mode.

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-23 16:13:42 -03:00
..
em28xx-audio.c [media] em28xx: simplify usb audio class handling 2014-09-23 16:13:41 -03:00
em28xx-camera.c [media] em28xx-v4l: simplify some pointers in em28xx_init_camera() 2014-07-26 16:42:28 -03:00
em28xx-cards.c [media] em28xx: simplify usb audio class handling 2014-09-23 16:13:41 -03:00
em28xx-core.c [media] em28xx: get rid of field has_audio in struct em28xx_audio_mode 2014-09-23 16:13:42 -03:00
em28xx-dvb.c [media] em28xx: convert tda18212 tuner to I2C client 2014-09-21 19:59:57 -03:00
em28xx-i2c.c [media] media: em28xx - fix i2c_xfer to return -ENODEV when dev is removed 2014-07-26 11:15:17 -03:00
em28xx-input.c [media] em28xx-input: i2c IR decoders: improve i2c_client handling 2014-09-22 17:29:06 -03:00
em28xx-reg.h [media] em28xx: fix I2S audio sample rate definitions and info output 2014-01-07 08:33:29 -02:00
em28xx-v4l.h [media] vb2: stop_streaming should return void 2014-04-23 10:12:51 -03:00
em28xx-vbi.c [media] em28xx: Get rid of some unused modprobe parameters at vbi code 2014-09-21 21:06:44 -03:00
em28xx-video.c [media] em28xx: get rid of field has_audio in struct em28xx_audio_mode 2014-09-23 16:13:42 -03:00
em28xx.h [media] em28xx: get rid of field has_audio in struct em28xx_audio_mode 2014-09-23 16:13:42 -03:00
Kconfig [media] em28xx: add [2013:025f] PCTV tripleStick (292e) 2014-04-23 09:51:31 -03:00
Makefile [media] em28xx: make em28xx-video to be a separate module 2014-01-07 05:09:26 -02:00