Add a way to override priority of sinks - mostly for module-combine-sinks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Thu, 1 Jun 2017, at 07:20 AM, Tanu Kaskinen wrote:
> On Fri, 2017-05-26 at 06:41 -0700, Myst Fox wrote:
> > This is a bit hard to describe. I'd really like to see a way to manually
> > set priorities on sinks. I recently got a portable DAC, and I wanted to
> > use it when plugged in and fall back on module-combine-sink otherwise -
> > mostly because I often use a program that cannot handle changing sinks.
> > This however means I needed my priorities to be correctly ordered. After
> > fixing the identification of my DAC on the udev side, and switching to
> > running a git build to have recent fixes like
> > https://bugs.freedesktop.org/show_bug.cgi?id=99222, I ran into that I
> > wanted the module-combine-sink sink to be above my internal card but
> > below my DAC. I solved this for now with `load-module
> > module-combine-sink sink_properties='device.class="sound"
> > device.form_factor="speaker"'
> > `, but that's faking out the priority setting to get the right order,
> > not doing it any sort of "right".
> > 
> > I'm imagining adding a proplist entry of some naming that lets you
> > outright set the priority, and there would be a check at the start of
> > pa_device_init_priority in sink.c that would outright set the priority
> > if it was a valid value. I'd like to know, though, how that sounds, what
> > people think, ideas about the name, if there's anything big I might be
> > missing, before I try to work on a patch.
> 
> I wouldn't mind making it possible to configure the sink priority. I
> don't really like using the property list for this, though. pa_sink
> already has a priority field, duplicating the same information in the
> property list doesn't seem like a good thing. module-combine-sink could
> take a separate sink_priority argument and use that to override the
> default priority after the pa_sink_new() call.
> 
> I'm cc'ing Arun, because we recently had a discussion[1] about maybe
> removing sink priorities altogether and prioritizing sinks only based
> on the active port priority. That would break this use case, so I think
> it's best to keep the sink priorities.

Which sounds okay to me. :-)

-- Arun

> [1]
> https://lists.freedesktop.org/archives/pulseaudio-discuss/2017-February/027493.html
> 
> -- 
> Tanu
> 
> https://www.patreon.com/tanuk


[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux