tinyalsa/tinyalsa — pull request #38 by dawagner (2014-04-22 13:32:06+00:00)
Title: Add a function to disambiguate duplicate control names

Control names are not unique and can be shared by multiple mixers controls.
When this happens, there is no way of accessing the mixer using its control
name, because mixer_get_ctl_by_name() always returns the first match. The only
way of accessing the mixer is through its control number, i.e. using
mixer_get_ctl().

This patch adds the function mixer_get_ctl_by_name_and_index() to offer the
possibility to retrieve a control through its name and index. This index
corresponds to the nth occurence of the control name in the global supported
controls names list.

Change-Id: Ie29bf2a949ecf69f106bbe359155cdbfbe98928c
Signed-off-by: Frédéric Boisnard
Signed-off-by: David Wagner
Signed-off-by: Bruce Beare
Signed-off-by: Jack Ren
Author-Tracking-BZ: 139255