summaryrefslogtreecommitdiffstats
path: root/plugins/alsa/alsa-plug-vol.c
diff options
context:
space:
mode:
authorJan-Simon Moeller <jsmoeller@linuxfoundation.org>2019-01-18 15:12:37 +0000
committerGerrit Code Review <gerrit@automotivelinux.org>2019-01-18 15:12:37 +0000
commit17ad00443eecdb2ed7b92da01c7be6f316e04b64 (patch)
tree30344f5e729b9d20baf8d2a35b03555b88c36d68 /plugins/alsa/alsa-plug-vol.c
parente28d3210846d1984f8cda79f8b556a731690627d (diff)
parent67299f948f40afc2d506ba92e78d7066ea925485 (diff)
Merge "bluetooth sco: fixed the softvol open error"halibut_7.90.0halibut/7.90.0guppy_6.99.4guppy/6.99.47.90.06.99.4
Diffstat (limited to 'plugins/alsa/alsa-plug-vol.c')
-rw-r--r--plugins/alsa/alsa-plug-vol.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/alsa/alsa-plug-vol.c b/plugins/alsa/alsa-plug-vol.c
index 67400a5..09025c4 100644
--- a/plugins/alsa/alsa-plug-vol.c
+++ b/plugins/alsa/alsa-plug-vol.c
@@ -32,7 +32,7 @@ PUBLIC AlsaPcmCtlT *AlsaCreateSoftvol(SoftMixerT *mixer, AlsaStreamAudioT *strea
int error = 0;
AlsaPcmCtlT *pcmVol = NULL;
- AFB_ApiDebug(mixer->api, "%s create SOFTVOL on %s", __func__, slaveid);
+ AFB_ApiDebug(mixer->api, "%s create SOFTVOL on %s (nb channels=%d)", __func__, slaveid, stream->params->channels);
if (asprintf(&cardid, "softvol-%s", stream->uid) == -1) {
SOFTMIXER_NOMEM(mixer->api);
goto OnErrorExit;
@@ -70,6 +70,8 @@ PUBLIC AlsaPcmCtlT *AlsaCreateSoftvol(SoftMixerT *mixer, AlsaStreamAudioT *strea
error += snd_config_add(controlConfig, elemConfig);
error += snd_config_imake_integer(&elemConfig, "card", sndcard->cid.cardidx);
error += snd_config_add(controlConfig, elemConfig);
+ error += snd_config_imake_integer(&elemConfig, "count", stream->params->channels);
+ error += snd_config_add(controlConfig, elemConfig);
error += snd_config_add(streamConfig, controlConfig);
if (error) goto OnErrorExit;