ALSA Use Case Interface
The use case manager works by configuring the sound card ALSA kcontrols to change the hardware digital and analog audio routing to match the requested device use case. The use case manager kcontrol configurations are stored in easy to modify text files.
An audio use case can be defined by a verb and device parameter. The verb describes the use case action i.e. a phone call, listening to music, recording a conversation etc. The device describes the physical audio capture and playback hardware i.e. headphones, phone handset, bluetooth headset, etc.
It’s intended clients will mostly only need to set the use case verb and device for each system use case change (as the verb and device parameters cover most audio use cases).
However there are times when a use case has to be modified at runtime. e.g.
- Incoming phone call when the device is playing music
- Recording sections of a phone call
- Playing tones during a call.
In order to allow asynchronous runtime use case adaptations, we have a third optional modifier parameter that can be used to further configure the use case during live audio runtime.
This interface allows clients to :-
- Query the supported use case verbs, devices and modifiers for the machine.
- Set and Get use case verbs, devices and modifiers for the machine.
- Get the ALSA PCM playback and capture device PCMs for use case verb, use case device and modifier.
- Get the TQ parameter for each use case verb, use case device and modifier.
- Get the ALSA master playback and capture volume/switch kcontrols for each use case.