The audio variables in em28xx are a big mess:
- many have misleading names
- some are completely unnecessary
- some duplicate in parts or even completely the meaning of others
- some device features are described by combinations of multiple variables,
  which makes the code difficult to understand and allows inconsistencies

So clean up the em28xx audio variables:
- Patch 1 removes 3 unneeded audio variables.
- Patch 2 replaces the variables "has_alsa_audio" and "has_audio_class" with a 
  single enum variable describing the type of usb audio (no usb audio / audio 
class / vendor).
- Patches 3+4 replace the variables "has_audio" and "ac97" of struct 
em28xx_audio_mode
  with a single enum variable describing the type of internal audio connection 
(none / ac97 / i2s).
  Variable "audio_mode" is finally removed together with the obsolete structs 
  "em28xx_audio_mode" and "em28xx_ac97_mode".

This simplifies the audio code a lot, making it much more self-explaining and 
easier to understand.
It will hopefully reduce the risk of audio regression in the future.


Frank Schäfer (4):
  em28xx: remove some unnecessary fields from struct em28xx_audio_mode
  em28xx: simplify usb audio class handling
  em28xx: get rid of field has_audio in struct em28xx_audio_mode
  em28xx: get rid of structs em28xx_ac97_mode and em28xx_audio_mode

 drivers/media/usb/em28xx/em28xx-audio.c | 10 ++---
 drivers/media/usb/em28xx/em28xx-cards.c | 30 +++++++-------
 drivers/media/usb/em28xx/em28xx-core.c  | 72 +++++++++++----------------------
 drivers/media/usb/em28xx/em28xx-video.c |  8 ++--
 drivers/media/usb/em28xx/em28xx.h       | 28 +++++--------
 5 files changed, 59 insertions(+), 89 deletions(-)

-- 
1.8.4.5

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to