alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Martin Koegler <martin.koegler@chello.at>
To: Adam Goode <agoode@google.com>
Cc: alsa-devel@alsa-project.org, patch@alsa-project.org,
	martin.koegler@chello.at
Subject: Re: [PATCH - aconnect 1/1] Fix aconnect printing card and pid on older kernels
Date: Fri, 1 Apr 2016 23:28:05 +0200	[thread overview]
Message-ID: <20160401212805.GB20661@mail.zuhause> (raw)
In-Reply-To: <1459532101-6582-1-git-send-email-agoode@google.com>

On Fri, Apr 01, 2016 at 01:35:01PM -0400, Adam Goode wrote:
> alsa-lib is changed to return a distinct negative value if running on
> an older kernel. -1 is only returned now if the kernel knows for sure
> that there is no card or pid. On older kernels, alsa-lib will return
> -ENOSYS.
> 

Shouldn't we also update the default values of card/pid to -ENOSYS to be more consistent:
                int card = -1, pid = -1;

> @@ -177,13 +177,13 @@ static void print_port(snd_seq_t *seq, snd_seq_client_info_t *cinfo,
>  #ifdef HAVE_SEQ_CLIENT_INFO_GET_CARD
>  		card = snd_seq_client_info_get_card(cinfo);
>  #endif
> -		if (card != -1)
> +		if (card >= 0)
>  			printf(",card=%d", card);

aconnect from alsa-utils 1.1.1 will break with alsa-lib containing your patch.

The new API is propably not yet widely used, so I think that a ABI change can still be possible.
But in that case, alsa-lib/alsa-utils 1.1.1 need quickly be replaced by new releases, so that people
don't start using the old API.

Regards,
Martin

      reply	other threads:[~2016-04-01 21:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-01 17:35 [PATCH - aconnect 1/1] Fix aconnect printing card and pid on older kernels Adam Goode
2016-04-01 21:28 ` Martin Koegler [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160401212805.GB20661@mail.zuhause \
    --to=martin.koegler@chello.at \
    --cc=agoode@google.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=patch@alsa-project.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).