alsa-project / alsa-lib

The Advanced Linux Sound Architecture (ALSA) - library
GNU Lesser General Public License v2.1
357 stars 176 forks source link

How to get mixer control index from UCM #248

Closed Zames-Chang closed 2 years ago

Zames-Chang commented 2 years ago

I use Corsair VOID ELITE USB Gaming Headset. However this headset have two same name control

$ amixer -c 1 scontrols
Simple mixer control 'Auto Gain Control',0
Simple mixer control 'Headset',0
Simple mixer control 'Headset',1

use command to change 'Headset',0 is actually not working. But change 'Headset',1 will work. I want write a UCM to indicate that when seeing this headset, choose the name 'Headset' with index 1 not index 0.

I have seen use-case.h recommended names for values, but I don't find a proper name to describe control index.

Is there any suggestion about how to write control index in UCM file?

perexg commented 2 years ago
PlaybackMixerElem "Headset,1"

or

PlaybackMixerElem "'Headset',1"

or

PlaybackMixerElem '"Headset",1'
Zames-Chang commented 2 years ago

Many Thanks