[alsa-devel] What's the deal with elements?
Borg Onion
borg.onion at gmail.com
Wed Nov 23 05:44:03 CET 2011
Hi,
Still writing some basic ALSA software, trying to get to know the API. I
wrote some software to list cards and their properties, with output like
this:
$ ./list
Card #0: id=ICH6, driver=ICH4, name=Intel ICH6, longname=Intel ICH6 with
AD1981B at irq 17, mixername=Analog Devices AD1981B,
components=AC97a:41445374
Element used = 0, count = 28
Power state = D0
CTL type = Kernel level CTL
Card #1: id=Device, driver=USB-Audio, name=C-Media USB Audio Device,
longname=C-Media USB Audio Device at usb-0000:00:1d.0-1, full speed,
mixername=USB Mixer, components=USB0d8c:0008
Element used = 0, count = 7
Power state = D0
CTL type = Kernel level CTL
No more cards!
Whenever I try to access the elements by their index though, I get errors.
What's the meaning of "used" vs. "count"? What are these elements used
for? I would assume to discover what devices are on a card, but I could be
wrong. How does one do device discovery?
Thanks,
--BO
More information about the Alsa-devel
mailing list