[pulseaudio-tickets] [Bug 72523] New: Refactoring idea: change sink and source ownership from the card back end implementation to pa_card

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Mon Dec 9 06:55:53 PST 2013


https://bugs.freedesktop.org/show_bug.cgi?id=72523

          Priority: medium
            Bug ID: 72523
                CC: lennart at poettering.net
          Assignee: pulseaudio-bugs at lists.freedesktop.org
           Summary: Refactoring idea: change sink and source ownership
                    from the card back end implementation to pa_card
        QA Contact: pulseaudio-bugs at lists.freedesktop.org
          Severity: normal
    Classification: Unclassified
                OS: All
          Reporter: tanuk at iki.fi
          Hardware: Other
            Status: NEW
           Version: unspecified
         Component: core
           Product: PulseAudio

When a sink or source belongs to a card, I think it would be a good idea to
make pa_card the owner of the sink or source. This would mean that pa_card
would decide when to create and destroy sinks and sources (they would be
created at profile activation and destroyed at profile deactivation). I think
this would make a lot of sense conceptually, but I'm not whether the effects on
the back end complexity would be positive or negative (I would expect a
positive effect).

The unclear part is how to delegate the back end specific parts of the sink
initialization (and deinitialization) to the back end, if pa_sink_new() is
called from card.c. I don't think we currently have any similar object
initialization scheme in PA.

This idea occurred to me while implementing device prototypes. It's annoying
that card back ends need to explicitly link the device prototypes with the sink
or source whenever the back end creates a sink/source. It's only one line per
created sink/source, but still it feels like unnecessary boilerplate code. If
pa_card controlled the sink and source creation, the common code in card.c
could take care of hooking the sinks and sources to the corresponding device
prototype.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/pulseaudio-bugs/attachments/20131209/3c4b4718/attachment.html>


More information about the pulseaudio-bugs mailing list