@@ -82,24 +82,45 @@ list-pcms
82
82
info *PCM_PATH *
83
83
Print the properties and available codecs of the given PCM.
84
84
The properties are printed one per line, in the format
85
- 'PropertyName: Value'. Values are presented in human-readable format - for
86
- example the Volume property is printed as:
85
+ "PropertyName: Value". Values are presented in human-readable format, and
86
+ for a property with multiple values they are printed as a space-separated
87
+ list.
88
+
89
+ The Volume property is presented as two lines; "Volume:" indicating
90
+ the loudness component of each channel and "Mute:" indicating the mute
91
+ component of each channel. Both components are presented with their channel
92
+ values in the same order as the ChannelMap. For example:
93
+ ::
94
+
95
+ ChannelMap: FC FL FR RL RR LFE
96
+ Volume: 127 127 127 127 127 127
97
+ Mute: off off off off off off
98
+
99
+ If the **--verbose ** option is given then "Available codecs:" values include
100
+ the codec capabilities as a hexadecimal string suffix, separated by a colon.
101
+ Similarly, the "Selected codec:" value includes the current codec
102
+ configuration as a hexadecimal string separated by a colon. For example:
103
+ ::
87
104
88
- ``Volume: 127 127 ``
105
+ Available codecs: SBC:ffff02fa AAC:c0ffff035b60
106
+ Selected codec: AAC:400084035b60
107
+
108
+ A tool such as ``a2dpconf `` can be used to decode the hex string.
89
109
90
110
The list of available A2DP codecs requires BlueZ SEP support
91
111
(BlueZ >= 5.52)
92
112
93
113
codec [-c NUM] [-r NUM] [--force] *PCM_PATH * [*CODEC *\ [:*CONFIG *]]
94
114
Get or set the Bluetooth codec used by the given PCM.
95
115
116
+ If *CODEC * is not given, print a list of additional codecs supported by the
117
+ given PCM and the currently selected codec. With the option **--verbose **
118
+ the codec capabilities and current configuration are shown in the same
119
+ format as for the **info ** command.
120
+
96
121
If *CODEC * is given, change the codec to be used by the given PCM. This
97
122
command will terminate the PCM if it is currently running.
98
123
99
- If *CODEC * is not given, print a list of additional codecs supported by the
100
- given PCM and the currently selected codec. The level of detail in the
101
- output depends on the verbosity level.
102
-
103
124
Optionally, for A2DP codecs, one can specify A2DP codec configuration which
104
125
should be selected. The *CONFIG * shall be given as a hexadecimal string. If
105
126
this parameter is omitted, BlueALSA will select default configuration based
@@ -112,6 +133,16 @@ codec [-c NUM] [-r NUM] [--force] *PCM_PATH* [*CODEC*\ [:*CONFIG*]]
112
133
the configuration. However, this may result in a non-working connection and
113
134
in the worst case it may crash remote Bluetooth device!
114
135
136
+ The options **-c NUM ** and **-r ~NUM ** may be used to select a specific
137
+ channel count and/or sample rate, provided that the given values are
138
+ supported by the codec. For example, if the device at path PCM_PATH
139
+ supports 5.1 surround sound and 96000 rate with the AAC codec, but is
140
+ currently configured as AAC with stereo at 48000, then the configuration
141
+ can be changed with:
142
+ ::
143
+
144
+ bluealsactl codec -c6 -r96000 PCM_PATH aac
145
+
115
146
Selecting an A2DP codec and listing available A2DP codecs requires BlueZ
116
147
SEP support (BlueZ >= 5.52).
117
148
@@ -123,23 +154,31 @@ codec [-c NUM] [-r NUM] [--force] *PCM_PATH* [*CODEC*\ [:*CONFIG*]]
123
154
Selecting the HFP codec when using oFono is not supported.
124
155
125
156
volume *PCM_PATH * [*VOLUME * [*VOLUME *]...]
126
- Get or set the volume value of the given PCM.
157
+ Get or set the volume loudness value(s) of the given PCM.
127
158
128
159
If *VOLUME * is given, set the loudness component of the volume property of
129
160
the given PCM.
130
161
131
162
If only one value *VOLUME * is given it is applied to all channels.
132
- For stereo (2-channel) PCMs the first value *VOLUME * is applied to channel
133
- 1 (Left), and the second value *VOLUME * is applied to channel 2 (Right).
163
+
164
+ For multi-channel PCMs, if multiple *VOLUME * values are given, then each
165
+ given value is applied to the corresponding channel of the ChannelMap (see
166
+ the **info ** command). If the number of values given is less than the
167
+ number of channels, then the remaining channels are set to the first given
168
+ value.
134
169
135
170
Valid A2DP values for *VOLUME * are 0-127, valid HFP/HSP values are 0-15.
136
171
172
+ Note that A2DP does not support independent channel volumes, so such a
173
+ setting is better suited to use with soft-volume enabled. See
174
+ ``bluealsad(8) `` for more details.
175
+
137
176
mute *PCM_PATH * [*STATE * [*STATE *]...]
138
177
Get or set the mute switch of the given PCM.
139
178
140
179
If *STATE * argument(s) are given, set mute component of the volume property
141
- of the given PCM. The second *STATE * argument is used for stereo PCMs as
142
- described for the **volume ** command.
180
+ of the given PCM. Multiple *STATE * arguments are used for multi-channel
181
+ PCMs as described for the **volume ** command.
143
182
144
183
The *STATE * value can be one of **on **, **yes **, **true **, **y ** or **1 **
145
184
for mute on, or **off **, **no **, **false **, **n ** or **0 ** for mute off.
@@ -207,12 +246,19 @@ monitor [-p[PROPS] | --properties[=PROPS]]
207
246
208
247
``PropertyChanged PCM_PATH PROPERTY_NAME VALUE ``
209
248
210
- Property names than can be monitored are **Codec **, **Running **,
249
+ Property names that can be monitored are **Codec **, **Running **,
211
250
**SoftVolume ** and **Volume **.
212
251
213
- The value for Volume is a hexadecimal 16-bit encoding where data for
214
- channel 1 is stored in the upper byte, channel 2 is stored in the lower
215
- byte. The highest bit of both bytes determines whether channel is muted.
252
+ Volume is an array of values, each showing the loudness and mute components
253
+ of a channel. The order of the values corresponds to the ChannelMap
254
+ property (see the **info ** command). The loudness is shown as a decimal
255
+ integer value, with an optional suffix ``[M] `` indicating that the channel
256
+ is muted. For example, for a 2-channel (stereo) A2DP PCM at path PCM_PATH
257
+ with both channels at full volume and the right channel muted, the event
258
+ would be displayed as:
259
+ ::
260
+
261
+ PropertyChanged PCM_PATH Volume 127 127[M]
216
262
217
263
*PROPS * is an optional comma-separated list of property names to be
218
264
monitored. If given, only changes to those properties listed will be
0 commit comments