[alsa-devel] [PATCH - aconnect 1/1] Fix aconnect printing card and pid on older kernels
Martin Koegler
martin.koegler at chello.at
Fri Apr 1 23:28:05 CEST 2016
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
More information about the Alsa-devel
mailing list