Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* How to identify Alsa eLements?
@ 2020-07-02 20:05 Tanjeff Moos
  2020-07-03  0:34 ` Takashi Sakamoto
  0 siblings, 1 reply; 5+ messages in thread
From: Tanjeff Moos @ 2020-07-02 20:05 UTC (permalink / raw)
  To: alsa-devel

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-07-03  8:54 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-07-02 20:05 How to identify Alsa eLements? Tanjeff Moos
2020-07-03  0:34 ` Takashi Sakamoto
2020-07-03  0:48   ` Takashi Sakamoto
2020-07-03  6:16   ` Tanjeff Moos
2020-07-03  8:53     ` Takashi Sakamoto

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox