Re: [PATCH] Show sequencer sound card numer/PID via aconnect

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

 



Hi,

On Feb 13 2016 03:56, Martin Koegler wrote:
> From: Martin Koegler <martin.koegler@xxxxxxxxx>
> 
> Signed-off-by: Martin Koegler <martin.koegler@xxxxxxxxx>

The idea to print owner PID or card number is itself better to me, while
I think you should add some comments to describe your intension about
this patch, at least, for the other developers or users. Would you
please re-post this patch with your comments again?


Regards

Takashi Sakamoto

> ---
>  seq/aconnect/aconnect.c | 10 +++++++++-
>  1 file changed, 9 insertions(+), 1 deletion(-)
> 
> diff --git a/seq/aconnect/aconnect.c b/seq/aconnect/aconnect.c
> index 8d6cebb..3508e1b 100644
> --- a/seq/aconnect/aconnect.c
> +++ b/seq/aconnect/aconnect.c
> @@ -166,11 +166,19 @@ static void print_port(snd_seq_t *seq, snd_seq_client_info_t *cinfo,
>  		       snd_seq_port_info_t *pinfo, int count)
>  {
>  	if (! count) {
> -		printf(_("client %d: '%s' [type=%s]\n"),
> +		printf(_("client %d: '%s' [type=%s"),
>  		       snd_seq_client_info_get_client(cinfo),
>  		       snd_seq_client_info_get_name(cinfo),
>  		       (snd_seq_client_info_get_type(cinfo) == SND_SEQ_USER_CLIENT ?
>  			_("user") : _("kernel")));
> +		int owner = snd_seq_client_info_get_owner(cinfo);
> +		if (owner != -1) {
> +			if (snd_seq_client_info_get_type(cinfo) == SND_SEQ_USER_CLIENT)
> +				printf(",pid=%d", owner);
> +			else
> +				printf(",card=%d", owner);
> +		}
> +		printf("]\n");
>  	}
>  	printf("  %3d '%-16s'\n",
>  	       snd_seq_port_info_get_port(pinfo),
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux