[pulseaudio-discuss] [PATCH v3 0/6] Add default volume to ports

Tanu Kaskinen tanu.kaskinen at linux.intel.com
Tue May 5 07:08:04 PDT 2015


On Tue, 2015-05-05 at 17:31 +0500, Alexander E. Patrakov wrote:
> 27.04.2015 16:34, Tanu Kaskinen wrote:
> > Here's the third version of the patch set that aims to fix the Aureon
> > volume bug[1].
> >
> > Changes in v3:
> >   - Use pa_parse_volume() in pa_config_parse_volume().
> >   - Add mute and save_mute fields to
> >     pa_sink/source_port_changed_hook_data to make the mute handling
> >     symmetric with the volume handling.
> >
> > David suggested that I could share the volume parsing code also in
> > pactl, but that turned out to be difficult with pactl's relative
> > volume adjustments, so I didn't want to do that in this patch set, but
> > I plan to do that later.
> >
> > [1] https://bugs.freedesktop.org/show_bug.cgi?id=81777
> 
> I have tested the series. It works as described. However, the heuristic 
> that decides between 100% and 30% volume default could use some more 
> thinking.
> 
> On my new Rotel RA-1570 integrated amplifier, it defaulted to 30% 
> volume. Also, because the ALSA mixer does not expose any volume controls 
> on this card, PulseAudio applied those 30% in software. As this is a 
> high-end amplifier (as opposed to the originally-discussed Terratec 
> Aureon Dual USB card) and it has a hardware volume knob, I would object 
> to this default on my card.
> 
> So, maybe it is a good idea to apply the 30% default volume not on all 
> analog ports, but only on paths that have a volume control exposed in 
> ALSA mixer, plus some explicit exceptions (including the Terratec card)?

That sounds ok to me (I'm not volunteering to write the patch, however).
I'm not sure what would be the best approach to configuring it... Should
the analog path configuration files explicitly say that "I'm an analog
path", and the mixer code would then apply this heuristics to those
paths? Or should the mixer code just look at the path name, and infer
that it's an analog path if the name starts with "analog-"?

> Alsa-info here: 
> http://www.alsa-project.org/db/?f=45946d2958764b508773255a8ffffb1bf4e41ceb
> 
> P.S. PulseAudio also finds a bogus SPDIF output on the Rotel amplifier. 
> Maybe we need a whitelist, not a blacklist, here?

Can you elaborate, what kind of whitelist? Only create spdif profiles on
whitelisted products? If that's what you mean, I don't think it's a good
idea. It's a worse situation if we erroneously disable the spdif
capability on a sound card than if we erroneously enable it.

-- 
Tanu



More information about the pulseaudio-discuss mailing list