[alsa-devel] UCM list/set/get

pl bossart bossart.nospam at gmail.com
Fri Jan 28 18:36:47 CET 2011


I've been trying to figure out what exactly needs to be filled in UCM
configuration files, and so far it's been a pretty frustrating
experience with alsa-utils/alsaucm :-(

The interactive mode in alsa-utils/alsaucm is broken, I fixed a couple
of segfaults and bad output (patches attached), but so far the only
thing I can do is list the verbs...It looks like
alsa-lib/include/use-case.h and alsa-utils/alsaucm are not aligned,
whenever I query with predefined identifiers alsaucm seg faults or
provides an error message that doesn't help much. This happens with
the latest code.

[ume at plb alsaucm]$ ./alsaucm listcards
  0: AudioPC
    this is my AudioPCI card
  1: SDP4430
    this is my SDP4430 card
  2: TestHDA
    A test HDA card
[ume at plb alsaucm]$ ./alsaucm -c AudioPCI list _verbs
  0: HiFi
    Play and record HiFi quality Music.
  1: Voice
    Full duplex low-power voice call

So far so good. Now the fun begins

[ume at plb alsaucm]$ ./alsaucm -c AudioPCI list _devices
./alsaucm: error failed to get list _devices: No such file or directory
[ume at plb alsaucm]$ ./alsaucm -c AudioPCI set _verb HiFi
ALSA lib main.c:1250:(set_verb_user) error: failed to initialize new
use case: HiFi
./alsaucm: error failed to set _verb=HiFi: No such device
[ume at plb alsaucm]$ ./alsaucm -c AudioPCI get _verb
./alsaucm: error failed to get _verb: No such file or directory

Likewise if the .conf file contains a cset in the default values, then
the parser fails (I took the example from src/ucm/parser.c).
Commenting out the cset is the only solution. What exactly is this
index supposed to mean?
SectionDefaults [
cdev "hw:AudioPCI"
cset "name='Master Playback Switch',index=2 1,1"
]

[ume at plb alsaucm]$ ./alsaucm -c AudioPCI list _verbs
ALSA lib main.c:302:(import_master_config) Unable to execute default sequence
ALSA lib main.c:637:(snd_use_case_mgr_open) error: failed to import
AudioPCI use case configuration -19
./alsaucm: error failed to open sound card AudioPCI: No such device

Ideally I'd like to write an interface between PulseAudio and UCM,
there are existing modules I can reuse to set voice or hifi modes,
depending on what the client roles are. But if I can't make the
examples work I don't think this is going to go anywhere.
-Pierre
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-ucm-make-verb-comments-optional.patch
Type: application/octet-stream
Size: 1269 bytes
Desc: not available
Url : http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20110128/d4affda8/attachment-0004.dll 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-alsaucm-fix-list-command-and-output.patch
Type: application/octet-stream
Size: 1352 bytes
Desc: not available
Url : http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20110128/d4affda8/attachment-0005.dll 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: AudioPCI.conf
Type: application/octet-stream
Size: 934 bytes
Desc: not available
Url : http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20110128/d4affda8/attachment-0006.dll 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hifi
Type: application/octet-stream
Size: 1138 bytes
Desc: not available
Url : http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20110128/d4affda8/attachment-0007.dll 


More information about the Alsa-devel mailing list