[PATCH 2/3] module-port-manager: Add new port manager module

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

 




On 2015-03-10 19:28, Alexander E. Patrakov wrote:
> 10.03.2015 19:05, David Henningsson wrote:
>> +PA_MODULE_USAGE("");
>
> No other module does this.

Ok.

>
>> +
>> +#define SAVE_INTERVAL (5 * PA_USEC_PER_SEC)
>
> Some modules use 5 seconds, some 10 seconds. Why the inconsistency?

Bikeshed? I don't know - if anyone has a strong preference or argument 
for one 5, 10 or another number, let me know.

>> +static void rplist_save(userdata *u, rplist *rl) {
>> +    pa_strbuf *buf;
>> +    pa_datum key, value;
>> +    rport *r;
>> +    unsigned idx;
>> +
>> +    pa_assert(u);
>> +    pa_assert(u->database);
>
> u->database is guaranteed to be non-NULL by an explicit "otherwise goto
> fail" logic in pa__init() and lack of other assignments. But well - I
> have nothing against obviously-true assertions :)
>
>> +    PA_DYNARRAY_FOREACH(r, rl->l, idx) {
>> +        if (r->port) {
>> +            //void *s = NULL;
>> +
>> +            if (r->port->available == PA_AVAILABLE_NO)
>> +                continue;
>> +
>> +            /* Disregard ports not completely set up */
>> +/*            s = rl->direction == PA_DIRECTION_INPUT ? (void *)
>> find_source_for_port(r->port) : (void *) find_sink_for_port(r->port);
>> +            if (s == NULL)
>> +                continue; */
>
> Why is the code commented out?

It should be removed completely, will do so for v2. I used it when I 
developed the patch, before the rplist_route could actually set ports up 
itself (and then route things to it).

-- 
David Henningsson, Canonical Ltd.
https://launchpad.net/~diwic


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

  Powered by Linux