mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2026-03-17 05:33:43 -04:00
UCM: comment fixes and fix myvalue initialization fix in add_values()
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
parent
ae0a44c628
commit
60397387ef
2 changed files with 30 additions and 20 deletions
|
|
@ -80,9 +80,10 @@ extern "C" {
|
||||||
*
|
*
|
||||||
* o Query the supported use case verbs, devices and modifiers for the machine.
|
* o Query the supported use case verbs, devices and modifiers for the machine.
|
||||||
* o Set and Get use case verbs, devices and modifiers for the machine.
|
* o Set and Get use case verbs, devices and modifiers for the machine.
|
||||||
* o Get the ALSA PCM playback and capture device PCMs for use case verb and
|
* o Get the ALSA PCM playback and capture device PCMs for use case verb,
|
||||||
|
* use case device and modifier.
|
||||||
|
* o Get the TQ parameter for each use case verb, use case device and
|
||||||
* modifier.
|
* modifier.
|
||||||
* o Get the TQ parameter for each use case verb and modifier.
|
|
||||||
* o Get the ALSA master playback and capture volume/switch kcontrols
|
* o Get the ALSA master playback and capture volume/switch kcontrols
|
||||||
* for each use case.
|
* for each use case.
|
||||||
*/
|
*/
|
||||||
|
|
@ -111,7 +112,7 @@ extern "C" {
|
||||||
* Use Case Device.
|
* Use Case Device.
|
||||||
*
|
*
|
||||||
* Physical system devices the render and capture audio. Devices can be OR'ed
|
* Physical system devices the render and capture audio. Devices can be OR'ed
|
||||||
* together to support audio on similtanious devices.
|
* together to support audio on simultaneous devices.
|
||||||
*/
|
*/
|
||||||
#define SND_USE_CASE_DEV_NONE "None"
|
#define SND_USE_CASE_DEV_NONE "None"
|
||||||
#define SND_USE_CASE_DEV_SPEAKER "Speaker"
|
#define SND_USE_CASE_DEV_SPEAKER "Speaker"
|
||||||
|
|
@ -135,13 +136,13 @@ extern "C" {
|
||||||
* e.g. to record a voice call :-
|
* e.g. to record a voice call :-
|
||||||
* 1. Set verb to SND_USE_CASE_VERB_VOICECALL (for voice call)
|
* 1. Set verb to SND_USE_CASE_VERB_VOICECALL (for voice call)
|
||||||
* 2. Set modifier SND_USE_CASE_MOD_CAPTURE_VOICE when capture required.
|
* 2. Set modifier SND_USE_CASE_MOD_CAPTURE_VOICE when capture required.
|
||||||
* 3. Call snd_use_case_get("_pcm_/_cdevice") to get ALSA source PCM name
|
* 3. Call snd_use_case_get("CapturePCM") to get ALSA source PCM name
|
||||||
* with captured voice pcm data.
|
* with captured voice pcm data.
|
||||||
*
|
*
|
||||||
* e.g. to play a ring tone when listenin to MP3 Music :-
|
* e.g. to play a ring tone when listenin to MP3 Music :-
|
||||||
* 1. Set verb to SND_USE_CASE_VERB_HIFI (for MP3 playback)
|
* 1. Set verb to SND_USE_CASE_VERB_HIFI (for MP3 playback)
|
||||||
* 2. Set modifier to SND_USE_CASE_MOD_PLAY_TONE when incoming call happens.
|
* 2. Set modifier to SND_USE_CASE_MOD_PLAY_TONE when incoming call happens.
|
||||||
* 3. Call snd_use_case_get("_pcm_/_pdevice") to get ALSA PCM sink name for
|
* 3. Call snd_use_case_get("PlaybackPCM") to get ALSA PCM sink name for
|
||||||
* ringtone pcm data.
|
* ringtone pcm data.
|
||||||
*/
|
*/
|
||||||
#define SND_USE_CASE_MOD_CAPTURE_VOICE "Capture Voice"
|
#define SND_USE_CASE_MOD_CAPTURE_VOICE "Capture Voice"
|
||||||
|
|
@ -221,21 +222,29 @@ int snd_use_case_get_list(snd_use_case_mgr_t *uc_mgr,
|
||||||
* deallocate this string.
|
* deallocate this string.
|
||||||
*
|
*
|
||||||
* Known identifiers:
|
* Known identifiers:
|
||||||
* NULL - return current card
|
* NULL - return current card
|
||||||
* _verb - return current verb
|
* _verb - return current verb
|
||||||
* TQ[/<modifier>] - Tone Quality [for given modifier]
|
*
|
||||||
* PlaybackPCM[/<modifier>] - full PCM playback device name
|
* <NAME>[/<modifier>|</device>]
|
||||||
* CapturePCM[/<modifier>] - full PCM capture device name
|
* - value identifier <NAME> for
|
||||||
* PlaybackCTL[/<modifier>] - playback control device name
|
* given modifier or device
|
||||||
* PlaybackVolume[/<modifier>] - playback control volume ID string
|
* - Examples: "PlaybackPCM/Play Music",
|
||||||
* PlaybackSwitch[/<modifier>] - playback control switch ID string
|
* "CapturePCM/SPDIF"
|
||||||
* CaptureCTL[/<modifier>] - capture control device name
|
*
|
||||||
* CaptureVolume[/<modifier>] - capture control volume ID string
|
* Recommended names for values:
|
||||||
* CaptureSwitch[/<modifier>] - capture control switch ID string
|
* TQ - Tone Quality
|
||||||
* PlaybackMixer[/<modifier>] - name of playback mixer
|
* PlaybackPCM - full PCM playback device name
|
||||||
* PlaybackMixerID[/<modifier>] - mixer playback ID
|
* CapturePCM - full PCM capture device name
|
||||||
* CaptureMixer[/<modifier>] - name of capture mixer
|
* PlaybackCTL - playback control device name
|
||||||
* CaptureMixerID[/<modifier>] - mixer capture ID
|
* PlaybackVolume - playback control volume ID string
|
||||||
|
* PlaybackSwitch - playback control switch ID string
|
||||||
|
* CaptureCTL - capture control device name
|
||||||
|
* CaptureVolume - capture control volume ID string
|
||||||
|
* CaptureSwitch - capture control switch ID string
|
||||||
|
* PlaybackMixer - name of playback mixer
|
||||||
|
* PlaybackMixerID - mixer playback ID
|
||||||
|
* CaptureMixer - name of capture mixer
|
||||||
|
* CaptureMixerID - mixer capture ID
|
||||||
*/
|
*/
|
||||||
int snd_use_case_get(snd_use_case_mgr_t *uc_mgr,
|
int snd_use_case_get(snd_use_case_mgr_t *uc_mgr,
|
||||||
const char *identifier,
|
const char *identifier,
|
||||||
|
|
|
||||||
|
|
@ -858,6 +858,7 @@ static int add_values(struct list_head *list,
|
||||||
val = malloc(sizeof(struct myvalue));
|
val = malloc(sizeof(struct myvalue));
|
||||||
if (val == NULL)
|
if (val == NULL)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
val->value = v->data;
|
||||||
list_add_tail(&val->list, list);
|
list_add_tail(&val->list, list);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue