OSDN Git Service
mixer: simple - Unify simple_none: base_len() exception handling
Unify simple_none: base_len() exception handling:
1. In the "Input Source" and "3D Control" cases the base-name is the same
as the full-name and base_len() simply returns strlen(name).
Instead of returning 0 when the type is unknown, set the type to
CTL_SINGLE and return strlen(name). This allows removing the special
case for base_len() returning 0 in simple_event_add().
2. Move the special handling for "Capture Volume" and "Capture Switch"
from simple_event_add() to base_len(), so that we handle all exceptions
inside base_len(). Instead of handling some special cases in base_len()
and other special cases in simple_event_add().
[jk - moved the "Capture Volume" and "Capture Switch" to "Input Source"
exceptions]
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>