[pulseaudio-discuss] Toggling hardware volume for a card or port in pavucontrol

Tanu Kaskinen tanuk at iki.fi
Fri Jan 15 09:52:56 PST 2016


On Wed, 2016-01-13 at 16:19 +0200, Tanu Kaskinen wrote:
> Hi,
> 
> Related to previous discussions[1][2][3] about dealing with volume on
> certain type of usb sound cards, I'd like to make it possible to enable
> and disable hardware volume for individual cards and/or ports in
> pavucontrol.
> 
> Here's the specific use case: the Terratec Aureon Dual USB sound card
> has a single output jack that can used in both analog and digital modes
> (there are other similar usb sound cards too). PulseAudio has no way to
> know which mode is in use. Hardware volume works only in the analog
> mode. Currently that means that PulseAudio's volume control has no
> effect in the digital mode, because PulseAudio controls a mixer element
> that doesn't do anything.
> 
> I want to disable hardware volume for that card by default, because
> that's the only safe default. That reduces the audio quality a bit,
> however, so it would be good to allow concerned users to enable
> hardware volume for the card without too much hassle.
> 
> I'd like some feedback to guide the design:
> 
> 0) Is this feature worth the maintenance burden the new code causes, or
> should I just forget about this? (My answer: it's worth doing.)
> 
> 1) Should the client API be specific to alsa, or should it be added to
> the core interface? A third option exists too: don't make it specific
> to alsa, but implement the client API in a module with a protocol
> extension, and hook to the new module from alsa code. (My answer:
> core.)

Arun commented in IRC that another alternative would be to use the
"configuration system"[1] that Arun would like to implement. Although I
had some reservations at first, I now think that the proposed
configuration system fits this use case well, so I have nothing against
doing the hardware volume toggle implementation that way. The recent
discussion about the configuration system has been only between Arun
and me in IRC, however, so it may be that others disagree about the
desirability of the new system. Feedback about that, too, would be very
welcome.

[1] https://wiki.freedesktop.org/www/Software/PulseAudio/Documentation/Developer/ConfigurationSystem/

-- 
Tanu


More information about the pulseaudio-discuss mailing list