alsa/0004-UCM-comment-fixes-and-fix-myvalue-initialization-fix.patch
Takashi Iwai ccef10ef6c Accepting request 72599 from home:tiwai:branches:multimedia:libs
- Backport alsa-lib fixes from upstream:
  0001-Fix-alsa-lib-to-regard-3D-control-Depth-as-Playback-.patch
  0002-alsa-lib-add-LaCie-Firewire-Speakers-Griffin-FireWav.patch
  0003-alsa-lib-ucm-allow-values-to-be-read-from-devices.patch
  0004-UCM-comment-fixes-and-fix-myvalue-initialization-fix.patch
  0005-UCM-Fix-empty-get_list-initialize-returned-pointer-t.patch
  0006-Conf-Fix-channels-of-ICE1712-to-10-12.patch
  0007-UCM-Fix-LGPL-licence-how-to-receive-part-referred-GP.patch
  0008-configure-Fail-when-the-user-attempts-to-compile-sha.patch
  0009-Mark-Heaphone-Center-LFE-control-of-emu10k1-conf-as-.patch
  0010-Fix-typo-in-comment-in-surround71.conf.patch
  0011-test-latency-print-error-message-when-2-periods-per-.patch
  0012-EMU10K1.conf-Don-t-lock-hook-controls.patch
  0013-HDA-Intel.conf-Fix-low-mic-volume-due-to-pulseaudio-.patch
  0014-alsa-lib-fixed-coverity-reported-issues-under-FORWAR.patch
  0015-Fix-compile-warnings.patch
  0016-Fix-printf-for-size_t.patch
  0018-UCM-fix-memory-leak-when-executing-cset-commands.patch
  0019-Specficy-subdevice-0-for-front-surround-of-HDA-Intel.patch
  0020-emu10k1.conf-Fix-no-sound-problem-when-using-SB-Live.patch
  0021-ctlparse-Respect-softfloat-configure-option.patch
  0022-UCM-Fix-typo-in-error-message.patch
  0023-UCM-Fix-deadlock-following-failed-get-_verb.patch

OBS-URL: https://build.opensuse.org/request/show/72599
OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/alsa?expand=0&rev=80
2011-06-03 12:51:39 +00:00

115 lines
4.8 KiB
Diff

From 60397387eff7d8492df59d7a63a303f98e61b391 Mon Sep 17 00:00:00 2001
From: Jaroslav Kysela <perex@perex.cz>
Date: Sat, 19 Mar 2011 00:54:43 +0100
Subject: [PATCH 04/23] UCM: comment fixes and fix myvalue initialization fix
in add_values()
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
---
include/use-case.h | 49 +++++++++++++++++++++++++++++--------------------
src/ucm/main.c | 1 +
2 files changed, 30 insertions(+), 20 deletions(-)
diff --git a/include/use-case.h b/include/use-case.h
index f577628..cb3176e 100644
--- a/include/use-case.h
+++ b/include/use-case.h
@@ -80,9 +80,10 @@ extern "C" {
*
* 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 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.
- * o Get the TQ parameter for each use case verb and modifier.
* o Get the ALSA master playback and capture volume/switch kcontrols
* for each use case.
*/
@@ -111,7 +112,7 @@ extern "C" {
* Use Case Device.
*
* 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_SPEAKER "Speaker"
@@ -135,13 +136,13 @@ extern "C" {
* e.g. to record a 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.
- * 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.
*
* e.g. to play a ring tone when listenin to MP3 Music :-
* 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.
- * 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.
*/
#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.
*
* Known identifiers:
- * NULL - return current card
- * _verb - return current verb
- * TQ[/<modifier>] - Tone Quality [for given modifier]
- * PlaybackPCM[/<modifier>] - full PCM playback device name
- * CapturePCM[/<modifier>] - full PCM capture device name
- * PlaybackCTL[/<modifier>] - playback control device name
- * PlaybackVolume[/<modifier>] - playback control volume ID string
- * PlaybackSwitch[/<modifier>] - playback control switch ID string
- * CaptureCTL[/<modifier>] - capture control device name
- * CaptureVolume[/<modifier>] - capture control volume ID string
- * CaptureSwitch[/<modifier>] - capture control switch ID string
- * PlaybackMixer[/<modifier>] - name of playback mixer
- * PlaybackMixerID[/<modifier>] - mixer playback ID
- * CaptureMixer[/<modifier>] - name of capture mixer
- * CaptureMixerID[/<modifier>] - mixer capture ID
+ * NULL - return current card
+ * _verb - return current verb
+ *
+ * <NAME>[/<modifier>|</device>]
+ * - value identifier <NAME> for
+ * given modifier or device
+ * - Examples: "PlaybackPCM/Play Music",
+ * "CapturePCM/SPDIF"
+ *
+ * Recommended names for values:
+ * TQ - Tone Quality
+ * PlaybackPCM - full PCM playback device name
+ * CapturePCM - full PCM capture device name
+ * PlaybackCTL - playback control device name
+ * 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,
const char *identifier,
diff --git a/src/ucm/main.c b/src/ucm/main.c
index 88f8bf6..5de8170 100644
--- a/src/ucm/main.c
+++ b/src/ucm/main.c
@@ -858,6 +858,7 @@ static int add_values(struct list_head *list,
val = malloc(sizeof(struct myvalue));
if (val == NULL)
return -ENOMEM;
+ val->value = v->data;
list_add_tail(&val->list, list);
}
}
--
1.7.5.3