How to identify Alsa eLements?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi alsa-devel,

I'm programming a GUI for the mixer in my Focusrite Scarlett 6i6 interface. The Alsa driver supports that functionality, i.e. I can control the mixer using alsamixer, for example. Now I'm writing a Qt GUI for it.

I wonder how I can reliably identify a mixer control element (e.g. the master volume control). Each element has an ID (struct snd_ctl_elem_id), consisting of multiple elements:
- numid (seems to change at each boot)
- iface
- device
- subdevice
- name (is always constant)
- index
The docs says I can identify an element by the combination of name and index.

My questions:
1) Are name and index enough to identify an element?
2) How can I obtain the index? The name and numid are shown by 'amixer
   contents', for example.

Kind regards, Tanjeff




[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux