Peter Wurmsdobler wrote:
... Another control is called pmic_control_op_sw (.name = "Master Output Playback Volume") and appears in amixer as "Master Output" (in fact it is not a volume control but a switch).
Then I'd guess its name should be "Master Playback Switch". See Documentation/sound/alsa/ControlNames.txt.
What is the ioctl request code for a particular snd_kcontrol_new_t defined in the driver?
ALSA controls do not have separate ioctl codes. Controls are identified by their name (or by their ID, which is a number that ALSA assigns automatically). There is one ioctl request that writes the value of a control and which gets the control ID as parameter.
Alternatively, how does the OSS layer in ALSA map the different ALSA controls to the predefined and fixed OSS controls?
The OSS API has some predefined mixer controls that are identifed by a number or ioctl request. By default, ALSA maps these OSS controls to certain ALSA control names; see section "Mixer Elements" in Documentation/sound/alsa/OSS-Emulation.txt.
HTH Clemens