em28xx: clean up the audio variable mess
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest0 of 4 patches 0 repliesNew
Patches in v1 No applies recorded yet
None of the 4 patches the cover letter announces are in this archive.
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/4] em28xx: clean up the audio variable mess
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(-)
Signature · 1 line
1.8.4.5