Re: [RFC PATCH 1/4] card: New API pa_card_profile_has_available_ports

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

 



On Wed, Oct 3, 2018 at 2:36 AM Tanu Kaskinen <tanuk@xxxxxx> wrote:
>
> On Tue, 2018-08-07 at 22:00 -0700, João Paulo Rechi Vita wrote:
> > New function to check if a card has any ports with a certain
> > availability for a specific direction.
> >
> > This was built uppon previous work by Mario Sanchez Prada.
> > ---
> >  src/pulsecore/card.c | 18 ++++++++++++++++++
> >  src/pulsecore/card.h |  3 +++
> >  2 files changed, 21 insertions(+)
> >
> > diff --git a/src/pulsecore/card.c b/src/pulsecore/card.c
> > index c785f00a7..a3c732341 100644
> > --- a/src/pulsecore/card.c
> > +++ b/src/pulsecore/card.c
> > @@ -79,6 +79,24 @@ void pa_card_profile_set_available(pa_card_profile *c, pa_available_t available)
> >      pa_hook_fire(&core->hooks[PA_CORE_HOOK_CARD_PROFILE_AVAILABLE_CHANGED], c);
> >  }
> >
> > +bool pa_card_profile_has_available_ports(pa_card_profile *c, pa_direction_t direction, pa_available_t available) {
>
> I think pa_card_profile_has_ports_with_availability() would be a better
> name, because the function can return false even if the profile has
> available ports, which is confusing with the current name.
>
> Nitpicking: I'd prefer "cp" (or "profile") as the card profile variable
> name, because I associate "c" with pa_card, so reading "c->name" caused
> slight confusion for me.
>

Agreed, I'm going to resubmit this as a gitlab MR (which IIUC is now
the preferred way for patch submissions and CR).

Thanks,

--
João Paulo Rechi Vita
http://about.me/jprvita
_______________________________________________
pulseaudio-discuss mailing list
pulseaudio-discuss@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss




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

  Powered by Linux