unclear example how to use remap plugin

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

 



alsa-project/alsa-lib issue #441 was opened from dibalavs:

Hello. 

I combiled 3 sound cards into one vrurtual 5.1 card for PCM, and now trying to make volume control also to use single virtual device, to set up volume for all chanel of virtual 5.1 card.

 
I am trying to use remap control plugin mentioned at [source](https://github.com/alsa-project/alsa-lib/blob/master/src/control/control_remap.c#L1230)

But I unable to understand what does it mean:

```
ctl.name {
	type remap              # Remap controls
	child STR               # Child name
	# or
	child {                 # Child definition
		type STR
		...
	}
	remap {
		# the ID strings are parsed in the amixer style like 'name="Headphone Playback Switch",index=2'
		SRC_ID1_STR DST_ID1_STR
		SRC_ID2_STR DST_ID2_STR
		...
	}
	map {
		# join two stereo controls to one
		CREATE_ID1_STR {
			SRC_ID1_STR {
				vindex.0 0	# source channel 0 to merged channel 0
				vindex.1 1
			}
			SRC_ID2_STR {
				vindex.2 0
				vindex.3 1	# source channel 1 to merged channel 3
			}
		}
		# split stereo to mono
		CREATE_ID2_STR {
			SRC_ID3_STR {
				vindex.0 0	# stereo to mono (first channel)
			}
		}
		CREATE_ID3_STR {
			SRC_ID4_STR {
				vindex.0 1	# stereo to mono (second channel)
			}
		}
	}
}
```


I do not understand what should I write as SRC and DST?:

```
# the ID strings are parsed in the amixer style like 'name="Headphone Playback Switch",index=2'
SRC_ID1_STR DST_ID1_STR
SRC_ID2_STR DST_ID2_STR
```

Can you give real example without placeholders like: "name", "SRC", "DST", "STR" ?

Issue URL     : https://github.com/alsa-project/alsa-lib/issues/441
Repository URL: https://github.com/alsa-project/alsa-lib



[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