From: GitHub issues - opened <github@alsa-project.org>
To: alsa-devel@alsa-project.org
Subject: alsaloop: link existing mixer controls
Date: Thu, 5 Jun 2025 16:47:53 +0200 (CEST) [thread overview]
Message-ID: <18462ce5eff6d900-webhooks-bot@alsa-project.org> (raw)
In-Reply-To: <18462ce5eff12900-webhooks-bot@alsa-project.org>
alsa-project/alsa-utils issue #303 was opened from bravl:
Hi,
I'm trying to link the volume controls of 2 soundcards together. We've got 2 souncards, an UAC2Gadget card and a custom soundcard. We use alsaloop to create the following setup:
```
UAC2Gadget record -> alsaloop -> Custom soundcard speaker out
Custom soundcard mic in -> alsaloop -> UAC2Gadget soundcard playback
```
For this the alsaloop.conf looks like
```
-P hw:CARD=customsoundcard,DEV=0 -C hw:CARD=UAC2Gadget,DEV=0 -S 5 -T 1"
-C hw:CARD=customsoundcard,DEV=1 -P hw:CARD=UAC2Gadget,DEV=0 -S 5 -T 2
```
This setup works perfectly. But we would like to control the volume of the custom soundcard's speaker out via the UAC2Gadgets' PCM Record volume.
The cards expose the following controls:
```sh
$ amixer -c1 controls #custom soundcard
numid=1,iface=MIXER,name='Master Volume'
numid=2,iface=MIXER,name='Speaker Volume'
$ amixer -c2 controls #UAC2Gadget
numid=3,iface=MIXER,name='PCM Playback Switch'
numid=4,iface=MIXER,name='PCM Playback Volume'
numid=6,iface=MIXER,name='PCM Capture Switch'
numid=7,iface=MIXER,name='PCM Capture Volume'
numid=1,iface=PCM,name='Capture Pitch 1000000'
numid=8,iface=PCM,name='Capture Rate'
numid=2,iface=PCM,name='Playback Pitch 1000000'
numid=5,iface=PCM,name='Playback Rate'
```
Adding `-m "name=Speaker Volume"` creates a new linked control to the UAC2Gadget card called "Speaker Volume" as expected.
Adding `-m "name=Speaker Volume"@name="PCM Capture Volume"` does not work. Resulting in:
```
Unable to create control '0,MIXER,0,0,PCM Capture Volume,0': Device or resource busy
playback hw:CARD=customsoundcard,DEV=0/capture hw:CARD=UAC2Gadget,DEV=0: Unable to remove control '0,MIXER,0,0,PCM Capture Volume,0': Invalid argument
```
Looking at the alsaloop code, it seems that this is expected behaviour because it's trying to remove a control which was created by the UAC2Gadget driver.
Is the above conclusion correct or is there a different way to allow alsaloop to sync 2 existing driver controls?
Thanks
Issue URL : https://github.com/alsa-project/alsa-utils/issues/303
Repository URL: https://github.com/alsa-project/alsa-utils
parent reply other threads:[~2025-06-05 14:48 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <18462ce5eff12900-webhooks-bot@alsa-project.org>]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=18462ce5eff6d900-webhooks-bot@alsa-project.org \
--to=github@alsa-project.org \
--cc=alsa-devel@alsa-project.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox