[alsa-devel] [PATCH - alsa-lib 1/1] Introduce snd_seq_client_info_get_card_number, for getting the card number of a seq client on recent kernels

Adam Goode agoode at google.com
Wed Jun 10 19:09:05 CEST 2015


On Wed, Jun 10, 2015 at 6:35 AM, Takashi Iwai <tiwai at suse.de> wrote:

> At Fri, 05 Jun 2015 08:50:45 +0200,
> Clemens Ladisch wrote:
> >
> > Adam Goode wrote:
> > >  /**
> > > + * \brief Get the card number of a client_info container
> > > + * \param info client_info container
> > > + * \return the card number, -1 if no card associated with this
> client, or -ENOSYS if the
> > > + *         kernel does not support reporting this field
> > > + */
> >
> > -1 is used as an out-of-range value when enumerating cards.  However,
> > I don't think this convention can be applied here, because the return
> > value is also used for error codes, and -1 would correspond to -EPERM.
> >
> > Squashing all error codes into -1 is not a good idea, so I think the
> > value -1 should be converted into an appropriate error code, probably
> > -ENXIO.
>
> Agreed.
>
> Also, please don't include irrelevant changes in configure.ac.
>
>
> thanks,
>
> Takashi
>


Thanks for the feedback, I should have time this week to get back to you.


Adam


More information about the Alsa-devel mailing list